From 13c3f440947b7db60ff03a4607c7df13a7444b06 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 26 Feb 2025 04:52:54 +0000 Subject: [PATCH] CodeGen from PR 32609 in Azure/azure-rest-api-specs Merge dd3aa43a2f65599bbe484dd65f3a911af72656e5 into 5eebf11c2c98feded3199df1a68ccf6d2c626d63 --- sdk/resourcemanager/ci.mgmt.yml | 4 +- .../api/Azure.ResourceManager.Sql.net8.0.cs | 468 +++++- ...zure.ResourceManager.Sql.netstandard2.0.cs | 468 +++++- ..._DistributedAvailabilityGroupCollection.cs | 78 +- ...le_DistributedAvailabilityGroupResource.cs | 78 +- .../Samples/Sample_InstancePoolResource.cs | 8 +- .../Sample_ManagedInstanceCollection.cs | 143 +- .../Samples/Sample_ManagedInstanceResource.cs | 122 +- .../Sample_SubscriptionResourceExtensions.cs | 72 +- .../src/Generated/ArmSqlModelFactory.cs | 1408 +++++++++-------- .../DistributedAvailabilityGroupCollection.cs | 20 +- ...utedAvailabilityGroupData.Serialization.cs | 356 +++-- .../DistributedAvailabilityGroupData.cs | 102 +- .../DistributedAvailabilityGroupResource.cs | 197 ++- .../Extensions/MockableSqlArmClient.cs | 48 +- .../MockableSqlResourceGroupResource.cs | 142 +- .../MockableSqlSubscriptionResource.cs | 132 +- .../src/Generated/Extensions/SqlExtensions.cs | 406 ++--- .../src/Generated/InstancePoolResource.cs | 4 +- ...eStatusOperationResultMIOperationSource.cs | 30 + .../Generated/ManagedInstanceCollection.cs | 20 +- .../ManagedInstanceData.Serialization.cs | 351 +++- .../src/Generated/ManagedInstanceData.cs | 63 +- .../src/Generated/ManagedInstanceResource.cs | 290 ++-- .../Models/AuthMetadataLookupMode.cs | 54 + .../Models/CertificateInfo.Serialization.cs | 201 +++ .../src/Generated/Models/CertificateInfo.cs | 71 + ...AvailabilityGroupDatabase.Serialization.cs | 829 ++++++++++ .../DistributedAvailabilityGroupDatabase.cs | 166 ++ ...ributedAvailabilityGroupReplicationMode.cs | 51 - ...dAvailabilityGroupSetRole.Serialization.cs | 134 ++ .../DistributedAvailabilityGroupSetRole.cs | 80 + ...lityGroupsFailoverContent.Serialization.cs | 126 ++ ...ibutedAvailabilityGroupsFailoverContent.cs | 73 + .../src/Generated/Models/FailoverModeType.cs | 51 + .../src/Generated/Models/FailoverType.cs | 51 + .../src/Generated/Models/FreemiumType.cs | 51 + .../Generated/Models/HybridSecondaryUsage.cs | 51 + .../Models/HybridSecondaryUsageDetected.cs | 51 + .../src/Generated/Models/InstanceRole.cs | 51 + .../src/Generated/Models/LinkRole.cs | 51 + .../Models/ManagedInstanceDatabaseFormat.cs | 51 + .../ManagedInstancePatch.Serialization.cs | 176 ++- .../Generated/Models/ManagedInstancePatch.cs | 63 +- ...agedInstancePropertiesProvisioningState.cs | 90 -- ...tricIntervalAutoGenerated.Serialization.cs | 279 ++++ .../QueryMetricIntervalAutoGenerated.cs | 82 + ...QueryStatisticsProperties.Serialization.cs | 8 +- .../Models/QueryStatisticsProperties.cs | 6 +- ...ceStatusOperationResultMI.Serialization.cs | 433 +++++ ...ternalGovernanceStatusOperationResultMI.cs | 97 ++ .../Generated/Models/ReplicaConnectedState.cs | 51 + .../Models/ReplicaSynchronizationHealth.cs | 54 + .../Generated/Models/ReplicationModeType.cs | 51 + .../src/Generated/Models/RoleChangeType.cs | 51 + .../src/Generated/Models/SeedingModeType.cs | 51 + ...ributedAvailabilityGroupsRestOperations.cs | 207 ++- .../ManagedInstancesRestOperations.cs | 94 +- .../Azure.ResourceManager.Sql/src/autorest.md | 2 +- 59 files changed, 7265 insertions(+), 1733 deletions(-) create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/RefreshExternalGovernanceStatusOperationResultMIOperationSource.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/AuthMetadataLookupMode.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.cs delete mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupReplicationMode.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverModeType.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverType.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreemiumType.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsage.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsageDetected.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstanceRole.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LinkRole.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceDatabaseFormat.cs delete mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaConnectedState.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaSynchronizationHealth.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationModeType.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RoleChangeType.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SeedingModeType.cs diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index d8bf790b5988..f28c28a5d39c 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -79,7 +79,6 @@ trigger: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -108,6 +107,7 @@ trigger: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto @@ -285,7 +285,6 @@ pr: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -314,6 +313,7 @@ pr: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs index 108720ecaccc..ae6d4ba9b00b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs @@ -297,16 +297,17 @@ protected DistributedAvailabilityGroupCollection() { } public partial class DistributedAvailabilityGroupData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DistributedAvailabilityGroupData() { } + public System.Collections.Generic.IList Databases { get { throw null; } } public System.Guid? DistributedAvailabilityGroupId { get { throw null; } } - public string LastHardenedLsn { get { throw null; } } - public string LinkState { get { throw null; } } - public string PrimaryAvailabilityGroupName { get { throw null; } set { } } - public Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode? ReplicationMode { get { throw null; } set { } } - public string SecondaryAvailabilityGroupName { get { throw null; } set { } } - public string SourceEndpoint { get { throw null; } set { } } - public System.Guid? SourceReplicaId { get { throw null; } } - public string TargetDatabase { get { throw null; } set { } } - public System.Guid? TargetReplicaId { get { throw null; } } + public string DistributedAvailabilityGroupName { get { throw null; } } + public Azure.ResourceManager.Sql.Models.FailoverModeType? FailoverMode { get { throw null; } set { } } + public string InstanceAvailabilityGroupName { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.LinkRole? InstanceLinkRole { get { throw null; } set { } } + public string PartnerAvailabilityGroupName { get { throw null; } set { } } + public string PartnerEndpoint { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.LinkRole? PartnerLinkRole { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ReplicationModeType? ReplicationMode { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.SeedingModeType? SeedingMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.DistributedAvailabilityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -323,8 +324,12 @@ protected DistributedAvailabilityGroupResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Failover(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> FailoverAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation SetRole(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetRoleAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.Sql.DistributedAvailabilityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.DistributedAvailabilityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1871,15 +1876,22 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public string AdministratorLogin { get { throw null; } set { } } public string AdministratorLoginPassword { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator Administrators { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? AuthenticationMetadata { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + public System.DateTimeOffset? CreateOn { get { throw null; } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? CurrentBackupStorageRedundancy { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? DatabaseFormat { get { throw null; } set { } } public string DnsZone { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public string DnsZonePartner { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? ExternalGovernanceStatus { get { throw null; } } public string FullyQualifiedDomainName { get { throw null; } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? HybridSecondaryUsage { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? HybridSecondaryUsageDetected { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier InstancePoolId { get { throw null; } set { } } + public bool? IsGeneralPurposeV2 { get { throw null; } set { } } public bool? IsPublicDataEndpointEnabled { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } @@ -1888,9 +1900,10 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier ManagedDnsZonePartner { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? ManagedInstanceCreateMode { get { throw null; } set { } } public string MinimalTlsVersion { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FreemiumType? PricingModel { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? ProxyOverride { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? RequestedBackupStorageRedundancy { get { throw null; } set { } } public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } @@ -1898,10 +1911,13 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Sql.Models.SqlSku Sku { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceManagedInstanceId { get { throw null; } set { } } public string State { get { throw null; } } + public int? StorageIOps { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } + public int? StorageThroughputMBps { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public string TimezoneId { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } + public string VirtualClusterId { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.ManagedInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2362,14 +2378,16 @@ protected ManagedInstanceResource() { } public virtual Azure.Pageable GetTopQueries(int? numberOfQueries = default(int?), string databases = null, string startTime = null, string endTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), Azure.ResourceManager.Sql.Models.AggregationFunctionType? aggregationFunction = default(Azure.ResourceManager.Sql.Models.AggregationFunctionType?), Azure.ResourceManager.Sql.Models.SqlMetricType? observationMetric = default(Azure.ResourceManager.Sql.Models.SqlMetricType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetTopQueriesAsync(Azure.ResourceManager.Sql.Models.ManagedInstanceResourceGetTopQueriesOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetTopQueriesAsync(int? numberOfQueries = default(int?), string databases = null, string startTime = null, string endTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), Azure.ResourceManager.Sql.Models.AggregationFunctionType? aggregationFunction = default(Azure.ResourceManager.Sql.Models.AggregationFunctionType?), Azure.ResourceManager.Sql.Models.SqlMetricType? observationMetric = default(Azure.ResourceManager.Sql.Models.SqlMetricType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RefreshStatus(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RefreshStatusAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.Sql.ManagedInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.ManagedInstanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7099,6 +7117,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.AutomaticTuningServerOptions AutomaticTuningServerOptions(Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeDesired? desiredState = default(Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeDesired?), Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeActual? actualState = default(Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeActual?), int? reasonCode = default(int?), Azure.ResourceManager.Sql.Models.AutomaticTuningServerReason? reasonDesc = default(Azure.ResourceManager.Sql.Models.AutomaticTuningServerReason?)) { throw null; } public static Azure.ResourceManager.Sql.Models.AutoPauseDelayTimeRange AutoPauseDelayTimeRange(int? minValue = default(int?), int? maxValue = default(int?), int? stepSize = default(int?), int? @default = default(int?), Azure.ResourceManager.Sql.Models.PauseDelayTimeUnit? unit = default(Azure.ResourceManager.Sql.Models.PauseDelayTimeUnit?), int? doNotPauseValue = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.BackupShortTermRetentionPolicyData BackupShortTermRetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? retentionDays = default(int?), Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours? diffBackupIntervalInHours = default(Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours?)) { throw null; } + public static Azure.ResourceManager.Sql.Models.CertificateInfo CertificateInfo(string certificateName = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.DatabaseAdvancedThreatProtectionData DatabaseAdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.DatabaseColumnData DatabaseColumnData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.SqlColumnDataType? columnType = default(Azure.ResourceManager.Sql.Models.SqlColumnDataType?), Azure.ResourceManager.Sql.Models.TableTemporalType? temporalType = default(Azure.ResourceManager.Sql.Models.TableTemporalType?), bool? isMemoryOptimized = default(bool?), bool? isComputed = default(bool?)) { throw null; } public static Azure.ResourceManager.Sql.Models.DatabaseExportDefinition DatabaseExportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType = default(Azure.ResourceManager.Sql.Models.StorageKeyType), string storageKey = null, System.Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, Azure.ResourceManager.Sql.Models.NetworkIsolationSettings networkIsolation = null) { throw null; } @@ -7116,7 +7135,8 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.DataMaskingRule DataMaskingRule(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, string aliasName = null, Azure.ResourceManager.Sql.Models.DataMaskingRuleState? ruleState = default(Azure.ResourceManager.Sql.Models.DataMaskingRuleState?), string schemaName = null, string tableName = null, string columnName = null, Azure.ResourceManager.Sql.Models.DataMaskingFunction? maskingFunction = default(Azure.ResourceManager.Sql.Models.DataMaskingFunction?), string numberFrom = null, string numberTo = null, string prefixSize = null, string suffixSize = null, string replacementString = null) { throw null; } public static Azure.ResourceManager.Sql.DataWarehouseUserActivityData DataWarehouseUserActivityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? activeQueriesCount = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.DeletedServerData DeletedServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string version = null, System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier originalId = null, string fullyQualifiedDomainName = null) { throw null; } - public static Azure.ResourceManager.Sql.DistributedAvailabilityGroupData DistributedAvailabilityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string targetDatabase = null, string sourceEndpoint = null, string primaryAvailabilityGroupName = null, string secondaryAvailabilityGroupName = null, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode? replicationMode = default(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode?), System.Guid? distributedAvailabilityGroupId = default(System.Guid?), System.Guid? sourceReplicaId = default(System.Guid?), System.Guid? targetReplicaId = default(System.Guid?), string linkState = null, string lastHardenedLsn = null) { throw null; } + public static Azure.ResourceManager.Sql.DistributedAvailabilityGroupData DistributedAvailabilityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string distributedAvailabilityGroupName = null, System.Guid? distributedAvailabilityGroupId = default(System.Guid?), Azure.ResourceManager.Sql.Models.ReplicationModeType? replicationMode = default(Azure.ResourceManager.Sql.Models.ReplicationModeType?), Azure.ResourceManager.Sql.Models.LinkRole? partnerLinkRole = default(Azure.ResourceManager.Sql.Models.LinkRole?), string partnerAvailabilityGroupName = null, string partnerEndpoint = null, Azure.ResourceManager.Sql.Models.LinkRole? instanceLinkRole = default(Azure.ResourceManager.Sql.Models.LinkRole?), string instanceAvailabilityGroupName = null, Azure.ResourceManager.Sql.Models.FailoverModeType? failoverMode = default(Azure.ResourceManager.Sql.Models.FailoverModeType?), Azure.ResourceManager.Sql.Models.SeedingModeType? seedingMode = default(Azure.ResourceManager.Sql.Models.SeedingModeType?), System.Collections.Generic.IEnumerable databases = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupDatabase DistributedAvailabilityGroupDatabase(string databaseName = null, System.Guid? instanceReplicaId = default(System.Guid?), System.Guid? partnerReplicaId = default(System.Guid?), string replicaState = null, string seedingProgress = null, Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth? synchronizationHealth = default(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth?), Azure.ResourceManager.Sql.Models.ReplicaConnectedState? connectedState = default(Azure.ResourceManager.Sql.Models.ReplicaConnectedState?), string lastReceivedLsn = null, System.DateTimeOffset? lastReceivedOn = default(System.DateTimeOffset?), string lastSentLsn = null, System.DateTimeOffset? lastSentOn = default(System.DateTimeOffset?), string lastCommitLsn = null, System.DateTimeOffset? lastCommitOn = default(System.DateTimeOffset?), string lastHardenedLsn = null, System.DateTimeOffset? lastHardenedOn = default(System.DateTimeOffset?), string lastBackupLsn = null, System.DateTimeOffset? lastBackupOn = default(System.DateTimeOffset?), string mostRecentLinkError = null, Azure.ResourceManager.Sql.Models.CertificateInfo partnerAuthCertValidity = null, int? instanceSendReplicationLagSeconds = default(int?), int? instanceRedoReplicationLagSeconds = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.Models.EditionCapability EditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedServiceLevelObjectives = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.ReadScaleCapability readScale = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ElasticPoolActivity ElasticPoolActivity(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), int? errorCode = default(int?), string errorMessage = null, int? errorSeverity = default(int?), string operation = null, System.Guid? operationId = default(System.Guid?), int? percentComplete = default(int?), int? requestedDatabaseDtuMax = default(int?), int? requestedDatabaseDtuMin = default(int?), int? requestedDtu = default(int?), string requestedElasticPoolName = null, long? requestedStorageLimitInGB = default(long?), string elasticPoolName = null, string serverName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string state = null, int? requestedStorageLimitInMB = default(int?), int? requestedDatabaseDtuGuarantee = default(int?), int? requestedDatabaseDtuCap = default(int?), int? requestedDtuGuarantee = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.ElasticPoolData ElasticPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Sql.Models.SqlSku sku = null, string kind = null, Azure.ResourceManager.Sql.Models.ElasticPoolState? state = default(Azure.ResourceManager.Sql.Models.ElasticPoolState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), long? maxSizeBytes = default(long?), double? minCapacity = default(double?), Azure.ResourceManager.Sql.Models.ElasticPoolPerDatabaseSettings perDatabaseSettings = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType?), Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, int? highAvailabilityReplicaCount = default(int?), Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = default(Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType?), Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? availabilityZone = default(Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType?)) { throw null; } @@ -7167,7 +7187,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceAdministratorData ManagedInstanceAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType? administratorType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType?), string login = null, System.Guid? sid = default(System.Guid?), System.Guid? tenantId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAzureADOnlyAuthenticationData ManagedInstanceAzureADOnlyAuthenticationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureADOnlyAuthenticationEnabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), int? vCores = default(int?), int? storageSizeInGB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null) { throw null; } + public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, string virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.FreemiumType? pricingModel = default(Azure.ResourceManager.Sql.Models.FreemiumType?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceDtcData ManagedInstanceDtcData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? dtcEnabled = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceDtcSecuritySettings securitySettings = null, System.Collections.Generic.IEnumerable externalDnsSuffixSearchList = null, string dtcHostNameDnsSuffix = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceEditionCapability ManagedInstanceEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedFamilies = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceEncryptionProtectorData ManagedInstanceEncryptionProtectorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, string serverKeyName = null, Azure.ResourceManager.Sql.Models.SqlServerKeyType? serverKeyType = default(Azure.ResourceManager.Sql.Models.SqlServerKeyType?), System.Uri uri = null, string thumbprint = null, bool? isAutoRotationEnabled = default(bool?)) { throw null; } @@ -7181,7 +7201,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceOperationData ManagedInstanceOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string managedInstanceName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair operationParameters = null, Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps operationSteps = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair ManagedInstanceOperationParametersPair(Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters currentParameters = null, Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters requestedParameters = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps ManagedInstanceOperationSteps(string totalSteps = null, int? currentStep = default(int?), System.Collections.Generic.IEnumerable stepsList = null) { throw null; } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), int? vCores = default(int?), int? storageSizeInGB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, string virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.FreemiumType? pricingModel = default(Azure.ResourceManager.Sql.Models.FreemiumType?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePecProperty ManagedInstancePecProperty(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstancePrivateEndpointConnectionData ManagedInstancePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty connectionState = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties ManagedInstancePrivateEndpointConnectionProperties(Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = null, string provisioningState = null) { throw null; } @@ -7209,9 +7229,10 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.PrivateEndpointConnectionRequestStatus PrivateEndpointConnectionRequestStatus(Azure.Core.ResourceIdentifier privateLinkServiceId = null, string privateEndpointConnectionName = null, string status = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ProxyResourceWithWritableName ProxyResourceWithWritableName(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryMetricInterval QueryMetricInterval(string intervalStartTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? intervalType = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), long? executionCount = default(long?), System.Collections.Generic.IEnumerable metrics = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.QueryMetricIntervalAutoGenerated QueryMetricIntervalAutoGenerated(string intervalStartTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? intervalType = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), long? executionCount = default(long?), System.Collections.Generic.IEnumerable metrics = null) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryMetricProperties QueryMetricProperties(string name = null, string displayName = null, Azure.ResourceManager.Sql.Models.QueryMetricUnitType? unit = default(Azure.ResourceManager.Sql.Models.QueryMetricUnitType?), double? value = default(double?), double? min = default(double?), double? max = default(double?), double? avg = default(double?), double? sum = default(double?), double? stdev = default(double?)) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryStatistics QueryStatistics(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } - public static Azure.ResourceManager.Sql.Models.QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ReadScaleCapability ReadScaleCapability(int? maxNumberOfReplicas = default(int?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.RecommendedActionData RecommendedActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string recommendationReason = null, System.DateTimeOffset? validSince = default(System.DateTimeOffset?), System.DateTimeOffset? lastRefresh = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionStateInfo state = null, bool? isExecutableAction = default(bool?), bool? isRevertableAction = default(bool?), bool? isArchivedAction = default(bool?), System.DateTimeOffset? executeActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? executeActionDuration = default(System.TimeSpan?), System.DateTimeOffset? revertActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? revertActionDuration = default(System.TimeSpan?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? executeActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? executeActionInitiatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? revertActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? revertActionInitiatedOn = default(System.DateTimeOffset?), int? score = default(int?), Azure.ResourceManager.Sql.Models.RecommendedActionImplementationInfo implementationDetails = null, Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo errorDetails = null, System.Collections.Generic.IEnumerable estimatedImpact = null, System.Collections.Generic.IEnumerable observedImpact = null, System.Collections.Generic.IEnumerable timeSeries = null, System.Collections.Generic.IEnumerable linkedObjects = null, System.Collections.Generic.IReadOnlyDictionary details = null) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo RecommendedActionErrorInfo(string errorCode = null, Azure.ResourceManager.Sql.Models.ActionRetryableState? isRetryable = default(Azure.ResourceManager.Sql.Models.ActionRetryableState?)) { throw null; } @@ -7223,6 +7244,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.RecoverableDatabaseData RecoverableDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, System.DateTimeOffset? lastAvailableBackupOn = default(System.DateTimeOffset?), System.Collections.Generic.IDictionary keys = null) { throw null; } public static Azure.ResourceManager.Sql.RecoverableManagedDatabaseData RecoverableManagedDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string lastAvailableBackupDate = null) { throw null; } public static Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResult RefreshExternalGovernanceStatusOperationResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string queuedTime = null, string serverName = null, string status = null, string errorMessage = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResultMI RefreshExternalGovernanceStatusOperationResultMI(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string queuedTime = null, string managedInstanceName = null, string status = null, string errorMessage = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ResourceWithWritableName ResourceWithWritableName(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.Sql.RestorableDroppedDatabaseData RestorableDroppedDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Sql.Models.SqlSku sku = null, string databaseName = null, long? maxSizeBytes = default(long?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? backupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), System.Collections.Generic.IDictionary keys = null) { throw null; } public static Azure.ResourceManager.Sql.RestorableDroppedManagedDatabaseData RestorableDroppedManagedDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string databaseName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?)) { throw null; } @@ -7343,6 +7365,25 @@ public static partial class ArmSqlModelFactory public static bool operator !=(Azure.ResourceManager.Sql.Models.AuthenticationName left, Azure.ResourceManager.Sql.Models.AuthenticationName right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthMetadataLookupMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthMetadataLookupMode(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode AzureAD { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode Paired { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode Windows { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode left, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode left, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode right) { throw null; } + public override string ToString() { throw null; } + } public enum AutoExecuteStatus { Default = 0, @@ -7481,6 +7522,18 @@ public enum BlobAuditingPolicyState public static bool operator !=(Azure.ResourceManager.Sql.Models.CatalogCollationType left, Azure.ResourceManager.Sql.Models.CatalogCollationType right) { throw null; } public override string ToString() { throw null; } } + public partial class CertificateInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CertificateInfo() { } + public string CertificateName { get { throw null; } } + public System.DateTimeOffset? ExpiryOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.CertificateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.CertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ChangeLongTermRetentionBackupAccessTierParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ChangeLongTermRetentionBackupAccessTierParameters(string backupStorageAccessTier, string operationMode) { } @@ -7839,23 +7892,59 @@ public enum DataMaskingState public static bool operator !=(Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours left, Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DistributedAvailabilityGroupReplicationMode : System.IEquatable + public partial class DistributedAvailabilityGroupDatabase : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DistributedAvailabilityGroupReplicationMode(string value) { throw null; } - public static Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode Async { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode Sync { get { throw null; } } - public bool Equals(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode left, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode right) { throw null; } - public static implicit operator Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode left, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode right) { throw null; } - public override string ToString() { throw null; } + public DistributedAvailabilityGroupDatabase() { } + public Azure.ResourceManager.Sql.Models.ReplicaConnectedState? ConnectedState { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public int? InstanceRedoReplicationLagSeconds { get { throw null; } } + public System.Guid? InstanceReplicaId { get { throw null; } } + public int? InstanceSendReplicationLagSeconds { get { throw null; } } + public string LastBackupLsn { get { throw null; } } + public System.DateTimeOffset? LastBackupOn { get { throw null; } } + public string LastCommitLsn { get { throw null; } } + public System.DateTimeOffset? LastCommitOn { get { throw null; } } + public string LastHardenedLsn { get { throw null; } } + public System.DateTimeOffset? LastHardenedOn { get { throw null; } } + public string LastReceivedLsn { get { throw null; } } + public System.DateTimeOffset? LastReceivedOn { get { throw null; } } + public string LastSentLsn { get { throw null; } } + public System.DateTimeOffset? LastSentOn { get { throw null; } } + public string MostRecentLinkError { get { throw null; } } + public Azure.ResourceManager.Sql.Models.CertificateInfo PartnerAuthCertValidity { get { throw null; } } + public System.Guid? PartnerReplicaId { get { throw null; } } + public string ReplicaState { get { throw null; } } + public string SeedingProgress { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth? SynchronizationHealth { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupDatabase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DistributedAvailabilityGroupSetRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DistributedAvailabilityGroupSetRole(Azure.ResourceManager.Sql.Models.InstanceRole instanceRole, Azure.ResourceManager.Sql.Models.RoleChangeType roleChangeType) { } + public Azure.ResourceManager.Sql.Models.InstanceRole InstanceRole { get { throw null; } } + public Azure.ResourceManager.Sql.Models.RoleChangeType RoleChangeType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DistributedAvailabilityGroupsFailoverContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DistributedAvailabilityGroupsFailoverContent(Azure.ResourceManager.Sql.Models.FailoverType failoverType) { } + public Azure.ResourceManager.Sql.Models.FailoverType FailoverType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DnsRefreshConfigurationPropertiesStatus : System.IEquatable @@ -8244,6 +8333,42 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FailoverModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FailoverModeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FailoverModeType Manual { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FailoverModeType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FailoverModeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.FailoverModeType left, Azure.ResourceManager.Sql.Models.FailoverModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FailoverModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FailoverModeType left, Azure.ResourceManager.Sql.Models.FailoverModeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FailoverType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FailoverType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FailoverType ForcedAllowDataLoss { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FailoverType Planned { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FailoverType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.FailoverType left, Azure.ResourceManager.Sql.Models.FailoverType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FailoverType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FailoverType left, Azure.ResourceManager.Sql.Models.FailoverType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FreeLimitExhaustionBehavior : System.IEquatable { private readonly object _dummy; @@ -8262,6 +8387,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FreemiumType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FreemiumType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FreemiumType Freemium { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FreemiumType Regular { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FreemiumType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.FreemiumType left, Azure.ResourceManager.Sql.Models.FreemiumType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FreemiumType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FreemiumType left, Azure.ResourceManager.Sql.Models.FreemiumType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct GeoBackupPolicyName : System.IEquatable { private readonly object _dummy; @@ -8301,6 +8444,42 @@ public enum GeoBackupPolicyState public static bool operator !=(Azure.ResourceManager.Sql.Models.GeoSecondaryInstanceType left, Azure.ResourceManager.Sql.Models.GeoSecondaryInstanceType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HybridSecondaryUsage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HybridSecondaryUsage(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsage Active { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsage Passive { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.HybridSecondaryUsage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HybridSecondaryUsageDetected : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HybridSecondaryUsageDetected(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected Active { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected Passive { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected right) { throw null; } + public override string ToString() { throw null; } + } public enum ImplementationMethod { TSql = 0, @@ -8499,6 +8678,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InstanceRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceRole(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.InstanceRole Primary { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.InstanceRole Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.InstanceRole other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.InstanceRole left, Azure.ResourceManager.Sql.Models.InstanceRole right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.InstanceRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.InstanceRole left, Azure.ResourceManager.Sql.Models.InstanceRole right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct JobAgentState : System.IEquatable { private readonly object _dummy; @@ -8754,6 +8951,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LinkRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LinkRole(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.LinkRole Primary { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.LinkRole Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.LinkRole other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.LinkRole left, Azure.ResourceManager.Sql.Models.LinkRole right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.LinkRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.LinkRole left, Azure.ResourceManager.Sql.Models.LinkRole right) { throw null; } + public override string ToString() { throw null; } + } public partial class LogSizeCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LogSizeCapability() { } @@ -9015,6 +9230,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType left, Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedInstanceDatabaseFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedInstanceDatabaseFormat(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat AlwaysUpToDate { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat SqlServer2022 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat left, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat left, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManagedInstanceDtcSecuritySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedInstanceDtcSecuritySettings() { } @@ -9208,13 +9441,20 @@ public ManagedInstancePatch() { } public string AdministratorLogin { get { throw null; } set { } } public string AdministratorLoginPassword { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator Administrators { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? AuthenticationMetadata { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + public System.DateTimeOffset? CreateOn { get { throw null; } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? CurrentBackupStorageRedundancy { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? DatabaseFormat { get { throw null; } set { } } public string DnsZone { get { throw null; } } public string DnsZonePartner { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? ExternalGovernanceStatus { get { throw null; } } public string FullyQualifiedDomainName { get { throw null; } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? HybridSecondaryUsage { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? HybridSecondaryUsageDetected { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier InstancePoolId { get { throw null; } set { } } + public bool? IsGeneralPurposeV2 { get { throw null; } set { } } public bool? IsPublicDataEndpointEnabled { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } @@ -9223,9 +9463,10 @@ public ManagedInstancePatch() { } public Azure.Core.ResourceIdentifier ManagedDnsZonePartner { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? ManagedInstanceCreateMode { get { throw null; } set { } } public string MinimalTlsVersion { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FreemiumType? PricingModel { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? ProxyOverride { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? RequestedBackupStorageRedundancy { get { throw null; } set { } } public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } @@ -9233,11 +9474,14 @@ public ManagedInstancePatch() { } public Azure.ResourceManager.Sql.Models.SqlSku Sku { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceManagedInstanceId { get { throw null; } set { } } public string State { get { throw null; } } + public int? StorageIOps { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } + public int? StorageThroughputMBps { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string TimezoneId { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } + public string VirtualClusterId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.Models.ManagedInstancePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -9296,37 +9540,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ManagedInstancePropertiesProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ManagedInstancePropertiesProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Created { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Deleted { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState NotSpecified { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Registering { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Running { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState TimedOut { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Unknown { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Unrecognized { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState left, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState left, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ManagedInstanceProxyOverride : System.IEquatable { private readonly object _dummy; @@ -9742,6 +9955,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class QueryMetricIntervalAutoGenerated : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QueryMetricIntervalAutoGenerated() { } + public long? ExecutionCount { get { throw null; } } + public string IntervalStartTime { get { throw null; } } + public Azure.ResourceManager.Sql.Models.QueryTimeGrainType? IntervalType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Metrics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.QueryMetricIntervalAutoGenerated System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.QueryMetricIntervalAutoGenerated System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class QueryMetricProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public QueryMetricProperties() { } @@ -9801,7 +10028,7 @@ public partial class QueryStatisticsProperties : System.ClientModel.Primitives.I internal QueryStatisticsProperties() { } public string DatabaseName { get { throw null; } } public string EndTime { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Intervals { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Intervals { get { throw null; } } public string QueryId { get { throw null; } } public string StartTime { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -10026,6 +10253,59 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class RefreshExternalGovernanceStatusOperationResultMI : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RefreshExternalGovernanceStatusOperationResultMI() { } + public string ErrorMessage { get { throw null; } } + public string ManagedInstanceName { get { throw null; } } + public string QueuedTime { get { throw null; } } + public System.Guid? RequestId { get { throw null; } } + public string RequestType { get { throw null; } } + public string Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResultMI System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResultMI System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReplicaConnectedState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReplicaConnectedState(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ReplicaConnectedState Connected { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicaConnectedState Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ReplicaConnectedState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ReplicaConnectedState left, Azure.ResourceManager.Sql.Models.ReplicaConnectedState right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ReplicaConnectedState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ReplicaConnectedState left, Azure.ResourceManager.Sql.Models.ReplicaConnectedState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReplicaSynchronizationHealth : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReplicaSynchronizationHealth(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth Healthy { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth NOTHealthy { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth PartiallyHealthy { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth left, Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth left, Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReplicationLinkState : System.IEquatable { @@ -10066,6 +10346,24 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReplicationModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReplicationModeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ReplicationModeType Async { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicationModeType Sync { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ReplicationModeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ReplicationModeType left, Azure.ResourceManager.Sql.Models.ReplicationModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ReplicationModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ReplicationModeType left, Azure.ResourceManager.Sql.Models.ReplicationModeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReplicaType : System.IEquatable { private readonly object _dummy; @@ -10119,6 +10417,24 @@ public enum RestorePointType Discrete = 1, } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoleChangeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoleChangeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.RoleChangeType Forced { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.RoleChangeType Planned { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.RoleChangeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.RoleChangeType left, Azure.ResourceManager.Sql.Models.RoleChangeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.RoleChangeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.RoleChangeType left, Azure.ResourceManager.Sql.Models.RoleChangeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SampleSchemaName : System.IEquatable { private readonly object _dummy; @@ -10209,6 +10525,24 @@ public enum SecurityEventType SqlInjectionVulnerability = 1, SqlInjectionExploit = 2, } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SeedingModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SeedingModeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.SeedingModeType Automatic { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.SeedingModeType Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.SeedingModeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.SeedingModeType left, Azure.ResourceManager.Sql.Models.SeedingModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.SeedingModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.SeedingModeType left, Azure.ResourceManager.Sql.Models.SeedingModeType right) { throw null; } + public override string ToString() { throw null; } + } public enum SensitivityLabelRank { None = 0, diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs index 108720ecaccc..ae6d4ba9b00b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs @@ -297,16 +297,17 @@ protected DistributedAvailabilityGroupCollection() { } public partial class DistributedAvailabilityGroupData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DistributedAvailabilityGroupData() { } + public System.Collections.Generic.IList Databases { get { throw null; } } public System.Guid? DistributedAvailabilityGroupId { get { throw null; } } - public string LastHardenedLsn { get { throw null; } } - public string LinkState { get { throw null; } } - public string PrimaryAvailabilityGroupName { get { throw null; } set { } } - public Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode? ReplicationMode { get { throw null; } set { } } - public string SecondaryAvailabilityGroupName { get { throw null; } set { } } - public string SourceEndpoint { get { throw null; } set { } } - public System.Guid? SourceReplicaId { get { throw null; } } - public string TargetDatabase { get { throw null; } set { } } - public System.Guid? TargetReplicaId { get { throw null; } } + public string DistributedAvailabilityGroupName { get { throw null; } } + public Azure.ResourceManager.Sql.Models.FailoverModeType? FailoverMode { get { throw null; } set { } } + public string InstanceAvailabilityGroupName { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.LinkRole? InstanceLinkRole { get { throw null; } set { } } + public string PartnerAvailabilityGroupName { get { throw null; } set { } } + public string PartnerEndpoint { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.LinkRole? PartnerLinkRole { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ReplicationModeType? ReplicationMode { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.SeedingModeType? SeedingMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.DistributedAvailabilityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -323,8 +324,12 @@ protected DistributedAvailabilityGroupResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Failover(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> FailoverAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation SetRole(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetRoleAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.Sql.DistributedAvailabilityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.DistributedAvailabilityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1871,15 +1876,22 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public string AdministratorLogin { get { throw null; } set { } } public string AdministratorLoginPassword { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator Administrators { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? AuthenticationMetadata { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + public System.DateTimeOffset? CreateOn { get { throw null; } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? CurrentBackupStorageRedundancy { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? DatabaseFormat { get { throw null; } set { } } public string DnsZone { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public string DnsZonePartner { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? ExternalGovernanceStatus { get { throw null; } } public string FullyQualifiedDomainName { get { throw null; } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? HybridSecondaryUsage { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? HybridSecondaryUsageDetected { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier InstancePoolId { get { throw null; } set { } } + public bool? IsGeneralPurposeV2 { get { throw null; } set { } } public bool? IsPublicDataEndpointEnabled { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } @@ -1888,9 +1900,10 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier ManagedDnsZonePartner { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? ManagedInstanceCreateMode { get { throw null; } set { } } public string MinimalTlsVersion { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FreemiumType? PricingModel { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? ProxyOverride { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? RequestedBackupStorageRedundancy { get { throw null; } set { } } public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } @@ -1898,10 +1911,13 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Sql.Models.SqlSku Sku { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceManagedInstanceId { get { throw null; } set { } } public string State { get { throw null; } } + public int? StorageIOps { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } + public int? StorageThroughputMBps { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public string TimezoneId { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } + public string VirtualClusterId { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.ManagedInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2362,14 +2378,16 @@ protected ManagedInstanceResource() { } public virtual Azure.Pageable GetTopQueries(int? numberOfQueries = default(int?), string databases = null, string startTime = null, string endTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), Azure.ResourceManager.Sql.Models.AggregationFunctionType? aggregationFunction = default(Azure.ResourceManager.Sql.Models.AggregationFunctionType?), Azure.ResourceManager.Sql.Models.SqlMetricType? observationMetric = default(Azure.ResourceManager.Sql.Models.SqlMetricType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetTopQueriesAsync(Azure.ResourceManager.Sql.Models.ManagedInstanceResourceGetTopQueriesOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetTopQueriesAsync(int? numberOfQueries = default(int?), string databases = null, string startTime = null, string endTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), Azure.ResourceManager.Sql.Models.AggregationFunctionType? aggregationFunction = default(Azure.ResourceManager.Sql.Models.AggregationFunctionType?), Azure.ResourceManager.Sql.Models.SqlMetricType? observationMetric = default(Azure.ResourceManager.Sql.Models.SqlMetricType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RefreshStatus(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RefreshStatusAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.Sql.ManagedInstanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.ManagedInstanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7099,6 +7117,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.AutomaticTuningServerOptions AutomaticTuningServerOptions(Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeDesired? desiredState = default(Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeDesired?), Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeActual? actualState = default(Azure.ResourceManager.Sql.Models.AutomaticTuningOptionModeActual?), int? reasonCode = default(int?), Azure.ResourceManager.Sql.Models.AutomaticTuningServerReason? reasonDesc = default(Azure.ResourceManager.Sql.Models.AutomaticTuningServerReason?)) { throw null; } public static Azure.ResourceManager.Sql.Models.AutoPauseDelayTimeRange AutoPauseDelayTimeRange(int? minValue = default(int?), int? maxValue = default(int?), int? stepSize = default(int?), int? @default = default(int?), Azure.ResourceManager.Sql.Models.PauseDelayTimeUnit? unit = default(Azure.ResourceManager.Sql.Models.PauseDelayTimeUnit?), int? doNotPauseValue = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.BackupShortTermRetentionPolicyData BackupShortTermRetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? retentionDays = default(int?), Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours? diffBackupIntervalInHours = default(Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours?)) { throw null; } + public static Azure.ResourceManager.Sql.Models.CertificateInfo CertificateInfo(string certificateName = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.DatabaseAdvancedThreatProtectionData DatabaseAdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.DatabaseColumnData DatabaseColumnData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.SqlColumnDataType? columnType = default(Azure.ResourceManager.Sql.Models.SqlColumnDataType?), Azure.ResourceManager.Sql.Models.TableTemporalType? temporalType = default(Azure.ResourceManager.Sql.Models.TableTemporalType?), bool? isMemoryOptimized = default(bool?), bool? isComputed = default(bool?)) { throw null; } public static Azure.ResourceManager.Sql.Models.DatabaseExportDefinition DatabaseExportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType = default(Azure.ResourceManager.Sql.Models.StorageKeyType), string storageKey = null, System.Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, Azure.ResourceManager.Sql.Models.NetworkIsolationSettings networkIsolation = null) { throw null; } @@ -7116,7 +7135,8 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.DataMaskingRule DataMaskingRule(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, string aliasName = null, Azure.ResourceManager.Sql.Models.DataMaskingRuleState? ruleState = default(Azure.ResourceManager.Sql.Models.DataMaskingRuleState?), string schemaName = null, string tableName = null, string columnName = null, Azure.ResourceManager.Sql.Models.DataMaskingFunction? maskingFunction = default(Azure.ResourceManager.Sql.Models.DataMaskingFunction?), string numberFrom = null, string numberTo = null, string prefixSize = null, string suffixSize = null, string replacementString = null) { throw null; } public static Azure.ResourceManager.Sql.DataWarehouseUserActivityData DataWarehouseUserActivityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? activeQueriesCount = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.DeletedServerData DeletedServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string version = null, System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier originalId = null, string fullyQualifiedDomainName = null) { throw null; } - public static Azure.ResourceManager.Sql.DistributedAvailabilityGroupData DistributedAvailabilityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string targetDatabase = null, string sourceEndpoint = null, string primaryAvailabilityGroupName = null, string secondaryAvailabilityGroupName = null, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode? replicationMode = default(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode?), System.Guid? distributedAvailabilityGroupId = default(System.Guid?), System.Guid? sourceReplicaId = default(System.Guid?), System.Guid? targetReplicaId = default(System.Guid?), string linkState = null, string lastHardenedLsn = null) { throw null; } + public static Azure.ResourceManager.Sql.DistributedAvailabilityGroupData DistributedAvailabilityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string distributedAvailabilityGroupName = null, System.Guid? distributedAvailabilityGroupId = default(System.Guid?), Azure.ResourceManager.Sql.Models.ReplicationModeType? replicationMode = default(Azure.ResourceManager.Sql.Models.ReplicationModeType?), Azure.ResourceManager.Sql.Models.LinkRole? partnerLinkRole = default(Azure.ResourceManager.Sql.Models.LinkRole?), string partnerAvailabilityGroupName = null, string partnerEndpoint = null, Azure.ResourceManager.Sql.Models.LinkRole? instanceLinkRole = default(Azure.ResourceManager.Sql.Models.LinkRole?), string instanceAvailabilityGroupName = null, Azure.ResourceManager.Sql.Models.FailoverModeType? failoverMode = default(Azure.ResourceManager.Sql.Models.FailoverModeType?), Azure.ResourceManager.Sql.Models.SeedingModeType? seedingMode = default(Azure.ResourceManager.Sql.Models.SeedingModeType?), System.Collections.Generic.IEnumerable databases = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupDatabase DistributedAvailabilityGroupDatabase(string databaseName = null, System.Guid? instanceReplicaId = default(System.Guid?), System.Guid? partnerReplicaId = default(System.Guid?), string replicaState = null, string seedingProgress = null, Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth? synchronizationHealth = default(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth?), Azure.ResourceManager.Sql.Models.ReplicaConnectedState? connectedState = default(Azure.ResourceManager.Sql.Models.ReplicaConnectedState?), string lastReceivedLsn = null, System.DateTimeOffset? lastReceivedOn = default(System.DateTimeOffset?), string lastSentLsn = null, System.DateTimeOffset? lastSentOn = default(System.DateTimeOffset?), string lastCommitLsn = null, System.DateTimeOffset? lastCommitOn = default(System.DateTimeOffset?), string lastHardenedLsn = null, System.DateTimeOffset? lastHardenedOn = default(System.DateTimeOffset?), string lastBackupLsn = null, System.DateTimeOffset? lastBackupOn = default(System.DateTimeOffset?), string mostRecentLinkError = null, Azure.ResourceManager.Sql.Models.CertificateInfo partnerAuthCertValidity = null, int? instanceSendReplicationLagSeconds = default(int?), int? instanceRedoReplicationLagSeconds = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.Models.EditionCapability EditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedServiceLevelObjectives = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.ReadScaleCapability readScale = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ElasticPoolActivity ElasticPoolActivity(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), int? errorCode = default(int?), string errorMessage = null, int? errorSeverity = default(int?), string operation = null, System.Guid? operationId = default(System.Guid?), int? percentComplete = default(int?), int? requestedDatabaseDtuMax = default(int?), int? requestedDatabaseDtuMin = default(int?), int? requestedDtu = default(int?), string requestedElasticPoolName = null, long? requestedStorageLimitInGB = default(long?), string elasticPoolName = null, string serverName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string state = null, int? requestedStorageLimitInMB = default(int?), int? requestedDatabaseDtuGuarantee = default(int?), int? requestedDatabaseDtuCap = default(int?), int? requestedDtuGuarantee = default(int?)) { throw null; } public static Azure.ResourceManager.Sql.ElasticPoolData ElasticPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Sql.Models.SqlSku sku = null, string kind = null, Azure.ResourceManager.Sql.Models.ElasticPoolState? state = default(Azure.ResourceManager.Sql.Models.ElasticPoolState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), long? maxSizeBytes = default(long?), double? minCapacity = default(double?), Azure.ResourceManager.Sql.Models.ElasticPoolPerDatabaseSettings perDatabaseSettings = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ElasticPoolLicenseType?), Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, int? highAvailabilityReplicaCount = default(int?), Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType? preferredEnclaveType = default(Azure.ResourceManager.Sql.Models.SqlAlwaysEncryptedEnclaveType?), Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType? availabilityZone = default(Azure.ResourceManager.Sql.Models.SqlAvailabilityZoneType?)) { throw null; } @@ -7167,7 +7187,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceAdministratorData ManagedInstanceAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType? administratorType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType?), string login = null, System.Guid? sid = default(System.Guid?), System.Guid? tenantId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAzureADOnlyAuthenticationData ManagedInstanceAzureADOnlyAuthenticationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureADOnlyAuthenticationEnabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), int? vCores = default(int?), int? storageSizeInGB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null) { throw null; } + public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, string virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.FreemiumType? pricingModel = default(Azure.ResourceManager.Sql.Models.FreemiumType?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceDtcData ManagedInstanceDtcData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? dtcEnabled = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceDtcSecuritySettings securitySettings = null, System.Collections.Generic.IEnumerable externalDnsSuffixSearchList = null, string dtcHostNameDnsSuffix = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceEditionCapability ManagedInstanceEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedFamilies = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceEncryptionProtectorData ManagedInstanceEncryptionProtectorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, string serverKeyName = null, Azure.ResourceManager.Sql.Models.SqlServerKeyType? serverKeyType = default(Azure.ResourceManager.Sql.Models.SqlServerKeyType?), System.Uri uri = null, string thumbprint = null, bool? isAutoRotationEnabled = default(bool?)) { throw null; } @@ -7181,7 +7201,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceOperationData ManagedInstanceOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string managedInstanceName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair operationParameters = null, Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps operationSteps = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair ManagedInstanceOperationParametersPair(Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters currentParameters = null, Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters requestedParameters = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps ManagedInstanceOperationSteps(string totalSteps = null, int? currentStep = default(int?), System.Collections.Generic.IEnumerable stepsList = null) { throw null; } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), int? vCores = default(int?), int? storageSizeInGB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, string virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.FreemiumType? pricingModel = default(Azure.ResourceManager.Sql.Models.FreemiumType?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePecProperty ManagedInstancePecProperty(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstancePrivateEndpointConnectionData ManagedInstancePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty connectionState = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties ManagedInstancePrivateEndpointConnectionProperties(Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = null, string provisioningState = null) { throw null; } @@ -7209,9 +7229,10 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.PrivateEndpointConnectionRequestStatus PrivateEndpointConnectionRequestStatus(Azure.Core.ResourceIdentifier privateLinkServiceId = null, string privateEndpointConnectionName = null, string status = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ProxyResourceWithWritableName ProxyResourceWithWritableName(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryMetricInterval QueryMetricInterval(string intervalStartTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? intervalType = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), long? executionCount = default(long?), System.Collections.Generic.IEnumerable metrics = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.QueryMetricIntervalAutoGenerated QueryMetricIntervalAutoGenerated(string intervalStartTime = null, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? intervalType = default(Azure.ResourceManager.Sql.Models.QueryTimeGrainType?), long? executionCount = default(long?), System.Collections.Generic.IEnumerable metrics = null) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryMetricProperties QueryMetricProperties(string name = null, string displayName = null, Azure.ResourceManager.Sql.Models.QueryMetricUnitType? unit = default(Azure.ResourceManager.Sql.Models.QueryMetricUnitType?), double? value = default(double?), double? min = default(double?), double? max = default(double?), double? avg = default(double?), double? sum = default(double?), double? stdev = default(double?)) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryStatistics QueryStatistics(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } - public static Azure.ResourceManager.Sql.Models.QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ReadScaleCapability ReadScaleCapability(int? maxNumberOfReplicas = default(int?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.RecommendedActionData RecommendedActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string recommendationReason = null, System.DateTimeOffset? validSince = default(System.DateTimeOffset?), System.DateTimeOffset? lastRefresh = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionStateInfo state = null, bool? isExecutableAction = default(bool?), bool? isRevertableAction = default(bool?), bool? isArchivedAction = default(bool?), System.DateTimeOffset? executeActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? executeActionDuration = default(System.TimeSpan?), System.DateTimeOffset? revertActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? revertActionDuration = default(System.TimeSpan?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? executeActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? executeActionInitiatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? revertActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? revertActionInitiatedOn = default(System.DateTimeOffset?), int? score = default(int?), Azure.ResourceManager.Sql.Models.RecommendedActionImplementationInfo implementationDetails = null, Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo errorDetails = null, System.Collections.Generic.IEnumerable estimatedImpact = null, System.Collections.Generic.IEnumerable observedImpact = null, System.Collections.Generic.IEnumerable timeSeries = null, System.Collections.Generic.IEnumerable linkedObjects = null, System.Collections.Generic.IReadOnlyDictionary details = null) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo RecommendedActionErrorInfo(string errorCode = null, Azure.ResourceManager.Sql.Models.ActionRetryableState? isRetryable = default(Azure.ResourceManager.Sql.Models.ActionRetryableState?)) { throw null; } @@ -7223,6 +7244,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.RecoverableDatabaseData RecoverableDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, System.DateTimeOffset? lastAvailableBackupOn = default(System.DateTimeOffset?), System.Collections.Generic.IDictionary keys = null) { throw null; } public static Azure.ResourceManager.Sql.RecoverableManagedDatabaseData RecoverableManagedDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string lastAvailableBackupDate = null) { throw null; } public static Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResult RefreshExternalGovernanceStatusOperationResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string queuedTime = null, string serverName = null, string status = null, string errorMessage = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResultMI RefreshExternalGovernanceStatusOperationResultMI(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string queuedTime = null, string managedInstanceName = null, string status = null, string errorMessage = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ResourceWithWritableName ResourceWithWritableName(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.Sql.RestorableDroppedDatabaseData RestorableDroppedDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Sql.Models.SqlSku sku = null, string databaseName = null, long? maxSizeBytes = default(long?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? backupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), System.Collections.Generic.IDictionary keys = null) { throw null; } public static Azure.ResourceManager.Sql.RestorableDroppedManagedDatabaseData RestorableDroppedManagedDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string databaseName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? deletedOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?)) { throw null; } @@ -7343,6 +7365,25 @@ public static partial class ArmSqlModelFactory public static bool operator !=(Azure.ResourceManager.Sql.Models.AuthenticationName left, Azure.ResourceManager.Sql.Models.AuthenticationName right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthMetadataLookupMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthMetadataLookupMode(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode AzureAD { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode Paired { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode Windows { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode left, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode left, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode right) { throw null; } + public override string ToString() { throw null; } + } public enum AutoExecuteStatus { Default = 0, @@ -7481,6 +7522,18 @@ public enum BlobAuditingPolicyState public static bool operator !=(Azure.ResourceManager.Sql.Models.CatalogCollationType left, Azure.ResourceManager.Sql.Models.CatalogCollationType right) { throw null; } public override string ToString() { throw null; } } + public partial class CertificateInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CertificateInfo() { } + public string CertificateName { get { throw null; } } + public System.DateTimeOffset? ExpiryOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.CertificateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.CertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ChangeLongTermRetentionBackupAccessTierParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ChangeLongTermRetentionBackupAccessTierParameters(string backupStorageAccessTier, string operationMode) { } @@ -7839,23 +7892,59 @@ public enum DataMaskingState public static bool operator !=(Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours left, Azure.ResourceManager.Sql.Models.DiffBackupIntervalInHours right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DistributedAvailabilityGroupReplicationMode : System.IEquatable + public partial class DistributedAvailabilityGroupDatabase : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DistributedAvailabilityGroupReplicationMode(string value) { throw null; } - public static Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode Async { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode Sync { get { throw null; } } - public bool Equals(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode left, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode right) { throw null; } - public static implicit operator Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode left, Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupReplicationMode right) { throw null; } - public override string ToString() { throw null; } + public DistributedAvailabilityGroupDatabase() { } + public Azure.ResourceManager.Sql.Models.ReplicaConnectedState? ConnectedState { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public int? InstanceRedoReplicationLagSeconds { get { throw null; } } + public System.Guid? InstanceReplicaId { get { throw null; } } + public int? InstanceSendReplicationLagSeconds { get { throw null; } } + public string LastBackupLsn { get { throw null; } } + public System.DateTimeOffset? LastBackupOn { get { throw null; } } + public string LastCommitLsn { get { throw null; } } + public System.DateTimeOffset? LastCommitOn { get { throw null; } } + public string LastHardenedLsn { get { throw null; } } + public System.DateTimeOffset? LastHardenedOn { get { throw null; } } + public string LastReceivedLsn { get { throw null; } } + public System.DateTimeOffset? LastReceivedOn { get { throw null; } } + public string LastSentLsn { get { throw null; } } + public System.DateTimeOffset? LastSentOn { get { throw null; } } + public string MostRecentLinkError { get { throw null; } } + public Azure.ResourceManager.Sql.Models.CertificateInfo PartnerAuthCertValidity { get { throw null; } } + public System.Guid? PartnerReplicaId { get { throw null; } } + public string ReplicaState { get { throw null; } } + public string SeedingProgress { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth? SynchronizationHealth { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupDatabase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DistributedAvailabilityGroupSetRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DistributedAvailabilityGroupSetRole(Azure.ResourceManager.Sql.Models.InstanceRole instanceRole, Azure.ResourceManager.Sql.Models.RoleChangeType roleChangeType) { } + public Azure.ResourceManager.Sql.Models.InstanceRole InstanceRole { get { throw null; } } + public Azure.ResourceManager.Sql.Models.RoleChangeType RoleChangeType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupSetRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DistributedAvailabilityGroupsFailoverContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DistributedAvailabilityGroupsFailoverContent(Azure.ResourceManager.Sql.Models.FailoverType failoverType) { } + public Azure.ResourceManager.Sql.Models.FailoverType FailoverType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DistributedAvailabilityGroupsFailoverContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DnsRefreshConfigurationPropertiesStatus : System.IEquatable @@ -8244,6 +8333,42 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FailoverModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FailoverModeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FailoverModeType Manual { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FailoverModeType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FailoverModeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.FailoverModeType left, Azure.ResourceManager.Sql.Models.FailoverModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FailoverModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FailoverModeType left, Azure.ResourceManager.Sql.Models.FailoverModeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FailoverType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FailoverType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FailoverType ForcedAllowDataLoss { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FailoverType Planned { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FailoverType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.FailoverType left, Azure.ResourceManager.Sql.Models.FailoverType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FailoverType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FailoverType left, Azure.ResourceManager.Sql.Models.FailoverType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FreeLimitExhaustionBehavior : System.IEquatable { private readonly object _dummy; @@ -8262,6 +8387,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FreemiumType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FreemiumType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FreemiumType Freemium { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FreemiumType Regular { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FreemiumType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.FreemiumType left, Azure.ResourceManager.Sql.Models.FreemiumType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FreemiumType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FreemiumType left, Azure.ResourceManager.Sql.Models.FreemiumType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct GeoBackupPolicyName : System.IEquatable { private readonly object _dummy; @@ -8301,6 +8444,42 @@ public enum GeoBackupPolicyState public static bool operator !=(Azure.ResourceManager.Sql.Models.GeoSecondaryInstanceType left, Azure.ResourceManager.Sql.Models.GeoSecondaryInstanceType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HybridSecondaryUsage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HybridSecondaryUsage(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsage Active { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsage Passive { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.HybridSecondaryUsage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HybridSecondaryUsageDetected : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HybridSecondaryUsageDetected(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected Active { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected Passive { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected left, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected right) { throw null; } + public override string ToString() { throw null; } + } public enum ImplementationMethod { TSql = 0, @@ -8499,6 +8678,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InstanceRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceRole(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.InstanceRole Primary { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.InstanceRole Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.InstanceRole other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.InstanceRole left, Azure.ResourceManager.Sql.Models.InstanceRole right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.InstanceRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.InstanceRole left, Azure.ResourceManager.Sql.Models.InstanceRole right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct JobAgentState : System.IEquatable { private readonly object _dummy; @@ -8754,6 +8951,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LinkRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LinkRole(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.LinkRole Primary { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.LinkRole Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.LinkRole other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.LinkRole left, Azure.ResourceManager.Sql.Models.LinkRole right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.LinkRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.LinkRole left, Azure.ResourceManager.Sql.Models.LinkRole right) { throw null; } + public override string ToString() { throw null; } + } public partial class LogSizeCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LogSizeCapability() { } @@ -9015,6 +9230,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType left, Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedInstanceDatabaseFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedInstanceDatabaseFormat(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat AlwaysUpToDate { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat SqlServer2022 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat left, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat left, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManagedInstanceDtcSecuritySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedInstanceDtcSecuritySettings() { } @@ -9208,13 +9441,20 @@ public ManagedInstancePatch() { } public string AdministratorLogin { get { throw null; } set { } } public string AdministratorLoginPassword { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator Administrators { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? AuthenticationMetadata { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + public System.DateTimeOffset? CreateOn { get { throw null; } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? CurrentBackupStorageRedundancy { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? DatabaseFormat { get { throw null; } set { } } public string DnsZone { get { throw null; } } public string DnsZonePartner { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? ExternalGovernanceStatus { get { throw null; } } public string FullyQualifiedDomainName { get { throw null; } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? HybridSecondaryUsage { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? HybridSecondaryUsageDetected { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier InstancePoolId { get { throw null; } set { } } + public bool? IsGeneralPurposeV2 { get { throw null; } set { } } public bool? IsPublicDataEndpointEnabled { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public System.Uri KeyId { get { throw null; } set { } } @@ -9223,9 +9463,10 @@ public ManagedInstancePatch() { } public Azure.Core.ResourceIdentifier ManagedDnsZonePartner { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? ManagedInstanceCreateMode { get { throw null; } set { } } public string MinimalTlsVersion { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FreemiumType? PricingModel { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? ProxyOverride { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? RequestedBackupStorageRedundancy { get { throw null; } set { } } public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } @@ -9233,11 +9474,14 @@ public ManagedInstancePatch() { } public Azure.ResourceManager.Sql.Models.SqlSku Sku { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceManagedInstanceId { get { throw null; } set { } } public string State { get { throw null; } } + public int? StorageIOps { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } + public int? StorageThroughputMBps { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string TimezoneId { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } + public string VirtualClusterId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.Models.ManagedInstancePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -9296,37 +9540,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ManagedInstancePropertiesProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ManagedInstancePropertiesProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Created { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Deleted { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState NotSpecified { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Registering { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Running { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState TimedOut { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Unknown { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Unrecognized { get { throw null; } } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState left, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState left, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ManagedInstanceProxyOverride : System.IEquatable { private readonly object _dummy; @@ -9742,6 +9955,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class QueryMetricIntervalAutoGenerated : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QueryMetricIntervalAutoGenerated() { } + public long? ExecutionCount { get { throw null; } } + public string IntervalStartTime { get { throw null; } } + public Azure.ResourceManager.Sql.Models.QueryTimeGrainType? IntervalType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Metrics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.QueryMetricIntervalAutoGenerated System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.QueryMetricIntervalAutoGenerated System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class QueryMetricProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public QueryMetricProperties() { } @@ -9801,7 +10028,7 @@ public partial class QueryStatisticsProperties : System.ClientModel.Primitives.I internal QueryStatisticsProperties() { } public string DatabaseName { get { throw null; } } public string EndTime { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Intervals { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Intervals { get { throw null; } } public string QueryId { get { throw null; } } public string StartTime { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -10026,6 +10253,59 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class RefreshExternalGovernanceStatusOperationResultMI : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RefreshExternalGovernanceStatusOperationResultMI() { } + public string ErrorMessage { get { throw null; } } + public string ManagedInstanceName { get { throw null; } } + public string QueuedTime { get { throw null; } } + public System.Guid? RequestId { get { throw null; } } + public string RequestType { get { throw null; } } + public string Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResultMI System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.RefreshExternalGovernanceStatusOperationResultMI System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReplicaConnectedState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReplicaConnectedState(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ReplicaConnectedState Connected { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicaConnectedState Disconnected { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ReplicaConnectedState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ReplicaConnectedState left, Azure.ResourceManager.Sql.Models.ReplicaConnectedState right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ReplicaConnectedState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ReplicaConnectedState left, Azure.ResourceManager.Sql.Models.ReplicaConnectedState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReplicaSynchronizationHealth : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReplicaSynchronizationHealth(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth Healthy { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth NOTHealthy { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth PartiallyHealthy { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth left, Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth left, Azure.ResourceManager.Sql.Models.ReplicaSynchronizationHealth right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReplicationLinkState : System.IEquatable { @@ -10066,6 +10346,24 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReplicationModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReplicationModeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.ReplicationModeType Async { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.ReplicationModeType Sync { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.ReplicationModeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.ReplicationModeType left, Azure.ResourceManager.Sql.Models.ReplicationModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.ReplicationModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.ReplicationModeType left, Azure.ResourceManager.Sql.Models.ReplicationModeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReplicaType : System.IEquatable { private readonly object _dummy; @@ -10119,6 +10417,24 @@ public enum RestorePointType Discrete = 1, } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoleChangeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoleChangeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.RoleChangeType Forced { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.RoleChangeType Planned { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.RoleChangeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.RoleChangeType left, Azure.ResourceManager.Sql.Models.RoleChangeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.RoleChangeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.RoleChangeType left, Azure.ResourceManager.Sql.Models.RoleChangeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SampleSchemaName : System.IEquatable { private readonly object _dummy; @@ -10209,6 +10525,24 @@ public enum SecurityEventType SqlInjectionVulnerability = 1, SqlInjectionExploit = 2, } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SeedingModeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SeedingModeType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.SeedingModeType Automatic { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.SeedingModeType Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.SeedingModeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Sql.Models.SeedingModeType left, Azure.ResourceManager.Sql.Models.SeedingModeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.SeedingModeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.SeedingModeType left, Azure.ResourceManager.Sql.Models.SeedingModeType right) { throw null; } + public override string ToString() { throw null; } + } public enum SensitivityLabelRank { None = 0, diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupCollection.cs index 842624c0ddec..2f717010b5fb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Sql.Models; using NUnit.Framework; namespace Azure.ResourceManager.Sql.Samples @@ -17,9 +18,9 @@ public partial class Sample_DistributedAvailabilityGroupCollection { [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateADistributedAvailabilityGroup() + public async Task CreateOrUpdate_CreateADistributedAvailabilityGroupWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsCreateMax.json // this example is just showing the usage of "DistributedAvailabilityGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,10 +43,61 @@ public async Task CreateOrUpdate_CreateADistributedAvailabilityGroup() string distributedAvailabilityGroupName = "dag"; DistributedAvailabilityGroupData data = new DistributedAvailabilityGroupData { - TargetDatabase = "testdb", - SourceEndpoint = "TCP://SERVER:7022", - PrimaryAvailabilityGroupName = "BoxLocalAg1", - SecondaryAvailabilityGroupName = "testcl", + PartnerAvailabilityGroupName = "BoxLocalAg1", + PartnerEndpoint = "TCP://SERVER:7022", + InstanceLinkRole = LinkRole.Primary, + InstanceAvailabilityGroupName = "testcl", + FailoverMode = FailoverModeType.None, + SeedingMode = SeedingModeType.Automatic, + Databases = {new DistributedAvailabilityGroupDatabase +{ +DatabaseName = "testdb", +}}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, distributedAvailabilityGroupName, data); + DistributedAvailabilityGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DistributedAvailabilityGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateADistributedAvailabilityGroupWithMinimalProperties() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsCreateMin.json + // this example is just showing the usage of "DistributedAvailabilityGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ManagedInstanceResource created on azure + // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string managedInstanceName = "testcl"; + ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); + ManagedInstanceResource managedInstance = client.GetManagedInstanceResource(managedInstanceResourceId); + + // get the collection of this DistributedAvailabilityGroupResource + DistributedAvailabilityGroupCollection collection = managedInstance.GetDistributedAvailabilityGroups(); + + // invoke the operation + string distributedAvailabilityGroupName = "dag"; + DistributedAvailabilityGroupData data = new DistributedAvailabilityGroupData + { + PartnerAvailabilityGroupName = "BoxLocalAg1", + PartnerEndpoint = "TCP://SERVER:7022", + InstanceAvailabilityGroupName = "testcl", + Databases = {new DistributedAvailabilityGroupDatabase +{ +DatabaseName = "testdb", +}}, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, distributedAvailabilityGroupName, data); DistributedAvailabilityGroupResource result = lro.Value; @@ -61,7 +113,7 @@ public async Task CreateOrUpdate_CreateADistributedAvailabilityGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +123,7 @@ public async Task Get_GetsTheDistributedAvailabilityGroupInfo() // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "f2669dff-5f08-45dd-b857-b2a60b72cdc9"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testcl"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -95,7 +147,7 @@ public async Task Get_GetsTheDistributedAvailabilityGroupInfo() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsAllDistributedAvailabilityGroupsInInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json // this example is just showing the usage of "DistributedAvailabilityGroups_ListByInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +183,7 @@ public async Task GetAll_ListsAllDistributedAvailabilityGroupsInInstance() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +193,7 @@ public async Task Exists_GetsTheDistributedAvailabilityGroupInfo() // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "f2669dff-5f08-45dd-b857-b2a60b72cdc9"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testcl"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -161,7 +213,7 @@ public async Task Exists_GetsTheDistributedAvailabilityGroupInfo() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +223,7 @@ public async Task GetIfExists_GetsTheDistributedAvailabilityGroupInfo() // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "f2669dff-5f08-45dd-b857-b2a60b72cdc9"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testcl"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupResource.cs index 6453f724d433..b4df451d700e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DistributedAvailabilityGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DistributedAvailabilityGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_GetsTheDistributedAvailabilityGroupInfo() // this example assumes you already have this DistributedAvailabilityGroupResource created on azure // for more information of creating DistributedAvailabilityGroupResource, please refer to the document of DistributedAvailabilityGroupResource - string subscriptionId = "f2669dff-5f08-45dd-b857-b2a60b72cdc9"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testcl"; string distributedAvailabilityGroupName = "dag"; @@ -51,7 +51,7 @@ public async Task Get_GetsTheDistributedAvailabilityGroupInfo() [Ignore("Only validating compilation of examples")] public async Task Delete_InitiateADistributedAvailabilityGroupDrop() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsDelete.json // this example is just showing the usage of "DistributedAvailabilityGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Delete_InitiateADistributedAvailabilityGroupDrop() // this example assumes you already have this DistributedAvailabilityGroupResource created on azure // for more information of creating DistributedAvailabilityGroupResource, please refer to the document of DistributedAvailabilityGroupResource - string subscriptionId = "f2669dff-5f08-45dd-b857-b2a60b72cdc9"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testcl"; string distributedAvailabilityGroupName = "dag"; @@ -78,7 +78,7 @@ public async Task Delete_InitiateADistributedAvailabilityGroupDrop() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheDistributedAvailabilityGroupReplicationModeBeforeDeletingIt() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsUpdate.json // this example is just showing the usage of "DistributedAvailabilityGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Update_UpdateTheDistributedAvailabilityGroupReplicationModeBef // invoke the operation DistributedAvailabilityGroupData data = new DistributedAvailabilityGroupData { - ReplicationMode = DistributedAvailabilityGroupReplicationMode.Sync, + ReplicationMode = ReplicationModeType.Sync, }; ArmOperation lro = await distributedAvailabilityGroup.UpdateAsync(WaitUntil.Completed, data); DistributedAvailabilityGroupResource result = lro.Value; @@ -109,5 +109,71 @@ public async Task Update_UpdateTheDistributedAvailabilityGroupReplicationModeBef // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Failover_FailoverADistributedAvailabilityGroup() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsFailover.json + // this example is just showing the usage of "DistributedAvailabilityGroups_Failover" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DistributedAvailabilityGroupResource created on azure + // for more information of creating DistributedAvailabilityGroupResource, please refer to the document of DistributedAvailabilityGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string managedInstanceName = "testcl"; + string distributedAvailabilityGroupName = "dag"; + ResourceIdentifier distributedAvailabilityGroupResourceId = DistributedAvailabilityGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName); + DistributedAvailabilityGroupResource distributedAvailabilityGroup = client.GetDistributedAvailabilityGroupResource(distributedAvailabilityGroupResourceId); + + // invoke the operation + DistributedAvailabilityGroupsFailoverContent content = new DistributedAvailabilityGroupsFailoverContent(FailoverType.ForcedAllowDataLoss); + ArmOperation lro = await distributedAvailabilityGroup.FailoverAsync(WaitUntil.Completed, content); + DistributedAvailabilityGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DistributedAvailabilityGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task SetRole_SetDistributedAvailabilityGroupPrimaryReplicaToManagedInstance() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/examples/DistributedAvailabilityGroupsSetRole.json + // this example is just showing the usage of "DistributedAvailabilityGroups_SetRole" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DistributedAvailabilityGroupResource created on azure + // for more information of creating DistributedAvailabilityGroupResource, please refer to the document of DistributedAvailabilityGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string managedInstanceName = "testcl"; + string distributedAvailabilityGroupName = "dag"; + ResourceIdentifier distributedAvailabilityGroupResourceId = DistributedAvailabilityGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName); + DistributedAvailabilityGroupResource distributedAvailabilityGroup = client.GetDistributedAvailabilityGroupResource(distributedAvailabilityGroupResourceId); + + // invoke the operation + DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole = new DistributedAvailabilityGroupSetRole(InstanceRole.Primary, RoleChangeType.Forced); + ArmOperation lro = await distributedAvailabilityGroup.SetRoleAsync(WaitUntil.Completed, distributedAvailabilityGroupSetRole); + DistributedAvailabilityGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DistributedAvailabilityGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs index 3798912e79e7..4a4f113eab84 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs @@ -173,7 +173,7 @@ public async Task GetUsages_ListInstancePoolUsages() [Ignore("Only validating compilation of examples")] public async Task GetManagedInstances_ListManagedInstancesByInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePool.json // this example is just showing the usage of "ManagedInstances_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task GetManagedInstances_ListManagedInstancesByInstancePool() // this example assumes you already have this InstancePoolResource created on azure // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "Test1"; string instancePoolName = "pool1"; ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); @@ -206,7 +206,7 @@ public async Task GetManagedInstances_ListManagedInstancesByInstancePool() [Ignore("Only validating compilation of examples")] public async Task GetManagedInstances_ListManagedInstancesByInstancePoolWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetManagedInstances_ListManagedInstancesByInstancePoolWithExpa // this example assumes you already have this InstancePoolResource created on azure // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "Test1"; string instancePoolName = "pool1"; ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs index 207424cb13ca..9a9430a22bc0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ManagedInstanceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateManagedInstanceWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMax.json // this example is just showing the usage of "ManagedInstances_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,6 +51,7 @@ public async Task CreateOrUpdate_CreateManagedInstanceWithAllProperties() AdministratorLoginPassword = "PLACEHOLDER", SubnetId = new ResourceIdentifier("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), LicenseType = ManagedInstanceLicenseType.LicenseIncluded, + HybridSecondaryUsage = HybridSecondaryUsage.Passive, VCores = 8, StorageSizeInGB = 1024, Collation = "SQL_Latin1_General_CP1_CI_AS", @@ -74,6 +75,7 @@ public async Task CreateOrUpdate_CreateManagedInstanceWithAllProperties() { PrincipalType = SqlServicePrincipalType.SystemAssigned, }, + DatabaseFormat = ManagedInstanceDatabaseFormat.AlwaysUpToDate, Tags = { ["tagKey1"] = "TagValue1" @@ -93,7 +95,7 @@ public async Task CreateOrUpdate_CreateManagedInstanceWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateManagedInstanceWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMin.json // this example is just showing the usage of "ManagedInstances_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +117,7 @@ public async Task CreateOrUpdate_CreateManagedInstanceWithMinimalProperties() string managedInstanceName = "testinstance"; ManagedInstanceData data = new ManagedInstanceData(new AzureLocation("Japan East")) { - Sku = new SqlSku("GP_Gen4") + Sku = new SqlSku("GP_Gen5") { Tier = "GeneralPurpose", }, @@ -140,7 +142,7 @@ public async Task CreateOrUpdate_CreateManagedInstanceWithMinimalProperties() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGet.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +152,40 @@ public async Task Get_GetManagedInstance() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedInstanceResource + ManagedInstanceCollection collection = resourceGroupResource.GetManagedInstances(); + + // invoke the operation + string managedInstanceName = "testinstance"; + ManagedInstanceResource result = await collection.GetAsync(managedInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetManagedInstanceWhileResourceIsUpdating() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json + // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -173,7 +208,7 @@ public async Task Get_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +218,7 @@ public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory( // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -206,7 +241,7 @@ public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory( [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedInstancesByResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByResourceGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroup.json // this example is just showing the usage of "ManagedInstances_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +251,7 @@ public async Task GetAll_ListManagedInstancesByResourceGroup() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "Test1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -241,7 +276,7 @@ public async Task GetAll_ListManagedInstancesByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedInstancesByResourceGroupWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -251,7 +286,7 @@ public async Task GetAll_ListManagedInstancesByResourceGroupWithExpandAdministra // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "Test1"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -276,7 +311,7 @@ public async Task GetAll_ListManagedInstancesByResourceGroupWithExpandAdministra [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGet.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -286,7 +321,36 @@ public async Task Exists_GetManagedInstance() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedInstanceResource + ManagedInstanceCollection collection = resourceGroupResource.GetManagedInstances(); + + // invoke the operation + string managedInstanceName = "testinstance"; + bool result = await collection.ExistsAsync(managedInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetManagedInstanceWhileResourceIsUpdating() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json + // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -305,7 +369,7 @@ public async Task Exists_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -315,7 +379,7 @@ public async Task Exists_GetManagedInstanceWithExpandAdministratorsActivedirecto // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -334,7 +398,48 @@ public async Task Exists_GetManagedInstanceWithExpandAdministratorsActivedirecto [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGet.json + // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ManagedInstanceResource + ManagedInstanceCollection collection = resourceGroupResource.GetManagedInstances(); + + // invoke the operation + string managedInstanceName = "testinstance"; + NullableResponse response = await collection.GetIfExistsAsync(managedInstanceName); + ManagedInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetManagedInstanceWhileResourceIsUpdating() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -344,7 +449,7 @@ public async Task GetIfExists_GetManagedInstance() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -375,7 +480,7 @@ public async Task GetIfExists_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -385,7 +490,7 @@ public async Task GetIfExists_GetManagedInstanceWithExpandAdministratorsActivedi // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs index 230c6e050d55..e88e8c1813ff 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGet.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,37 @@ public async Task Get_GetManagedInstance() // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string managedInstanceName = "testinstance"; + ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); + ManagedInstanceResource managedInstance = client.GetManagedInstanceResource(managedInstanceResourceId); + + // invoke the operation + ManagedInstanceResource result = await managedInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetManagedInstanceWhileResourceIsUpdating() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json + // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ManagedInstanceResource created on azure + // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testinstance"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -50,7 +80,7 @@ public async Task Get_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +90,7 @@ public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory( // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "20d7082a-0fc7-4468-82bd-542694d5042b"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testinstance"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -80,7 +110,7 @@ public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory( [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDelete.json // this example is just showing the usage of "ManagedInstances_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +120,7 @@ public async Task Delete_DeleteManagedInstance() // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testinstance"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -106,7 +136,7 @@ public async Task Delete_DeleteManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Update_RemoveMaintenancePolicyFromManagedInstanceSelectDefaultMaintenancePolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json // this example is just showing the usage of "ManagedInstances_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +146,7 @@ public async Task Update_RemoveMaintenancePolicyFromManagedInstanceSelectDefault // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testinstance"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -125,7 +155,7 @@ public async Task Update_RemoveMaintenancePolicyFromManagedInstanceSelectDefault // invoke the operation ManagedInstancePatch patch = new ManagedInstancePatch { - MaintenanceConfigurationId = new ResourceIdentifier("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), + MaintenanceConfigurationId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), }; ArmOperation lro = await managedInstance.UpdateAsync(WaitUntil.Completed, patch); ManagedInstanceResource result = lro.Value; @@ -141,7 +171,7 @@ public async Task Update_RemoveMaintenancePolicyFromManagedInstanceSelectDefault [Ignore("Only validating compilation of examples")] public async Task Update_UpdateManagedInstanceWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMax.json // this example is just showing the usage of "ManagedInstances_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +181,7 @@ public async Task Update_UpdateManagedInstanceWithAllProperties() // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testinstance"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -160,7 +190,7 @@ public async Task Update_UpdateManagedInstanceWithAllProperties() // invoke the operation ManagedInstancePatch patch = new ManagedInstancePatch { - Sku = new SqlSku("GP_Gen4") + Sku = new SqlSku("GP_Gen5") { Tier = "GeneralPurpose", Capacity = 8, @@ -172,14 +202,17 @@ public async Task Update_UpdateManagedInstanceWithAllProperties() AdministratorLogin = "dummylogin", AdministratorLoginPassword = "PLACEHOLDER", LicenseType = ManagedInstanceLicenseType.BasePrice, + HybridSecondaryUsage = HybridSecondaryUsage.Passive, VCores = 8, StorageSizeInGB = 448, Collation = "SQL_Latin1_General_CP1_CI_AS", IsPublicDataEndpointEnabled = false, ProxyOverride = ManagedInstanceProxyOverride.Redirect, - MaintenanceConfigurationId = new ResourceIdentifier("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), + MaintenanceConfigurationId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), MinimalTlsVersion = "1.2", RequestedBackupStorageRedundancy = SqlBackupStorageRedundancy.Geo, + AuthenticationMetadata = AuthMetadataLookupMode.Windows, + DatabaseFormat = ManagedInstanceDatabaseFormat.AlwaysUpToDate, }; ArmOperation lro = await managedInstance.UpdateAsync(WaitUntil.Completed, patch); ManagedInstanceResource result = lro.Value; @@ -195,7 +228,7 @@ public async Task Update_UpdateManagedInstanceWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateManagedInstanceWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMin.json // this example is just showing the usage of "ManagedInstances_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +238,7 @@ public async Task Update_UpdateManagedInstanceWithMinimalProperties() // this example assumes you already have this ManagedInstanceResource created on azure // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; string managedInstanceName = "testinstance"; ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); @@ -329,7 +362,7 @@ public async Task GetInaccessibleManagedDatabases_ListInaccessibleManagedDatabas [Ignore("Only validating compilation of examples")] public async Task Failover_FailoverAManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/FailoverManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverManagedInstance.json // this example is just showing the usage of "ManagedInstances_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -356,7 +389,7 @@ public async Task Failover_FailoverAManagedInstance() [Ignore("Only validating compilation of examples")] public async Task GetOutboundNetworkDependencies_GetsTheCollectionOfOutboundNetworkDependenciesForTheGivenManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ListOutboundNetworkDependenciesByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListOutboundNetworkDependenciesByManagedInstance.json // this example is just showing the usage of "ManagedInstances_ListOutboundNetworkDependenciesByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -381,11 +414,38 @@ public async Task GetOutboundNetworkDependencies_GetsTheCollectionOfOutboundNetw Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RefreshStatus_RefreshExternalGovernanceEnablementStatus() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRefreshExternalGovernanceStatus.json + // this example is just showing the usage of "ManagedInstances_RefreshStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ManagedInstanceResource created on azure + // for more information of creating ManagedInstanceResource, please refer to the document of ManagedInstanceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-7398"; + string managedInstanceName = "sqlcrudtest-4645"; + ResourceIdentifier managedInstanceResourceId = ManagedInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, managedInstanceName); + ManagedInstanceResource managedInstance = client.GetManagedInstanceResource(managedInstanceResourceId); + + // invoke the operation + ArmOperation lro = await managedInstance.RefreshStatusAsync(WaitUntil.Completed); + RefreshExternalGovernanceStatusOperationResultMI result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Start_StartsTheManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StartManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartManagedInstance.json // this example is just showing the usage of "ManagedInstances_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -402,16 +462,21 @@ public async Task Start_StartsTheManagedInstance() ManagedInstanceResource managedInstance = client.GetManagedInstanceResource(managedInstanceResourceId); // invoke the operation - await managedInstance.StartAsync(WaitUntil.Completed); + ArmOperation lro = await managedInstance.StartAsync(WaitUntil.Completed); + ManagedInstanceResource result = lro.Value; - Console.WriteLine("Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } [Test] [Ignore("Only validating compilation of examples")] public async Task Stop_StopsTheManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StopManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StopManagedInstance.json // this example is just showing the usage of "ManagedInstances_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -428,16 +493,21 @@ public async Task Stop_StopsTheManagedInstance() ManagedInstanceResource managedInstance = client.GetManagedInstanceResource(managedInstanceResourceId); // invoke the operation - await managedInstance.StopAsync(WaitUntil.Completed); + ArmOperation lro = await managedInstance.StopAsync(WaitUntil.Completed); + ManagedInstanceResource result = lro.Value; - Console.WriteLine("Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } [Test] [Ignore("Only validating compilation of examples")] public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueries() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceTopQueriesList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesList.json // this example is just showing the usage of "ManagedInstances_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -467,7 +537,7 @@ public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueries [Ignore("Only validating compilation of examples")] public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueriesFullBlownRequestAndResponse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceTopQueriesListMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMax.json // this example is just showing the usage of "ManagedInstances_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -497,7 +567,7 @@ public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueries [Ignore("Only validating compilation of examples")] public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueriesMinimalRequestAndResponse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceTopQueriesListMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMin.json // this example is just showing the usage of "ManagedInstances_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index bde85a65d39e..52996c9615b2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -194,10 +194,10 @@ public async Task GetVirtualClusters_ListVirtualClusters() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedInstances_ListManagedInstances() + public async Task GetInstancePools_ListInstancePoolsInTheSubscription() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceList.json - // this example is just showing the usage of "ManagedInstances_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsBySubscriptionId.json + // this example is just showing the usage of "InstancePools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -206,16 +206,16 @@ public async Task GetManagedInstances_ListManagedInstances() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (ManagedInstanceResource item in subscriptionResource.GetManagedInstancesAsync()) + await foreach (InstancePoolResource item in subscriptionResource.GetInstancePoolsAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ManagedInstanceData resourceData = item.Data; + InstancePoolData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -225,10 +225,10 @@ public async Task GetManagedInstances_ListManagedInstances() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedInstances_ListManagedInstancesWithExpandAdministratorsActivedirectory() + public async Task GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json - // this example is just showing the usage of "ManagedInstances_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByLocation.json + // this example is just showing the usage of "LongTermRetentionBackups_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -237,18 +237,16 @@ public async Task GetManagedInstances_ListManagedInstancesWithExpandAdministrato // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "20D7082A-0FC7-4468-82BD-542694D5042B"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (ManagedInstanceResource item in subscriptionResource.GetManagedInstancesAsync()) + AzureLocation locationName = new AzureLocation("japaneast"); + await foreach (LongTermRetentionBackupData item in subscriptionResource.GetLongTermRetentionBackupsWithLocationAsync(locationName)) { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ManagedInstanceData resourceData = item.Data; // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded on id: {item.Id}"); } Console.WriteLine("Succeeded"); @@ -256,10 +254,10 @@ public async Task GetManagedInstances_ListManagedInstancesWithExpandAdministrato [Test] [Ignore("Only validating compilation of examples")] - public async Task GetInstancePools_ListInstancePoolsInTheSubscription() + public async Task GetLongTermRetentionBackupsWithServer_GetAllLongTermRetentionBackupsUnderTheServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsBySubscriptionId.json - // this example is just showing the usage of "InstancePools_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByServer.json + // this example is just showing the usage of "LongTermRetentionBackups_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -273,13 +271,12 @@ public async Task GetInstancePools_ListInstancePoolsInTheSubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (InstancePoolResource item in subscriptionResource.GetInstancePoolsAsync()) + AzureLocation locationName = new AzureLocation("japaneast"); + string longTermRetentionServerName = "testserver"; + await foreach (LongTermRetentionBackupData item in subscriptionResource.GetLongTermRetentionBackupsWithServerAsync(locationName, longTermRetentionServerName)) { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InstancePoolData resourceData = item.Data; // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded on id: {item.Id}"); } Console.WriteLine("Succeeded"); @@ -287,10 +284,10 @@ public async Task GetInstancePools_ListInstancePoolsInTheSubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocation() + public async Task GetManagedInstances_ListManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByLocation.json - // this example is just showing the usage of "LongTermRetentionBackups_ListByLocation" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceList.json + // this example is just showing the usage of "ManagedInstances_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -304,11 +301,13 @@ public async Task GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentio SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation locationName = new AzureLocation("japaneast"); - await foreach (LongTermRetentionBackupData item in subscriptionResource.GetLongTermRetentionBackupsWithLocationAsync(locationName)) + await foreach (ManagedInstanceResource item in subscriptionResource.GetManagedInstancesAsync()) { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedInstanceData resourceData = item.Data; // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {item.Id}"); + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); @@ -316,10 +315,10 @@ public async Task GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentio [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLongTermRetentionBackupsWithServer_GetAllLongTermRetentionBackupsUnderTheServer() + public async Task GetManagedInstances_ListManagedInstancesWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByServer.json - // this example is just showing the usage of "LongTermRetentionBackups_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json + // this example is just showing the usage of "ManagedInstances_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -333,12 +332,13 @@ public async Task GetLongTermRetentionBackupsWithServer_GetAllLongTermRetentionB SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation locationName = new AzureLocation("japaneast"); - string longTermRetentionServerName = "testserver"; - await foreach (LongTermRetentionBackupData item in subscriptionResource.GetLongTermRetentionBackupsWithServerAsync(locationName, longTermRetentionServerName)) + await foreach (ManagedInstanceResource item in subscriptionResource.GetManagedInstancesAsync()) { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ManagedInstanceData resourceData = item.Data; // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {item.Id}"); + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs index 0064125ba412..09294771e0f0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs @@ -1695,26 +1695,6 @@ public static QueryStatistics QueryStatistics(ResourceIdentifier id = null, stri serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Database name of the database in which this query was executed. - /// Unique query id (unique within one database). - /// The start time for the metric (ISO-8601 format). - /// The end time for the metric (ISO-8601 format). - /// List of intervals with appropriate metric data. - /// A new instance for mocking. - public static QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, IEnumerable intervals = null) - { - intervals ??= new List(); - - return new QueryStatisticsProperties( - databaseName, - queryId, - startTime, - endTime, - intervals?.ToList(), - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The start time for the metric interval (ISO-8601 format). /// Interval type (length). @@ -3255,42 +3235,6 @@ public static SqlServerConnectionPolicyData SqlServerConnectionPolicyData(Resour serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The name of the target database. - /// The source endpoint. - /// The primary availability group name. - /// The secondary availability group name. - /// The replication mode of a distributed availability group. Parameter will be ignored during link creation. - /// The distributed availability group id. - /// The source replica id. - /// The target replica id. - /// The link state. - /// The last hardened lsn. - /// A new instance for mocking. - public static DistributedAvailabilityGroupData DistributedAvailabilityGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string targetDatabase = null, string sourceEndpoint = null, string primaryAvailabilityGroupName = null, string secondaryAvailabilityGroupName = null, DistributedAvailabilityGroupReplicationMode? replicationMode = null, Guid? distributedAvailabilityGroupId = null, Guid? sourceReplicaId = null, Guid? targetReplicaId = null, string linkState = null, string lastHardenedLsn = null) - { - return new DistributedAvailabilityGroupData( - id, - name, - resourceType, - systemData, - targetDatabase, - sourceEndpoint, - primaryAvailabilityGroupName, - secondaryAvailabilityGroupName, - replicationMode, - distributedAvailabilityGroupId, - sourceReplicaId, - targetReplicaId, - linkState, - lastHardenedLsn, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -4933,548 +4877,288 @@ public static ManagedDatabaseStartMoveDefinition ManagedDatabaseStartMoveDefinit return new ManagedDatabaseStartMoveDefinition(destinationManagedDatabaseId, operationMode, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. + /// Specifies the state of ledger digest upload. + /// A new instance for mocking. + public static ManagedLedgerDigestUploadData ManagedLedgerDigestUploadData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string digestStorageEndpoint = null, ManagedLedgerDigestUploadsState? state = null) + { + return new ManagedLedgerDigestUploadData( + id, + name, + resourceType, + systemData, + digestStorageEndpoint, + state, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The edition of the database. + /// The service level objective name of the database. + /// The elastic pool name of the database. + /// The last available backup date. + /// The resource ids of the user assigned identities to use. + /// A new instance for mocking. + public static RecoverableDatabaseData RecoverableDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, DateTimeOffset? lastAvailableBackupOn = null, IDictionary keys = null) + { + keys ??= new Dictionary(); + + return new RecoverableDatabaseData( + id, + name, + resourceType, + systemData, + edition, + serviceLevelObjective, + elasticPoolName, + lastAvailableBackupOn, + keys, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// The Azure Active Directory identity of the managed instance. - /// Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH. - /// - /// - /// Specifies the mode of database creation. - /// - /// Default: Regular instance creation. - /// - /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. - /// - /// The fully qualified domain name of the managed instance. - /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). - /// The administrator login password (required for managed instance creation). - /// Subnet resource ID for the managed instance. - /// The state of the managed instance. - /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - /// Collation of the managed instance. - /// The Dns Zone that the managed instance is in. - /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. - /// Whether or not the public data endpoint is enabled. - /// The resource identifier of the source managed instance associated with create operation of this instance. - /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - /// Connection type used for connecting to the instance. - /// - /// Id of the timezone. Allowed values are timezones supported by Windows. - /// Windows keeps details on supported timezones, including the id, in registry under - /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. - /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". - /// - /// The Id of the instance pool this managed server belongs to. - /// Specifies maintenance configuration id to apply to this managed instance. - /// List of private endpoint connections on a managed instance. - /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). - /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). - /// Whether or not the multi-az is enabled. - /// The resource id of a user assigned identity to be used by default. - /// A CMK URI of the key to use for encryption. - /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. - /// The managed instance's service principal. - /// A new instance for mocking. - public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, SqlSku sku = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, int? vCores = null, int? storageSizeInGB = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null) + /// The name and tier of the SKU. + /// The name of the database. + /// The max size of the database expressed in bytes. + /// The creation date of the database (ISO8601 format). + /// The deletion date of the database (ISO8601 format). + /// The earliest restore date of the database (ISO8601 format). + /// The storage account type used to store backups for this database. + /// The resource ids of the user assigned identities to use. + /// A new instance for mocking. + public static RestorableDroppedDatabaseData RestorableDroppedDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string databaseName = null, long? maxSizeBytes = null, DateTimeOffset? createdOn = null, DateTimeOffset? deletedOn = null, DateTimeOffset? earliestRestoreOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, IDictionary keys = null) { tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); + keys ??= new Dictionary(); - return new ManagedInstanceData( + return new RestorableDroppedDatabaseData( id, name, resourceType, systemData, tags, location, - identity, sku, + databaseName, + maxSizeBytes, + createdOn, + deletedOn, + earliestRestoreOn, + backupStorageRedundancy, + keys, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Value of the server configuration option. + /// Provisioning state of server configuration option. + /// A new instance for mocking. + public static ManagedInstanceServerConfigurationOptionData ManagedInstanceServerConfigurationOptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? serverConfigurationOptionValue = null, JobExecutionProvisioningState? provisioningState = null) + { + return new ManagedInstanceServerConfigurationOptionData( + id, + name, + resourceType, + systemData, + serverConfigurationOptionValue, provisioningState, - managedInstanceCreateMode, - fullyQualifiedDomainName, - administratorLogin, - administratorLoginPassword, - subnetId, - state, - licenseType, - vCores, - storageSizeInGB, - collation, - dnsZone, - managedDnsZonePartner, - isPublicDataEndpointEnabled, - sourceManagedInstanceId, - restorePointInTime, - proxyOverride, - timezoneId, - instancePoolId, - maintenanceConfigurationId, - privateEndpointConnections?.ToList(), - minimalTlsVersion, - currentBackupStorageRedundancy, - requestedBackupStorageRedundancy, - isZoneRedundant, - primaryUserAssignedIdentityId, - keyId, - administrators, - servicePrincipal, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Resource ID. - /// Private endpoint connection properties. - /// A new instance for mocking. - public static ManagedInstancePecProperty ManagedInstancePecProperty(ResourceIdentifier id = null, ManagedInstancePrivateEndpointConnectionProperties properties = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The description of the schedule. + /// The time zone of the schedule. + /// Schedule list. + /// Next action to be executed (Start or Stop). + /// Timestamp when the next action will be executed in the corresponding schedule time zone. + /// A new instance for mocking. + public static ManagedInstanceStartStopScheduleData ManagedInstanceStartStopScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string timeZoneId = null, IEnumerable scheduleList = null, string nextRunAction = null, string nextExecutionTime = null) { - return new ManagedInstancePecProperty(id, properties, serializedAdditionalRawData: null); + scheduleList ??= new List(); + + return new ManagedInstanceStartStopScheduleData( + id, + name, + resourceType, + systemData, + description, + timeZoneId, + scheduleList?.ToList(), + nextRunAction, + nextExecutionTime, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The Azure Active Directory application object id. - /// The Azure Active Directory application client id. - /// The Azure Active Directory tenant id. - /// Service principal type. - /// A new instance for mocking. - public static SqlServicePrincipal SqlServicePrincipal(Guid? principalId = null, Guid? clientId = null, Guid? tenantId = null, SqlServicePrincipalType? principalType = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Specifies the state of the transparent data encryption. + /// A new instance for mocking. + public static LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransparentDataEncryptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TransparentDataEncryptionState? state = null) { - return new SqlServicePrincipal(principalId, clientId, tenantId, principalType, serializedAdditionalRawData: null); + return new LogicalDatabaseTransparentDataEncryptionData( + id, + name, + resourceType, + systemData, + state, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Managed instance sku. - /// Managed instance identity. - /// Resource tags. - /// - /// - /// Specifies the mode of database creation. - /// - /// Default: Regular instance creation. - /// - /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. - /// - /// The fully qualified domain name of the managed instance. - /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). - /// The administrator login password (required for managed instance creation). - /// Subnet resource ID for the managed instance. - /// The state of the managed instance. - /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - /// Collation of the managed instance. - /// The Dns Zone that the managed instance is in. - /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. - /// Whether or not the public data endpoint is enabled. - /// The resource identifier of the source managed instance associated with create operation of this instance. - /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. - /// Connection type used for connecting to the instance. - /// - /// Id of the timezone. Allowed values are timezones supported by Windows. - /// Windows keeps details on supported timezones, including the id, in registry under - /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. - /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. - /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. - /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". - /// - /// The Id of the instance pool this managed server belongs to. - /// Specifies maintenance configuration id to apply to this managed instance. - /// List of private endpoint connections on a managed instance. - /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). - /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). - /// Whether or not the multi-az is enabled. - /// The resource id of a user assigned identity to be used by default. - /// A CMK URI of the key to use for encryption. - /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. - /// The managed instance's service principal. - /// A new instance for mocking. - public static ManagedInstancePatch ManagedInstancePatch(SqlSku sku = null, ManagedServiceIdentity identity = null, IDictionary tags = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, int? vCores = null, int? storageSizeInGB = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the database the operation is being performed on. + /// The name of operation. + /// The friendly name of operation. + /// The percentage of the operation completed. + /// The name of the server. + /// The operation start time. + /// The operation state. + /// The operation error code. + /// The operation error description. + /// The operation error severity. + /// Whether or not the error is a user error. + /// The estimated completion time of the operation. + /// The operation description. + /// Whether the operation can be cancelled. + /// The operation phase details. + /// A new instance for mocking. + public static DatabaseOperationData DatabaseOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string databaseName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = null, string serverName = null, DateTimeOffset? startOn = null, ManagementOperationState? state = null, int? errorCode = null, string errorDescription = null, int? errorSeverity = null, bool? isUserError = null, DateTimeOffset? estimatedCompleteOn = null, string description = null, bool? isCancellable = null, DatabaseOperationPhaseDetails operationPhaseDetails = null) { - tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); - - return new ManagedInstancePatch( - sku, - identity, - tags, - provisioningState, - managedInstanceCreateMode, - fullyQualifiedDomainName, - administratorLogin, - administratorLoginPassword, - subnetId, + return new DatabaseOperationData( + id, + name, + resourceType, + systemData, + databaseName, + operation, + operationFriendlyName, + percentComplete, + serverName, + startOn, state, - licenseType, - vCores, - storageSizeInGB, - collation, - dnsZone, - managedDnsZonePartner, - isPublicDataEndpointEnabled, - sourceManagedInstanceId, - restorePointInTime, - proxyOverride, - timezoneId, - instancePoolId, - maintenanceConfigurationId, - privateEndpointConnections?.ToList(), - minimalTlsVersion, - currentBackupStorageRedundancy, - requestedBackupStorageRedundancy, - isZoneRedundant, - primaryUserAssignedIdentityId, - keyId, - administrators, - servicePrincipal, + errorCode, + errorDescription, + errorSeverity, + isUserError, + estimatedCompleteOn, + description, + isCancellable, + operationPhaseDetails, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc. - /// The endpoints that the managed instance service communicates with in order to function correctly. - /// A new instance for mocking. - public static SqlOutboundEnvironmentEndpoint SqlOutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) - { - endpoints ??= new List(); - - return new SqlOutboundEnvironmentEndpoint(category, endpoints?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The domain name of the dependency. - /// The IP Addresses and Ports used when connecting to DomainName. - /// A new instance for mocking. - public static ManagedInstanceEndpointDependency ManagedInstanceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) + /// Initializes a new instance of . + /// The operation phase. + /// The operation phase information. + /// A new instance for mocking. + public static DatabaseOperationPhaseDetails DatabaseOperationPhaseDetails(DatabaseOperationPhase? phase = null, IReadOnlyDictionary phaseInformation = null) { - endpointDetails ??= new List(); - - return new ManagedInstanceEndpointDependency(domainName, endpointDetails?.ToList(), serializedAdditionalRawData: null); - } + phaseInformation ??= new Dictionary(); - /// Initializes a new instance of . - /// The port an endpoint is connected to. - /// A new instance for mocking. - public static ManagedInstanceEndpointDetail ManagedInstanceEndpointDetail(int? port = null) - { - return new ManagedInstanceEndpointDetail(port, serializedAdditionalRawData: null); + return new DatabaseOperationPhaseDetails(phase, phaseInformation, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Requested number of top queries. - /// Aggregation function used to calculate query metrics. - /// Metric used to rank queries. - /// Interval type (length). - /// The start time for the metric (ISO-8601 format). - /// The end time for the metric (ISO-8601 format). - /// List of top resource consuming queries with appropriate metric data. - /// A new instance for mocking. - public static TopQueries TopQueries(int? numberOfQueries = null, string aggregationFunction = null, string observationMetric = null, QueryTimeGrainType? intervalType = null, string startTime = null, string endTime = null, IEnumerable queries = null) + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// The start IP address of the firewall rule. Must be IPv6 format. + /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address. + /// A new instance for mocking. + public static IPv6FirewallRuleData IPv6FirewallRuleData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string startIPv6Address = null, string endIPv6Address = null) { - queries ??= new List(); - - return new TopQueries( - numberOfQueries, - aggregationFunction, - observationMetric, - intervalType, - startTime, - endTime, - queries?.ToList(), - serializedAdditionalRawData: null); + return new IPv6FirewallRuleData( + id, + name, + resourceType, + serializedAdditionalRawData: null, + startIPv6Address, + endIPv6Address); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. - /// Specifies the state of ledger digest upload. - /// A new instance for mocking. - public static ManagedLedgerDigestUploadData ManagedLedgerDigestUploadData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string digestStorageEndpoint = null, ManagedLedgerDigestUploadsState? state = null) + /// The baseline set result. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineData SqlVulnerabilityAssessmentBaselineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary>> results = null) { - return new ManagedLedgerDigestUploadData( + results ??= new Dictionary>>(); + + return new SqlVulnerabilityAssessmentBaselineData( id, name, resourceType, systemData, - digestStorageEndpoint, - state, + results, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The edition of the database. - /// The service level objective name of the database. - /// The elastic pool name of the database. - /// The last available backup date. - /// The resource ids of the user assigned identities to use. - /// A new instance for mocking. - public static RecoverableDatabaseData RecoverableDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string edition = null, string serviceLevelObjective = null, string elasticPoolName = null, DateTimeOffset? lastAvailableBackupOn = null, IDictionary keys = null) + /// The latest scan flag. + /// The rule baseline result list. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isLatestScan = null, IDictionary>> results = null) { - keys ??= new Dictionary(); + results ??= new Dictionary>>(); - return new RecoverableDatabaseData( + return new SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent( id, name, resourceType, systemData, - edition, - serviceLevelObjective, - elasticPoolName, - lastAvailableBackupOn, - keys, + isLatestScan, + results, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// The name and tier of the SKU. - /// The name of the database. - /// The max size of the database expressed in bytes. - /// The creation date of the database (ISO8601 format). - /// The deletion date of the database (ISO8601 format). - /// The earliest restore date of the database (ISO8601 format). - /// The storage account type used to store backups for this database. - /// The resource ids of the user assigned identities to use. - /// A new instance for mocking. - public static RestorableDroppedDatabaseData RestorableDroppedDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, string databaseName = null, long? maxSizeBytes = null, DateTimeOffset? createdOn = null, DateTimeOffset? deletedOn = null, DateTimeOffset? earliestRestoreOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, IDictionary keys = null) + /// The rule baseline result. + /// A new instance for mocking. + public static SqlVulnerabilityAssessmentBaselineRuleData SqlVulnerabilityAssessmentBaselineRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable> results = null) { - tags ??= new Dictionary(); - keys ??= new Dictionary(); + results ??= new List>(); - return new RestorableDroppedDatabaseData( - id, - name, - resourceType, - systemData, - tags, - location, - sku, - databaseName, - maxSizeBytes, - createdOn, - deletedOn, - earliestRestoreOn, - backupStorageRedundancy, - keys, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Value of the server configuration option. - /// Provisioning state of server configuration option. - /// A new instance for mocking. - public static ManagedInstanceServerConfigurationOptionData ManagedInstanceServerConfigurationOptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? serverConfigurationOptionValue = null, JobExecutionProvisioningState? provisioningState = null) - { - return new ManagedInstanceServerConfigurationOptionData( - id, - name, - resourceType, - systemData, - serverConfigurationOptionValue, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The description of the schedule. - /// The time zone of the schedule. - /// Schedule list. - /// Next action to be executed (Start or Stop). - /// Timestamp when the next action will be executed in the corresponding schedule time zone. - /// A new instance for mocking. - public static ManagedInstanceStartStopScheduleData ManagedInstanceStartStopScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string timeZoneId = null, IEnumerable scheduleList = null, string nextRunAction = null, string nextExecutionTime = null) - { - scheduleList ??= new List(); - - return new ManagedInstanceStartStopScheduleData( - id, - name, - resourceType, - systemData, - description, - timeZoneId, - scheduleList?.ToList(), - nextRunAction, - nextExecutionTime, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Specifies the state of the transparent data encryption. - /// A new instance for mocking. - public static LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransparentDataEncryptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TransparentDataEncryptionState? state = null) - { - return new LogicalDatabaseTransparentDataEncryptionData( - id, - name, - resourceType, - systemData, - state, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The name of the database the operation is being performed on. - /// The name of operation. - /// The friendly name of operation. - /// The percentage of the operation completed. - /// The name of the server. - /// The operation start time. - /// The operation state. - /// The operation error code. - /// The operation error description. - /// The operation error severity. - /// Whether or not the error is a user error. - /// The estimated completion time of the operation. - /// The operation description. - /// Whether the operation can be cancelled. - /// The operation phase details. - /// A new instance for mocking. - public static DatabaseOperationData DatabaseOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string databaseName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = null, string serverName = null, DateTimeOffset? startOn = null, ManagementOperationState? state = null, int? errorCode = null, string errorDescription = null, int? errorSeverity = null, bool? isUserError = null, DateTimeOffset? estimatedCompleteOn = null, string description = null, bool? isCancellable = null, DatabaseOperationPhaseDetails operationPhaseDetails = null) - { - return new DatabaseOperationData( - id, - name, - resourceType, - systemData, - databaseName, - operation, - operationFriendlyName, - percentComplete, - serverName, - startOn, - state, - errorCode, - errorDescription, - errorSeverity, - isUserError, - estimatedCompleteOn, - description, - isCancellable, - operationPhaseDetails, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The operation phase. - /// The operation phase information. - /// A new instance for mocking. - public static DatabaseOperationPhaseDetails DatabaseOperationPhaseDetails(DatabaseOperationPhase? phase = null, IReadOnlyDictionary phaseInformation = null) - { - phaseInformation ??= new Dictionary(); - - return new DatabaseOperationPhaseDetails(phase, phaseInformation, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Resource ID. - /// Resource name. - /// Resource type. - /// The start IP address of the firewall rule. Must be IPv6 format. - /// The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address. - /// A new instance for mocking. - public static IPv6FirewallRuleData IPv6FirewallRuleData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string startIPv6Address = null, string endIPv6Address = null) - { - return new IPv6FirewallRuleData( - id, - name, - resourceType, - serializedAdditionalRawData: null, - startIPv6Address, - endIPv6Address); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The baseline set result. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineData SqlVulnerabilityAssessmentBaselineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary>> results = null) - { - results ??= new Dictionary>>(); - - return new SqlVulnerabilityAssessmentBaselineData( - id, - name, - resourceType, - systemData, - results, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The latest scan flag. - /// The rule baseline result list. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isLatestScan = null, IDictionary>> results = null) - { - results ??= new Dictionary>>(); - - return new SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent( - id, - name, - resourceType, - systemData, - isLatestScan, - results, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The rule baseline result. - /// A new instance for mocking. - public static SqlVulnerabilityAssessmentBaselineRuleData SqlVulnerabilityAssessmentBaselineRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable> results = null) - { - results ??= new List>(); - - return new SqlVulnerabilityAssessmentBaselineRuleData( + return new SqlVulnerabilityAssessmentBaselineRuleData( id, name, resourceType, @@ -5767,145 +5451,510 @@ public static PartnerServerInfo PartnerServerInfo(ResourceIdentifier id = null, /// The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). /// The Dns Zone that the managed instance pool is in. /// Specifies maintenance configuration id to apply to this managed instance. - /// A new instance for mocking. - public static InstancePoolData InstancePoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) + /// A new instance for mocking. + public static InstancePoolData InstancePoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SqlSku sku = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) + { + tags ??= new Dictionary(); + + return new InstancePoolData( + id, + name, + resourceType, + systemData, + tags, + location, + sku, + subnetId, + vCores, + licenseType, + dnsZone, + maintenanceConfigurationId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name and tier of the SKU. + /// Resource tags. + /// Resource ID of the subnet to place this instance pool in. + /// Count of vCores belonging to this instance pool. + /// The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). + /// The Dns Zone that the managed instance pool is in. + /// Specifies maintenance configuration id to apply to this managed instance. + /// A new instance for mocking. + public static InstancePoolPatch InstancePoolPatch(SqlSku sku = null, IDictionary tags = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) + { + tags ??= new Dictionary(); + + return new InstancePoolPatch( + sku, + tags, + subnetId, + vCores, + licenseType, + dnsZone, + maintenanceConfigurationId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The server name that the backup database belong to. + /// The create time of the server. + /// The name of the database the backup belong to. + /// The delete time of the database. + /// The time the backup was taken. + /// The time the long term retention backup will expire. + /// The storage redundancy type of the backup. + /// The storage redundancy type of the backup. + /// The setting whether the LTR backup is immutable. + /// The BackupStorageAccessTier for the LTR backup. + /// A new instance for mocking. + public static LongTermRetentionBackupData LongTermRetentionBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string serverName = null, DateTimeOffset? serverCreateOn = null, string databaseName = null, DateTimeOffset? databaseDeletedOn = null, DateTimeOffset? backupOn = null, DateTimeOffset? backupExpireOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isBackupImmutable = null, SqlBackupStorageAccessTier? backupStorageAccessTier = null) + { + return new LongTermRetentionBackupData( + id, + name, + resourceType, + systemData, + serverName, + serverCreateOn, + databaseName, + databaseDeletedOn, + backupOn, + backupExpireOn, + backupStorageRedundancy, + requestedBackupStorageRedundancy, + isBackupImmutable, + backupStorageAccessTier, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Request Id. + /// Operation type. + /// Source backup resource id. + /// Target backup resource id. + /// The storage redundancy type of the copied backup. + /// Operation status. + /// Progress message. + /// A new instance for mocking. + public static LongTermRetentionBackupOperationResult LongTermRetentionBackupOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string operationType = null, ResourceIdentifier fromBackupResourceId = null, ResourceIdentifier toBackupResourceId = null, SqlBackupStorageRedundancy? targetBackupStorageRedundancy = null, string status = null, string message = null) + { + return new LongTermRetentionBackupOperationResult( + id, + name, + resourceType, + systemData, + requestId, + operationType, + fromBackupResourceId, + toBackupResourceId, + targetBackupStorageRedundancy, + status, + message, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The setting whether to make LTR backups immutable. + /// The BackupStorageAccessTier for the LTR backups. + /// The weekly retention policy for an LTR backup in an ISO 8601 format. + /// The monthly retention policy for an LTR backup in an ISO 8601 format. + /// The yearly retention policy for an LTR backup in an ISO 8601 format. + /// The week of year to take the yearly backup in an ISO 8601 format. + /// A new instance for mocking. + public static LongTermRetentionPolicyData LongTermRetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? makeBackupsImmutable = null, SqlBackupStorageAccessTier? backupStorageAccessTier = null, string weeklyRetention = null, string monthlyRetention = null, string yearlyRetention = null, int? weekOfYear = null) + { + return new LongTermRetentionPolicyData( + id, + name, + resourceType, + systemData, + makeBackupsImmutable, + backupStorageAccessTier, + weeklyRetention, + monthlyRetention, + yearlyRetention, + weekOfYear, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The Azure Active Directory identity of the managed instance. + /// Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH. + /// Provisioning state of managed instance. + /// + /// Specifies the mode of database creation. + /// + /// Default: Regular instance creation. + /// + /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + /// + /// The fully qualified domain name of the managed instance. + /// Whether or not this is a GPv2 variant of General Purpose edition. + /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). + /// The administrator login password (required for managed instance creation). + /// Subnet resource ID for the managed instance. + /// The state of the managed instance. + /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). + /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. + /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Collation of the managed instance. + /// The Dns Zone that the managed instance is in. + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + /// Whether or not the public data endpoint is enabled. + /// The resource identifier of the source managed instance associated with create operation of this instance. + /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + /// Connection type used for connecting to the instance. + /// + /// Id of the timezone. Allowed values are timezones supported by Windows. + /// Windows keeps details on supported timezones, including the id, in registry under + /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + /// + /// The Id of the instance pool this managed server belongs to. + /// Specifies maintenance configuration id to apply to this managed instance. + /// List of private endpoint connections on a managed instance. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// Whether or not the multi-az is enabled. + /// The resource id of a user assigned identity to be used by default. + /// A CMK URI of the key to use for encryption. + /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. + /// The managed instance's service principal. + /// Virtual cluster resource id for the Managed Instance. + /// Status of external governance. + /// Weather or not Managed Instance is freemium. + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + /// The managed instance's authentication metadata lookup mode. + /// Specifies the internal format of instance databases specific to the SQL engine version. + /// A new instance for mocking. + public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, SqlSku sku = null, JobExecutionProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, HybridSecondaryUsage? hybridSecondaryUsage = null, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = null, int? vCores = null, int? storageSizeInGB = null, int? storageIOps = null, int? storageThroughputMBps = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null, string virtualClusterId = null, ExternalGovernanceStatus? externalGovernanceStatus = null, FreemiumType? pricingModel = null, DateTimeOffset? createOn = null, AuthMetadataLookupMode? authenticationMetadata = null, ManagedInstanceDatabaseFormat? databaseFormat = null) + { + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + + return new ManagedInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + identity, + sku, + provisioningState, + managedInstanceCreateMode, + fullyQualifiedDomainName, + isGeneralPurposeV2, + administratorLogin, + administratorLoginPassword, + subnetId, + state, + licenseType, + hybridSecondaryUsage, + hybridSecondaryUsageDetected, + vCores, + storageSizeInGB, + storageIOps, + storageThroughputMBps, + collation, + dnsZone, + managedDnsZonePartner, + isPublicDataEndpointEnabled, + sourceManagedInstanceId, + restorePointInTime, + proxyOverride, + timezoneId, + instancePoolId, + maintenanceConfigurationId, + privateEndpointConnections?.ToList(), + minimalTlsVersion, + currentBackupStorageRedundancy, + requestedBackupStorageRedundancy, + isZoneRedundant, + primaryUserAssignedIdentityId, + keyId, + administrators, + servicePrincipal, + virtualClusterId, + externalGovernanceStatus, + pricingModel, + createOn, + authenticationMetadata, + databaseFormat, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Private endpoint connection properties. + /// A new instance for mocking. + public static ManagedInstancePecProperty ManagedInstancePecProperty(ResourceIdentifier id = null, ManagedInstancePrivateEndpointConnectionProperties properties = null) + { + return new ManagedInstancePecProperty(id, properties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Azure Active Directory application object id. + /// The Azure Active Directory application client id. + /// The Azure Active Directory tenant id. + /// Service principal type. + /// A new instance for mocking. + public static SqlServicePrincipal SqlServicePrincipal(Guid? principalId = null, Guid? clientId = null, Guid? tenantId = null, SqlServicePrincipalType? principalType = null) + { + return new SqlServicePrincipal(principalId, clientId, tenantId, principalType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Managed instance sku. + /// Managed instance identity. + /// Resource tags. + /// Provisioning state of managed instance. + /// + /// Specifies the mode of database creation. + /// + /// Default: Regular instance creation. + /// + /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + /// + /// The fully qualified domain name of the managed instance. + /// Whether or not this is a GPv2 variant of General Purpose edition. + /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). + /// The administrator login password (required for managed instance creation). + /// Subnet resource ID for the managed instance. + /// The state of the managed instance. + /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). + /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. + /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Collation of the managed instance. + /// The Dns Zone that the managed instance is in. + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + /// Whether or not the public data endpoint is enabled. + /// The resource identifier of the source managed instance associated with create operation of this instance. + /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + /// Connection type used for connecting to the instance. + /// + /// Id of the timezone. Allowed values are timezones supported by Windows. + /// Windows keeps details on supported timezones, including the id, in registry under + /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + /// + /// The Id of the instance pool this managed server belongs to. + /// Specifies maintenance configuration id to apply to this managed instance. + /// List of private endpoint connections on a managed instance. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// Whether or not the multi-az is enabled. + /// The resource id of a user assigned identity to be used by default. + /// A CMK URI of the key to use for encryption. + /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. + /// The managed instance's service principal. + /// Virtual cluster resource id for the Managed Instance. + /// Status of external governance. + /// Weather or not Managed Instance is freemium. + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + /// The managed instance's authentication metadata lookup mode. + /// Specifies the internal format of instance databases specific to the SQL engine version. + /// A new instance for mocking. + public static ManagedInstancePatch ManagedInstancePatch(SqlSku sku = null, ManagedServiceIdentity identity = null, IDictionary tags = null, JobExecutionProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, HybridSecondaryUsage? hybridSecondaryUsage = null, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = null, int? vCores = null, int? storageSizeInGB = null, int? storageIOps = null, int? storageThroughputMBps = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null, string virtualClusterId = null, ExternalGovernanceStatus? externalGovernanceStatus = null, FreemiumType? pricingModel = null, DateTimeOffset? createOn = null, AuthMetadataLookupMode? authenticationMetadata = null, ManagedInstanceDatabaseFormat? databaseFormat = null) { tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); - return new InstancePoolData( - id, - name, - resourceType, - systemData, - tags, - location, + return new ManagedInstancePatch( sku, + identity, + tags, + provisioningState, + managedInstanceCreateMode, + fullyQualifiedDomainName, + isGeneralPurposeV2, + administratorLogin, + administratorLoginPassword, subnetId, - vCores, + state, licenseType, + hybridSecondaryUsage, + hybridSecondaryUsageDetected, + vCores, + storageSizeInGB, + storageIOps, + storageThroughputMBps, + collation, dnsZone, + managedDnsZonePartner, + isPublicDataEndpointEnabled, + sourceManagedInstanceId, + restorePointInTime, + proxyOverride, + timezoneId, + instancePoolId, maintenanceConfigurationId, + privateEndpointConnections?.ToList(), + minimalTlsVersion, + currentBackupStorageRedundancy, + requestedBackupStorageRedundancy, + isZoneRedundant, + primaryUserAssignedIdentityId, + keyId, + administrators, + servicePrincipal, + virtualClusterId, + externalGovernanceStatus, + pricingModel, + createOn, + authenticationMetadata, + databaseFormat, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The name and tier of the SKU. - /// Resource tags. - /// Resource ID of the subnet to place this instance pool in. - /// Count of vCores belonging to this instance pool. - /// The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). - /// The Dns Zone that the managed instance pool is in. - /// Specifies maintenance configuration id to apply to this managed instance. - /// A new instance for mocking. - public static InstancePoolPatch InstancePoolPatch(SqlSku sku = null, IDictionary tags = null, ResourceIdentifier subnetId = null, int? vCores = null, InstancePoolLicenseType? licenseType = null, string dnsZone = null, ResourceIdentifier maintenanceConfigurationId = null) + /// Initializes a new instance of . + /// The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc. + /// The endpoints that the managed instance service communicates with in order to function correctly. + /// A new instance for mocking. + public static SqlOutboundEnvironmentEndpoint SqlOutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) { - tags ??= new Dictionary(); + endpoints ??= new List(); - return new InstancePoolPatch( - sku, - tags, - subnetId, - vCores, - licenseType, - dnsZone, - maintenanceConfigurationId, - serializedAdditionalRawData: null); + return new SqlOutboundEnvironmentEndpoint(category, endpoints?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The server name that the backup database belong to. - /// The create time of the server. - /// The name of the database the backup belong to. - /// The delete time of the database. - /// The time the backup was taken. - /// The time the long term retention backup will expire. - /// The storage redundancy type of the backup. - /// The storage redundancy type of the backup. - /// The setting whether the LTR backup is immutable. - /// The BackupStorageAccessTier for the LTR backup. - /// A new instance for mocking. - public static LongTermRetentionBackupData LongTermRetentionBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string serverName = null, DateTimeOffset? serverCreateOn = null, string databaseName = null, DateTimeOffset? databaseDeletedOn = null, DateTimeOffset? backupOn = null, DateTimeOffset? backupExpireOn = null, SqlBackupStorageRedundancy? backupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isBackupImmutable = null, SqlBackupStorageAccessTier? backupStorageAccessTier = null) + /// Initializes a new instance of . + /// The domain name of the dependency. + /// The IP Addresses and Ports used when connecting to DomainName. + /// A new instance for mocking. + public static ManagedInstanceEndpointDependency ManagedInstanceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) { - return new LongTermRetentionBackupData( - id, - name, - resourceType, - systemData, - serverName, - serverCreateOn, - databaseName, - databaseDeletedOn, - backupOn, - backupExpireOn, - backupStorageRedundancy, - requestedBackupStorageRedundancy, - isBackupImmutable, - backupStorageAccessTier, - serializedAdditionalRawData: null); + endpointDetails ??= new List(); + + return new ManagedInstanceEndpointDependency(domainName, endpointDetails?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The port an endpoint is connected to. + /// A new instance for mocking. + public static ManagedInstanceEndpointDetail ManagedInstanceEndpointDetail(int? port = null) + { + return new ManagedInstanceEndpointDetail(port, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// Request Id. - /// Operation type. - /// Source backup resource id. - /// Target backup resource id. - /// The storage redundancy type of the copied backup. + /// Request type. + /// Queued time. + /// Managed instance name. /// Operation status. - /// Progress message. - /// A new instance for mocking. - public static LongTermRetentionBackupOperationResult LongTermRetentionBackupOperationResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string operationType = null, ResourceIdentifier fromBackupResourceId = null, ResourceIdentifier toBackupResourceId = null, SqlBackupStorageRedundancy? targetBackupStorageRedundancy = null, string status = null, string message = null) + /// Error message. + /// A new instance for mocking. + public static RefreshExternalGovernanceStatusOperationResultMI RefreshExternalGovernanceStatusOperationResultMI(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? requestId = null, string requestType = null, string queuedTime = null, string managedInstanceName = null, string status = null, string errorMessage = null) { - return new LongTermRetentionBackupOperationResult( + return new RefreshExternalGovernanceStatusOperationResultMI( id, name, resourceType, systemData, requestId, - operationType, - fromBackupResourceId, - toBackupResourceId, - targetBackupStorageRedundancy, + requestType, + queuedTime, + managedInstanceName, status, - message, + errorMessage, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The setting whether to make LTR backups immutable. - /// The BackupStorageAccessTier for the LTR backups. - /// The weekly retention policy for an LTR backup in an ISO 8601 format. - /// The monthly retention policy for an LTR backup in an ISO 8601 format. - /// The yearly retention policy for an LTR backup in an ISO 8601 format. - /// The week of year to take the yearly backup in an ISO 8601 format. - /// A new instance for mocking. - public static LongTermRetentionPolicyData LongTermRetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? makeBackupsImmutable = null, SqlBackupStorageAccessTier? backupStorageAccessTier = null, string weeklyRetention = null, string monthlyRetention = null, string yearlyRetention = null, int? weekOfYear = null) + /// Initializes a new instance of . + /// Requested number of top queries. + /// Aggregation function used to calculate query metrics. + /// Metric used to rank queries. + /// Interval type (length). + /// The start time for the metric (ISO-8601 format). + /// The end time for the metric (ISO-8601 format). + /// List of top resource consuming queries with appropriate metric data. + /// A new instance for mocking. + public static TopQueries TopQueries(int? numberOfQueries = null, string aggregationFunction = null, string observationMetric = null, QueryTimeGrainType? intervalType = null, string startTime = null, string endTime = null, IEnumerable queries = null) { - return new LongTermRetentionPolicyData( - id, - name, - resourceType, - systemData, - makeBackupsImmutable, - backupStorageAccessTier, - weeklyRetention, - monthlyRetention, - yearlyRetention, - weekOfYear, + queries ??= new List(); + + return new TopQueries( + numberOfQueries, + aggregationFunction, + observationMetric, + intervalType, + startTime, + endTime, + queries?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Database name of the database in which this query was executed. + /// Unique query id (unique within one database). + /// The start time for the metric (ISO-8601 format). + /// The end time for the metric (ISO-8601 format). + /// List of intervals with appropriate metric data. + /// A new instance for mocking. + public static QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, IEnumerable intervals = null) + { + intervals ??= new List(); + + return new QueryStatisticsProperties( + databaseName, + queryId, + startTime, + endTime, + intervals?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The start time for the metric interval (ISO-8601 format). + /// Interval type (length). + /// Execution count of a query in this interval. + /// List of metric objects for this interval. + /// A new instance for mocking. + public static QueryMetricIntervalAutoGenerated QueryMetricIntervalAutoGenerated(string intervalStartTime = null, QueryTimeGrainType? intervalType = null, long? executionCount = null, IEnumerable metrics = null) + { + metrics ??= new List(); + + return new QueryMetricIntervalAutoGenerated(intervalStartTime, intervalType, executionCount, metrics?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// /// @@ -6156,5 +6205,104 @@ public static SqlServerDatabaseReplicationLinkPatch SqlServerDatabaseReplication linkType, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Name of the distributed availability group. + /// ID of the distributed availability group. + /// Replication mode of the link. + /// SQL server side link role. + /// SQL server side availability group name. + /// SQL server side endpoint - IP or DNS resolvable name. + /// Managed instance side link role. + /// Managed instance side availability group name. + /// The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure. + /// Database seeding mode – can be Automatic (default), or Manual for supported scenarios. + /// Databases in the distributed availability group. + /// A new instance for mocking. + public static DistributedAvailabilityGroupData DistributedAvailabilityGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string distributedAvailabilityGroupName = null, Guid? distributedAvailabilityGroupId = null, ReplicationModeType? replicationMode = null, LinkRole? partnerLinkRole = null, string partnerAvailabilityGroupName = null, string partnerEndpoint = null, LinkRole? instanceLinkRole = null, string instanceAvailabilityGroupName = null, FailoverModeType? failoverMode = null, SeedingModeType? seedingMode = null, IEnumerable databases = null) + { + databases ??= new List(); + + return new DistributedAvailabilityGroupData( + id, + name, + resourceType, + systemData, + distributedAvailabilityGroupName, + distributedAvailabilityGroupId, + replicationMode, + partnerLinkRole, + partnerAvailabilityGroupName, + partnerEndpoint, + instanceLinkRole, + instanceAvailabilityGroupName, + failoverMode, + seedingMode, + databases?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the database in link. + /// Managed instance replica id. + /// SQL server replica id. + /// Current link state. + /// Seeding progress. + /// Link health state. + /// Link connected state. + /// Last received LSN. + /// Last received LSN time. + /// Last sent LSN. + /// Last sent LSN time. + /// Last commit LSN. + /// Last commit LSN time. + /// Last hardened LSN. + /// Last hardened LSN time. + /// Last backup LSN. + /// Last backup LSN time. + /// The most recent link connection error description. + /// SQL server certificate validity. + /// Replication lag when Managed Instance link side is primary. + /// Redo lag when Managed Instance link side is primary. + /// A new instance for mocking. + public static DistributedAvailabilityGroupDatabase DistributedAvailabilityGroupDatabase(string databaseName = null, Guid? instanceReplicaId = null, Guid? partnerReplicaId = null, string replicaState = null, string seedingProgress = null, ReplicaSynchronizationHealth? synchronizationHealth = null, ReplicaConnectedState? connectedState = null, string lastReceivedLsn = null, DateTimeOffset? lastReceivedOn = null, string lastSentLsn = null, DateTimeOffset? lastSentOn = null, string lastCommitLsn = null, DateTimeOffset? lastCommitOn = null, string lastHardenedLsn = null, DateTimeOffset? lastHardenedOn = null, string lastBackupLsn = null, DateTimeOffset? lastBackupOn = null, string mostRecentLinkError = null, CertificateInfo partnerAuthCertValidity = null, int? instanceSendReplicationLagSeconds = null, int? instanceRedoReplicationLagSeconds = null) + { + return new DistributedAvailabilityGroupDatabase( + databaseName, + instanceReplicaId, + partnerReplicaId, + replicaState, + seedingProgress, + synchronizationHealth, + connectedState, + lastReceivedLsn, + lastReceivedOn, + lastSentLsn, + lastSentOn, + lastCommitLsn, + lastCommitOn, + lastHardenedLsn, + lastHardenedOn, + lastBackupLsn, + lastBackupOn, + mostRecentLinkError, + partnerAuthCertValidity, + instanceSendReplicationLagSeconds, + instanceRedoReplicationLagSeconds, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The certificate name. + /// The certificate expiry date. + /// A new instance for mocking. + public static CertificateInfo CertificateInfo(string certificateName = null, DateTimeOffset? expiryOn = null) + { + return new CertificateInfo(certificateName, expiryOn, serializedAdditionalRawData: null); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupCollection.cs index aa5cc50bc01c..3f22631d00ff 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string distrib /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string distributedAvailabi /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string distributedAvailabilityGroupName, Ca /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.Serialization.cs index 41b317ab0764..551e226906ed 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -40,55 +41,65 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(TargetDatabase)) + if (options.Format != "W" && Optional.IsDefined(DistributedAvailabilityGroupName)) { - writer.WritePropertyName("targetDatabase"u8); - writer.WriteStringValue(TargetDatabase); + writer.WritePropertyName("distributedAvailabilityGroupName"u8); + writer.WriteStringValue(DistributedAvailabilityGroupName); } - if (Optional.IsDefined(SourceEndpoint)) + if (options.Format != "W" && Optional.IsDefined(DistributedAvailabilityGroupId)) { - writer.WritePropertyName("sourceEndpoint"u8); - writer.WriteStringValue(SourceEndpoint); + writer.WritePropertyName("distributedAvailabilityGroupId"u8); + writer.WriteStringValue(DistributedAvailabilityGroupId.Value); } - if (Optional.IsDefined(PrimaryAvailabilityGroupName)) + if (Optional.IsDefined(ReplicationMode)) { - writer.WritePropertyName("primaryAvailabilityGroupName"u8); - writer.WriteStringValue(PrimaryAvailabilityGroupName); + writer.WritePropertyName("replicationMode"u8); + writer.WriteStringValue(ReplicationMode.Value.ToString()); } - if (Optional.IsDefined(SecondaryAvailabilityGroupName)) + if (options.Format != "W" && Optional.IsDefined(PartnerLinkRole)) { - writer.WritePropertyName("secondaryAvailabilityGroupName"u8); - writer.WriteStringValue(SecondaryAvailabilityGroupName); + writer.WritePropertyName("partnerLinkRole"u8); + writer.WriteStringValue(PartnerLinkRole.Value.ToString()); } - if (Optional.IsDefined(ReplicationMode)) + if (Optional.IsDefined(PartnerAvailabilityGroupName)) { - writer.WritePropertyName("replicationMode"u8); - writer.WriteStringValue(ReplicationMode.Value.ToString()); + writer.WritePropertyName("partnerAvailabilityGroupName"u8); + writer.WriteStringValue(PartnerAvailabilityGroupName); } - if (options.Format != "W" && Optional.IsDefined(DistributedAvailabilityGroupId)) + if (Optional.IsDefined(PartnerEndpoint)) { - writer.WritePropertyName("distributedAvailabilityGroupId"u8); - writer.WriteStringValue(DistributedAvailabilityGroupId.Value); + writer.WritePropertyName("partnerEndpoint"u8); + writer.WriteStringValue(PartnerEndpoint); } - if (options.Format != "W" && Optional.IsDefined(SourceReplicaId)) + if (Optional.IsDefined(InstanceLinkRole)) { - writer.WritePropertyName("sourceReplicaId"u8); - writer.WriteStringValue(SourceReplicaId.Value); + writer.WritePropertyName("instanceLinkRole"u8); + writer.WriteStringValue(InstanceLinkRole.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(TargetReplicaId)) + if (Optional.IsDefined(InstanceAvailabilityGroupName)) { - writer.WritePropertyName("targetReplicaId"u8); - writer.WriteStringValue(TargetReplicaId.Value); + writer.WritePropertyName("instanceAvailabilityGroupName"u8); + writer.WriteStringValue(InstanceAvailabilityGroupName); } - if (options.Format != "W" && Optional.IsDefined(LinkState)) + if (Optional.IsDefined(FailoverMode)) { - writer.WritePropertyName("linkState"u8); - writer.WriteStringValue(LinkState); + writer.WritePropertyName("failoverMode"u8); + writer.WriteStringValue(FailoverMode.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(LastHardenedLsn)) + if (Optional.IsDefined(SeedingMode)) { - writer.WritePropertyName("lastHardenedLsn"u8); - writer.WriteStringValue(LastHardenedLsn); + writer.WritePropertyName("seedingMode"u8); + writer.WriteStringValue(SeedingMode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Databases)) + { + writer.WritePropertyName("databases"u8); + writer.WriteStartArray(); + foreach (var item in Databases) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } writer.WriteEndObject(); } @@ -117,16 +128,17 @@ internal static DistributedAvailabilityGroupData DeserializeDistributedAvailabil string name = default; ResourceType type = default; SystemData systemData = default; - string targetDatabase = default; - string sourceEndpoint = default; - string primaryAvailabilityGroupName = default; - string secondaryAvailabilityGroupName = default; - DistributedAvailabilityGroupReplicationMode? replicationMode = default; + string distributedAvailabilityGroupName = default; Guid? distributedAvailabilityGroupId = default; - Guid? sourceReplicaId = default; - Guid? targetReplicaId = default; - string linkState = default; - string lastHardenedLsn = default; + ReplicationModeType? replicationMode = default; + LinkRole? partnerLinkRole = default; + string partnerAvailabilityGroupName = default; + string partnerEndpoint = default; + LinkRole? instanceLinkRole = default; + string instanceAvailabilityGroupName = default; + FailoverModeType? failoverMode = default; + SeedingModeType? seedingMode = default; + IList databases = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -164,24 +176,18 @@ internal static DistributedAvailabilityGroupData DeserializeDistributedAvailabil } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("targetDatabase"u8)) - { - targetDatabase = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("sourceEndpoint"u8)) + if (property0.NameEquals("distributedAvailabilityGroupName"u8)) { - sourceEndpoint = property0.Value.GetString(); + distributedAvailabilityGroupName = property0.Value.GetString(); continue; } - if (property0.NameEquals("primaryAvailabilityGroupName"u8)) - { - primaryAvailabilityGroupName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("secondaryAvailabilityGroupName"u8)) + if (property0.NameEquals("distributedAvailabilityGroupId"u8)) { - secondaryAvailabilityGroupName = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + distributedAvailabilityGroupId = property0.Value.GetGuid(); continue; } if (property0.NameEquals("replicationMode"u8)) @@ -190,44 +196,72 @@ internal static DistributedAvailabilityGroupData DeserializeDistributedAvailabil { continue; } - replicationMode = new DistributedAvailabilityGroupReplicationMode(property0.Value.GetString()); + replicationMode = new ReplicationModeType(property0.Value.GetString()); continue; } - if (property0.NameEquals("distributedAvailabilityGroupId"u8)) + if (property0.NameEquals("partnerLinkRole"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - distributedAvailabilityGroupId = property0.Value.GetGuid(); + partnerLinkRole = new LinkRole(property0.Value.GetString()); continue; } - if (property0.NameEquals("sourceReplicaId"u8)) + if (property0.NameEquals("partnerAvailabilityGroupName"u8)) + { + partnerAvailabilityGroupName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("partnerEndpoint"u8)) + { + partnerEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("instanceLinkRole"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - sourceReplicaId = property0.Value.GetGuid(); + instanceLinkRole = new LinkRole(property0.Value.GetString()); continue; } - if (property0.NameEquals("targetReplicaId"u8)) + if (property0.NameEquals("instanceAvailabilityGroupName"u8)) + { + instanceAvailabilityGroupName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("failoverMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - targetReplicaId = property0.Value.GetGuid(); + failoverMode = new FailoverModeType(property0.Value.GetString()); continue; } - if (property0.NameEquals("linkState"u8)) + if (property0.NameEquals("seedingMode"u8)) { - linkState = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + seedingMode = new SeedingModeType(property0.Value.GetString()); continue; } - if (property0.NameEquals("lastHardenedLsn"u8)) + if (property0.NameEquals("databases"u8)) { - lastHardenedLsn = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(DistributedAvailabilityGroupDatabase.DeserializeDistributedAvailabilityGroupDatabase(item, options)); + } + databases = array; continue; } } @@ -244,16 +278,17 @@ internal static DistributedAvailabilityGroupData DeserializeDistributedAvailabil name, type, systemData, - targetDatabase, - sourceEndpoint, - primaryAvailabilityGroupName, - secondaryAvailabilityGroupName, - replicationMode, + distributedAvailabilityGroupName, distributedAvailabilityGroupId, - sourceReplicaId, - targetReplicaId, - linkState, - lastHardenedLsn, + replicationMode, + partnerLinkRole, + partnerAvailabilityGroupName, + partnerEndpoint, + instanceLinkRole, + instanceAvailabilityGroupName, + failoverMode, + seedingMode, + databases ?? new ChangeTrackingList(), serializedAdditionalRawData); } @@ -323,200 +358,207 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.Append(" properties:"); builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetDatabase), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DistributedAvailabilityGroupName), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" targetDatabase: "); + builder.Append(" distributedAvailabilityGroupName: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(TargetDatabase)) + if (Optional.IsDefined(DistributedAvailabilityGroupName)) { - builder.Append(" targetDatabase: "); - if (TargetDatabase.Contains(Environment.NewLine)) + builder.Append(" distributedAvailabilityGroupName: "); + if (DistributedAvailabilityGroupName.Contains(Environment.NewLine)) { builder.AppendLine("'''"); - builder.AppendLine($"{TargetDatabase}'''"); + builder.AppendLine($"{DistributedAvailabilityGroupName}'''"); } else { - builder.AppendLine($"'{TargetDatabase}'"); + builder.AppendLine($"'{DistributedAvailabilityGroupName}'"); } } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceEndpoint), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DistributedAvailabilityGroupId), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" sourceEndpoint: "); + builder.Append(" distributedAvailabilityGroupId: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(SourceEndpoint)) + if (Optional.IsDefined(DistributedAvailabilityGroupId)) { - builder.Append(" sourceEndpoint: "); - if (SourceEndpoint.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{SourceEndpoint}'''"); - } - else - { - builder.AppendLine($"'{SourceEndpoint}'"); - } + builder.Append(" distributedAvailabilityGroupId: "); + builder.AppendLine($"'{DistributedAvailabilityGroupId.Value.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrimaryAvailabilityGroupName), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReplicationMode), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" primaryAvailabilityGroupName: "); + builder.Append(" replicationMode: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(PrimaryAvailabilityGroupName)) + if (Optional.IsDefined(ReplicationMode)) { - builder.Append(" primaryAvailabilityGroupName: "); - if (PrimaryAvailabilityGroupName.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{PrimaryAvailabilityGroupName}'''"); - } - else - { - builder.AppendLine($"'{PrimaryAvailabilityGroupName}'"); - } + builder.Append(" replicationMode: "); + builder.AppendLine($"'{ReplicationMode.Value.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryAvailabilityGroupName), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerLinkRole), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" secondaryAvailabilityGroupName: "); + builder.Append(" partnerLinkRole: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(SecondaryAvailabilityGroupName)) + if (Optional.IsDefined(PartnerLinkRole)) { - builder.Append(" secondaryAvailabilityGroupName: "); - if (SecondaryAvailabilityGroupName.Contains(Environment.NewLine)) + builder.Append(" partnerLinkRole: "); + builder.AppendLine($"'{PartnerLinkRole.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerAvailabilityGroupName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerAvailabilityGroupName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerAvailabilityGroupName)) + { + builder.Append(" partnerAvailabilityGroupName: "); + if (PartnerAvailabilityGroupName.Contains(Environment.NewLine)) { builder.AppendLine("'''"); - builder.AppendLine($"{SecondaryAvailabilityGroupName}'''"); + builder.AppendLine($"{PartnerAvailabilityGroupName}'''"); } else { - builder.AppendLine($"'{SecondaryAvailabilityGroupName}'"); + builder.AppendLine($"'{PartnerAvailabilityGroupName}'"); } } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReplicationMode), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerEndpoint), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" replicationMode: "); + builder.Append(" partnerEndpoint: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(ReplicationMode)) + if (Optional.IsDefined(PartnerEndpoint)) { - builder.Append(" replicationMode: "); - builder.AppendLine($"'{ReplicationMode.Value.ToString()}'"); + builder.Append(" partnerEndpoint: "); + if (PartnerEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PartnerEndpoint}'''"); + } + else + { + builder.AppendLine($"'{PartnerEndpoint}'"); + } } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DistributedAvailabilityGroupId), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceLinkRole), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" distributedAvailabilityGroupId: "); + builder.Append(" instanceLinkRole: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(DistributedAvailabilityGroupId)) + if (Optional.IsDefined(InstanceLinkRole)) { - builder.Append(" distributedAvailabilityGroupId: "); - builder.AppendLine($"'{DistributedAvailabilityGroupId.Value.ToString()}'"); + builder.Append(" instanceLinkRole: "); + builder.AppendLine($"'{InstanceLinkRole.Value.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceReplicaId), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceAvailabilityGroupName), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" sourceReplicaId: "); + builder.Append(" instanceAvailabilityGroupName: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(SourceReplicaId)) + if (Optional.IsDefined(InstanceAvailabilityGroupName)) { - builder.Append(" sourceReplicaId: "); - builder.AppendLine($"'{SourceReplicaId.Value.ToString()}'"); + builder.Append(" instanceAvailabilityGroupName: "); + if (InstanceAvailabilityGroupName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{InstanceAvailabilityGroupName}'''"); + } + else + { + builder.AppendLine($"'{InstanceAvailabilityGroupName}'"); + } } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetReplicaId), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FailoverMode), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" targetReplicaId: "); + builder.Append(" failoverMode: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(TargetReplicaId)) + if (Optional.IsDefined(FailoverMode)) { - builder.Append(" targetReplicaId: "); - builder.AppendLine($"'{TargetReplicaId.Value.ToString()}'"); + builder.Append(" failoverMode: "); + builder.AppendLine($"'{FailoverMode.Value.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkState), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SeedingMode), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" linkState: "); + builder.Append(" seedingMode: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(LinkState)) + if (Optional.IsDefined(SeedingMode)) { - builder.Append(" linkState: "); - if (LinkState.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{LinkState}'''"); - } - else - { - builder.AppendLine($"'{LinkState}'"); - } + builder.Append(" seedingMode: "); + builder.AppendLine($"'{SeedingMode.Value.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastHardenedLsn), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Databases), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" lastHardenedLsn: "); + builder.Append(" databases: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(LastHardenedLsn)) + if (Optional.IsCollectionDefined(Databases)) { - builder.Append(" lastHardenedLsn: "); - if (LastHardenedLsn.Contains(Environment.NewLine)) + if (Databases.Any()) { - builder.AppendLine("'''"); - builder.AppendLine($"{LastHardenedLsn}'''"); - } - else - { - builder.AppendLine($"'{LastHardenedLsn}'"); + builder.Append(" databases: "); + builder.AppendLine("["); + foreach (var item in Databases) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " databases: "); + } + builder.AppendLine(" ]"); } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.cs index a47b5c99fdb0..d6d9aac83086 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupData.cs @@ -54,6 +54,7 @@ public partial class DistributedAvailabilityGroupData : ResourceData /// Initializes a new instance of . public DistributedAvailabilityGroupData() { + Databases = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -61,61 +62,66 @@ public DistributedAvailabilityGroupData() /// The name. /// The resourceType. /// The systemData. - /// The name of the target database. - /// The source endpoint. - /// The primary availability group name. - /// The secondary availability group name. - /// The replication mode of a distributed availability group. Parameter will be ignored during link creation. - /// The distributed availability group id. - /// The source replica id. - /// The target replica id. - /// The link state. - /// The last hardened lsn. + /// Name of the distributed availability group. + /// ID of the distributed availability group. + /// Replication mode of the link. + /// SQL server side link role. + /// SQL server side availability group name. + /// SQL server side endpoint - IP or DNS resolvable name. + /// Managed instance side link role. + /// Managed instance side availability group name. + /// The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure. + /// Database seeding mode – can be Automatic (default), or Manual for supported scenarios. + /// Databases in the distributed availability group. /// Keeps track of any properties unknown to the library. - internal DistributedAvailabilityGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string targetDatabase, string sourceEndpoint, string primaryAvailabilityGroupName, string secondaryAvailabilityGroupName, DistributedAvailabilityGroupReplicationMode? replicationMode, Guid? distributedAvailabilityGroupId, Guid? sourceReplicaId, Guid? targetReplicaId, string linkState, string lastHardenedLsn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DistributedAvailabilityGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string distributedAvailabilityGroupName, Guid? distributedAvailabilityGroupId, ReplicationModeType? replicationMode, LinkRole? partnerLinkRole, string partnerAvailabilityGroupName, string partnerEndpoint, LinkRole? instanceLinkRole, string instanceAvailabilityGroupName, FailoverModeType? failoverMode, SeedingModeType? seedingMode, IList databases, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - TargetDatabase = targetDatabase; - SourceEndpoint = sourceEndpoint; - PrimaryAvailabilityGroupName = primaryAvailabilityGroupName; - SecondaryAvailabilityGroupName = secondaryAvailabilityGroupName; - ReplicationMode = replicationMode; + DistributedAvailabilityGroupName = distributedAvailabilityGroupName; DistributedAvailabilityGroupId = distributedAvailabilityGroupId; - SourceReplicaId = sourceReplicaId; - TargetReplicaId = targetReplicaId; - LinkState = linkState; - LastHardenedLsn = lastHardenedLsn; + ReplicationMode = replicationMode; + PartnerLinkRole = partnerLinkRole; + PartnerAvailabilityGroupName = partnerAvailabilityGroupName; + PartnerEndpoint = partnerEndpoint; + InstanceLinkRole = instanceLinkRole; + InstanceAvailabilityGroupName = instanceAvailabilityGroupName; + FailoverMode = failoverMode; + SeedingMode = seedingMode; + Databases = databases; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the target database. - [WirePath("properties.targetDatabase")] - public string TargetDatabase { get; set; } - /// The source endpoint. - [WirePath("properties.sourceEndpoint")] - public string SourceEndpoint { get; set; } - /// The primary availability group name. - [WirePath("properties.primaryAvailabilityGroupName")] - public string PrimaryAvailabilityGroupName { get; set; } - /// The secondary availability group name. - [WirePath("properties.secondaryAvailabilityGroupName")] - public string SecondaryAvailabilityGroupName { get; set; } - /// The replication mode of a distributed availability group. Parameter will be ignored during link creation. - [WirePath("properties.replicationMode")] - public DistributedAvailabilityGroupReplicationMode? ReplicationMode { get; set; } - /// The distributed availability group id. + /// Name of the distributed availability group. + [WirePath("properties.distributedAvailabilityGroupName")] + public string DistributedAvailabilityGroupName { get; } + /// ID of the distributed availability group. [WirePath("properties.distributedAvailabilityGroupId")] public Guid? DistributedAvailabilityGroupId { get; } - /// The source replica id. - [WirePath("properties.sourceReplicaId")] - public Guid? SourceReplicaId { get; } - /// The target replica id. - [WirePath("properties.targetReplicaId")] - public Guid? TargetReplicaId { get; } - /// The link state. - [WirePath("properties.linkState")] - public string LinkState { get; } - /// The last hardened lsn. - [WirePath("properties.lastHardenedLsn")] - public string LastHardenedLsn { get; } + /// Replication mode of the link. + [WirePath("properties.replicationMode")] + public ReplicationModeType? ReplicationMode { get; set; } + /// SQL server side link role. + [WirePath("properties.partnerLinkRole")] + public LinkRole? PartnerLinkRole { get; } + /// SQL server side availability group name. + [WirePath("properties.partnerAvailabilityGroupName")] + public string PartnerAvailabilityGroupName { get; set; } + /// SQL server side endpoint - IP or DNS resolvable name. + [WirePath("properties.partnerEndpoint")] + public string PartnerEndpoint { get; set; } + /// Managed instance side link role. + [WirePath("properties.instanceLinkRole")] + public LinkRole? InstanceLinkRole { get; set; } + /// Managed instance side availability group name. + [WirePath("properties.instanceAvailabilityGroupName")] + public string InstanceAvailabilityGroupName { get; set; } + /// The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure. + [WirePath("properties.failoverMode")] + public FailoverModeType? FailoverMode { get; set; } + /// Database seeding mode – can be Automatic (default), or Manual for supported scenarios. + [WirePath("properties.seedingMode")] + public SeedingModeType? SeedingMode { get; set; } + /// Databases in the distributed availability group. + [WirePath("properties.databases")] + public IList Databases { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupResource.cs index a78cb3205da7..6a6bedd309ce 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DistributedAvailabilityGroupResource.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { @@ -101,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -141,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -181,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -223,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -265,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -311,7 +312,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2021-11-01-preview + /// 2023-08-01-preview /// /// /// Resource @@ -343,5 +344,189 @@ public virtual ArmOperation Update(WaitUnt throw; } } + + /// + /// Performs requested failover type in this distributed availability group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/failover + /// + /// + /// Operation Id + /// DistributedAvailabilityGroups_Failover + /// + /// + /// Default Api Version + /// 2023-08-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The distributed availability group failover request parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> FailoverAsync(WaitUntil waitUntil, DistributedAvailabilityGroupsFailoverContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Failover"); + scope.Start(); + try + { + var response = await _distributedAvailabilityGroupRestClient.FailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs requested failover type in this distributed availability group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/failover + /// + /// + /// Operation Id + /// DistributedAvailabilityGroups_Failover + /// + /// + /// Default Api Version + /// 2023-08-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The distributed availability group failover request parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Failover(WaitUntil waitUntil, DistributedAvailabilityGroupsFailoverContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.Failover"); + scope.Start(); + try + { + var response = _distributedAvailabilityGroupRestClient.Failover(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Sets the role for managed instance in a distributed availability group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/setRole + /// + /// + /// Operation Id + /// DistributedAvailabilityGroups_SetRole + /// + /// + /// Default Api Version + /// 2023-08-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The distributed availability group set role request parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetRoleAsync(WaitUntil waitUntil, DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(distributedAvailabilityGroupSetRole, nameof(distributedAvailabilityGroupSetRole)); + + using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.SetRole"); + scope.Start(); + try + { + var response = await _distributedAvailabilityGroupRestClient.SetRoleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, distributedAvailabilityGroupSetRole, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateSetRoleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, distributedAvailabilityGroupSetRole).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Sets the role for managed instance in a distributed availability group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/setRole + /// + /// + /// Operation Id + /// DistributedAvailabilityGroups_SetRole + /// + /// + /// Default Api Version + /// 2023-08-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The distributed availability group set role request parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation SetRole(WaitUntil waitUntil, DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(distributedAvailabilityGroupSetRole, nameof(distributedAvailabilityGroupSetRole)); + + using var scope = _distributedAvailabilityGroupClientDiagnostics.CreateScope("DistributedAvailabilityGroupResource.SetRole"); + scope.Start(); + try + { + var response = _distributedAvailabilityGroupRestClient.SetRole(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, distributedAvailabilityGroupSetRole, cancellationToken); + var operation = new SqlArmOperation(new DistributedAvailabilityGroupOperationSource(Client), _distributedAvailabilityGroupClientDiagnostics, Pipeline, _distributedAvailabilityGroupRestClient.CreateSetRoleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, distributedAvailabilityGroupSetRole).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs index 217cbffe79ea..7997d4d5f45f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs @@ -994,18 +994,6 @@ public virtual SqlServerConnectionPolicyResource GetSqlServerConnectionPolicyRes return new SqlServerConnectionPolicyResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual DistributedAvailabilityGroupResource GetDistributedAvailabilityGroupResource(ResourceIdentifier id) - { - DistributedAvailabilityGroupResource.ValidateResourceId(id); - return new DistributedAvailabilityGroupResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1246,18 +1234,6 @@ public virtual ManagedDatabaseResource GetManagedDatabaseResource(ResourceIdenti return new ManagedDatabaseResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ManagedInstanceResource GetManagedInstanceResource(ResourceIdentifier id) - { - ManagedInstanceResource.ValidateResourceId(id); - return new ManagedInstanceResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1522,6 +1498,18 @@ public virtual LongTermRetentionPolicyResource GetLongTermRetentionPolicyResourc return new LongTermRetentionPolicyResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ManagedInstanceResource GetManagedInstanceResource(ResourceIdentifier id) + { + ManagedInstanceResource.ValidateResourceId(id); + return new ManagedInstanceResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1545,5 +1533,17 @@ public virtual SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseRepl SqlServerDatabaseReplicationLinkResource.ValidateResourceId(id); return new SqlServerDatabaseReplicationLinkResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DistributedAvailabilityGroupResource GetDistributedAvailabilityGroupResource(ResourceIdentifier id) + { + DistributedAvailabilityGroupResource.ValidateResourceId(id); + return new DistributedAvailabilityGroupResource(Client, id); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs index 6e9a0e821e52..e02362bd2516 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs @@ -339,77 +339,6 @@ public virtual Response GetInstanceFailoverGroup( return GetInstanceFailoverGroups(locationName).Get(failoverGroupName, cancellationToken); } - /// Gets a collection of ManagedInstanceResources in the ResourceGroupResource. - /// An object representing collection of ManagedInstanceResources and their operations over a ManagedInstanceResource. - public virtual ManagedInstanceCollection GetManagedInstances() - { - return GetCachedClient(client => new ManagedInstanceCollection(client, Id)); - } - - /// - /// Gets a managed instance. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} - /// - /// - /// Operation Id - /// ManagedInstances_Get - /// - /// - /// Default Api Version - /// 2022-08-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the managed instance. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetManagedInstanceAsync(string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) - { - return await GetManagedInstances().GetAsync(managedInstanceName, expand, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a managed instance. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} - /// - /// - /// Operation Id - /// ManagedInstances_Get - /// - /// - /// Default Api Version - /// 2022-08-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the managed instance. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetManagedInstance(string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) - { - return GetManagedInstances().Get(managedInstanceName, expand, cancellationToken); - } - /// Gets a collection of InstancePoolResources in the ResourceGroupResource. /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. public virtual InstancePoolCollection GetInstancePools() @@ -559,6 +488,77 @@ public virtual Response GetResourc return GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName).Get(backupName, cancellationToken); } + /// Gets a collection of ManagedInstanceResources in the ResourceGroupResource. + /// An object representing collection of ManagedInstanceResources and their operations over a ManagedInstanceResource. + public virtual ManagedInstanceCollection GetManagedInstances() + { + return GetCachedClient(client => new ManagedInstanceCollection(client, Id)); + } + + /// + /// Gets a managed instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} + /// + /// + /// Operation Id + /// ManagedInstances_Get + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the managed instance. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetManagedInstanceAsync(string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) + { + return await GetManagedInstances().GetAsync(managedInstanceName, expand, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a managed instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} + /// + /// + /// Operation Id + /// ManagedInstances_Get + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the managed instance. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetManagedInstance(string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) + { + return GetManagedInstances().Get(managedInstanceName, expand, cancellationToken); + } + /// Gets a collection of SqlServerResources in the ResourceGroupResource. /// An object representing collection of SqlServerResources and their operations over a SqlServerResource. public virtual SqlServerCollection GetSqlServers() diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs index b7021143a99e..2ddb2d978f02 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs @@ -30,12 +30,12 @@ public partial class MockableSqlSubscriptionResource : ArmResource private LongTermRetentionManagedInstanceBackupsRestOperations _longTermRetentionManagedInstanceBackupsRestClient; private ClientDiagnostics _virtualClusterClientDiagnostics; private VirtualClustersRestOperations _virtualClusterRestClient; - private ClientDiagnostics _managedInstanceClientDiagnostics; - private ManagedInstancesRestOperations _managedInstanceRestClient; private ClientDiagnostics _instancePoolClientDiagnostics; private InstancePoolsRestOperations _instancePoolRestClient; private ClientDiagnostics _longTermRetentionBackupsClientDiagnostics; private LongTermRetentionBackupsRestOperations _longTermRetentionBackupsRestClient; + private ClientDiagnostics _managedInstanceClientDiagnostics; + private ManagedInstancesRestOperations _managedInstanceRestClient; private ClientDiagnostics _sqlServerServersClientDiagnostics; private ServersRestOperations _sqlServerServersRestClient; @@ -61,12 +61,12 @@ internal MockableSqlSubscriptionResource(ArmClient client, ResourceIdentifier id private LongTermRetentionManagedInstanceBackupsRestOperations LongTermRetentionManagedInstanceBackupsRestClient => _longTermRetentionManagedInstanceBackupsRestClient ??= new LongTermRetentionManagedInstanceBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics VirtualClusterClientDiagnostics => _virtualClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", VirtualClusterResource.ResourceType.Namespace, Diagnostics); private VirtualClustersRestOperations VirtualClusterRestClient => _virtualClusterRestClient ??= new VirtualClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(VirtualClusterResource.ResourceType)); - private ClientDiagnostics ManagedInstanceClientDiagnostics => _managedInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstanceResource.ResourceType.Namespace, Diagnostics); - private ManagedInstancesRestOperations ManagedInstanceRestClient => _managedInstanceRestClient ??= new ManagedInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedInstanceResource.ResourceType)); private ClientDiagnostics InstancePoolClientDiagnostics => _instancePoolClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", InstancePoolResource.ResourceType.Namespace, Diagnostics); private InstancePoolsRestOperations InstancePoolRestClient => _instancePoolRestClient ??= new InstancePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(InstancePoolResource.ResourceType)); private ClientDiagnostics LongTermRetentionBackupsClientDiagnostics => _longTermRetentionBackupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); private LongTermRetentionBackupsRestOperations LongTermRetentionBackupsRestClient => _longTermRetentionBackupsRestClient ??= new LongTermRetentionBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ManagedInstanceClientDiagnostics => _managedInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", ManagedInstanceResource.ResourceType.Namespace, Diagnostics); + private ManagedInstancesRestOperations ManagedInstanceRestClient => _managedInstanceRestClient ??= new ManagedInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedInstanceResource.ResourceType)); private ClientDiagnostics SqlServerServersClientDiagnostics => _sqlServerServersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Sql", SqlServerResource.ResourceType.Namespace, Diagnostics); private ServersRestOperations SqlServerServersRestClient => _sqlServerServersRestClient ??= new ServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlServerResource.ResourceType)); @@ -832,68 +832,6 @@ public virtual Pageable GetVirtualClusters(CancellationT return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VirtualClusterResource(Client, VirtualClusterData.DeserializeVirtualClusterData(e)), VirtualClusterClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetVirtualClusters", "value", "nextLink", cancellationToken); } - /// - /// Gets a list of all managed instances in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances - /// - /// - /// Operation Id - /// ManagedInstances_List - /// - /// - /// Default Api Version - /// 2022-08-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The child resources to include in the response. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedInstancesAsync(string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedInstanceRestClient.CreateListRequest(Id.SubscriptionId, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedInstanceResource(Client, ManagedInstanceData.DeserializeManagedInstanceData(e)), ManagedInstanceClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetManagedInstances", "value", "nextLink", cancellationToken); - } - - /// - /// Gets a list of all managed instances in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances - /// - /// - /// Operation Id - /// ManagedInstances_List - /// - /// - /// Default Api Version - /// 2022-08-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The child resources to include in the response. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedInstances(string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedInstanceRestClient.CreateListRequest(Id.SubscriptionId, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedInstanceResource(Client, ManagedInstanceData.DeserializeManagedInstanceData(e)), ManagedInstanceClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetManagedInstances", "value", "nextLink", cancellationToken); - } - /// /// Gets a list of all instance pools in the subscription. /// @@ -1080,6 +1018,68 @@ public virtual Pageable GetLongTermRetentionBackups return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => LongTermRetentionBackupData.DeserializeLongTermRetentionBackupData(e), LongTermRetentionBackupsClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetLongTermRetentionBackupsWithServer", "value", "nextLink", cancellationToken); } + /// + /// Gets a list of all managed instances in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances + /// + /// + /// Operation Id + /// ManagedInstances_List + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The child resources to include in the response. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetManagedInstancesAsync(string expand = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedInstanceRestClient.CreateListRequest(Id.SubscriptionId, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedInstanceResource(Client, ManagedInstanceData.DeserializeManagedInstanceData(e)), ManagedInstanceClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetManagedInstances", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of all managed instances in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances + /// + /// + /// Operation Id + /// ManagedInstances_List + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The child resources to include in the response. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetManagedInstances(string expand = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedInstanceRestClient.CreateListRequest(Id.SubscriptionId, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, expand); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedInstanceResource(Client, ManagedInstanceData.DeserializeManagedInstanceData(e)), ManagedInstanceClientDiagnostics, Pipeline, "MockableSqlSubscriptionResource.GetManagedInstances", "value", "nextLink", cancellationToken); + } + /// /// Determines whether a resource can be created with the specified name. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs index 84185a040f19..3d3936c02a72 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs @@ -1554,25 +1554,6 @@ public static SqlServerConnectionPolicyResource GetSqlServerConnectionPolicyReso return GetMockableSqlArmClient(client).GetSqlServerConnectionPolicyResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static DistributedAvailabilityGroupResource GetDistributedAvailabilityGroupResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSqlArmClient(client).GetDistributedAvailabilityGroupResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1953,25 +1934,6 @@ public static ManagedDatabaseResource GetManagedDatabaseResource(this ArmClient return GetMockableSqlArmClient(client).GetManagedDatabaseResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static ManagedInstanceResource GetManagedInstanceResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSqlArmClient(client).GetManagedInstanceResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2390,6 +2352,25 @@ public static LongTermRetentionPolicyResource GetLongTermRetentionPolicyResource return GetMockableSqlArmClient(client).GetLongTermRetentionPolicyResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ManagedInstanceResource GetManagedInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSqlArmClient(client).GetManagedInstanceResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2428,6 +2409,25 @@ public static SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseRepli return GetMockableSqlArmClient(client).GetSqlServerDatabaseReplicationLinkResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DistributedAvailabilityGroupResource GetDistributedAvailabilityGroupResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSqlArmClient(client).GetDistributedAvailabilityGroupResource(id); + } + /// /// Gets a collection of SqlServerTrustGroupResources in the ResourceGroupResource. /// @@ -2817,127 +2817,129 @@ public static Response GetInstanceFailoverGroup(t } /// - /// Gets a collection of ManagedInstanceResources in the ResourceGroupResource. + /// Gets a collection of InstancePoolResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of ManagedInstanceResources and their operations over a ManagedInstanceResource. - public static ManagedInstanceCollection GetManagedInstances(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. + public static InstancePoolCollection GetInstancePools(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetManagedInstances(); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePools(); } /// - /// Gets a managed instance. + /// Gets an instance pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} /// /// /// Operation Id - /// ManagedInstances_Get + /// InstancePools_Get /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the managed instance. - /// The child resources to include in the response. + /// The name of the instance pool to be retrieved. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetManagedInstanceAsync(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) + public static async Task> GetInstancePoolAsync(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetManagedInstanceAsync(managedInstanceName, expand, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePoolAsync(instancePoolName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a managed instance. + /// Gets an instance pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} /// /// /// Operation Id - /// ManagedInstances_Get + /// InstancePools_Get /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the managed instance. - /// The child resources to include in the response. + /// The name of the instance pool to be retrieved. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetManagedInstance(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) + public static Response GetInstancePool(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetManagedInstance(managedInstanceName, expand, cancellationToken); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePool(instancePoolName, cancellationToken); } /// - /// Gets a collection of InstancePoolResources in the ResourceGroupResource. + /// Gets a collection of ResourceGroupLongTermRetentionBackupResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// is null. - /// An object representing collection of InstancePoolResources and their operations over a InstancePoolResource. - public static InstancePoolCollection GetInstancePools(this ResourceGroupResource resourceGroupResource) + /// The location of the database. + /// The name of the server. + /// The name of the database. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// An object representing collection of ResourceGroupLongTermRetentionBackupResources and their operations over a ResourceGroupLongTermRetentionBackupResource. + public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePools(); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName); } /// - /// Gets an instance pool. + /// Gets a long term retention backup. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} /// /// /// Operation Id - /// InstancePools_Get + /// LongTermRetentionBackups_GetByResourceGroup /// /// /// Default Api Version @@ -2945,37 +2947,40 @@ public static InstancePoolCollection GetInstancePools(this ResourceGroupResource /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the instance pool to be retrieved. + /// The location of the database. + /// The name of the server. + /// The name of the database. + /// The backup name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetInstancePoolAsync(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) + public static async Task> GetResourceGroupLongTermRetentionBackupAsync(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePoolAsync(instancePoolName, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackupAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken).ConfigureAwait(false); } /// - /// Gets an instance pool. + /// Gets a long term retention backup. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} /// /// /// Operation Id - /// InstancePools_Get + /// LongTermRetentionBackups_GetByResourceGroup /// /// /// Default Api Version @@ -2983,58 +2988,57 @@ public static async Task> GetInstancePoolAsync(th /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the instance pool to be retrieved. + /// The location of the database. + /// The name of the server. + /// The name of the database. + /// The backup name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetInstancePool(this ResourceGroupResource resourceGroupResource, string instancePoolName, CancellationToken cancellationToken = default) + public static Response GetResourceGroupLongTermRetentionBackup(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetInstancePool(instancePoolName, cancellationToken); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackup(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken); } /// - /// Gets a collection of ResourceGroupLongTermRetentionBackupResources in the ResourceGroupResource. + /// Gets a collection of ManagedInstanceResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// The name of the database. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - /// An object representing collection of ResourceGroupLongTermRetentionBackupResources and their operations over a ResourceGroupLongTermRetentionBackupResource. - public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLongTermRetentionBackups(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName) + /// is null. + /// An object representing collection of ManagedInstanceResources and their operations over a ManagedInstanceResource. + public static ManagedInstanceCollection GetManagedInstances(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackups(locationName, longTermRetentionServerName, longTermRetentionDatabaseName); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetManagedInstances(); } /// - /// Gets a long term retention backup. + /// Gets a managed instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} /// /// /// Operation Id - /// LongTermRetentionBackups_GetByResourceGroup + /// ManagedInstances_Get /// /// /// Default Api Version @@ -3042,40 +3046,38 @@ public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLon /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// The name of the database. - /// The backup name. + /// The name of the managed instance. + /// The child resources to include in the response. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetResourceGroupLongTermRetentionBackupAsync(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) + public static async Task> GetManagedInstanceAsync(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackupAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlResourceGroupResource(resourceGroupResource).GetManagedInstanceAsync(managedInstanceName, expand, cancellationToken).ConfigureAwait(false); } /// - /// Gets a long term retention backup. + /// Gets a managed instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName} /// /// /// Operation Id - /// LongTermRetentionBackups_GetByResourceGroup + /// ManagedInstances_Get /// /// /// Default Api Version @@ -3083,28 +3085,26 @@ public static async Task> /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location of the database. - /// The name of the server. - /// The name of the database. - /// The backup name. + /// The name of the managed instance. + /// The child resources to include in the response. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetResourceGroupLongTermRetentionBackup(this ResourceGroupResource resourceGroupResource, AzureLocation locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CancellationToken cancellationToken = default) + public static Response GetManagedInstance(this ResourceGroupResource resourceGroupResource, string managedInstanceName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlResourceGroupResource(resourceGroupResource).GetResourceGroupLongTermRetentionBackup(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, cancellationToken); + return GetMockableSqlResourceGroupResource(resourceGroupResource).GetManagedInstance(managedInstanceName, expand, cancellationToken); } /// @@ -4412,80 +4412,6 @@ public static Pageable GetVirtualClusters(this Subscript return GetMockableSqlSubscriptionResource(subscriptionResource).GetVirtualClusters(cancellationToken); } - /// - /// Gets a list of all managed instances in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances - /// - /// - /// Operation Id - /// ManagedInstances_List - /// - /// - /// Default Api Version - /// 2022-08-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedInstancesAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSqlSubscriptionResource(subscriptionResource).GetManagedInstancesAsync(expand, cancellationToken); - } - - /// - /// Gets a list of all managed instances in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances - /// - /// - /// Operation Id - /// ManagedInstances_List - /// - /// - /// Default Api Version - /// 2022-08-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedInstances(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableSqlSubscriptionResource(subscriptionResource).GetManagedInstances(expand, cancellationToken); - } - /// /// Gets a list of all instance pools in the subscription. /// @@ -4702,6 +4628,80 @@ public static Pageable GetLongTermRetentionBackupsW return GetMockableSqlSubscriptionResource(subscriptionResource).GetLongTermRetentionBackupsWithServer(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, cancellationToken); } + /// + /// Gets a list of all managed instances in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances + /// + /// + /// Operation Id + /// ManagedInstances_List + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetManagedInstancesAsync(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSqlSubscriptionResource(subscriptionResource).GetManagedInstancesAsync(expand, cancellationToken); + } + + /// + /// Gets a list of all managed instances in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances + /// + /// + /// Operation Id + /// ManagedInstances_List + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetManagedInstances(this SubscriptionResource subscriptionResource, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSqlSubscriptionResource(subscriptionResource).GetManagedInstances(expand, cancellationToken); + } + /// /// Determines whether a resource can be created with the specified name. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs index 531a2500f6e3..45e517fb6c55 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs @@ -423,7 +423,7 @@ public virtual Pageable GetUsages(bool? expandChildren = null /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual AsyncPageable GetManagedInstancesAsync(s /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/RefreshExternalGovernanceStatusOperationResultMIOperationSource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/RefreshExternalGovernanceStatusOperationResultMIOperationSource.cs new file mode 100644 index 000000000000..d8c3c6bea7c5 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongRunningOperation/RefreshExternalGovernanceStatusOperationResultMIOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + internal class RefreshExternalGovernanceStatusOperationResultMIOperationSource : IOperationSource + { + RefreshExternalGovernanceStatusOperationResultMI IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return RefreshExternalGovernanceStatusOperationResultMI.DeserializeRefreshExternalGovernanceStatusOperationResultMI(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return RefreshExternalGovernanceStatusOperationResultMI.DeserializeRefreshExternalGovernanceStatusOperationResultMI(document.RootElement); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs index da7e4b72be37..05740e916f2e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string man /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string managedInstanceName, /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(string expand /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string expand = null, Ca /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string managedInstanceName /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string managedInstanceName, string expand = /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs index b201d670d93e..ec9459487a84 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs @@ -67,6 +67,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("fullyQualifiedDomainName"u8); writer.WriteStringValue(FullyQualifiedDomainName); } + if (Optional.IsDefined(IsGeneralPurposeV2)) + { + writer.WritePropertyName("isGeneralPurposeV2"u8); + writer.WriteBooleanValue(IsGeneralPurposeV2.Value); + } if (Optional.IsDefined(AdministratorLogin)) { writer.WritePropertyName("administratorLogin"u8); @@ -92,6 +97,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("licenseType"u8); writer.WriteStringValue(LicenseType.Value.ToString()); } + if (Optional.IsDefined(HybridSecondaryUsage)) + { + writer.WritePropertyName("hybridSecondaryUsage"u8); + writer.WriteStringValue(HybridSecondaryUsage.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(HybridSecondaryUsageDetected)) + { + writer.WritePropertyName("hybridSecondaryUsageDetected"u8); + writer.WriteStringValue(HybridSecondaryUsageDetected.Value.ToString()); + } if (Optional.IsDefined(VCores)) { writer.WritePropertyName("vCores"u8); @@ -102,6 +117,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("storageSizeInGB"u8); writer.WriteNumberValue(StorageSizeInGB.Value); } + if (Optional.IsDefined(StorageIOps)) + { + writer.WritePropertyName("storageIOps"u8); + writer.WriteNumberValue(StorageIOps.Value); + } + if (Optional.IsDefined(StorageThroughputMBps)) + { + writer.WritePropertyName("storageThroughputMBps"u8); + writer.WriteNumberValue(StorageThroughputMBps.Value); + } if (Optional.IsDefined(Collation)) { writer.WritePropertyName("collation"u8); @@ -202,6 +227,36 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("servicePrincipal"u8); writer.WriteObjectValue(ServicePrincipal, options); } + if (options.Format != "W" && Optional.IsDefined(VirtualClusterId)) + { + writer.WritePropertyName("virtualClusterId"u8); + writer.WriteStringValue(VirtualClusterId); + } + if (options.Format != "W" && Optional.IsDefined(ExternalGovernanceStatus)) + { + writer.WritePropertyName("externalGovernanceStatus"u8); + writer.WriteStringValue(ExternalGovernanceStatus.Value.ToString()); + } + if (Optional.IsDefined(PricingModel)) + { + writer.WritePropertyName("pricingModel"u8); + writer.WriteStringValue(PricingModel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreateOn)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateOn.Value, "O"); + } + if (Optional.IsDefined(AuthenticationMetadata)) + { + writer.WritePropertyName("authenticationMetadata"u8); + writer.WriteStringValue(AuthenticationMetadata.Value.ToString()); + } + if (Optional.IsDefined(DatabaseFormat)) + { + writer.WritePropertyName("databaseFormat"u8); + writer.WriteStringValue(DatabaseFormat.Value.ToString()); + } writer.WriteEndObject(); } @@ -233,16 +288,21 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e string name = default; ResourceType type = default; SystemData systemData = default; - ManagedInstancePropertiesProvisioningState? provisioningState = default; + JobExecutionProvisioningState? provisioningState = default; ManagedServerCreateMode? managedInstanceCreateMode = default; string fullyQualifiedDomainName = default; + bool? isGeneralPurposeV2 = default; string administratorLogin = default; string administratorLoginPassword = default; ResourceIdentifier subnetId = default; string state = default; ManagedInstanceLicenseType? licenseType = default; + HybridSecondaryUsage? hybridSecondaryUsage = default; + HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default; int? vCores = default; int? storageSizeInGB = default; + int? storageIOps = default; + int? storageThroughputMBps = default; string collation = default; string dnsZone = default; ResourceIdentifier dnsZonePartner = default; @@ -262,6 +322,12 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e Uri keyId = default; ManagedInstanceExternalAdministrator administrators = default; SqlServicePrincipal servicePrincipal = default; + string virtualClusterId = default; + ExternalGovernanceStatus? externalGovernanceStatus = default; + FreemiumType? pricingModel = default; + DateTimeOffset? createTime = default; + AuthMetadataLookupMode? authenticationMetadata = default; + ManagedInstanceDatabaseFormat? databaseFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -343,7 +409,7 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e { continue; } - provisioningState = new ManagedInstancePropertiesProvisioningState(property0.Value.GetString()); + provisioningState = new JobExecutionProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("managedInstanceCreateMode"u8)) @@ -360,6 +426,15 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e fullyQualifiedDomainName = property0.Value.GetString(); continue; } + if (property0.NameEquals("isGeneralPurposeV2"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isGeneralPurposeV2 = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("administratorLogin"u8)) { administratorLogin = property0.Value.GetString(); @@ -393,6 +468,24 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e licenseType = new ManagedInstanceLicenseType(property0.Value.GetString()); continue; } + if (property0.NameEquals("hybridSecondaryUsage"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hybridSecondaryUsage = new HybridSecondaryUsage(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("hybridSecondaryUsageDetected"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hybridSecondaryUsageDetected = new HybridSecondaryUsageDetected(property0.Value.GetString()); + continue; + } if (property0.NameEquals("vCores"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -411,6 +504,24 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e storageSizeInGB = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("storageIOps"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageIOps = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("storageThroughputMBps"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageThroughputMBps = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("collation"u8)) { collation = property0.Value.GetString(); @@ -571,6 +682,56 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e servicePrincipal = SqlServicePrincipal.DeserializeSqlServicePrincipal(property0.Value, options); continue; } + if (property0.NameEquals("virtualClusterId"u8)) + { + virtualClusterId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("externalGovernanceStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + externalGovernanceStatus = new ExternalGovernanceStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("pricingModel"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pricingModel = new FreemiumType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("authenticationMetadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationMetadata = new AuthMetadataLookupMode(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("databaseFormat"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseFormat = new ManagedInstanceDatabaseFormat(property0.Value.GetString()); + continue; + } } continue; } @@ -592,13 +753,18 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e provisioningState, managedInstanceCreateMode, fullyQualifiedDomainName, + isGeneralPurposeV2, administratorLogin, administratorLoginPassword, subnetId, state, licenseType, + hybridSecondaryUsage, + hybridSecondaryUsageDetected, vCores, storageSizeInGB, + storageIOps, + storageThroughputMBps, collation, dnsZone, dnsZonePartner, @@ -618,6 +784,12 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e keyId, administrators, servicePrincipal, + virtualClusterId, + externalGovernanceStatus, + pricingModel, + createTime, + authenticationMetadata, + databaseFormat, serializedAdditionalRawData); } @@ -819,6 +991,22 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsGeneralPurposeV2), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isGeneralPurposeV2: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsGeneralPurposeV2)) + { + builder.Append(" isGeneralPurposeV2: "); + var boolValue = IsGeneralPurposeV2.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AdministratorLogin), out propertyOverride); if (hasPropertyOverride) { @@ -918,6 +1106,36 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HybridSecondaryUsage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hybridSecondaryUsage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HybridSecondaryUsage)) + { + builder.Append(" hybridSecondaryUsage: "); + builder.AppendLine($"'{HybridSecondaryUsage.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HybridSecondaryUsageDetected), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hybridSecondaryUsageDetected: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HybridSecondaryUsageDetected)) + { + builder.Append(" hybridSecondaryUsageDetected: "); + builder.AppendLine($"'{HybridSecondaryUsageDetected.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VCores), out propertyOverride); if (hasPropertyOverride) { @@ -948,6 +1166,36 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StorageIOps), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storageIOps: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StorageIOps)) + { + builder.Append(" storageIOps: "); + builder.AppendLine($"{StorageIOps.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StorageThroughputMBps), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storageThroughputMBps: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StorageThroughputMBps)) + { + builder.Append(" storageThroughputMBps: "); + builder.AppendLine($"{StorageThroughputMBps.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Collation), out propertyOverride); if (hasPropertyOverride) { @@ -1276,6 +1524,105 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualClusterId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualClusterId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualClusterId)) + { + builder.Append(" virtualClusterId: "); + if (VirtualClusterId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VirtualClusterId}'''"); + } + else + { + builder.AppendLine($"'{VirtualClusterId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalGovernanceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalGovernanceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalGovernanceStatus)) + { + builder.Append(" externalGovernanceStatus: "); + builder.AppendLine($"'{ExternalGovernanceStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PricingModel), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" pricingModel: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PricingModel)) + { + builder.Append(" pricingModel: "); + builder.AppendLine($"'{PricingModel.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreateOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreateOn)) + { + builder.Append(" createTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreateOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationMetadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationMetadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationMetadata)) + { + builder.Append(" authenticationMetadata: "); + builder.AppendLine($"'{AuthenticationMetadata.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseFormat), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseFormat: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DatabaseFormat)) + { + builder.Append(" databaseFormat: "); + builder.AppendLine($"'{DatabaseFormat.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs index 05cf67810f7d..b02a00aad14e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs @@ -67,7 +67,7 @@ public ManagedInstanceData(AzureLocation location) : base(location) /// The location. /// The Azure Active Directory identity of the managed instance. /// Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH. - /// + /// Provisioning state of managed instance. /// /// Specifies the mode of database creation. /// @@ -76,13 +76,18 @@ public ManagedInstanceData(AzureLocation location) : base(location) /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. /// /// The fully qualified domain name of the managed instance. + /// Whether or not this is a GPv2 variant of General Purpose edition. /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). /// The administrator login password (required for managed instance creation). /// Subnet resource ID for the managed instance. /// The state of the managed instance. /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage throughput MBps parameter is not supported in the instance create/update operation. /// Collation of the managed instance. /// The Dns Zone that the managed instance is in. /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. @@ -109,21 +114,32 @@ public ManagedInstanceData(AzureLocation location) : base(location) /// A CMK URI of the key to use for encryption. /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. /// The managed instance's service principal. + /// Virtual cluster resource id for the Managed Instance. + /// Status of external governance. + /// Weather or not Managed Instance is freemium. + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + /// The managed instance's authentication metadata lookup mode. + /// Specifies the internal format of instance databases specific to the SQL engine version. /// Keeps track of any properties unknown to the library. - internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, int? vCores, int? storageSizeInGB, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku sku, JobExecutionProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, string virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, FreemiumType? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; ProvisioningState = provisioningState; ManagedInstanceCreateMode = managedInstanceCreateMode; FullyQualifiedDomainName = fullyQualifiedDomainName; + IsGeneralPurposeV2 = isGeneralPurposeV2; AdministratorLogin = administratorLogin; AdministratorLoginPassword = administratorLoginPassword; SubnetId = subnetId; State = state; LicenseType = licenseType; + HybridSecondaryUsage = hybridSecondaryUsage; + HybridSecondaryUsageDetected = hybridSecondaryUsageDetected; VCores = vCores; StorageSizeInGB = storageSizeInGB; + StorageIOps = storageIOps; + StorageThroughputMBps = storageThroughputMBps; Collation = collation; DnsZone = dnsZone; ManagedDnsZonePartner = managedDnsZonePartner; @@ -143,6 +159,12 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType re KeyId = keyId; Administrators = administrators; ServicePrincipal = servicePrincipal; + VirtualClusterId = virtualClusterId; + ExternalGovernanceStatus = externalGovernanceStatus; + PricingModel = pricingModel; + CreateOn = createOn; + AuthenticationMetadata = authenticationMetadata; + DatabaseFormat = databaseFormat; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -157,9 +179,9 @@ internal ManagedInstanceData() /// Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH. [WirePath("sku")] public SqlSku Sku { get; set; } - /// Gets the provisioning state. + /// Provisioning state of managed instance. [WirePath("properties.provisioningState")] - public ManagedInstancePropertiesProvisioningState? ProvisioningState { get; } + public JobExecutionProvisioningState? ProvisioningState { get; } /// /// Specifies the mode of database creation. /// @@ -172,6 +194,9 @@ internal ManagedInstanceData() /// The fully qualified domain name of the managed instance. [WirePath("properties.fullyQualifiedDomainName")] public string FullyQualifiedDomainName { get; } + /// Whether or not this is a GPv2 variant of General Purpose edition. + [WirePath("properties.isGeneralPurposeV2")] + public bool? IsGeneralPurposeV2 { get; set; } /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). [WirePath("properties.administratorLogin")] public string AdministratorLogin { get; set; } @@ -187,12 +212,24 @@ internal ManagedInstanceData() /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). [WirePath("properties.licenseType")] public ManagedInstanceLicenseType? LicenseType { get; set; } + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + [WirePath("properties.hybridSecondaryUsage")] + public HybridSecondaryUsage? HybridSecondaryUsage { get; set; } + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). + [WirePath("properties.hybridSecondaryUsageDetected")] + public HybridSecondaryUsageDetected? HybridSecondaryUsageDetected { get; } /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. [WirePath("properties.vCores")] public int? VCores { get; set; } /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. [WirePath("properties.storageSizeInGB")] public int? StorageSizeInGB { get; set; } + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + [WirePath("properties.storageIOps")] + public int? StorageIOps { get; set; } + /// Storage throughput MBps parameter is not supported in the instance create/update operation. + [WirePath("properties.storageThroughputMBps")] + public int? StorageThroughputMBps { get; set; } /// Collation of the managed instance. [WirePath("properties.collation")] public string Collation { get; set; } @@ -257,5 +294,23 @@ internal ManagedInstanceData() /// The managed instance's service principal. [WirePath("properties.servicePrincipal")] public SqlServicePrincipal ServicePrincipal { get; set; } + /// Virtual cluster resource id for the Managed Instance. + [WirePath("properties.virtualClusterId")] + public string VirtualClusterId { get; } + /// Status of external governance. + [WirePath("properties.externalGovernanceStatus")] + public ExternalGovernanceStatus? ExternalGovernanceStatus { get; } + /// Weather or not Managed Instance is freemium. + [WirePath("properties.pricingModel")] + public FreemiumType? PricingModel { get; set; } + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + [WirePath("properties.createTime")] + public DateTimeOffset? CreateOn { get; } + /// The managed instance's authentication metadata lookup mode. + [WirePath("properties.authenticationMetadata")] + public AuthMetadataLookupMode? AuthenticationMetadata { get; set; } + /// Specifies the internal format of instance databases specific to the SQL engine version. + [WirePath("properties.databaseFormat")] + public ManagedInstanceDatabaseFormat? DatabaseFormat { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs index cf3a8f029f09..c77034e3342f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs @@ -847,75 +847,6 @@ public virtual Response GetRestorableD return GetRestorableDroppedManagedDatabases().Get(restorableDroppedDatabaseId, cancellationToken); } - /// Gets a collection of DistributedAvailabilityGroupResources in the ManagedInstance. - /// An object representing collection of DistributedAvailabilityGroupResources and their operations over a DistributedAvailabilityGroupResource. - public virtual DistributedAvailabilityGroupCollection GetDistributedAvailabilityGroups() - { - return GetCachedClient(client => new DistributedAvailabilityGroupCollection(client, Id)); - } - - /// - /// Gets a distributed availability group info. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName} - /// - /// - /// Operation Id - /// DistributedAvailabilityGroups_Get - /// - /// - /// Default Api Version - /// 2021-11-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The distributed availability group name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetDistributedAvailabilityGroupAsync(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default) - { - return await GetDistributedAvailabilityGroups().GetAsync(distributedAvailabilityGroupName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a distributed availability group info. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName} - /// - /// - /// Operation Id - /// DistributedAvailabilityGroups_Get - /// - /// - /// Default Api Version - /// 2021-11-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The distributed availability group name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetDistributedAvailabilityGroup(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default) - { - return GetDistributedAvailabilityGroups().Get(distributedAvailabilityGroupName, cancellationToken); - } - /// Gets a collection of ManagedInstanceServerTrustCertificateResources in the ManagedInstance. /// An object representing collection of ManagedInstanceServerTrustCertificateResources and their operations over a ManagedInstanceServerTrustCertificateResource. public virtual ManagedInstanceServerTrustCertificateCollection GetManagedInstanceServerTrustCertificates() @@ -1452,6 +1383,75 @@ public virtual Response GetManagedInst return GetManagedInstanceStartStopSchedules().Get(startStopScheduleName, cancellationToken); } + /// Gets a collection of DistributedAvailabilityGroupResources in the ManagedInstance. + /// An object representing collection of DistributedAvailabilityGroupResources and their operations over a DistributedAvailabilityGroupResource. + public virtual DistributedAvailabilityGroupCollection GetDistributedAvailabilityGroups() + { + return GetCachedClient(client => new DistributedAvailabilityGroupCollection(client, Id)); + } + + /// + /// Gets a distributed availability group info. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName} + /// + /// + /// Operation Id + /// DistributedAvailabilityGroups_Get + /// + /// + /// Default Api Version + /// 2023-08-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The distributed availability group name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDistributedAvailabilityGroupAsync(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default) + { + return await GetDistributedAvailabilityGroups().GetAsync(distributedAvailabilityGroupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a distributed availability group info. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName} + /// + /// + /// Operation Id + /// DistributedAvailabilityGroups_Get + /// + /// + /// Default Api Version + /// 2023-08-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The distributed availability group name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDistributedAvailabilityGroup(string distributedAvailabilityGroupName, CancellationToken cancellationToken = default) + { + return GetDistributedAvailabilityGroups().Get(distributedAvailabilityGroupName, cancellationToken); + } + /// /// Gets a managed instance. /// @@ -1465,7 +1465,7 @@ public virtual Response GetManagedInst /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -1506,7 +1506,7 @@ public virtual async Task> GetAsync(string exp /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -1547,7 +1547,7 @@ public virtual Response Get(string expand = null, Cance /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -1589,7 +1589,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -1631,7 +1631,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -1677,7 +1677,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -1927,7 +1927,7 @@ public virtual Pageable GetInaccessibleManagedDatabases /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -1970,7 +1970,7 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Repli /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2013,7 +2013,7 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, ReplicaType? replicaTy /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2043,7 +2043,7 @@ public virtual AsyncPageable GetOutboundNetworkD /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2060,6 +2060,90 @@ public virtual Pageable GetOutboundNetworkDepend return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SqlOutboundEnvironmentEndpoint.DeserializeSqlOutboundEnvironmentEndpoint(e), _managedInstanceClientDiagnostics, Pipeline, "ManagedInstanceResource.GetOutboundNetworkDependencies", "value", "nextLink", cancellationToken); } + /// + /// Refresh external governance enablement status. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/refreshExternalGovernanceStatus + /// + /// + /// Operation Id + /// ManagedInstances_RefreshStatus + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> RefreshStatusAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _managedInstanceClientDiagnostics.CreateScope("ManagedInstanceResource.RefreshStatus"); + scope.Start(); + try + { + var response = await _managedInstanceRestClient.RefreshStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new RefreshExternalGovernanceStatusOperationResultMIOperationSource(), _managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateRefreshStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Refresh external governance enablement status. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/refreshExternalGovernanceStatus + /// + /// + /// Operation Id + /// ManagedInstances_RefreshStatus + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation RefreshStatus(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _managedInstanceClientDiagnostics.CreateScope("ManagedInstanceResource.RefreshStatus"); + scope.Start(); + try + { + var response = _managedInstanceRestClient.RefreshStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SqlArmOperation(new RefreshExternalGovernanceStatusOperationResultMIOperationSource(), _managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateRefreshStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Starts the managed instance. /// @@ -2073,7 +2157,7 @@ public virtual Pageable GetOutboundNetworkDepend /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2083,16 +2167,16 @@ public virtual Pageable GetOutboundNetworkDepend /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _managedInstanceClientDiagnostics.CreateScope("ManagedInstanceResource.Start"); scope.Start(); try { var response = await _managedInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SqlArmOperation(_managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new SqlArmOperation(new ManagedInstanceOperationSource(Client), _managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -2115,7 +2199,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2125,16 +2209,16 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _managedInstanceClientDiagnostics.CreateScope("ManagedInstanceResource.Start"); scope.Start(); try { var response = _managedInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new SqlArmOperation(_managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new SqlArmOperation(new ManagedInstanceOperationSource(Client), _managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -2157,7 +2241,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2167,16 +2251,16 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _managedInstanceClientDiagnostics.CreateScope("ManagedInstanceResource.Stop"); scope.Start(); try { var response = await _managedInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SqlArmOperation(_managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new SqlArmOperation(new ManagedInstanceOperationSource(Client), _managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -2199,7 +2283,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2209,16 +2293,16 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _managedInstanceClientDiagnostics.CreateScope("ManagedInstanceResource.Stop"); scope.Start(); try { var response = _managedInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new SqlArmOperation(_managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new SqlArmOperation(new ManagedInstanceOperationSource(Client), _managedInstanceClientDiagnostics, Pipeline, _managedInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -2241,7 +2325,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2274,7 +2358,7 @@ public virtual AsyncPageable GetTopQueriesAsync(ManagedInstanceResou /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2307,7 +2391,7 @@ public virtual Pageable GetTopQueries(ManagedInstanceResourceGetTopQ /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2369,7 +2453,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2431,7 +2515,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2488,7 +2572,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2545,7 +2629,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2605,7 +2689,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2022-08-01-preview + /// 2023-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/AuthMetadataLookupMode.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/AuthMetadataLookupMode.cs new file mode 100644 index 000000000000..3c2bd9dfdffa --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/AuthMetadataLookupMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// The managed instance's authentication metadata lookup mode. + public readonly partial struct AuthMetadataLookupMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AuthMetadataLookupMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureADValue = "AzureAD"; + private const string PairedValue = "Paired"; + private const string WindowsValue = "Windows"; + + /// AzureAD. + public static AuthMetadataLookupMode AzureAD { get; } = new AuthMetadataLookupMode(AzureADValue); + /// Paired. + public static AuthMetadataLookupMode Paired { get; } = new AuthMetadataLookupMode(PairedValue); + /// Windows. + public static AuthMetadataLookupMode Windows { get; } = new AuthMetadataLookupMode(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(AuthMetadataLookupMode left, AuthMetadataLookupMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AuthMetadataLookupMode left, AuthMetadataLookupMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AuthMetadataLookupMode(string value) => new AuthMetadataLookupMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AuthMetadataLookupMode other && Equals(other); + /// + public bool Equals(AuthMetadataLookupMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.Serialization.cs new file mode 100644 index 000000000000..5c6a9513f6f3 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class CertificateInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CertificateInfo)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(CertificateName)) + { + writer.WritePropertyName("certificateName"u8); + writer.WriteStringValue(CertificateName); + } + if (options.Format != "W" && Optional.IsDefined(ExpiryOn)) + { + writer.WritePropertyName("expiryDate"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CertificateInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CertificateInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCertificateInfo(document.RootElement, options); + } + + internal static CertificateInfo DeserializeCertificateInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string certificateName = default; + DateTimeOffset? expiryDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("certificateName"u8)) + { + certificateName = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiryDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CertificateInfo(certificateName, expiryDate, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateName)) + { + builder.Append(" certificateName: "); + if (CertificateName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CertificateName}'''"); + } + else + { + builder.AppendLine($"'{CertificateName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpiryOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expiryDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExpiryOn)) + { + builder.Append(" expiryDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpiryOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CertificateInfo)} does not support writing '{options.Format}' format."); + } + } + + CertificateInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCertificateInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CertificateInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.cs new file mode 100644 index 000000000000..af5c43c38aaf --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/CertificateInfo.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Certificate information. + public partial class CertificateInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CertificateInfo() + { + } + + /// Initializes a new instance of . + /// The certificate name. + /// The certificate expiry date. + /// Keeps track of any properties unknown to the library. + internal CertificateInfo(string certificateName, DateTimeOffset? expiryOn, IDictionary serializedAdditionalRawData) + { + CertificateName = certificateName; + ExpiryOn = expiryOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The certificate name. + [WirePath("certificateName")] + public string CertificateName { get; } + /// The certificate expiry date. + [WirePath("expiryDate")] + public DateTimeOffset? ExpiryOn { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.Serialization.cs new file mode 100644 index 000000000000..29922e06f458 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.Serialization.cs @@ -0,0 +1,829 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class DistributedAvailabilityGroupDatabase : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupDatabase)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (options.Format != "W" && Optional.IsDefined(InstanceReplicaId)) + { + writer.WritePropertyName("instanceReplicaId"u8); + writer.WriteStringValue(InstanceReplicaId.Value); + } + if (options.Format != "W" && Optional.IsDefined(PartnerReplicaId)) + { + writer.WritePropertyName("partnerReplicaId"u8); + writer.WriteStringValue(PartnerReplicaId.Value); + } + if (options.Format != "W" && Optional.IsDefined(ReplicaState)) + { + writer.WritePropertyName("replicaState"u8); + writer.WriteStringValue(ReplicaState); + } + if (options.Format != "W" && Optional.IsDefined(SeedingProgress)) + { + writer.WritePropertyName("seedingProgress"u8); + writer.WriteStringValue(SeedingProgress); + } + if (options.Format != "W" && Optional.IsDefined(SynchronizationHealth)) + { + writer.WritePropertyName("synchronizationHealth"u8); + writer.WriteStringValue(SynchronizationHealth.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ConnectedState)) + { + writer.WritePropertyName("connectedState"u8); + writer.WriteStringValue(ConnectedState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LastReceivedLsn)) + { + writer.WritePropertyName("lastReceivedLsn"u8); + writer.WriteStringValue(LastReceivedLsn); + } + if (options.Format != "W" && Optional.IsDefined(LastReceivedOn)) + { + writer.WritePropertyName("lastReceivedTime"u8); + writer.WriteStringValue(LastReceivedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastSentLsn)) + { + writer.WritePropertyName("lastSentLsn"u8); + writer.WriteStringValue(LastSentLsn); + } + if (options.Format != "W" && Optional.IsDefined(LastSentOn)) + { + writer.WritePropertyName("lastSentTime"u8); + writer.WriteStringValue(LastSentOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastCommitLsn)) + { + writer.WritePropertyName("lastCommitLsn"u8); + writer.WriteStringValue(LastCommitLsn); + } + if (options.Format != "W" && Optional.IsDefined(LastCommitOn)) + { + writer.WritePropertyName("lastCommitTime"u8); + writer.WriteStringValue(LastCommitOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastHardenedLsn)) + { + writer.WritePropertyName("lastHardenedLsn"u8); + writer.WriteStringValue(LastHardenedLsn); + } + if (options.Format != "W" && Optional.IsDefined(LastHardenedOn)) + { + writer.WritePropertyName("lastHardenedTime"u8); + writer.WriteStringValue(LastHardenedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastBackupLsn)) + { + writer.WritePropertyName("lastBackupLsn"u8); + writer.WriteStringValue(LastBackupLsn); + } + if (options.Format != "W" && Optional.IsDefined(LastBackupOn)) + { + writer.WritePropertyName("lastBackupTime"u8); + writer.WriteStringValue(LastBackupOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(MostRecentLinkError)) + { + writer.WritePropertyName("mostRecentLinkError"u8); + writer.WriteStringValue(MostRecentLinkError); + } + if (options.Format != "W" && Optional.IsDefined(PartnerAuthCertValidity)) + { + writer.WritePropertyName("partnerAuthCertValidity"u8); + writer.WriteObjectValue(PartnerAuthCertValidity, options); + } + if (options.Format != "W" && Optional.IsDefined(InstanceSendReplicationLagSeconds)) + { + writer.WritePropertyName("instanceSendReplicationLagSeconds"u8); + writer.WriteNumberValue(InstanceSendReplicationLagSeconds.Value); + } + if (options.Format != "W" && Optional.IsDefined(InstanceRedoReplicationLagSeconds)) + { + writer.WritePropertyName("instanceRedoReplicationLagSeconds"u8); + writer.WriteNumberValue(InstanceRedoReplicationLagSeconds.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DistributedAvailabilityGroupDatabase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupDatabase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDistributedAvailabilityGroupDatabase(document.RootElement, options); + } + + internal static DistributedAvailabilityGroupDatabase DeserializeDistributedAvailabilityGroupDatabase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string databaseName = default; + Guid? instanceReplicaId = default; + Guid? partnerReplicaId = default; + string replicaState = default; + string seedingProgress = default; + ReplicaSynchronizationHealth? synchronizationHealth = default; + ReplicaConnectedState? connectedState = default; + string lastReceivedLsn = default; + DateTimeOffset? lastReceivedTime = default; + string lastSentLsn = default; + DateTimeOffset? lastSentTime = default; + string lastCommitLsn = default; + DateTimeOffset? lastCommitTime = default; + string lastHardenedLsn = default; + DateTimeOffset? lastHardenedTime = default; + string lastBackupLsn = default; + DateTimeOffset? lastBackupTime = default; + string mostRecentLinkError = default; + CertificateInfo partnerAuthCertValidity = default; + int? instanceSendReplicationLagSeconds = default; + int? instanceRedoReplicationLagSeconds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceReplicaId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceReplicaId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("partnerReplicaId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerReplicaId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("replicaState"u8)) + { + replicaState = property.Value.GetString(); + continue; + } + if (property.NameEquals("seedingProgress"u8)) + { + seedingProgress = property.Value.GetString(); + continue; + } + if (property.NameEquals("synchronizationHealth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + synchronizationHealth = new ReplicaSynchronizationHealth(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectedState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectedState = new ReplicaConnectedState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastReceivedLsn"u8)) + { + lastReceivedLsn = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastReceivedTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastReceivedTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastSentLsn"u8)) + { + lastSentLsn = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastSentTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSentTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastCommitLsn"u8)) + { + lastCommitLsn = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastCommitTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastCommitTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastHardenedLsn"u8)) + { + lastHardenedLsn = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastHardenedTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastHardenedTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastBackupLsn"u8)) + { + lastBackupLsn = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastBackupTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBackupTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("mostRecentLinkError"u8)) + { + mostRecentLinkError = property.Value.GetString(); + continue; + } + if (property.NameEquals("partnerAuthCertValidity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerAuthCertValidity = CertificateInfo.DeserializeCertificateInfo(property.Value, options); + continue; + } + if (property.NameEquals("instanceSendReplicationLagSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceSendReplicationLagSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceRedoReplicationLagSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceRedoReplicationLagSeconds = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DistributedAvailabilityGroupDatabase( + databaseName, + instanceReplicaId, + partnerReplicaId, + replicaState, + seedingProgress, + synchronizationHealth, + connectedState, + lastReceivedLsn, + lastReceivedTime, + lastSentLsn, + lastSentTime, + lastCommitLsn, + lastCommitTime, + lastHardenedLsn, + lastHardenedTime, + lastBackupLsn, + lastBackupTime, + mostRecentLinkError, + partnerAuthCertValidity, + instanceSendReplicationLagSeconds, + instanceRedoReplicationLagSeconds, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DatabaseName)) + { + builder.Append(" databaseName: "); + if (DatabaseName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DatabaseName}'''"); + } + else + { + builder.AppendLine($"'{DatabaseName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceReplicaId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceReplicaId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceReplicaId)) + { + builder.Append(" instanceReplicaId: "); + builder.AppendLine($"'{InstanceReplicaId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerReplicaId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerReplicaId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerReplicaId)) + { + builder.Append(" partnerReplicaId: "); + builder.AppendLine($"'{PartnerReplicaId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReplicaState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" replicaState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReplicaState)) + { + builder.Append(" replicaState: "); + if (ReplicaState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ReplicaState}'''"); + } + else + { + builder.AppendLine($"'{ReplicaState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SeedingProgress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" seedingProgress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SeedingProgress)) + { + builder.Append(" seedingProgress: "); + if (SeedingProgress.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SeedingProgress}'''"); + } + else + { + builder.AppendLine($"'{SeedingProgress}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SynchronizationHealth), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" synchronizationHealth: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SynchronizationHealth)) + { + builder.Append(" synchronizationHealth: "); + builder.AppendLine($"'{SynchronizationHealth.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectedState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectedState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectedState)) + { + builder.Append(" connectedState: "); + builder.AppendLine($"'{ConnectedState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastReceivedLsn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastReceivedLsn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastReceivedLsn)) + { + builder.Append(" lastReceivedLsn: "); + if (LastReceivedLsn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastReceivedLsn}'''"); + } + else + { + builder.AppendLine($"'{LastReceivedLsn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastReceivedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastReceivedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastReceivedOn)) + { + builder.Append(" lastReceivedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastReceivedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastSentLsn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastSentLsn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastSentLsn)) + { + builder.Append(" lastSentLsn: "); + if (LastSentLsn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastSentLsn}'''"); + } + else + { + builder.AppendLine($"'{LastSentLsn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastSentOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastSentTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastSentOn)) + { + builder.Append(" lastSentTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastSentOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastCommitLsn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastCommitLsn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastCommitLsn)) + { + builder.Append(" lastCommitLsn: "); + if (LastCommitLsn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastCommitLsn}'''"); + } + else + { + builder.AppendLine($"'{LastCommitLsn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastCommitOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastCommitTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastCommitOn)) + { + builder.Append(" lastCommitTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastCommitOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastHardenedLsn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastHardenedLsn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastHardenedLsn)) + { + builder.Append(" lastHardenedLsn: "); + if (LastHardenedLsn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastHardenedLsn}'''"); + } + else + { + builder.AppendLine($"'{LastHardenedLsn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastHardenedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastHardenedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastHardenedOn)) + { + builder.Append(" lastHardenedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastHardenedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastBackupLsn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastBackupLsn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastBackupLsn)) + { + builder.Append(" lastBackupLsn: "); + if (LastBackupLsn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastBackupLsn}'''"); + } + else + { + builder.AppendLine($"'{LastBackupLsn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastBackupOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastBackupTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastBackupOn)) + { + builder.Append(" lastBackupTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastBackupOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MostRecentLinkError), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mostRecentLinkError: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MostRecentLinkError)) + { + builder.Append(" mostRecentLinkError: "); + if (MostRecentLinkError.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MostRecentLinkError}'''"); + } + else + { + builder.AppendLine($"'{MostRecentLinkError}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerAuthCertValidity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerAuthCertValidity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerAuthCertValidity)) + { + builder.Append(" partnerAuthCertValidity: "); + BicepSerializationHelpers.AppendChildObject(builder, PartnerAuthCertValidity, options, 2, false, " partnerAuthCertValidity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceSendReplicationLagSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceSendReplicationLagSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceSendReplicationLagSeconds)) + { + builder.Append(" instanceSendReplicationLagSeconds: "); + builder.AppendLine($"{InstanceSendReplicationLagSeconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceRedoReplicationLagSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceRedoReplicationLagSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceRedoReplicationLagSeconds)) + { + builder.Append(" instanceRedoReplicationLagSeconds: "); + builder.AppendLine($"{InstanceRedoReplicationLagSeconds.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupDatabase)} does not support writing '{options.Format}' format."); + } + } + + DistributedAvailabilityGroupDatabase IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDistributedAvailabilityGroupDatabase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupDatabase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.cs new file mode 100644 index 000000000000..c64216736fc6 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupDatabase.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Database specific information. + public partial class DistributedAvailabilityGroupDatabase + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DistributedAvailabilityGroupDatabase() + { + } + + /// Initializes a new instance of . + /// The name of the database in link. + /// Managed instance replica id. + /// SQL server replica id. + /// Current link state. + /// Seeding progress. + /// Link health state. + /// Link connected state. + /// Last received LSN. + /// Last received LSN time. + /// Last sent LSN. + /// Last sent LSN time. + /// Last commit LSN. + /// Last commit LSN time. + /// Last hardened LSN. + /// Last hardened LSN time. + /// Last backup LSN. + /// Last backup LSN time. + /// The most recent link connection error description. + /// SQL server certificate validity. + /// Replication lag when Managed Instance link side is primary. + /// Redo lag when Managed Instance link side is primary. + /// Keeps track of any properties unknown to the library. + internal DistributedAvailabilityGroupDatabase(string databaseName, Guid? instanceReplicaId, Guid? partnerReplicaId, string replicaState, string seedingProgress, ReplicaSynchronizationHealth? synchronizationHealth, ReplicaConnectedState? connectedState, string lastReceivedLsn, DateTimeOffset? lastReceivedOn, string lastSentLsn, DateTimeOffset? lastSentOn, string lastCommitLsn, DateTimeOffset? lastCommitOn, string lastHardenedLsn, DateTimeOffset? lastHardenedOn, string lastBackupLsn, DateTimeOffset? lastBackupOn, string mostRecentLinkError, CertificateInfo partnerAuthCertValidity, int? instanceSendReplicationLagSeconds, int? instanceRedoReplicationLagSeconds, IDictionary serializedAdditionalRawData) + { + DatabaseName = databaseName; + InstanceReplicaId = instanceReplicaId; + PartnerReplicaId = partnerReplicaId; + ReplicaState = replicaState; + SeedingProgress = seedingProgress; + SynchronizationHealth = synchronizationHealth; + ConnectedState = connectedState; + LastReceivedLsn = lastReceivedLsn; + LastReceivedOn = lastReceivedOn; + LastSentLsn = lastSentLsn; + LastSentOn = lastSentOn; + LastCommitLsn = lastCommitLsn; + LastCommitOn = lastCommitOn; + LastHardenedLsn = lastHardenedLsn; + LastHardenedOn = lastHardenedOn; + LastBackupLsn = lastBackupLsn; + LastBackupOn = lastBackupOn; + MostRecentLinkError = mostRecentLinkError; + PartnerAuthCertValidity = partnerAuthCertValidity; + InstanceSendReplicationLagSeconds = instanceSendReplicationLagSeconds; + InstanceRedoReplicationLagSeconds = instanceRedoReplicationLagSeconds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the database in link. + [WirePath("databaseName")] + public string DatabaseName { get; set; } + /// Managed instance replica id. + [WirePath("instanceReplicaId")] + public Guid? InstanceReplicaId { get; } + /// SQL server replica id. + [WirePath("partnerReplicaId")] + public Guid? PartnerReplicaId { get; } + /// Current link state. + [WirePath("replicaState")] + public string ReplicaState { get; } + /// Seeding progress. + [WirePath("seedingProgress")] + public string SeedingProgress { get; } + /// Link health state. + [WirePath("synchronizationHealth")] + public ReplicaSynchronizationHealth? SynchronizationHealth { get; } + /// Link connected state. + [WirePath("connectedState")] + public ReplicaConnectedState? ConnectedState { get; } + /// Last received LSN. + [WirePath("lastReceivedLsn")] + public string LastReceivedLsn { get; } + /// Last received LSN time. + [WirePath("lastReceivedTime")] + public DateTimeOffset? LastReceivedOn { get; } + /// Last sent LSN. + [WirePath("lastSentLsn")] + public string LastSentLsn { get; } + /// Last sent LSN time. + [WirePath("lastSentTime")] + public DateTimeOffset? LastSentOn { get; } + /// Last commit LSN. + [WirePath("lastCommitLsn")] + public string LastCommitLsn { get; } + /// Last commit LSN time. + [WirePath("lastCommitTime")] + public DateTimeOffset? LastCommitOn { get; } + /// Last hardened LSN. + [WirePath("lastHardenedLsn")] + public string LastHardenedLsn { get; } + /// Last hardened LSN time. + [WirePath("lastHardenedTime")] + public DateTimeOffset? LastHardenedOn { get; } + /// Last backup LSN. + [WirePath("lastBackupLsn")] + public string LastBackupLsn { get; } + /// Last backup LSN time. + [WirePath("lastBackupTime")] + public DateTimeOffset? LastBackupOn { get; } + /// The most recent link connection error description. + [WirePath("mostRecentLinkError")] + public string MostRecentLinkError { get; } + /// SQL server certificate validity. + [WirePath("partnerAuthCertValidity")] + public CertificateInfo PartnerAuthCertValidity { get; } + /// Replication lag when Managed Instance link side is primary. + [WirePath("instanceSendReplicationLagSeconds")] + public int? InstanceSendReplicationLagSeconds { get; } + /// Redo lag when Managed Instance link side is primary. + [WirePath("instanceRedoReplicationLagSeconds")] + public int? InstanceRedoReplicationLagSeconds { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupReplicationMode.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupReplicationMode.cs deleted file mode 100644 index 6938a98b3bc6..000000000000 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupReplicationMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Sql.Models -{ - /// The replication mode of a distributed availability group. Parameter will be ignored during link creation. - public readonly partial struct DistributedAvailabilityGroupReplicationMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DistributedAvailabilityGroupReplicationMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AsyncValue = "Async"; - private const string SyncValue = "Sync"; - - /// Async. - public static DistributedAvailabilityGroupReplicationMode Async { get; } = new DistributedAvailabilityGroupReplicationMode(AsyncValue); - /// Sync. - public static DistributedAvailabilityGroupReplicationMode Sync { get; } = new DistributedAvailabilityGroupReplicationMode(SyncValue); - /// Determines if two values are the same. - public static bool operator ==(DistributedAvailabilityGroupReplicationMode left, DistributedAvailabilityGroupReplicationMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DistributedAvailabilityGroupReplicationMode left, DistributedAvailabilityGroupReplicationMode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator DistributedAvailabilityGroupReplicationMode(string value) => new DistributedAvailabilityGroupReplicationMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DistributedAvailabilityGroupReplicationMode other && Equals(other); - /// - public bool Equals(DistributedAvailabilityGroupReplicationMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.Serialization.cs new file mode 100644 index 000000000000..2b848b1d7a78 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class DistributedAvailabilityGroupSetRole : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupSetRole)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceRole"u8); + writer.WriteStringValue(InstanceRole.ToString()); + writer.WritePropertyName("roleChangeType"u8); + writer.WriteStringValue(RoleChangeType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DistributedAvailabilityGroupSetRole IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupSetRole)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDistributedAvailabilityGroupSetRole(document.RootElement, options); + } + + internal static DistributedAvailabilityGroupSetRole DeserializeDistributedAvailabilityGroupSetRole(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InstanceRole instanceRole = default; + RoleChangeType roleChangeType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceRole"u8)) + { + instanceRole = new InstanceRole(property.Value.GetString()); + continue; + } + if (property.NameEquals("roleChangeType"u8)) + { + roleChangeType = new RoleChangeType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DistributedAvailabilityGroupSetRole(instanceRole, roleChangeType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupSetRole)} does not support writing '{options.Format}' format."); + } + } + + DistributedAvailabilityGroupSetRole IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDistributedAvailabilityGroupSetRole(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupSetRole)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.cs new file mode 100644 index 000000000000..88f071912cc1 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupSetRole.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Distributed availability group failover request. + public partial class DistributedAvailabilityGroupSetRole + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// New role of managed instance in a distributed availability group, can be Primary or Secondary. + /// The type of the role change, can be Planned or Forced. + public DistributedAvailabilityGroupSetRole(InstanceRole instanceRole, RoleChangeType roleChangeType) + { + InstanceRole = instanceRole; + RoleChangeType = roleChangeType; + } + + /// Initializes a new instance of . + /// New role of managed instance in a distributed availability group, can be Primary or Secondary. + /// The type of the role change, can be Planned or Forced. + /// Keeps track of any properties unknown to the library. + internal DistributedAvailabilityGroupSetRole(InstanceRole instanceRole, RoleChangeType roleChangeType, IDictionary serializedAdditionalRawData) + { + InstanceRole = instanceRole; + RoleChangeType = roleChangeType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DistributedAvailabilityGroupSetRole() + { + } + + /// New role of managed instance in a distributed availability group, can be Primary or Secondary. + [WirePath("instanceRole")] + public InstanceRole InstanceRole { get; } + /// The type of the role change, can be Planned or Forced. + [WirePath("roleChangeType")] + public RoleChangeType RoleChangeType { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.Serialization.cs new file mode 100644 index 000000000000..352828a10910 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class DistributedAvailabilityGroupsFailoverContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupsFailoverContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("failoverType"u8); + writer.WriteStringValue(FailoverType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DistributedAvailabilityGroupsFailoverContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupsFailoverContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDistributedAvailabilityGroupsFailoverContent(document.RootElement, options); + } + + internal static DistributedAvailabilityGroupsFailoverContent DeserializeDistributedAvailabilityGroupsFailoverContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FailoverType failoverType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failoverType"u8)) + { + failoverType = new FailoverType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DistributedAvailabilityGroupsFailoverContent(failoverType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupsFailoverContent)} does not support writing '{options.Format}' format."); + } + } + + DistributedAvailabilityGroupsFailoverContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDistributedAvailabilityGroupsFailoverContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DistributedAvailabilityGroupsFailoverContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.cs new file mode 100644 index 000000000000..b1305eb1e21e --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DistributedAvailabilityGroupsFailoverContent.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Distributed availability group failover. + public partial class DistributedAvailabilityGroupsFailoverContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The failover type, can be ForcedAllowDataLoss or Planned. + public DistributedAvailabilityGroupsFailoverContent(FailoverType failoverType) + { + FailoverType = failoverType; + } + + /// Initializes a new instance of . + /// The failover type, can be ForcedAllowDataLoss or Planned. + /// Keeps track of any properties unknown to the library. + internal DistributedAvailabilityGroupsFailoverContent(FailoverType failoverType, IDictionary serializedAdditionalRawData) + { + FailoverType = failoverType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DistributedAvailabilityGroupsFailoverContent() + { + } + + /// The failover type, can be ForcedAllowDataLoss or Planned. + [WirePath("failoverType")] + public FailoverType FailoverType { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverModeType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverModeType.cs new file mode 100644 index 000000000000..0ca6d4abf81e --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverModeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure. + public readonly partial struct FailoverModeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FailoverModeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ManualValue = "Manual"; + + /// None. + public static FailoverModeType None { get; } = new FailoverModeType(NoneValue); + /// Manual. + public static FailoverModeType Manual { get; } = new FailoverModeType(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(FailoverModeType left, FailoverModeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FailoverModeType left, FailoverModeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FailoverModeType(string value) => new FailoverModeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FailoverModeType other && Equals(other); + /// + public bool Equals(FailoverModeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverType.cs new file mode 100644 index 000000000000..6de7d42aa64f --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// The failover type, can be ForcedAllowDataLoss or Planned. + public readonly partial struct FailoverType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FailoverType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ForcedAllowDataLossValue = "ForcedAllowDataLoss"; + private const string PlannedValue = "Planned"; + + /// ForcedAllowDataLoss. + public static FailoverType ForcedAllowDataLoss { get; } = new FailoverType(ForcedAllowDataLossValue); + /// Planned. + public static FailoverType Planned { get; } = new FailoverType(PlannedValue); + /// Determines if two values are the same. + public static bool operator ==(FailoverType left, FailoverType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FailoverType left, FailoverType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FailoverType(string value) => new FailoverType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FailoverType other && Equals(other); + /// + public bool Equals(FailoverType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreemiumType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreemiumType.cs new file mode 100644 index 000000000000..7c15f87c25b6 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FreemiumType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Weather or not Managed Instance is freemium. + public readonly partial struct FreemiumType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FreemiumType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegularValue = "Regular"; + private const string FreemiumValue = "Freemium"; + + /// Regular. + public static FreemiumType Regular { get; } = new FreemiumType(RegularValue); + /// Freemium. + public static FreemiumType Freemium { get; } = new FreemiumType(FreemiumValue); + /// Determines if two values are the same. + public static bool operator ==(FreemiumType left, FreemiumType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FreemiumType left, FreemiumType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FreemiumType(string value) => new FreemiumType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FreemiumType other && Equals(other); + /// + public bool Equals(FreemiumType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsage.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsage.cs new file mode 100644 index 000000000000..787e7a24ebe1 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsage.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + public readonly partial struct HybridSecondaryUsage : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HybridSecondaryUsage(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string PassiveValue = "Passive"; + + /// Active. + public static HybridSecondaryUsage Active { get; } = new HybridSecondaryUsage(ActiveValue); + /// Passive. + public static HybridSecondaryUsage Passive { get; } = new HybridSecondaryUsage(PassiveValue); + /// Determines if two values are the same. + public static bool operator ==(HybridSecondaryUsage left, HybridSecondaryUsage right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HybridSecondaryUsage left, HybridSecondaryUsage right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator HybridSecondaryUsage(string value) => new HybridSecondaryUsage(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HybridSecondaryUsage other && Equals(other); + /// + public bool Equals(HybridSecondaryUsage other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsageDetected.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsageDetected.cs new file mode 100644 index 000000000000..5dba9bfa0e77 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/HybridSecondaryUsageDetected.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). + public readonly partial struct HybridSecondaryUsageDetected : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HybridSecondaryUsageDetected(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string PassiveValue = "Passive"; + + /// Active. + public static HybridSecondaryUsageDetected Active { get; } = new HybridSecondaryUsageDetected(ActiveValue); + /// Passive. + public static HybridSecondaryUsageDetected Passive { get; } = new HybridSecondaryUsageDetected(PassiveValue); + /// Determines if two values are the same. + public static bool operator ==(HybridSecondaryUsageDetected left, HybridSecondaryUsageDetected right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HybridSecondaryUsageDetected left, HybridSecondaryUsageDetected right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator HybridSecondaryUsageDetected(string value) => new HybridSecondaryUsageDetected(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HybridSecondaryUsageDetected other && Equals(other); + /// + public bool Equals(HybridSecondaryUsageDetected other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstanceRole.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstanceRole.cs new file mode 100644 index 000000000000..47134adf7a2f --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstanceRole.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// New role of managed instance in a distributed availability group, can be Primary or Secondary. + public readonly partial struct InstanceRole : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InstanceRole(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// Primary. + public static InstanceRole Primary { get; } = new InstanceRole(PrimaryValue); + /// Secondary. + public static InstanceRole Secondary { get; } = new InstanceRole(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(InstanceRole left, InstanceRole right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InstanceRole left, InstanceRole right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InstanceRole(string value) => new InstanceRole(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InstanceRole other && Equals(other); + /// + public bool Equals(InstanceRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LinkRole.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LinkRole.cs new file mode 100644 index 000000000000..ea6e50792f17 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/LinkRole.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// SQL server side link role. + public readonly partial struct LinkRole : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LinkRole(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// Primary. + public static LinkRole Primary { get; } = new LinkRole(PrimaryValue); + /// Secondary. + public static LinkRole Secondary { get; } = new LinkRole(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(LinkRole left, LinkRole right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LinkRole left, LinkRole right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LinkRole(string value) => new LinkRole(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LinkRole other && Equals(other); + /// + public bool Equals(LinkRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceDatabaseFormat.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceDatabaseFormat.cs new file mode 100644 index 000000000000..ed9c1b652eaa --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstanceDatabaseFormat.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Specifies the internal format of instance databases specific to the SQL engine version. + public readonly partial struct ManagedInstanceDatabaseFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedInstanceDatabaseFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AlwaysUpToDateValue = "AlwaysUpToDate"; + private const string SqlServer2022Value = "SQLServer2022"; + + /// AlwaysUpToDate. + public static ManagedInstanceDatabaseFormat AlwaysUpToDate { get; } = new ManagedInstanceDatabaseFormat(AlwaysUpToDateValue); + /// SQLServer2022. + public static ManagedInstanceDatabaseFormat SqlServer2022 { get; } = new ManagedInstanceDatabaseFormat(SqlServer2022Value); + /// Determines if two values are the same. + public static bool operator ==(ManagedInstanceDatabaseFormat left, ManagedInstanceDatabaseFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedInstanceDatabaseFormat left, ManagedInstanceDatabaseFormat right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedInstanceDatabaseFormat(string value) => new ManagedInstanceDatabaseFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedInstanceDatabaseFormat other && Equals(other); + /// + public bool Equals(ManagedInstanceDatabaseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs index 8af061516409..bc423f7c0ed8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs @@ -74,6 +74,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("fullyQualifiedDomainName"u8); writer.WriteStringValue(FullyQualifiedDomainName); } + if (Optional.IsDefined(IsGeneralPurposeV2)) + { + writer.WritePropertyName("isGeneralPurposeV2"u8); + writer.WriteBooleanValue(IsGeneralPurposeV2.Value); + } if (Optional.IsDefined(AdministratorLogin)) { writer.WritePropertyName("administratorLogin"u8); @@ -99,6 +104,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("licenseType"u8); writer.WriteStringValue(LicenseType.Value.ToString()); } + if (Optional.IsDefined(HybridSecondaryUsage)) + { + writer.WritePropertyName("hybridSecondaryUsage"u8); + writer.WriteStringValue(HybridSecondaryUsage.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(HybridSecondaryUsageDetected)) + { + writer.WritePropertyName("hybridSecondaryUsageDetected"u8); + writer.WriteStringValue(HybridSecondaryUsageDetected.Value.ToString()); + } if (Optional.IsDefined(VCores)) { writer.WritePropertyName("vCores"u8); @@ -109,6 +124,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("storageSizeInGB"u8); writer.WriteNumberValue(StorageSizeInGB.Value); } + if (Optional.IsDefined(StorageIOps)) + { + writer.WritePropertyName("storageIOps"u8); + writer.WriteNumberValue(StorageIOps.Value); + } + if (Optional.IsDefined(StorageThroughputMBps)) + { + writer.WritePropertyName("storageThroughputMBps"u8); + writer.WriteNumberValue(StorageThroughputMBps.Value); + } if (Optional.IsDefined(Collation)) { writer.WritePropertyName("collation"u8); @@ -209,6 +234,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("servicePrincipal"u8); writer.WriteObjectValue(ServicePrincipal, options); } + if (options.Format != "W" && Optional.IsDefined(VirtualClusterId)) + { + writer.WritePropertyName("virtualClusterId"u8); + writer.WriteStringValue(VirtualClusterId); + } + if (options.Format != "W" && Optional.IsDefined(ExternalGovernanceStatus)) + { + writer.WritePropertyName("externalGovernanceStatus"u8); + writer.WriteStringValue(ExternalGovernanceStatus.Value.ToString()); + } + if (Optional.IsDefined(PricingModel)) + { + writer.WritePropertyName("pricingModel"u8); + writer.WriteStringValue(PricingModel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreateOn)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteStringValue(CreateOn.Value, "O"); + } + if (Optional.IsDefined(AuthenticationMetadata)) + { + writer.WritePropertyName("authenticationMetadata"u8); + writer.WriteStringValue(AuthenticationMetadata.Value.ToString()); + } + if (Optional.IsDefined(DatabaseFormat)) + { + writer.WritePropertyName("databaseFormat"u8); + writer.WriteStringValue(DatabaseFormat.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -250,16 +305,21 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement SqlSku sku = default; ManagedServiceIdentity identity = default; IDictionary tags = default; - ManagedInstancePropertiesProvisioningState? provisioningState = default; + JobExecutionProvisioningState? provisioningState = default; ManagedServerCreateMode? managedInstanceCreateMode = default; string fullyQualifiedDomainName = default; + bool? isGeneralPurposeV2 = default; string administratorLogin = default; string administratorLoginPassword = default; ResourceIdentifier subnetId = default; string state = default; ManagedInstanceLicenseType? licenseType = default; + HybridSecondaryUsage? hybridSecondaryUsage = default; + HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default; int? vCores = default; int? storageSizeInGB = default; + int? storageIOps = default; + int? storageThroughputMBps = default; string collation = default; string dnsZone = default; ResourceIdentifier dnsZonePartner = default; @@ -279,6 +339,12 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement Uri keyId = default; ManagedInstanceExternalAdministrator administrators = default; SqlServicePrincipal servicePrincipal = default; + string virtualClusterId = default; + ExternalGovernanceStatus? externalGovernanceStatus = default; + FreemiumType? pricingModel = default; + DateTimeOffset? createTime = default; + AuthMetadataLookupMode? authenticationMetadata = default; + ManagedInstanceDatabaseFormat? databaseFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -331,7 +397,7 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement { continue; } - provisioningState = new ManagedInstancePropertiesProvisioningState(property0.Value.GetString()); + provisioningState = new JobExecutionProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("managedInstanceCreateMode"u8)) @@ -348,6 +414,15 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement fullyQualifiedDomainName = property0.Value.GetString(); continue; } + if (property0.NameEquals("isGeneralPurposeV2"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isGeneralPurposeV2 = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("administratorLogin"u8)) { administratorLogin = property0.Value.GetString(); @@ -381,6 +456,24 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement licenseType = new ManagedInstanceLicenseType(property0.Value.GetString()); continue; } + if (property0.NameEquals("hybridSecondaryUsage"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hybridSecondaryUsage = new HybridSecondaryUsage(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("hybridSecondaryUsageDetected"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hybridSecondaryUsageDetected = new HybridSecondaryUsageDetected(property0.Value.GetString()); + continue; + } if (property0.NameEquals("vCores"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -399,6 +492,24 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement storageSizeInGB = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("storageIOps"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageIOps = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("storageThroughputMBps"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageThroughputMBps = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("collation"u8)) { collation = property0.Value.GetString(); @@ -559,6 +670,56 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement servicePrincipal = SqlServicePrincipal.DeserializeSqlServicePrincipal(property0.Value, options); continue; } + if (property0.NameEquals("virtualClusterId"u8)) + { + virtualClusterId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("externalGovernanceStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + externalGovernanceStatus = new ExternalGovernanceStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("pricingModel"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pricingModel = new FreemiumType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("authenticationMetadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationMetadata = new AuthMetadataLookupMode(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("databaseFormat"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseFormat = new ManagedInstanceDatabaseFormat(property0.Value.GetString()); + continue; + } } continue; } @@ -575,13 +736,18 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement provisioningState, managedInstanceCreateMode, fullyQualifiedDomainName, + isGeneralPurposeV2, administratorLogin, administratorLoginPassword, subnetId, state, licenseType, + hybridSecondaryUsage, + hybridSecondaryUsageDetected, vCores, storageSizeInGB, + storageIOps, + storageThroughputMBps, collation, dnsZone, dnsZonePartner, @@ -601,6 +767,12 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement keyId, administrators, servicePrincipal, + virtualClusterId, + externalGovernanceStatus, + pricingModel, + createTime, + authenticationMetadata, + databaseFormat, serializedAdditionalRawData); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs index 4564590e9977..91fb9b3a22a4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs @@ -58,7 +58,7 @@ public ManagedInstancePatch() /// Managed instance sku. /// Managed instance identity. /// Resource tags. - /// + /// Provisioning state of managed instance. /// /// Specifies the mode of database creation. /// @@ -67,13 +67,18 @@ public ManagedInstancePatch() /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. /// /// The fully qualified domain name of the managed instance. + /// Whether or not this is a GPv2 variant of General Purpose edition. /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). /// The administrator login password (required for managed instance creation). /// Subnet resource ID for the managed instance. /// The state of the managed instance. /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage throughput MBps parameter is not supported in the instance create/update operation. /// Collation of the managed instance. /// The Dns Zone that the managed instance is in. /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. @@ -100,8 +105,14 @@ public ManagedInstancePatch() /// A CMK URI of the key to use for encryption. /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. /// The managed instance's service principal. + /// Virtual cluster resource id for the Managed Instance. + /// Status of external governance. + /// Weather or not Managed Instance is freemium. + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + /// The managed instance's authentication metadata lookup mode. + /// Specifies the internal format of instance databases specific to the SQL engine version. /// Keeps track of any properties unknown to the library. - internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDictionary tags, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, int? vCores, int? storageSizeInGB, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, IDictionary serializedAdditionalRawData) + internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDictionary tags, JobExecutionProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, string virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, FreemiumType? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat, IDictionary serializedAdditionalRawData) { Sku = sku; Identity = identity; @@ -109,13 +120,18 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict ProvisioningState = provisioningState; ManagedInstanceCreateMode = managedInstanceCreateMode; FullyQualifiedDomainName = fullyQualifiedDomainName; + IsGeneralPurposeV2 = isGeneralPurposeV2; AdministratorLogin = administratorLogin; AdministratorLoginPassword = administratorLoginPassword; SubnetId = subnetId; State = state; LicenseType = licenseType; + HybridSecondaryUsage = hybridSecondaryUsage; + HybridSecondaryUsageDetected = hybridSecondaryUsageDetected; VCores = vCores; StorageSizeInGB = storageSizeInGB; + StorageIOps = storageIOps; + StorageThroughputMBps = storageThroughputMBps; Collation = collation; DnsZone = dnsZone; ManagedDnsZonePartner = managedDnsZonePartner; @@ -135,6 +151,12 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict KeyId = keyId; Administrators = administrators; ServicePrincipal = servicePrincipal; + VirtualClusterId = virtualClusterId; + ExternalGovernanceStatus = externalGovernanceStatus; + PricingModel = pricingModel; + CreateOn = createOn; + AuthenticationMetadata = authenticationMetadata; + DatabaseFormat = databaseFormat; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -147,9 +169,9 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict /// Resource tags. [WirePath("tags")] public IDictionary Tags { get; } - /// Gets the provisioning state. + /// Provisioning state of managed instance. [WirePath("properties.provisioningState")] - public ManagedInstancePropertiesProvisioningState? ProvisioningState { get; } + public JobExecutionProvisioningState? ProvisioningState { get; } /// /// Specifies the mode of database creation. /// @@ -162,6 +184,9 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict /// The fully qualified domain name of the managed instance. [WirePath("properties.fullyQualifiedDomainName")] public string FullyQualifiedDomainName { get; } + /// Whether or not this is a GPv2 variant of General Purpose edition. + [WirePath("properties.isGeneralPurposeV2")] + public bool? IsGeneralPurposeV2 { get; set; } /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). [WirePath("properties.administratorLogin")] public string AdministratorLogin { get; set; } @@ -177,12 +202,24 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). [WirePath("properties.licenseType")] public ManagedInstanceLicenseType? LicenseType { get; set; } + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + [WirePath("properties.hybridSecondaryUsage")] + public HybridSecondaryUsage? HybridSecondaryUsage { get; set; } + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). + [WirePath("properties.hybridSecondaryUsageDetected")] + public HybridSecondaryUsageDetected? HybridSecondaryUsageDetected { get; } /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. [WirePath("properties.vCores")] public int? VCores { get; set; } /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. [WirePath("properties.storageSizeInGB")] public int? StorageSizeInGB { get; set; } + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + [WirePath("properties.storageIOps")] + public int? StorageIOps { get; set; } + /// Storage throughput MBps parameter is not supported in the instance create/update operation. + [WirePath("properties.storageThroughputMBps")] + public int? StorageThroughputMBps { get; set; } /// Collation of the managed instance. [WirePath("properties.collation")] public string Collation { get; set; } @@ -247,5 +284,23 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict /// The managed instance's service principal. [WirePath("properties.servicePrincipal")] public SqlServicePrincipal ServicePrincipal { get; set; } + /// Virtual cluster resource id for the Managed Instance. + [WirePath("properties.virtualClusterId")] + public string VirtualClusterId { get; } + /// Status of external governance. + [WirePath("properties.externalGovernanceStatus")] + public ExternalGovernanceStatus? ExternalGovernanceStatus { get; } + /// Weather or not Managed Instance is freemium. + [WirePath("properties.pricingModel")] + public FreemiumType? PricingModel { get; set; } + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + [WirePath("properties.createTime")] + public DateTimeOffset? CreateOn { get; } + /// The managed instance's authentication metadata lookup mode. + [WirePath("properties.authenticationMetadata")] + public AuthMetadataLookupMode? AuthenticationMetadata { get; set; } + /// Specifies the internal format of instance databases specific to the SQL engine version. + [WirePath("properties.databaseFormat")] + public ManagedInstanceDatabaseFormat? DatabaseFormat { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs deleted file mode 100644 index 69b071a8428b..000000000000 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePropertiesProvisioningState.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Sql.Models -{ - /// The ManagedInstancePropertiesProvisioningState. - public readonly partial struct ManagedInstancePropertiesProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ManagedInstancePropertiesProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatingValue = "Creating"; - private const string DeletingValue = "Deleting"; - private const string UpdatingValue = "Updating"; - private const string UnknownValue = "Unknown"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string AcceptedValue = "Accepted"; - private const string CreatedValue = "Created"; - private const string DeletedValue = "Deleted"; - private const string UnrecognizedValue = "Unrecognized"; - private const string RunningValue = "Running"; - private const string CanceledValue = "Canceled"; - private const string NotSpecifiedValue = "NotSpecified"; - private const string RegisteringValue = "Registering"; - private const string TimedOutValue = "TimedOut"; - - /// Creating. - public static ManagedInstancePropertiesProvisioningState Creating { get; } = new ManagedInstancePropertiesProvisioningState(CreatingValue); - /// Deleting. - public static ManagedInstancePropertiesProvisioningState Deleting { get; } = new ManagedInstancePropertiesProvisioningState(DeletingValue); - /// Updating. - public static ManagedInstancePropertiesProvisioningState Updating { get; } = new ManagedInstancePropertiesProvisioningState(UpdatingValue); - /// Unknown. - public static ManagedInstancePropertiesProvisioningState Unknown { get; } = new ManagedInstancePropertiesProvisioningState(UnknownValue); - /// Succeeded. - public static ManagedInstancePropertiesProvisioningState Succeeded { get; } = new ManagedInstancePropertiesProvisioningState(SucceededValue); - /// Failed. - public static ManagedInstancePropertiesProvisioningState Failed { get; } = new ManagedInstancePropertiesProvisioningState(FailedValue); - /// Accepted. - public static ManagedInstancePropertiesProvisioningState Accepted { get; } = new ManagedInstancePropertiesProvisioningState(AcceptedValue); - /// Created. - public static ManagedInstancePropertiesProvisioningState Created { get; } = new ManagedInstancePropertiesProvisioningState(CreatedValue); - /// Deleted. - public static ManagedInstancePropertiesProvisioningState Deleted { get; } = new ManagedInstancePropertiesProvisioningState(DeletedValue); - /// Unrecognized. - public static ManagedInstancePropertiesProvisioningState Unrecognized { get; } = new ManagedInstancePropertiesProvisioningState(UnrecognizedValue); - /// Running. - public static ManagedInstancePropertiesProvisioningState Running { get; } = new ManagedInstancePropertiesProvisioningState(RunningValue); - /// Canceled. - public static ManagedInstancePropertiesProvisioningState Canceled { get; } = new ManagedInstancePropertiesProvisioningState(CanceledValue); - /// NotSpecified. - public static ManagedInstancePropertiesProvisioningState NotSpecified { get; } = new ManagedInstancePropertiesProvisioningState(NotSpecifiedValue); - /// Registering. - public static ManagedInstancePropertiesProvisioningState Registering { get; } = new ManagedInstancePropertiesProvisioningState(RegisteringValue); - /// TimedOut. - public static ManagedInstancePropertiesProvisioningState TimedOut { get; } = new ManagedInstancePropertiesProvisioningState(TimedOutValue); - /// Determines if two values are the same. - public static bool operator ==(ManagedInstancePropertiesProvisioningState left, ManagedInstancePropertiesProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ManagedInstancePropertiesProvisioningState left, ManagedInstancePropertiesProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ManagedInstancePropertiesProvisioningState(string value) => new ManagedInstancePropertiesProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ManagedInstancePropertiesProvisioningState other && Equals(other); - /// - public bool Equals(ManagedInstancePropertiesProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.Serialization.cs new file mode 100644 index 000000000000..b68c6af69888 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.Serialization.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class QueryMetricIntervalAutoGenerated : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QueryMetricIntervalAutoGenerated)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(IntervalStartTime)) + { + writer.WritePropertyName("intervalStartTime"u8); + writer.WriteStringValue(IntervalStartTime); + } + if (options.Format != "W" && Optional.IsDefined(IntervalType)) + { + writer.WritePropertyName("intervalType"u8); + writer.WriteStringValue(IntervalType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ExecutionCount)) + { + writer.WritePropertyName("executionCount"u8); + writer.WriteNumberValue(ExecutionCount.Value); + } + if (Optional.IsCollectionDefined(Metrics)) + { + writer.WritePropertyName("metrics"u8); + writer.WriteStartArray(); + foreach (var item in Metrics) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + QueryMetricIntervalAutoGenerated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QueryMetricIntervalAutoGenerated)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeQueryMetricIntervalAutoGenerated(document.RootElement, options); + } + + internal static QueryMetricIntervalAutoGenerated DeserializeQueryMetricIntervalAutoGenerated(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string intervalStartTime = default; + QueryTimeGrainType? intervalType = default; + long? executionCount = default; + IReadOnlyList metrics = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("intervalStartTime"u8)) + { + intervalStartTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("intervalType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + intervalType = new QueryTimeGrainType(property.Value.GetString()); + continue; + } + if (property.NameEquals("executionCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("metrics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(QueryMetricProperties.DeserializeQueryMetricProperties(item, options)); + } + metrics = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new QueryMetricIntervalAutoGenerated(intervalStartTime, intervalType, executionCount, metrics ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntervalStartTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" intervalStartTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntervalStartTime)) + { + builder.Append(" intervalStartTime: "); + if (IntervalStartTime.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IntervalStartTime}'''"); + } + else + { + builder.AppendLine($"'{IntervalStartTime}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntervalType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" intervalType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntervalType)) + { + builder.Append(" intervalType: "); + builder.AppendLine($"'{IntervalType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExecutionCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" executionCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExecutionCount)) + { + builder.Append(" executionCount: "); + builder.AppendLine($"'{ExecutionCount.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metrics), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metrics: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Metrics)) + { + if (Metrics.Any()) + { + builder.Append(" metrics: "); + builder.AppendLine("["); + foreach (var item in Metrics) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " metrics: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(QueryMetricIntervalAutoGenerated)} does not support writing '{options.Format}' format."); + } + } + + QueryMetricIntervalAutoGenerated IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeQueryMetricIntervalAutoGenerated(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(QueryMetricIntervalAutoGenerated)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.cs new file mode 100644 index 000000000000..8bb7b0c61145 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryMetricIntervalAutoGenerated.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Properties of a query metrics interval. + public partial class QueryMetricIntervalAutoGenerated + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal QueryMetricIntervalAutoGenerated() + { + Metrics = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The start time for the metric interval (ISO-8601 format). + /// Interval type (length). + /// Execution count of a query in this interval. + /// List of metric objects for this interval. + /// Keeps track of any properties unknown to the library. + internal QueryMetricIntervalAutoGenerated(string intervalStartTime, QueryTimeGrainType? intervalType, long? executionCount, IReadOnlyList metrics, IDictionary serializedAdditionalRawData) + { + IntervalStartTime = intervalStartTime; + IntervalType = intervalType; + ExecutionCount = executionCount; + Metrics = metrics; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The start time for the metric interval (ISO-8601 format). + [WirePath("intervalStartTime")] + public string IntervalStartTime { get; } + /// Interval type (length). + [WirePath("intervalType")] + public QueryTimeGrainType? IntervalType { get; } + /// Execution count of a query in this interval. + [WirePath("executionCount")] + public long? ExecutionCount { get; } + /// List of metric objects for this interval. + [WirePath("metrics")] + public IReadOnlyList Metrics { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.Serialization.cs index b532c7137090..6f097ad9db21 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.Serialization.cs @@ -107,7 +107,7 @@ internal static QueryStatisticsProperties DeserializeQueryStatisticsProperties(J string queryId = default; string startTime = default; string endTime = default; - IReadOnlyList intervals = default; + IReadOnlyList intervals = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -138,10 +138,10 @@ internal static QueryStatisticsProperties DeserializeQueryStatisticsProperties(J { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(QueryMetricInterval.DeserializeQueryMetricInterval(item, options)); + array.Add(QueryMetricIntervalAutoGenerated.DeserializeQueryMetricIntervalAutoGenerated(item, options)); } intervals = array; continue; @@ -157,7 +157,7 @@ internal static QueryStatisticsProperties DeserializeQueryStatisticsProperties(J queryId, startTime, endTime, - intervals ?? new ChangeTrackingList(), + intervals ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.cs index a1aa5a92e4ac..47d8cb2d46a2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/QueryStatisticsProperties.cs @@ -48,7 +48,7 @@ public partial class QueryStatisticsProperties /// Initializes a new instance of . internal QueryStatisticsProperties() { - Intervals = new ChangeTrackingList(); + Intervals = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -58,7 +58,7 @@ internal QueryStatisticsProperties() /// The end time for the metric (ISO-8601 format). /// List of intervals with appropriate metric data. /// Keeps track of any properties unknown to the library. - internal QueryStatisticsProperties(string databaseName, string queryId, string startTime, string endTime, IReadOnlyList intervals, IDictionary serializedAdditionalRawData) + internal QueryStatisticsProperties(string databaseName, string queryId, string startTime, string endTime, IReadOnlyList intervals, IDictionary serializedAdditionalRawData) { DatabaseName = databaseName; QueryId = queryId; @@ -82,6 +82,6 @@ internal QueryStatisticsProperties(string databaseName, string queryId, string s public string EndTime { get; } /// List of intervals with appropriate metric data. [WirePath("intervals")] - public IReadOnlyList Intervals { get; } + public IReadOnlyList Intervals { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.Serialization.cs new file mode 100644 index 000000000000..0cdb793a189a --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.Serialization.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class RefreshExternalGovernanceStatusOperationResultMI : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RefreshExternalGovernanceStatusOperationResultMI)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(RequestId)) + { + writer.WritePropertyName("requestId"u8); + writer.WriteStringValue(RequestId.Value); + } + if (options.Format != "W" && Optional.IsDefined(RequestType)) + { + writer.WritePropertyName("requestType"u8); + writer.WriteStringValue(RequestType); + } + if (options.Format != "W" && Optional.IsDefined(QueuedTime)) + { + writer.WritePropertyName("queuedTime"u8); + writer.WriteStringValue(QueuedTime); + } + if (options.Format != "W" && Optional.IsDefined(ManagedInstanceName)) + { + writer.WritePropertyName("managedInstanceName"u8); + writer.WriteStringValue(ManagedInstanceName); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (options.Format != "W" && Optional.IsDefined(ErrorMessage)) + { + writer.WritePropertyName("errorMessage"u8); + writer.WriteStringValue(ErrorMessage); + } + writer.WriteEndObject(); + } + + RefreshExternalGovernanceStatusOperationResultMI IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RefreshExternalGovernanceStatusOperationResultMI)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRefreshExternalGovernanceStatusOperationResultMI(document.RootElement, options); + } + + internal static RefreshExternalGovernanceStatusOperationResultMI DeserializeRefreshExternalGovernanceStatusOperationResultMI(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + Guid? requestId = default; + string requestType = default; + string queuedTime = default; + string managedInstanceName = default; + string status = default; + string errorMessage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("requestId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requestId = property0.Value.GetGuid(); + continue; + } + if (property0.NameEquals("requestType"u8)) + { + requestType = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("queuedTime"u8)) + { + queuedTime = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("managedInstanceName"u8)) + { + managedInstanceName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("status"u8)) + { + status = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("errorMessage"u8)) + { + errorMessage = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RefreshExternalGovernanceStatusOperationResultMI( + id, + name, + type, + systemData, + requestId, + requestType, + queuedTime, + managedInstanceName, + status, + errorMessage, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequestId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requestId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequestId)) + { + builder.Append(" requestId: "); + builder.AppendLine($"'{RequestId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequestType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requestType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequestType)) + { + builder.Append(" requestType: "); + if (RequestType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RequestType}'''"); + } + else + { + builder.AppendLine($"'{RequestType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(QueuedTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queuedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(QueuedTime)) + { + builder.Append(" queuedTime: "); + if (QueuedTime.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{QueuedTime}'''"); + } + else + { + builder.AppendLine($"'{QueuedTime}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagedInstanceName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managedInstanceName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagedInstanceName)) + { + builder.Append(" managedInstanceName: "); + if (ManagedInstanceName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ManagedInstanceName}'''"); + } + else + { + builder.AppendLine($"'{ManagedInstanceName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + if (Status.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Status}'''"); + } + else + { + builder.AppendLine($"'{Status}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorMessage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorMessage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorMessage)) + { + builder.Append(" errorMessage: "); + if (ErrorMessage.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ErrorMessage}'''"); + } + else + { + builder.AppendLine($"'{ErrorMessage}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RefreshExternalGovernanceStatusOperationResultMI)} does not support writing '{options.Format}' format."); + } + } + + RefreshExternalGovernanceStatusOperationResultMI IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRefreshExternalGovernanceStatusOperationResultMI(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RefreshExternalGovernanceStatusOperationResultMI)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.cs new file mode 100644 index 000000000000..79a5ba84b6bc --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RefreshExternalGovernanceStatusOperationResultMI.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Sql.Models +{ + /// An RefreshExternalGovernanceStatus operation result resource. + public partial class RefreshExternalGovernanceStatusOperationResultMI : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RefreshExternalGovernanceStatusOperationResultMI() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Request Id. + /// Request type. + /// Queued time. + /// Managed instance name. + /// Operation status. + /// Error message. + /// Keeps track of any properties unknown to the library. + internal RefreshExternalGovernanceStatusOperationResultMI(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? requestId, string requestType, string queuedTime, string managedInstanceName, string status, string errorMessage, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + RequestId = requestId; + RequestType = requestType; + QueuedTime = queuedTime; + ManagedInstanceName = managedInstanceName; + Status = status; + ErrorMessage = errorMessage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Request Id. + [WirePath("properties.requestId")] + public Guid? RequestId { get; } + /// Request type. + [WirePath("properties.requestType")] + public string RequestType { get; } + /// Queued time. + [WirePath("properties.queuedTime")] + public string QueuedTime { get; } + /// Managed instance name. + [WirePath("properties.managedInstanceName")] + public string ManagedInstanceName { get; } + /// Operation status. + [WirePath("properties.status")] + public string Status { get; } + /// Error message. + [WirePath("properties.errorMessage")] + public string ErrorMessage { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaConnectedState.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaConnectedState.cs new file mode 100644 index 000000000000..c3cfbea65211 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaConnectedState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Link connected state. + public readonly partial struct ReplicaConnectedState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ReplicaConnectedState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisconnectedValue = "DISCONNECTED"; + private const string ConnectedValue = "CONNECTED"; + + /// DISCONNECTED. + public static ReplicaConnectedState Disconnected { get; } = new ReplicaConnectedState(DisconnectedValue); + /// CONNECTED. + public static ReplicaConnectedState Connected { get; } = new ReplicaConnectedState(ConnectedValue); + /// Determines if two values are the same. + public static bool operator ==(ReplicaConnectedState left, ReplicaConnectedState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReplicaConnectedState left, ReplicaConnectedState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ReplicaConnectedState(string value) => new ReplicaConnectedState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReplicaConnectedState other && Equals(other); + /// + public bool Equals(ReplicaConnectedState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaSynchronizationHealth.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaSynchronizationHealth.cs new file mode 100644 index 000000000000..f3aba9b9fd27 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicaSynchronizationHealth.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Link health state. + public readonly partial struct ReplicaSynchronizationHealth : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ReplicaSynchronizationHealth(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NOTHealthyValue = "NOT_HEALTHY"; + private const string PartiallyHealthyValue = "PARTIALLY_HEALTHY"; + private const string HealthyValue = "HEALTHY"; + + /// NOT_HEALTHY. + public static ReplicaSynchronizationHealth NOTHealthy { get; } = new ReplicaSynchronizationHealth(NOTHealthyValue); + /// PARTIALLY_HEALTHY. + public static ReplicaSynchronizationHealth PartiallyHealthy { get; } = new ReplicaSynchronizationHealth(PartiallyHealthyValue); + /// HEALTHY. + public static ReplicaSynchronizationHealth Healthy { get; } = new ReplicaSynchronizationHealth(HealthyValue); + /// Determines if two values are the same. + public static bool operator ==(ReplicaSynchronizationHealth left, ReplicaSynchronizationHealth right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReplicaSynchronizationHealth left, ReplicaSynchronizationHealth right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ReplicaSynchronizationHealth(string value) => new ReplicaSynchronizationHealth(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReplicaSynchronizationHealth other && Equals(other); + /// + public bool Equals(ReplicaSynchronizationHealth other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationModeType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationModeType.cs new file mode 100644 index 000000000000..4d44c3a13cb4 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationModeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Replication mode of the link. + public readonly partial struct ReplicationModeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ReplicationModeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AsyncValue = "Async"; + private const string SyncValue = "Sync"; + + /// Async. + public static ReplicationModeType Async { get; } = new ReplicationModeType(AsyncValue); + /// Sync. + public static ReplicationModeType Sync { get; } = new ReplicationModeType(SyncValue); + /// Determines if two values are the same. + public static bool operator ==(ReplicationModeType left, ReplicationModeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReplicationModeType left, ReplicationModeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ReplicationModeType(string value) => new ReplicationModeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReplicationModeType other && Equals(other); + /// + public bool Equals(ReplicationModeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RoleChangeType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RoleChangeType.cs new file mode 100644 index 000000000000..50b4b744c2a2 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/RoleChangeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// The type of the role change, can be Planned or Forced. + public readonly partial struct RoleChangeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RoleChangeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ForcedValue = "Forced"; + private const string PlannedValue = "Planned"; + + /// Forced. + public static RoleChangeType Forced { get; } = new RoleChangeType(ForcedValue); + /// Planned. + public static RoleChangeType Planned { get; } = new RoleChangeType(PlannedValue); + /// Determines if two values are the same. + public static bool operator ==(RoleChangeType left, RoleChangeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RoleChangeType left, RoleChangeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RoleChangeType(string value) => new RoleChangeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoleChangeType other && Equals(other); + /// + public bool Equals(RoleChangeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SeedingModeType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SeedingModeType.cs new file mode 100644 index 000000000000..7652b7717826 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SeedingModeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// Database seeding mode – can be Automatic (default), or Manual for supported scenarios. + public readonly partial struct SeedingModeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SeedingModeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string ManualValue = "Manual"; + + /// Automatic. + public static SeedingModeType Automatic { get; } = new SeedingModeType(AutomaticValue); + /// Manual. + public static SeedingModeType Manual { get; } = new SeedingModeType(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(SeedingModeType left, SeedingModeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SeedingModeType left, SeedingModeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SeedingModeType(string value) => new SeedingModeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SeedingModeType other && Equals(other); + /// + public bool Equals(SeedingModeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs index 3c5aa7ee1e24..226557a3efb2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs @@ -32,7 +32,7 @@ public DistributedAvailabilityGroupsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-11-01-preview"; + _apiVersion = apiVersion ?? "2023-08-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -369,6 +369,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(distributedAvailabilityGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -529,6 +530,210 @@ public Response Update(string subscriptionId, string resourceGroupName, string m } } + internal RequestUriBuilder CreateFailoverRequestUri(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/managedInstances/", false); + uri.AppendPath(managedInstanceName, true); + uri.AppendPath("/distributedAvailabilityGroups/", false); + uri.AppendPath(distributedAvailabilityGroupName, true); + uri.AppendPath("/failover", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/managedInstances/", false); + uri.AppendPath(managedInstanceName, true); + uri.AppendPath("/distributedAvailabilityGroups/", false); + uri.AppendPath(distributedAvailabilityGroupName, true); + uri.AppendPath("/failover", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Performs requested failover type in this distributed availability group. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance. + /// The distributed availability group name. + /// The distributed availability group failover request parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task FailoverAsync(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName)); + Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs requested failover type in this distributed availability group. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance. + /// The distributed availability group name. + /// The distributed availability group failover request parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Failover(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName)); + Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateSetRoleRequestUri(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/managedInstances/", false); + uri.AppendPath(managedInstanceName, true); + uri.AppendPath("/distributedAvailabilityGroups/", false); + uri.AppendPath(distributedAvailabilityGroupName, true); + uri.AppendPath("/setRole", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateSetRoleRequest(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/managedInstances/", false); + uri.AppendPath(managedInstanceName, true); + uri.AppendPath("/distributedAvailabilityGroups/", false); + uri.AppendPath(distributedAvailabilityGroupName, true); + uri.AppendPath("/setRole", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(distributedAvailabilityGroupSetRole, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Sets the role for managed instance in a distributed availability group. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance. + /// The distributed availability group name. + /// The distributed availability group set role request parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task SetRoleAsync(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName)); + Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName)); + Argument.AssertNotNull(distributedAvailabilityGroupSetRole, nameof(distributedAvailabilityGroupSetRole)); + + using var message = CreateSetRoleRequest(subscriptionId, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, distributedAvailabilityGroupSetRole); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Sets the role for managed instance in a distributed availability group. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance. + /// The distributed availability group name. + /// The distributed availability group set role request parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response SetRole(string subscriptionId, string resourceGroupName, string managedInstanceName, string distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole distributedAvailabilityGroupSetRole, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName)); + Argument.AssertNotNullOrEmpty(distributedAvailabilityGroupName, nameof(distributedAvailabilityGroupName)); + Argument.AssertNotNull(distributedAvailabilityGroupSetRole, nameof(distributedAvailabilityGroupSetRole)); + + using var message = CreateSetRoleRequest(subscriptionId, resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, distributedAvailabilityGroupSetRole); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByInstanceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string managedInstanceName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs index 4c314dadb778..eb2034046f4f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstancesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-08-01-preview"; + _apiVersion = apiVersion ?? "2023-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -890,6 +890,92 @@ public Response ListOutboundNetworkDep } } + internal RequestUriBuilder CreateRefreshStatusRequestUri(string subscriptionId, string resourceGroupName, string managedInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/managedInstances/", false); + uri.AppendPath(managedInstanceName, true); + uri.AppendPath("/refreshExternalGovernanceStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRefreshStatusRequest(string subscriptionId, string resourceGroupName, string managedInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/managedInstances/", false); + uri.AppendPath(managedInstanceName, true); + uri.AppendPath("/refreshExternalGovernanceStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Refresh external governance enablement status. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RefreshStatusAsync(string subscriptionId, string resourceGroupName, string managedInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName)); + + using var message = CreateRefreshStatusRequest(subscriptionId, resourceGroupName, managedInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Refresh external governance enablement status. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RefreshStatus(string subscriptionId, string resourceGroupName, string managedInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(managedInstanceName, nameof(managedInstanceName)); + + using var message = CreateRefreshStatusRequest(subscriptionId, resourceGroupName, managedInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string managedInstanceName) { var uri = new RawRequestUriBuilder(); @@ -921,6 +1007,7 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -942,6 +1029,7 @@ public async Task StartAsync(string subscriptionId, string resourceGro await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -966,6 +1054,7 @@ public Response Start(string subscriptionId, string resourceGroupName, string ma _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -1004,6 +1093,7 @@ internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGro uri.AppendPath("/stop", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -1025,6 +1115,7 @@ public async Task StopAsync(string subscriptionId, string resourceGrou await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -1049,6 +1140,7 @@ public Response Stop(string subscriptionId, string resourceGroupName, string man _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md index 6a47c694e969..d25e4a271b28 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md @@ -5,7 +5,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true tag: package-composite-v5 -require: https://github.com/Azure/azure-rest-api-specs/blob/f45a76fc39f033947ed12faf4b6416e1e19724cd/specification/sql/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/sql/resource-manager/readme.md #package-composite-v5 namespace: Azure.ResourceManager.Sql output-folder: $(this-folder)/Generated