diff --git a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs index 7bc3c9d9aca1..8e62a1bcd520 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs @@ -884,7 +884,13 @@ public static partial class FlexibleServersExtensions public static Azure.Response GetMySqlFlexibleServersCapability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { 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 static Azure.Response GetOperationResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 static System.Threading.Tasks.Task> GetOperationResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MySqlFlexibleServerAadAdministratorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -1120,17 +1126,22 @@ public MySqlFlexibleServerData(Azure.Core.AzureLocation location) { } public string AvailabilityZone { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties Backup { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? CreateMode { get { throw null; } set { } } + public int? DatabasePort { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption DataEncryption { get { throw null; } set { } } + public string FullVersion { get { throw null; } } public string FullyQualifiedDomainName { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability HighAvailability { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties ImportSourceProperties { get { throw null; } set { } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow MaintenanceWindow { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork Network { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public int? ReplicaCapacity { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList ServerPrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku Sku { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceServerResourceId { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? State { get { throw null; } } @@ -1307,6 +1318,8 @@ protected MySqlFlexibleServerResource() { } public virtual System.Threading.Tasks.Task> CutoverMigrationServersMigrationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 DetachVnet(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DetachVnetAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Failover(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task FailoverAsync(Azure.WaitUntil waitUntil, 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; } @@ -1337,6 +1350,12 @@ protected MySqlFlexibleServerResource() { } public virtual Azure.Response GetMySqlFlexibleServerMaintenance(string maintenanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServerMaintenanceAsync(string maintenanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceCollection GetMySqlFlexibleServerMaintenances() { throw null; } + public virtual Azure.Response GetMySqlFlexibleServersPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionCollection GetMySqlFlexibleServersPrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetMySqlFlexibleServersPrivateLinkResource(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateLinkResourceAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceCollection GetMySqlFlexibleServersPrivateLinkResources() { 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.ResourceManager.ArmOperation ResetGtid(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1381,6 +1400,7 @@ protected MySqlFlexibleServersCapabilityCollection() { } public partial class MySqlFlexibleServersCapabilityData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServersCapabilityData() { } + public System.Collections.Generic.IReadOnlyList SupportedFeatures { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedFlexibleServerEditions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedGeoBackupRegions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedServerVersions { get { throw null; } } @@ -1406,6 +1426,99 @@ protected MySqlFlexibleServersCapabilityResource() { } 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 MySqlFlexibleServersPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MySqlFlexibleServersPrivateEndpointConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MySqlFlexibleServersPrivateEndpointConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MySqlFlexibleServersPrivateEndpointConnectionData() { } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } + public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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 MySqlFlexibleServersPrivateEndpointConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MySqlFlexibleServersPrivateEndpointConnectionResource() { } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) { 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.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; } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MySqlFlexibleServersPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MySqlFlexibleServersPrivateLinkResource() { } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string groupName) { 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; } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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 MySqlFlexibleServersPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MySqlFlexibleServersPrivateLinkResourceCollection() { } + public virtual Azure.Response Exists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MySqlFlexibleServersPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MySqlFlexibleServersPrivateLinkResourceData() { } + public string GroupId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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; } + } } namespace Azure.ResourceManager.MySql.FlexibleServers.Mocking { @@ -1422,6 +1535,8 @@ protected MockableMySqlFlexibleServersArmClient() { } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerResource GetMySqlFlexibleServerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableMySqlFlexibleServersResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -1446,7 +1561,11 @@ protected MockableMySqlFlexibleServersSubscriptionResource() { } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersCapabilities(Azure.Core.AzureLocation locationName) { throw null; } public virtual Azure.Response GetMySqlFlexibleServersCapability(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 virtual Azure.Response GetOperationResult(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 virtual System.Threading.Tasks.Task> GetOperationResultAsync(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableMySqlFlexibleServersTenantResource : Azure.ResourceManager.ArmResource @@ -1529,18 +1648,23 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.AdvancedThreatProtectionData AdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = default(int?), string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType? administratorType = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType?), string login = null, string sid = null, System.Guid? tenantId = default(System.Guid?), Azure.Core.ResourceIdentifier identityResourceId = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null, Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResponseError error = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, Azure.ResponseError error) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupType = null, System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string source = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties MySqlFlexibleServerBackupProperties(int? backupRetentionDays = default(int?), int? backupIntervalHours = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? geoRedundantBackup = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat? backupFormat = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupV2Data MySqlFlexibleServerBackupV2Data(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupNameV2 = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType? backupType = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string source = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCapabilityProperties MySqlFlexibleServerCapabilityProperties(string zone = null, System.Collections.Generic.IEnumerable supportedHAMode = null, System.Collections.Generic.IEnumerable supportedGeoBackupRegions = null, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerConfigurationData MySqlFlexibleServerConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string currentValue = null, string description = null, string documentationLink = null, string defaultValue = null, string dataType = null, string allowedValues = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationSource? source = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationSource?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigReadOnlyState? isReadOnly = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigReadOnlyState?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigPendingRestartState? isConfigPendingRestart = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigPendingRestartState?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigDynamicState? isDynamicConfig = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigDynamicState?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(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.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values = null, System.Uri nextLink = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version, string availabilityZone, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode, Azure.Core.ResourceIdentifier sourceServerResourceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state, string fullyQualifiedDomainName, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(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.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string fullVersion = null, string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, int? databasePort = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable serverPrivateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData MySqlFlexibleServerDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string charset = null, string collation = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage MySqlFlexibleServerDelegatedSubnetUsage(string subnetName = null, long? usage = default(long?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability MySqlFlexibleServerEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedStorageEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerFeatureProperty MySqlFlexibleServerFeatureProperty(string featureName = null, string featureValue = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerFirewallRuleData MySqlFlexibleServerFirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Net.IPAddress startIPAddress = null, System.Net.IPAddress endIPAddress = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability MySqlFlexibleServerHighAvailability(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityMode? mode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityMode?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityState?), string standbyAvailabilityZone = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerLogFile MySqlFlexibleServerLogFile(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, long? sizeInKB = default(long?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string typePropertiesType = null, System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.Uri uri = null) { throw null; } @@ -1548,16 +1672,23 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityContent MySqlFlexibleServerNameAvailabilityContent(string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameAvailabilityResult(string message = null, bool? isNameAvailable = default(bool?), string reason = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPrivateDnsZoneSuffixResponse MySqlFlexibleServerPrivateDnsZoneSuffixResponse(string privateDnsZoneSuffix = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(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.IEnumerable supportedGeoBackupRegions = null, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable supportedGeoBackupRegions, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions, System.Collections.Generic.IEnumerable supportedServerVersions) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(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.IEnumerable supportedGeoBackupRegions = null, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null, System.Collections.Generic.IEnumerable supportedFeatures = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerServerVersionCapability MySqlFlexibleServerServerVersionCapability(string name = null, System.Collections.Generic.IEnumerable supportedSkus = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability MySqlFlexibleServerSkuCapability(string name = null, long? vCores = default(long?), long? supportedIops = default(long?), long? supportedMemoryPerVCoreInMB = default(long?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(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.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = default(int?), int? iops = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), string storageSku = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable groupIds, Azure.Core.ResourceIdentifier privateEndpointId, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(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.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData MySqlFlexibleServersPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = default(int?), int? iops = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), string storageSku = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType? storageRedundancy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability MySqlFlexibleServerStorageEditionCapability(string name = null, long? minStorageSize = default(long?), long? maxStorageSize = default(long?), long? minBackupRetentionDays = default(long?), long? maxBackupRetentionDays = default(long?), long? minBackupIntervalHours = default(long?), long? maxBackupIntervalHours = default(long?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerValidateBackupResult MySqlFlexibleServerValidateBackupResult(int? numberOfContainers = default(int?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageResult MySqlFlexibleServerVirtualNetworkSubnetUsageResult(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string subscriptionId = null, System.Collections.Generic.IEnumerable delegatedSubnetsUsage = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusExtendedResult OperationStatusExtendedResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult OperationStatusResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusExtendedResult OperationStatusExtendedResult(Azure.Core.ResourceIdentifier id, Azure.Core.ResourceIdentifier resourceId, string name, string status, float? percentComplete, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, System.Collections.Generic.IEnumerable operations, Azure.ResponseError error, System.Collections.Generic.IReadOnlyDictionary properties) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult OperationStatusResult(Azure.Core.ResourceIdentifier id, Azure.Core.ResourceIdentifier resourceId, string name, string status, float? percentComplete, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, System.Collections.Generic.IEnumerable operations, Azure.ResponseError error) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.ServerEditionCapabilityV2 ServerEditionCapabilityV2(string name = null, string defaultSku = null, int? defaultStorageSize = default(int?), System.Collections.Generic.IEnumerable supportedStorageEditions = null, System.Collections.Generic.IEnumerable supportedSkus = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.ServerVersionCapabilityV2 ServerVersionCapabilityV2(string name = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.SkuCapabilityV2 SkuCapabilityV2(string name = null, long? vCores = default(long?), long? supportedIops = default(long?), long? supportedMemoryPerVCoreMB = default(long?), System.Collections.Generic.IEnumerable supportedZones = null, System.Collections.Generic.IEnumerable supportedHAMode = null) { throw null; } @@ -1781,6 +1912,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MySqlFlexibleServerBatchOfMaintenance : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MySqlFlexibleServerBatchOfMaintenance(string value) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance Batch1 { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance Batch2 { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance Default { get { throw null; } } + public bool Equals(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance right) { throw null; } + public static implicit operator Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance right) { throw null; } + public override string ToString() { throw null; } + } public partial class MySqlFlexibleServerCapabilityProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerCapabilityProperties() { } @@ -1895,6 +2045,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MySqlFlexibleServerConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerConfigurations() { } + public System.Uri NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1973,6 +2124,17 @@ 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 MySqlFlexibleServerDetachVnetContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MySqlFlexibleServerDetachVnetContent() { } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent 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.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent 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 MySqlFlexibleServerEditionCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerEditionCapability() { } @@ -2004,6 +2166,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum right) { throw null; } public override string ToString() { throw null; } } + public partial class MySqlFlexibleServerFeatureProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MySqlFlexibleServerFeatureProperty() { } + public string FeatureName { get { throw null; } } + public string FeatureValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerFeatureProperty 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.MySql.FlexibleServers.Models.MySqlFlexibleServerFeatureProperty 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 MySqlFlexibleServerFullBackupStoreDetails : Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServerFullBackupStoreDetails(System.Collections.Generic.IEnumerable sasUriList) { } @@ -2170,6 +2344,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MySqlFlexibleServerMaintenanceWindow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServerMaintenanceWindow() { } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance? BatchOfMaintenance { get { throw null; } set { } } public string CustomWindow { get { throw null; } set { } } public int? DayOfWeek { get { throw null; } set { } } public int? StartHour { get { throw null; } set { } } @@ -2227,6 +2402,7 @@ public MySqlFlexibleServerPatch() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption DataEncryption { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability HighAvailability { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow MaintenanceWindow { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork Network { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } @@ -2241,6 +2417,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 MySqlFlexibleServerPatchStrategy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MySqlFlexibleServerPatchStrategy(string value) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy Regular { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy VirtualCanary { get { throw null; } } + public bool Equals(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy 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.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy right) { throw null; } + public static implicit operator Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy right) { throw null; } + public override string ToString() { throw null; } + } public partial class MySqlFlexibleServerPrivateDnsZoneSuffixResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerPrivateDnsZoneSuffixResponse() { } @@ -2436,6 +2630,7 @@ public MySqlFlexibleServerStorage() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? AutoIoScaling { get { throw null; } set { } } public int? Iops { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? LogOnDisk { get { throw null; } set { } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType? StorageRedundancy { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } public string StorageSku { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2462,6 +2657,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 MySqlFlexibleServerStorageRedundancyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MySqlFlexibleServerStorageRedundancyType(string value) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType LocalRedundancy { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType ZoneRedundancy { get { throw null; } } + public bool Equals(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType 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.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType right) { throw null; } + public static implicit operator Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType right) { throw null; } + public override string ToString() { throw null; } + } public partial class MySqlFlexibleServerValidateBackupResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerValidateBackupResult() { } @@ -2515,6 +2728,7 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class OperationStatusExtendedResult : Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OperationStatusExtendedResult() { } @@ -2526,6 +2740,7 @@ 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; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class OperationStatusResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OperationStatusResult() { } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs index 7bc3c9d9aca1..8e62a1bcd520 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs @@ -884,7 +884,13 @@ public static partial class FlexibleServersExtensions public static Azure.Response GetMySqlFlexibleServersCapability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { 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 static Azure.Response GetOperationResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 static System.Threading.Tasks.Task> GetOperationResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MySqlFlexibleServerAadAdministratorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -1120,17 +1126,22 @@ public MySqlFlexibleServerData(Azure.Core.AzureLocation location) { } public string AvailabilityZone { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties Backup { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? CreateMode { get { throw null; } set { } } + public int? DatabasePort { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption DataEncryption { get { throw null; } set { } } + public string FullVersion { get { throw null; } } public string FullyQualifiedDomainName { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability HighAvailability { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties ImportSourceProperties { get { throw null; } set { } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow MaintenanceWindow { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork Network { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public int? ReplicaCapacity { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList ServerPrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku Sku { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceServerResourceId { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? State { get { throw null; } } @@ -1307,6 +1318,8 @@ protected MySqlFlexibleServerResource() { } public virtual System.Threading.Tasks.Task> CutoverMigrationServersMigrationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 DetachVnet(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DetachVnetAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Failover(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task FailoverAsync(Azure.WaitUntil waitUntil, 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; } @@ -1337,6 +1350,12 @@ protected MySqlFlexibleServerResource() { } public virtual Azure.Response GetMySqlFlexibleServerMaintenance(string maintenanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServerMaintenanceAsync(string maintenanceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceCollection GetMySqlFlexibleServerMaintenances() { throw null; } + public virtual Azure.Response GetMySqlFlexibleServersPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionCollection GetMySqlFlexibleServersPrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetMySqlFlexibleServersPrivateLinkResource(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateLinkResourceAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceCollection GetMySqlFlexibleServersPrivateLinkResources() { 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.ResourceManager.ArmOperation ResetGtid(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1381,6 +1400,7 @@ protected MySqlFlexibleServersCapabilityCollection() { } public partial class MySqlFlexibleServersCapabilityData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServersCapabilityData() { } + public System.Collections.Generic.IReadOnlyList SupportedFeatures { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedFlexibleServerEditions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedGeoBackupRegions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedServerVersions { get { throw null; } } @@ -1406,6 +1426,99 @@ protected MySqlFlexibleServersCapabilityResource() { } 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 MySqlFlexibleServersPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MySqlFlexibleServersPrivateEndpointConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MySqlFlexibleServersPrivateEndpointConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MySqlFlexibleServersPrivateEndpointConnectionData() { } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } + public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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 MySqlFlexibleServersPrivateEndpointConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MySqlFlexibleServersPrivateEndpointConnectionResource() { } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) { 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.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; } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MySqlFlexibleServersPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MySqlFlexibleServersPrivateLinkResource() { } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string groupName) { 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; } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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 MySqlFlexibleServersPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MySqlFlexibleServersPrivateLinkResourceCollection() { } + public virtual Azure.Response Exists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MySqlFlexibleServersPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MySqlFlexibleServersPrivateLinkResourceData() { } + public string GroupId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData 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; } + } } namespace Azure.ResourceManager.MySql.FlexibleServers.Mocking { @@ -1422,6 +1535,8 @@ protected MockableMySqlFlexibleServersArmClient() { } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerResource GetMySqlFlexibleServerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableMySqlFlexibleServersResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -1446,7 +1561,11 @@ protected MockableMySqlFlexibleServersSubscriptionResource() { } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersCapabilities(Azure.Core.AzureLocation locationName) { throw null; } public virtual Azure.Response GetMySqlFlexibleServersCapability(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 virtual Azure.Response GetOperationResult(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 virtual System.Threading.Tasks.Task> GetOperationResultAsync(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableMySqlFlexibleServersTenantResource : Azure.ResourceManager.ArmResource @@ -1529,18 +1648,23 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.AdvancedThreatProtectionData AdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = default(int?), string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType? administratorType = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType?), string login = null, string sid = null, System.Guid? tenantId = default(System.Guid?), Azure.Core.ResourceIdentifier identityResourceId = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null, Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResponseError error = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, Azure.ResponseError error) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupType = null, System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string source = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties MySqlFlexibleServerBackupProperties(int? backupRetentionDays = default(int?), int? backupIntervalHours = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? geoRedundantBackup = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat? backupFormat = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupV2Data MySqlFlexibleServerBackupV2Data(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupNameV2 = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType? backupType = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType?), System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string source = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCapabilityProperties MySqlFlexibleServerCapabilityProperties(string zone = null, System.Collections.Generic.IEnumerable supportedHAMode = null, System.Collections.Generic.IEnumerable supportedGeoBackupRegions = null, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerConfigurationData MySqlFlexibleServerConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string currentValue = null, string description = null, string documentationLink = null, string defaultValue = null, string dataType = null, string allowedValues = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationSource? source = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationSource?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigReadOnlyState? isReadOnly = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigReadOnlyState?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigPendingRestartState? isConfigPendingRestart = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigPendingRestartState?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigDynamicState? isDynamicConfig = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigDynamicState?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(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.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values = null, System.Uri nextLink = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version, string availabilityZone, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode, Azure.Core.ResourceIdentifier sourceServerResourceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state, string fullyQualifiedDomainName, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(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.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string fullVersion = null, string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, int? databasePort = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable serverPrivateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData MySqlFlexibleServerDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string charset = null, string collation = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage MySqlFlexibleServerDelegatedSubnetUsage(string subnetName = null, long? usage = default(long?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability MySqlFlexibleServerEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedStorageEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerFeatureProperty MySqlFlexibleServerFeatureProperty(string featureName = null, string featureValue = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerFirewallRuleData MySqlFlexibleServerFirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Net.IPAddress startIPAddress = null, System.Net.IPAddress endIPAddress = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability MySqlFlexibleServerHighAvailability(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityMode? mode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityMode?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityState?), string standbyAvailabilityZone = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerLogFile MySqlFlexibleServerLogFile(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, long? sizeInKB = default(long?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string typePropertiesType = null, System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.Uri uri = null) { throw null; } @@ -1548,16 +1672,23 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityContent MySqlFlexibleServerNameAvailabilityContent(string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameAvailabilityResult(string message = null, bool? isNameAvailable = default(bool?), string reason = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPrivateDnsZoneSuffixResponse MySqlFlexibleServerPrivateDnsZoneSuffixResponse(string privateDnsZoneSuffix = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(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.IEnumerable supportedGeoBackupRegions = null, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable supportedGeoBackupRegions, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions, System.Collections.Generic.IEnumerable supportedServerVersions) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(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.IEnumerable supportedGeoBackupRegions = null, System.Collections.Generic.IEnumerable supportedFlexibleServerEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null, System.Collections.Generic.IEnumerable supportedFeatures = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerServerVersionCapability MySqlFlexibleServerServerVersionCapability(string name = null, System.Collections.Generic.IEnumerable supportedSkus = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability MySqlFlexibleServerSkuCapability(string name = null, long? vCores = default(long?), long? supportedIops = default(long?), long? supportedMemoryPerVCoreInMB = default(long?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(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.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = default(int?), int? iops = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), string storageSku = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable groupIds, Azure.Core.ResourceIdentifier privateEndpointId, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(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.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData MySqlFlexibleServersPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = default(int?), int? iops = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), string storageSku = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType? storageRedundancy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability MySqlFlexibleServerStorageEditionCapability(string name = null, long? minStorageSize = default(long?), long? maxStorageSize = default(long?), long? minBackupRetentionDays = default(long?), long? maxBackupRetentionDays = default(long?), long? minBackupIntervalHours = default(long?), long? maxBackupIntervalHours = default(long?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerValidateBackupResult MySqlFlexibleServerValidateBackupResult(int? numberOfContainers = default(int?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageResult MySqlFlexibleServerVirtualNetworkSubnetUsageResult(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string subscriptionId = null, System.Collections.Generic.IEnumerable delegatedSubnetsUsage = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusExtendedResult OperationStatusExtendedResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult OperationStatusResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusExtendedResult OperationStatusExtendedResult(Azure.Core.ResourceIdentifier id, Azure.Core.ResourceIdentifier resourceId, string name, string status, float? percentComplete, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, System.Collections.Generic.IEnumerable operations, Azure.ResponseError error, System.Collections.Generic.IReadOnlyDictionary properties) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult OperationStatusResult(Azure.Core.ResourceIdentifier id, Azure.Core.ResourceIdentifier resourceId, string name, string status, float? percentComplete, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, System.Collections.Generic.IEnumerable operations, Azure.ResponseError error) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.ServerEditionCapabilityV2 ServerEditionCapabilityV2(string name = null, string defaultSku = null, int? defaultStorageSize = default(int?), System.Collections.Generic.IEnumerable supportedStorageEditions = null, System.Collections.Generic.IEnumerable supportedSkus = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.ServerVersionCapabilityV2 ServerVersionCapabilityV2(string name = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.SkuCapabilityV2 SkuCapabilityV2(string name = null, long? vCores = default(long?), long? supportedIops = default(long?), long? supportedMemoryPerVCoreMB = default(long?), System.Collections.Generic.IEnumerable supportedZones = null, System.Collections.Generic.IEnumerable supportedHAMode = null) { throw null; } @@ -1781,6 +1912,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MySqlFlexibleServerBatchOfMaintenance : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MySqlFlexibleServerBatchOfMaintenance(string value) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance Batch1 { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance Batch2 { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance Default { get { throw null; } } + public bool Equals(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance right) { throw null; } + public static implicit operator Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance right) { throw null; } + public override string ToString() { throw null; } + } public partial class MySqlFlexibleServerCapabilityProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerCapabilityProperties() { } @@ -1895,6 +2045,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MySqlFlexibleServerConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerConfigurations() { } + public System.Uri NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1973,6 +2124,17 @@ 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 MySqlFlexibleServerDetachVnetContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MySqlFlexibleServerDetachVnetContent() { } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent 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.MySql.FlexibleServers.Models.MySqlFlexibleServerDetachVnetContent 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 MySqlFlexibleServerEditionCapability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerEditionCapability() { } @@ -2004,6 +2166,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum right) { throw null; } public override string ToString() { throw null; } } + public partial class MySqlFlexibleServerFeatureProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MySqlFlexibleServerFeatureProperty() { } + public string FeatureName { get { throw null; } } + public string FeatureValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerFeatureProperty 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.MySql.FlexibleServers.Models.MySqlFlexibleServerFeatureProperty 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 MySqlFlexibleServerFullBackupStoreDetails : Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServerFullBackupStoreDetails(System.Collections.Generic.IEnumerable sasUriList) { } @@ -2170,6 +2344,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MySqlFlexibleServerMaintenanceWindow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServerMaintenanceWindow() { } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBatchOfMaintenance? BatchOfMaintenance { get { throw null; } set { } } public string CustomWindow { get { throw null; } set { } } public int? DayOfWeek { get { throw null; } set { } } public int? StartHour { get { throw null; } set { } } @@ -2227,6 +2402,7 @@ public MySqlFlexibleServerPatch() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption DataEncryption { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability HighAvailability { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow MaintenanceWindow { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork Network { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } @@ -2241,6 +2417,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 MySqlFlexibleServerPatchStrategy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MySqlFlexibleServerPatchStrategy(string value) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy Regular { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy VirtualCanary { get { throw null; } } + public bool Equals(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy 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.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy right) { throw null; } + public static implicit operator Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy right) { throw null; } + public override string ToString() { throw null; } + } public partial class MySqlFlexibleServerPrivateDnsZoneSuffixResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerPrivateDnsZoneSuffixResponse() { } @@ -2436,6 +2630,7 @@ public MySqlFlexibleServerStorage() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? AutoIoScaling { get { throw null; } set { } } public int? Iops { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? LogOnDisk { get { throw null; } set { } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType? StorageRedundancy { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } public string StorageSku { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2462,6 +2657,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 MySqlFlexibleServerStorageRedundancyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MySqlFlexibleServerStorageRedundancyType(string value) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType LocalRedundancy { get { throw null; } } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType ZoneRedundancy { get { throw null; } } + public bool Equals(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType 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.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType right) { throw null; } + public static implicit operator Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType left, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType right) { throw null; } + public override string ToString() { throw null; } + } public partial class MySqlFlexibleServerValidateBackupResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MySqlFlexibleServerValidateBackupResult() { } @@ -2515,6 +2728,7 @@ 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.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class OperationStatusExtendedResult : Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OperationStatusExtendedResult() { } @@ -2526,6 +2740,7 @@ 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; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class OperationStatusResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal OperationStatusResult() { } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/ArmMySqlFlexibleServersModelFactory.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/ArmMySqlFlexibleServersModelFactory.cs new file mode 100644 index 000000000000..1efec0775a02 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/ArmMySqlFlexibleServersModelFactory.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// Model factory for models. + public static partial class ArmMySqlFlexibleServersModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The cmk identity for the server. Current supported identity types: UserAssigned. + /// The SKU (pricing tier) of the server. + /// The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). + /// The password of the administrator login (required for server creation). + /// Server version. + /// availability Zone information of the server. + /// The mode to create a new MySQL server. + /// The source MySQL server id. + /// Restore point creation time (ISO8601 format), specifying the time to restore from. + /// The replication role. + /// The maximum number of replicas that a primary server can have. + /// The Data Encryption for CMK. + /// The state of a server. + /// The fully qualified domain name of a server. + /// Storage related properties of a server. + /// Backup related properties of a server. + /// High availability related properties of a server. + /// Network related properties of a server. + /// PrivateEndpointConnections related properties of a server. + /// Maintenance window of a server. + /// Source properties for import from storage. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, MySqlFlexibleServerVersion? version, string availabilityZone, MySqlFlexibleServerCreateMode? createMode, ResourceIdentifier sourceServerResourceId, DateTimeOffset? restorePointInTime, MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerState? state, string fullyQualifiedDomainName, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MySqlFlexibleServerNetwork network, IEnumerable privateEndpointConnections, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, ImportSourceProperties importSourceProperties) + { + tags ??= new Dictionary(); + + var list = new List(); + if (privateEndpointConnections != null) + { + foreach (var item in privateEndpointConnections) + { + var model = new MySqlFlexibleServersPrivateEndpointConnectionData(); + if (item.GroupIds != null && model.GroupIds is IList modelGroupIds) + { + foreach (var gid in item.GroupIds) + modelGroupIds.Add(gid); + } + model.PrivateEndpoint = item.PrivateEndpoint; + model.ConnectionState = item.ConnectionState; + list.Add(model); + } + } + + return new MySqlFlexibleServerData( + id, + name, + resourceType, + systemData, + tags, + location, + identity, + sku, + administratorLogin, + administratorLoginPassword, + version, + null, + availabilityZone, + createMode, + sourceServerResourceId, + restorePointInTime, + replicationRole, + replicaCapacity, + dataEncryption, + state, + fullyQualifiedDomainName, + null, + storage, + backup, + highAvailability, + network, + list.ToList(), + null, + maintenanceWindow, + importSourceProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// supported geo backup regions. + /// A list of supported flexible server editions. + /// A list of supported server versions. + /// A new instance for mocking. + public static MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, IEnumerable supportedGeoBackupRegions, IEnumerable supportedFlexibleServerEditions, IEnumerable supportedServerVersions) + => MySqlFlexibleServersCapabilityData(id, name, resourceType, systemData, supportedGeoBackupRegions, supportedFlexibleServerEditions, supportedServerVersions, supportedFeatures: null); + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The group ids for the private endpoint resource. + /// The private endpoint resource. + /// A collection of information about the state of the connection between service consumer and provider. + /// The provisioning state of the private endpoint connection resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, IEnumerable groupIds, ResourceIdentifier privateEndpointId, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState) + { + groupIds ??= new List(); + + return new MySqlFlexibleServersPrivateEndpointConnection( + id, + name, + resourceType, + systemData, + groupIds?.ToList(), + privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, + connectionState, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Max storage size allowed for a server. + /// Storage IOPS for a server. + /// Enable Storage Auto Grow or not. + /// Enable Log On Disk or not. + /// The sku name of the server storage. + /// Enable IO Auto Scaling or not. + /// A new instance for mocking. + public static MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, MySqlFlexibleServerEnableStatusEnum? autoGrow, MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, MySqlFlexibleServerEnableStatusEnum? autoIoScaling) + => MySqlFlexibleServerStorage(storageSizeInGB, iops, autoGrow, logOnDisk, storageSku, autoIoScaling, null); + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// The extended properties of Operation Results. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static OperationStatusExtendedResult OperationStatusExtendedResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IEnumerable operations, ResponseError error, IReadOnlyDictionary properties) + { + operations ??= new List(); + properties ??= new Dictionary(); + + return new OperationStatusExtendedResult( + id, + resourceId, + name, + status, + percentComplete, + startOn, + endOn, + operations?.ToList(), + error, + serializedAdditionalRawData: null, + properties); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static OperationStatusResult OperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IEnumerable operations, ResponseError error) + { + operations ??= new List(); + + return new OperationStatusResult( + id, + resourceId, + name, + status, + percentComplete, + startOn, + endOn, + operations?.ToList(), + error, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The operation status. + /// Start time. + /// End time. + /// Operation progress (0-100). + /// Size of datasource in bytes. + /// Data transferred in bytes. + /// Metadata related to backup to be stored for restoring resource in key-value pairs. + /// The error object. + /// A new instance for mocking. + public static MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MySqlFlexibleServerBackupAndExportOperationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, ResponseError error) + => MySqlFlexibleServerBackupAndExportResult(id, name, resourceType, systemData, status, startOn, endOn, percentComplete, datasourceSizeInBytes, dataTransferredInBytes, backupMetadata, error); + + /// Initializes a new instance of . + /// The list of server configurations. + /// A new instance for mocking. + public static MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(IEnumerable values) + => MySqlFlexibleServerConfigurations(values, null); + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/AzureResourceManagerMySqlContext.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/AzureResourceManagerMySqlContext.cs similarity index 61% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/AzureResourceManagerMySqlContext.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/AzureResourceManagerMySqlContext.cs index 54c1619c9b05..2948b40312d1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/AzureResourceManagerMySqlContext.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/AzureResourceManagerMySqlContext.cs @@ -1,11 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.ClientModel.Primitives; using Azure.Core; +using Azure.ResourceManager.MySql.FlexibleServers.Models; namespace Azure.ResourceManager.MySql; [CodeGenType("AzureResourceManagerMySqlFlexibleServersContext")] +[ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnection))] public partial class AzureResourceManagerMySqlContext { } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/FlexibleServersExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/FlexibleServersExtensions.cs new file mode 100644 index 000000000000..c83664eff81b --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/FlexibleServersExtensions.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.MySql.FlexibleServers.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + [CodeGenType("MySqlFlexibleServersExtensions")] + public static partial class FlexibleServersExtensions + { + /// + /// Get the operation result for a long running operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// + /// The instance the method will execute against. + /// The name of the location. + /// The operation Id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release", false)] + public static Task> GetOperationResultAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + { + throw new NotSupportedException("This method is deprecated."); + } + + /// + /// Get the operation result for a long running operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// + /// The instance the method will execute against. + /// The name of the location. + /// The operation Id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release", false)] + public static Response GetOperationResult(this SubscriptionResource subscriptionResource, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + { + throw new NotSupportedException("This method is deprecated."); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs new file mode 100644 index 000000000000..500c173f1cbd --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.MySql.FlexibleServers.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableMySqlFlexibleServersSubscriptionResource : ArmResource + { + /// + /// Get the operation result for a long running operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// + /// The name of the location. + /// The operation Id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release", false)] + public virtual Task> GetOperationResultAsync(AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + { + throw new NotSupportedException(); + } + + /// + /// Get the operation result for a long running operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// + /// The name of the location. + /// The operation Id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete and will be removed in a future release", false)] + public virtual Response GetOperationResult(AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + { + throw new NotSupportedException(); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/HelperSuppressions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/HelperSuppressions.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/HelperSuppressions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/HelperSuppressions.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/Models/MySqlFlexibleServerVersion.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerVersion.cs similarity index 91% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/Models/MySqlFlexibleServerVersion.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerVersion.cs index 3e3f091440ae..9664ab6f236c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/Models/MySqlFlexibleServerVersion.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerVersion.cs @@ -4,7 +4,6 @@ #nullable disable using System; -using System.ComponentModel; using Azure.Core; namespace Azure.ResourceManager.MySql.FlexibleServers.Models @@ -13,7 +12,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models public readonly partial struct MySqlFlexibleServerVersion : IEquatable { /// 5.7. - [CodeGenMember("FivePointSeven")] + [CodeGenMember("Five7")] public static MySqlFlexibleServerVersion Ver5_7 { get; } = new MySqlFlexibleServerVersion(Ver5_7Value); /// 8.0.21. [CodeGenMember("Eight021")] diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs index 395cad537c44..bfccd8ec0e19 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -91,7 +89,7 @@ internal static MySqlFlexibleServersPrivateEndpointConnection DeserializeMySqlFl ResourceIdentifier id = default; string name = default; ResourceType type = default; - SystemData systemData = default; + Azure.ResourceManager.Models.SystemData systemData = default; IReadOnlyList groupIds = default; SubResource privateEndpoint = default; MySqlFlexibleServersPrivateLinkServiceConnectionState privateLinkServiceConnectionState = default; @@ -121,7 +119,7 @@ internal static MySqlFlexibleServersPrivateEndpointConnection DeserializeMySqlFl { continue; } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerMySqlContext.Default); + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerMySqlContext.Default); continue; } if (property.NameEquals("properties"u8)) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServersPrivateEndpointConnection.cs similarity index 90% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServersPrivateEndpointConnection.cs index 06c871180cb5..69781046a2d2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServersPrivateEndpointConnection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -64,7 +62,7 @@ public MySqlFlexibleServersPrivateEndpointConnection() /// A collection of information about the state of the connection between service consumer and provider. /// The provisioning state of the private endpoint connection resource. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServersPrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList groupIds, SubResource privateEndpoint, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal MySqlFlexibleServersPrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, IReadOnlyList groupIds, SubResource privateEndpoint, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { GroupIds = groupIds; PrivateEndpoint = privateEndpoint; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusExtendedResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusExtendedResult.Serialization.cs index 734d7f2693e6..4378e2999198 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusExtendedResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusExtendedResult.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusExtendedResult.cs index 19e89fe33282..c3357ff25e71 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusExtendedResult.cs @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; using System.Collections.Generic; +using System.ComponentModel; using Azure.Core; namespace Azure.ResourceManager.MySql.FlexibleServers.Models { /// Represents Operation Results API Response. + [EditorBrowsable(EditorBrowsableState.Never)] public partial class OperationStatusExtendedResult : OperationStatusResult { /// Initializes a new instance of . diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusResult.Serialization.cs index ac7ba8829a51..00dc3af00fd1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusResult.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusResult.cs index d07fc5ee293a..ef0eda60ba18 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/OperationStatusResult.cs @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; using System.Collections.Generic; +using System.ComponentModel; using Azure.Core; namespace Azure.ResourceManager.MySql.FlexibleServers.Models { /// The current status of an async operation. + [EditorBrowsable(EditorBrowsableState.Never)] public partial class OperationStatusResult { /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerConfigurationCollection.cs similarity index 93% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/MySqlFlexibleServerConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerConfigurationCollection.cs index 3f2aac5e8442..25dc6c0a1e92 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/MySqlFlexibleServerConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerConfigurationCollection.cs @@ -3,17 +3,9 @@ #nullable disable -using System; -using System.ComponentModel; -using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.ComponentModel; using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; namespace Azure.ResourceManager.MySql.FlexibleServers { diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerData.cs new file mode 100644 index 000000000000..479c78feeab9 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerData.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.MySql.FlexibleServers.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A class representing the MySqlFlexibleServer data model. + /// Represents a server. + /// + public partial class MySqlFlexibleServerData : TrackedResourceData + { + /// PrivateEndpointConnections related properties of a server. + [EditorBrowsable(EditorBrowsableState.Never)] + public IReadOnlyList PrivateEndpointConnections + { + get + { + if (ServerPrivateEndpointConnections == null) + return null; + var list = new List(); + foreach (var item in ServerPrivateEndpointConnections) + { + var model = new MySqlFlexibleServersPrivateEndpointConnection(); + if (item.GroupIds != null && model.GroupIds is IList modelGroupIds) + { + foreach (var gid in item.GroupIds) + modelGroupIds.Add(gid); + } + model.PrivateEndpoint = item.PrivateEndpoint; + model.ConnectionState = item.ConnectionState; + list.Add(model); + } + return list; + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionCollection.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionCollection.cs index 45e9c02ad6a8..142db5180e24 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync(A /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(AdvancedThreatProt /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(AdvancedThreatProtectionNa /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(AdvancedThreatProtectionName advancedThreat /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.cs index 8bdadebc3685..bbe30f865ca4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/ArmMySqlFlexibleServersModelFactory.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ArmMySqlFlexibleServersModelFactory.cs similarity index 88% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/ArmMySqlFlexibleServersModelFactory.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ArmMySqlFlexibleServersModelFactory.cs index ae7427ec0d29..3e40a5637388 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/ArmMySqlFlexibleServersModelFactory.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ArmMySqlFlexibleServersModelFactory.cs @@ -17,215 +17,31 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models /// Model factory for models. public static partial class ArmMySqlFlexibleServersModelFactory { - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Type of the sever administrator. - /// Login name of the server administrator. - /// SID (object ID) of the server administrator. - /// Tenant ID of the administrator. - /// The resource id of the identity used for AAD Authentication. - /// A new instance for mocking. - public static MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MySqlFlexibleServerAdministratorType? administratorType = null, string login = null, string sid = null, Guid? tenantId = null, ResourceIdentifier identityResourceId = null) - { - return new MySqlFlexibleServerAadAdministratorData( - id, - name, - resourceType, - systemData, - administratorType, - login, - sid, - tenantId, - identityResourceId, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Backup type. - /// Backup completed time (ISO8601 format). - /// Backup source. - /// A new instance for mocking. - public static MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupType = null, DateTimeOffset? completedOn = null, string source = null) - { - return new MySqlFlexibleServerBackupData( - id, - name, - resourceType, - systemData, - backupType, - completedOn, - source, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The name of the backup. - /// Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE). - /// A new instance for mocking. - public static MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, MySqlFlexibleServerBackupFormat? backupFormat = null) - { - return new MySqlFlexibleServerBackupSettings(backupName, backupFormat, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The operation status. - /// Start time. - /// End time. - /// Operation progress (0-100). - /// Size of datasource in bytes. - /// Data transferred in bytes. - /// Metadata related to backup to be stored for restoring resource in key-value pairs. - /// The error object. - /// A new instance for mocking. - public static MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MySqlFlexibleServerBackupAndExportOperationStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, double? percentComplete = null, long? datasourceSizeInBytes = null, long? dataTransferredInBytes = null, string backupMetadata = null, ResponseError error = null) - { - return new MySqlFlexibleServerBackupAndExportResult( - id, - name, - resourceType, - systemData, - status, - startOn, - endOn, - percentComplete, - datasourceSizeInBytes, - dataTransferredInBytes, - backupMetadata, - error, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Estimated no of storage containers required for resource data to be backed up. - /// A new instance for mocking. - public static MySqlFlexibleServerValidateBackupResult MySqlFlexibleServerValidateBackupResult(int? numberOfContainers = null) - { - return new MySqlFlexibleServerValidateBackupResult(numberOfContainers, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Backup name. - /// - /// Backup completed time (ISO8601 format). - /// Backup source. - /// The provisioning state of backup resource. - /// A new instance for mocking. - public static MySqlFlexibleServerBackupV2Data MySqlFlexibleServerBackupV2Data(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupNameV2 = null, MySqlFlexibleServerBackupType? backupType = null, DateTimeOffset? completedOn = null, string source = null, MySqlFlexibleServerBackupProvisioningState? provisioningState = null) - { - return new MySqlFlexibleServerBackupV2Data( - id, - name, - resourceType, - systemData, - backupNameV2, - backupType, - completedOn, - source, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Value of the configuration. - /// Current value of the configuration. - /// Description of the configuration. - /// The link used to get the document from community or Azure site. - /// Default value of the configuration. - /// Data type of the configuration. - /// Allowed values of the configuration. - /// Source of the configuration. - /// If is the configuration read only. - /// If is the configuration pending restart or not. - /// If is the configuration dynamic. - /// A new instance for mocking. - public static MySqlFlexibleServerConfigurationData MySqlFlexibleServerConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string currentValue = null, string description = null, string documentationLink = null, string defaultValue = null, string dataType = null, string allowedValues = null, MySqlFlexibleServerConfigurationSource? source = null, MySqlFlexibleServerConfigReadOnlyState? isReadOnly = null, MySqlFlexibleServerConfigPendingRestartState? isConfigPendingRestart = null, MySqlFlexibleServerConfigDynamicState? isDynamicConfig = null) - { - return new MySqlFlexibleServerConfigurationData( - id, - name, - resourceType, - systemData, - value, - currentValue, - description, - documentationLink, - defaultValue, - dataType, - allowedValues, - source, - isReadOnly, - isConfigPendingRestart, - isDynamicConfig, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The list of server configurations. - /// A new instance for mocking. - public static MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(IEnumerable values = null) + /// Initializes a new instance of . + /// Represents the private DNS zone suffix. + /// A new instance for mocking. + public static MySqlFlexibleServerPrivateDnsZoneSuffixResponse MySqlFlexibleServerPrivateDnsZoneSuffixResponse(string privateDnsZoneSuffix = null) { - values ??= new List(); - - return new MySqlFlexibleServerConfigurations(values?.ToList(), serializedAdditionalRawData: null); + return new MySqlFlexibleServerPrivateDnsZoneSuffixResponse(privateDnsZoneSuffix, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The charset of the database. - /// The collation of the database. - /// A new instance for mocking. - public static MySqlFlexibleServerDatabaseData MySqlFlexibleServerDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string charset = null, string collation = null) + /// Initializes a new instance of . + /// Resource name to verify. + /// Resource type used for verification. + /// A new instance for mocking. + public static MySqlFlexibleServerNameAvailabilityContent MySqlFlexibleServerNameAvailabilityContent(string name = null, ResourceType? resourceType = null) { - return new MySqlFlexibleServerDatabaseData( - id, - name, - resourceType, - systemData, - charset, - collation, - serializedAdditionalRawData: null); + return new MySqlFlexibleServerNameAvailabilityContent(name, resourceType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The start IP address of the server firewall rule. Must be IPv4 format. - /// The end IP address of the server firewall rule. Must be IPv4 format. - /// A new instance for mocking. - public static MySqlFlexibleServerFirewallRuleData MySqlFlexibleServerFirewallRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IPAddress startIPAddress = null, IPAddress endIPAddress = null) + /// Initializes a new instance of . + /// Error Message. + /// Indicates whether the resource name is available. + /// Reason for name being unavailable. + /// A new instance for mocking. + public static MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameAvailabilityResult(string message = null, bool? isNameAvailable = null, string reason = null) { - return new MySqlFlexibleServerFirewallRuleData( - id, - name, - resourceType, - systemData, - startIPAddress, - endIPAddress, - serializedAdditionalRawData: null); + return new MySqlFlexibleServerNameAvailabilityResult(message, isNameAvailable, reason, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -239,7 +55,8 @@ public static MySqlFlexibleServerFirewallRuleData MySqlFlexibleServerFirewallRul /// The SKU (pricing tier) of the server. /// The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). /// The password of the administrator login (required for server creation). - /// Server version. + /// Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7. + /// Major version and actual engine version. /// availability Zone information of the server. /// The mode to create a new MySQL server. /// The source MySQL server id. @@ -249,18 +66,20 @@ public static MySqlFlexibleServerFirewallRuleData MySqlFlexibleServerFirewallRul /// The Data Encryption for CMK. /// The state of a server. /// The fully qualified domain name of a server. + /// The server database port. Can only be specified when the server is being created. /// Storage related properties of a server. /// Backup related properties of a server. /// High availability related properties of a server. /// Network related properties of a server. - /// PrivateEndpointConnections related properties of a server. - /// Maintenance window of a server. + /// PrivateEndpointConnections related properties of a server. + /// Maintenance policy of a server. + /// Maintenance window of a server. Known issue: cannot be set during server creation or updated with other properties during server update; must be updated separately. /// Source properties for import from storage. /// A new instance for mocking. - public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, MySqlFlexibleServerVersion? version = null, string availabilityZone = null, MySqlFlexibleServerCreateMode? createMode = null, ResourceIdentifier sourceServerResourceId = null, DateTimeOffset? restorePointInTime = null, MySqlFlexibleServerReplicationRole? replicationRole = null, int? replicaCapacity = null, MySqlFlexibleServerDataEncryption dataEncryption = null, MySqlFlexibleServerState? state = null, string fullyQualifiedDomainName = null, MySqlFlexibleServerStorage storage = null, MySqlFlexibleServerBackupProperties backup = null, MySqlFlexibleServerHighAvailability highAvailability = null, MySqlFlexibleServerNetwork network = null, IEnumerable privateEndpointConnections = null, MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, ImportSourceProperties importSourceProperties = null) + public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, MySqlFlexibleServerVersion? version = null, string fullVersion = null, string availabilityZone = null, MySqlFlexibleServerCreateMode? createMode = null, ResourceIdentifier sourceServerResourceId = null, DateTimeOffset? restorePointInTime = null, MySqlFlexibleServerReplicationRole? replicationRole = null, int? replicaCapacity = null, MySqlFlexibleServerDataEncryption dataEncryption = null, MySqlFlexibleServerState? state = null, string fullyQualifiedDomainName = null, int? databasePort = null, MySqlFlexibleServerStorage storage = null, MySqlFlexibleServerBackupProperties backup = null, MySqlFlexibleServerHighAvailability highAvailability = null, MySqlFlexibleServerNetwork network = null, IEnumerable serverPrivateEndpointConnections = null, MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = null, MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, ImportSourceProperties importSourceProperties = null) { tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); + serverPrivateEndpointConnections ??= new List(); return new MySqlFlexibleServerData( id, @@ -274,6 +93,7 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier administratorLogin, administratorLoginPassword, version, + fullVersion, availabilityZone, createMode, sourceServerResourceId, @@ -283,11 +103,13 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier dataEncryption, state, fullyQualifiedDomainName, + databasePort, storage, backup, highAvailability, network, - privateEndpointConnections?.ToList(), + serverPrivateEndpointConnections?.ToList(), + maintenancePatchStrategy != null ? new MaintenancePolicy(maintenancePatchStrategy, serializedAdditionalRawData: null) : null, maintenanceWindow, importSourceProperties, serializedAdditionalRawData: null); @@ -300,8 +122,9 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier /// Enable Log On Disk or not. /// The sku name of the server storage. /// Enable IO Auto Scaling or not. + /// The redundant type of the server storage. The parameter is used for server creation. /// A new instance for mocking. - public static MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = null, int? iops = null, MySqlFlexibleServerEnableStatusEnum? autoGrow = null, MySqlFlexibleServerEnableStatusEnum? logOnDisk = null, string storageSku = null, MySqlFlexibleServerEnableStatusEnum? autoIoScaling = null) + public static MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = null, int? iops = null, MySqlFlexibleServerEnableStatusEnum? autoGrow = null, MySqlFlexibleServerEnableStatusEnum? logOnDisk = null, string storageSku = null, MySqlFlexibleServerEnableStatusEnum? autoIoScaling = null, MySqlFlexibleServerStorageRedundancyType? storageRedundancy = null) { return new MySqlFlexibleServerStorage( storageSizeInGB, @@ -310,6 +133,7 @@ public static MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storage logOnDisk, storageSku, autoIoScaling, + storageRedundancy, serializedAdditionalRawData: null); } @@ -334,7 +158,7 @@ public static MySqlFlexibleServerHighAvailability MySqlFlexibleServerHighAvailab return new MySqlFlexibleServerHighAvailability(mode, state, standbyAvailabilityZone, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -343,12 +167,12 @@ public static MySqlFlexibleServerHighAvailability MySqlFlexibleServerHighAvailab /// The private endpoint resource. /// A collection of information about the state of the connection between service consumer and provider. /// The provisioning state of the private endpoint connection resource. - /// A new instance for mocking. - public static MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable groupIds = null, ResourceIdentifier privateEndpointId = null, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = null) + /// A new instance for mocking. + public static MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable groupIds = null, ResourceIdentifier privateEndpointId = null, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = null) { groupIds ??= new List(); - return new MySqlFlexibleServersPrivateEndpointConnection( + return new MySqlFlexibleServersPrivateEndpointConnectionData( id, name, resourceType, @@ -360,77 +184,19 @@ public static MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServers serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Estimated seconds of downtime for the deployment. - /// Scheduled Availability zone of the standby server. - /// Expected Availability zone of the standby server. - /// A new instance for mocking. - public static HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = null, string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) + /// Initializes a new instance of . + /// zone name. + /// Supported high availability mode. + /// supported geo backup regions. + /// A list of supported flexible server editions. + /// A new instance for mocking. + public static MySqlFlexibleServerCapabilityProperties MySqlFlexibleServerCapabilityProperties(string zone = null, IEnumerable supportedHAMode = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null) { - return new HighAvailabilityValidationEstimation(estimatedDowntime, scheduledStandbyAvailabilityZone, expectedStandbyAvailabilityZone, serializedAdditionalRawData: null); - } + supportedHAMode ??= new List(); + supportedGeoBackupRegions ??= new List(); + supportedFlexibleServerEditions ??= new List(); - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Specifies the UTC creation time of the policy. - /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. - /// Provisioning state of the Threat Protection. - /// A new instance for mocking. - public static AdvancedThreatProtectionData AdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, AdvancedThreatProtectionState? state = null, AdvancedThreatProtectionProvisioningState? provisioningState = null) - { - return new AdvancedThreatProtectionData( - id, - name, - resourceType, - systemData, - createdOn, - state, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The size in kb of the logFile. - /// Creation timestamp of the log file. - /// Type of the log file. - /// Last modified timestamp of the log file. - /// The url to download the log file from. - /// A new instance for mocking. - public static MySqlFlexibleServerLogFile MySqlFlexibleServerLogFile(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, long? sizeInKB = null, DateTimeOffset? createdOn = null, string typePropertiesType = null, DateTimeOffset? lastModifiedOn = null, Uri uri = null) - { - return new MySqlFlexibleServerLogFile( - id, - name, - resourceType, - systemData, - sizeInKB, - createdOn, - typePropertiesType, - lastModifiedOn, - uri, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// zone name. - /// Supported high availability mode. - /// supported geo backup regions. - /// A list of supported flexible server editions. - /// A new instance for mocking. - public static MySqlFlexibleServerCapabilityProperties MySqlFlexibleServerCapabilityProperties(string zone = null, IEnumerable supportedHAMode = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null) - { - supportedHAMode ??= new List(); - supportedGeoBackupRegions ??= new List(); - supportedFlexibleServerEditions ??= new List(); - - return new MySqlFlexibleServerCapabilityProperties(zone, supportedHAMode?.ToList(), supportedGeoBackupRegions?.ToList(), supportedFlexibleServerEditions?.ToList(), serializedAdditionalRawData: null); + return new MySqlFlexibleServerCapabilityProperties(zone, supportedHAMode?.ToList(), supportedGeoBackupRegions?.ToList(), supportedFlexibleServerEditions?.ToList(), serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -498,12 +264,14 @@ public static MySqlFlexibleServerSkuCapability MySqlFlexibleServerSkuCapability( /// supported geo backup regions. /// A list of supported flexible server editions. /// A list of supported server versions. + /// A list of supported features. /// A new instance for mocking. - public static MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null, IEnumerable supportedServerVersions = null) + public static MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null, IEnumerable supportedServerVersions = null, IEnumerable supportedFeatures = null) { supportedGeoBackupRegions ??= new List(); supportedFlexibleServerEditions ??= new List(); supportedServerVersions ??= new List(); + supportedFeatures ??= new List(); return new MySqlFlexibleServersCapabilityData( id, @@ -513,6 +281,7 @@ public static MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityD supportedGeoBackupRegions?.ToList(), supportedFlexibleServerEditions?.ToList(), supportedServerVersions?.ToList(), + supportedFeatures?.ToList(), serializedAdditionalRawData: null); } @@ -568,6 +337,15 @@ public static ServerVersionCapabilityV2 ServerVersionCapabilityV2(string name = return new ServerVersionCapabilityV2(name, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// feature name. + /// feature value. + /// A new instance for mocking. + public static MySqlFlexibleServerFeatureProperty MySqlFlexibleServerFeatureProperty(string featureName = null, string featureValue = null) + { + return new MySqlFlexibleServerFeatureProperty(featureName, featureValue, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The location name. /// The subscription id. @@ -589,90 +367,256 @@ public static MySqlFlexibleServerDelegatedSubnetUsage MySqlFlexibleServerDelegat return new MySqlFlexibleServerDelegatedSubnetUsage(subnetName, usage, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Resource name to verify. - /// Resource type used for verification. - /// A new instance for mocking. - public static MySqlFlexibleServerNameAvailabilityContent MySqlFlexibleServerNameAvailabilityContent(string name = null, ResourceType? resourceType = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Type of the sever administrator. + /// Login name of the server administrator. + /// SID (object ID) of the server administrator. + /// Tenant ID of the administrator. + /// The resource id of the identity used for AAD Authentication. + /// A new instance for mocking. + public static MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MySqlFlexibleServerAdministratorType? administratorType = null, string login = null, string sid = null, Guid? tenantId = null, ResourceIdentifier identityResourceId = null) { - return new MySqlFlexibleServerNameAvailabilityContent(name, resourceType, serializedAdditionalRawData: null); + return new MySqlFlexibleServerAadAdministratorData( + id, + name, + resourceType, + systemData, + administratorType, + login, + sid, + tenantId, + identityResourceId, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Error Message. - /// Indicates whether the resource name is available. - /// Reason for name being unavailable. - /// A new instance for mocking. - public static MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameAvailabilityResult(string message = null, bool? isNameAvailable = null, string reason = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Specifies the UTC creation time of the policy. + /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. + /// Provisioning state of the Threat Protection. + /// A new instance for mocking. + public static AdvancedThreatProtectionData AdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, AdvancedThreatProtectionState? state = null, AdvancedThreatProtectionProvisioningState? provisioningState = null) { - return new MySqlFlexibleServerNameAvailabilityResult(message, isNameAvailable, reason, serializedAdditionalRawData: null); + return new AdvancedThreatProtectionData( + id, + name, + resourceType, + systemData, + createdOn, + state, + provisioningState, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Fully qualified ID for the async operation. - /// Fully qualified ID of the resource against which the original async operation was started. - /// Name of the async operation. - /// Operation status. - /// Percent of the operation that is complete. - /// The start time of the operation. - /// The end time of the operation. - /// The operations list. - /// If present, details of the operation error. - /// The extended properties of Operation Results. - /// A new instance for mocking. - public static OperationStatusExtendedResult OperationStatusExtendedResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, IReadOnlyDictionary properties = null) - { - operations ??= new List(); - properties ??= new Dictionary(); - - return new OperationStatusExtendedResult( + /// Initializes a new instance of . + /// The name of the backup. + /// Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE). + /// A new instance for mocking. + public static MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, MySqlFlexibleServerBackupFormat? backupFormat = null) + { + return new MySqlFlexibleServerBackupSettings(backupName, backupFormat, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The error object. + /// The operation status. + /// Start time. + /// End time. + /// Operation progress (0-100). + /// Size of datasource in bytes. + /// Data transferred in bytes. + /// Metadata related to backup to be stored for restoring resource in key-value pairs. + /// A new instance for mocking. + public static MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResponseError error = null, MySqlFlexibleServerBackupAndExportOperationStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, double? percentComplete = null, long? datasourceSizeInBytes = null, long? dataTransferredInBytes = null, string backupMetadata = null) + { + return new MySqlFlexibleServerBackupAndExportResult( id, - resourceId, name, + resourceType, + systemData, + error, status, - percentComplete, startOn, endOn, - operations?.ToList(), - error, - serializedAdditionalRawData: null, - properties); - } - - /// Initializes a new instance of . - /// Fully qualified ID for the async operation. - /// Fully qualified ID of the resource against which the original async operation was started. - /// Name of the async operation. - /// Operation status. - /// Percent of the operation that is complete. - /// The start time of the operation. - /// The end time of the operation. - /// The operations list. - /// If present, details of the operation error. - /// A new instance for mocking. - public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null) - { - operations ??= new List(); - - return new OperationStatusResult( + percentComplete, + datasourceSizeInBytes, + dataTransferredInBytes, + backupMetadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Backup type. + /// Backup completed time (ISO8601 format). + /// Backup source. + /// A new instance for mocking. + public static MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupType = null, DateTimeOffset? completedOn = null, string source = null) + { + return new MySqlFlexibleServerBackupData( id, - resourceId, name, - status, - percentComplete, - startOn, - endOn, - operations?.ToList(), - error, + resourceType, + systemData, + backupType, + completedOn, + source, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Represents the private DNS zone suffix. - /// A new instance for mocking. - public static MySqlFlexibleServerPrivateDnsZoneSuffixResponse MySqlFlexibleServerPrivateDnsZoneSuffixResponse(string privateDnsZoneSuffix = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Backup name. + /// + /// Backup completed time (ISO8601 format). + /// Backup source. + /// The provisioning state of backup resource. + /// A new instance for mocking. + public static MySqlFlexibleServerBackupV2Data MySqlFlexibleServerBackupV2Data(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupNameV2 = null, MySqlFlexibleServerBackupType? backupType = null, DateTimeOffset? completedOn = null, string source = null, MySqlFlexibleServerBackupProvisioningState? provisioningState = null) { - return new MySqlFlexibleServerPrivateDnsZoneSuffixResponse(privateDnsZoneSuffix, serializedAdditionalRawData: null); + return new MySqlFlexibleServerBackupV2Data( + id, + name, + resourceType, + systemData, + backupNameV2, + backupType, + completedOn, + source, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Configuration items on this page. + /// The link to the next page of items. + /// A new instance for mocking. + public static MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(IEnumerable values = null, Uri nextLink = null) + { + values ??= new List(); + + return new MySqlFlexibleServerConfigurations(values?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Value of the configuration. + /// Current value of the configuration. + /// Description of the configuration. + /// The link used to get the document from community or Azure site. + /// Default value of the configuration. + /// Data type of the configuration. + /// Allowed values of the configuration. + /// Source of the configuration. + /// If is the configuration read only. + /// If is the configuration pending restart or not. + /// If is the configuration dynamic. + /// A new instance for mocking. + public static MySqlFlexibleServerConfigurationData MySqlFlexibleServerConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string currentValue = null, string description = null, string documentationLink = null, string defaultValue = null, string dataType = null, string allowedValues = null, MySqlFlexibleServerConfigurationSource? source = null, MySqlFlexibleServerConfigReadOnlyState? isReadOnly = null, MySqlFlexibleServerConfigPendingRestartState? isConfigPendingRestart = null, MySqlFlexibleServerConfigDynamicState? isDynamicConfig = null) + { + return new MySqlFlexibleServerConfigurationData( + id, + name, + resourceType, + systemData, + value, + currentValue, + description, + documentationLink, + defaultValue, + dataType, + allowedValues, + source, + isReadOnly, + isConfigPendingRestart, + isDynamicConfig, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The charset of the database. + /// The collation of the database. + /// A new instance for mocking. + public static MySqlFlexibleServerDatabaseData MySqlFlexibleServerDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string charset = null, string collation = null) + { + return new MySqlFlexibleServerDatabaseData( + id, + name, + resourceType, + systemData, + charset, + collation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The start IP address of the server firewall rule. Must be IPv4 format. + /// The end IP address of the server firewall rule. Must be IPv4 format. + /// A new instance for mocking. + public static MySqlFlexibleServerFirewallRuleData MySqlFlexibleServerFirewallRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IPAddress startIPAddress = null, IPAddress endIPAddress = null) + { + return new MySqlFlexibleServerFirewallRuleData( + id, + name, + resourceType, + systemData, + startIPAddress, + endIPAddress, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The size in kb of the logFile. + /// Creation timestamp of the log file. + /// Type of the log file. + /// Last modified timestamp of the log file. + /// The url to download the log file from. + /// A new instance for mocking. + public static MySqlFlexibleServerLogFile MySqlFlexibleServerLogFile(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, long? sizeInKB = null, DateTimeOffset? createdOn = null, string typePropertiesType = null, DateTimeOffset? lastModifiedOn = null, Uri uri = null) + { + return new MySqlFlexibleServerLogFile( + id, + name, + resourceType, + systemData, + sizeInKB, + createdOn, + typePropertiesType, + lastModifiedOn, + uri, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -712,5 +656,48 @@ public static MySqlFlexibleServerMaintenanceData MySqlFlexibleServerMaintenanceD provisioningState, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource private link DNS zone name. + /// A new instance for mocking. + public static MySqlFlexibleServersPrivateLinkResourceData MySqlFlexibleServersPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + { + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new MySqlFlexibleServersPrivateLinkResourceData( + id, + name, + resourceType, + systemData, + groupId, + requiredMembers?.ToList(), + requiredZoneNames?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Estimated no of storage containers required for resource data to be backed up. + /// A new instance for mocking. + public static MySqlFlexibleServerValidateBackupResult MySqlFlexibleServerValidateBackupResult(int? numberOfContainers = null) + { + return new MySqlFlexibleServerValidateBackupResult(numberOfContainers, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Estimated seconds of downtime for the deployment. + /// Scheduled Availability zone of the standby server. + /// Expected Availability zone of the standby server. + /// A new instance for mocking. + public static HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = null, string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) + { + return new HighAvailabilityValidationEstimation(estimatedDowntime, scheduledStandbyAvailabilityZone, expectedStandbyAvailabilityZone, serializedAdditionalRawData: null); + } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/FlexibleServersExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/FlexibleServersExtensions.cs similarity index 90% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/FlexibleServersExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/FlexibleServersExtensions.cs index 2975b2c9421d..278f15be87a9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/FlexibleServersExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/FlexibleServersExtensions.cs @@ -38,6 +38,44 @@ private static MockableMySqlFlexibleServersTenantResource GetMockableMySqlFlexib return resource.GetCachedClient(client => new MockableMySqlFlexibleServersTenantResource(client, resource.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 MySqlFlexibleServerResource GetMySqlFlexibleServerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerResource(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 MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersCapabilityResource(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. @@ -57,6 +95,25 @@ public static MySqlFlexibleServerAadAdministratorResource GetMySqlFlexibleServer return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerAadAdministratorResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an 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 AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMySqlFlexibleServersArmClient(client).GetAdvancedThreatProtectionResource(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. @@ -153,79 +210,60 @@ public static MySqlFlexibleServerFirewallRuleResource GetMySqlFlexibleServerFire } /// - /// 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 MySqlFlexibleServerResource GetMySqlFlexibleServerResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerResource(id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// 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. + /// 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 AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableMySqlFlexibleServersArmClient(client).GetAdvancedThreatProtectionResource(id); + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerMaintenanceResource(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. + /// 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. + /// 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 MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersCapabilityResource(id); + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersPrivateEndpointConnectionResource(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. + /// 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. + /// 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 MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerMaintenanceResource(id); + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersPrivateLinkResource(id); } /// @@ -258,7 +296,7 @@ public static MySqlFlexibleServerCollection GetMySqlFlexibleServers(this Resourc /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -296,7 +334,7 @@ public static async Task> GetMySqlFlexible /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -352,7 +390,7 @@ public static MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersCa /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -391,7 +429,7 @@ public static async Task> GetMy /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -418,207 +456,205 @@ public static Response GetMySqlFlexibleS } /// - /// List all the servers in a given subscription. + /// Check the availability of name for server /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability /// /// /// Operation Id - /// Servers_List + /// CheckNameAvailabilityWithoutLocation_Execute /// /// /// Default Api Version - /// 2023-12-30 - /// - /// - /// Resource - /// + /// 2024-12-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The request body. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetMySqlFlexibleServersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServersAsync(cancellationToken); + return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content, cancellationToken).ConfigureAwait(false); } /// - /// List all the servers in a given subscription. + /// Check the availability of name for server /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability /// /// /// Operation Id - /// Servers_List + /// CheckNameAvailabilityWithoutLocation_Execute /// /// /// Default Api Version - /// 2023-12-30 - /// - /// - /// Resource - /// + /// 2024-12-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The request body. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetMySqlFlexibleServers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is null. + public static Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServers(cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(content, cancellationToken); } /// - /// Get capabilities at specified location in a given subscription. + /// List all the servers in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers /// /// /// Operation Id - /// LocationBasedCapabilities_List + /// Servers_List /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 location. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetLocationBasedCapabilitiesAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMySqlFlexibleServersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilitiesAsync(locationName, cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServersAsync(cancellationToken); } /// - /// Get capabilities at specified location in a given subscription. + /// List all the servers in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers /// /// /// Operation Id - /// LocationBasedCapabilities_List + /// Servers_List /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 location. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetLocationBasedCapabilities(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMySqlFlexibleServers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilities(locationName, cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServers(cancellationToken); } /// - /// Get virtual network subnet usage for a given vNet resource id. + /// Get capabilities at specified location in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities /// /// /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute + /// LocationBasedCapabilities_List /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// 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 location. - /// The required parameters for creating or updating a server. /// The cancellation token to use. - /// or is null. - public static async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetLocationBasedCapabilitiesAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilitiesAsync(locationName, cancellationToken); } /// - /// Get virtual network subnet usage for a given vNet resource id. + /// Get capabilities at specified location in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities /// /// /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute + /// LocationBasedCapabilities_List /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// 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 location. - /// The required parameters for creating or updating a server. /// The cancellation token to use. - /// or is null. - public static Response ExecuteCheckVirtualNetworkSubnetUsage(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetLocationBasedCapabilities(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsage(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilities(locationName, cancellationToken); } /// @@ -634,7 +670,7 @@ public static Response Execu /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -644,7 +680,7 @@ public static Response Execu /// /// The instance the method will execute against. /// The name of the location. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// or is null. public static async Task> CheckMySqlFlexibleServerNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -667,7 +703,7 @@ public static async Task> Ch /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -677,7 +713,7 @@ public static async Task> Ch /// /// The instance the method will execute against. /// The name of the location. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// or is null. public static Response CheckMySqlFlexibleServerNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -688,135 +724,69 @@ public static Response CheckMySqlFlex } /// - /// Check the availability of name for server - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability - /// - /// - /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute - /// - /// - /// Default Api Version - /// 2023-12-30 - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The required parameters for checking if server name is available. - /// The cancellation token to use. - /// or is null. - public static async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content, cancellationToken).ConfigureAwait(false); - } - - /// - /// Check the availability of name for server - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability - /// - /// - /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute - /// - /// - /// Default Api Version - /// 2023-12-30 - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The required parameters for checking if server name is available. - /// The cancellation token to use. - /// or is null. - public static Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(content, cancellationToken); - } - - /// - /// Get the operation result for a long running operation. + /// Get virtual network subnet usage for a given vNet resource id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage /// /// /// Operation Id - /// OperationResults_Get + /// CheckVirtualNetworkSubnetUsage_Execute /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// 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 location. - /// The operation Id. + /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetOperationResultAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetOperationResultAsync(locationName, operationId, cancellationToken).ConfigureAwait(false); + return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); } /// - /// Get the operation result for a long running operation. + /// Get virtual network subnet usage for a given vNet resource id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage /// /// /// Operation Id - /// OperationResults_Get + /// CheckVirtualNetworkSubnetUsage_Execute /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// 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 location. - /// The operation Id. + /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetOperationResult(this SubscriptionResource subscriptionResource, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + /// or is null. + public static Response ExecuteCheckVirtualNetworkSubnetUsage(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetOperationResult(locationName, operationId, cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsage(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); } /// @@ -832,7 +802,7 @@ public static Response GetOperationResult(this Su /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -863,7 +833,7 @@ public static async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs similarity index 84% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs index b7ff91566aa4..980d10e3af5b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs @@ -34,6 +34,30 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// 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 MySqlFlexibleServerResource GetMySqlFlexibleServerResource(ResourceIdentifier id) + { + MySqlFlexibleServerResource.ValidateResourceId(id); + return new MySqlFlexibleServerResource(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 MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(ResourceIdentifier id) + { + MySqlFlexibleServersCapabilityResource.ValidateResourceId(id); + return new MySqlFlexibleServersCapabilityResource(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. @@ -46,6 +70,18 @@ public virtual MySqlFlexibleServerAadAdministratorResource GetMySqlFlexibleServe return new MySqlFlexibleServerAadAdministratorResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(ResourceIdentifier id) + { + AdvancedThreatProtectionResource.ValidateResourceId(id); + return new AdvancedThreatProtectionResource(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. @@ -107,51 +143,39 @@ public virtual MySqlFlexibleServerFirewallRuleResource GetMySqlFlexibleServerFir } /// - /// 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 MySqlFlexibleServerResource GetMySqlFlexibleServerResource(ResourceIdentifier id) - { - MySqlFlexibleServerResource.ValidateResourceId(id); - return new MySqlFlexibleServerResource(Client, id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// 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 AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(ResourceIdentifier id) + /// Returns a object. + public virtual MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(ResourceIdentifier id) { - AdvancedThreatProtectionResource.ValidateResourceId(id); - return new AdvancedThreatProtectionResource(Client, id); + MySqlFlexibleServerMaintenanceResource.ValidateResourceId(id); + return new MySqlFlexibleServerMaintenanceResource(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. + /// 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 MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(ResourceIdentifier id) + /// Returns a object. + public virtual MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(ResourceIdentifier id) { - MySqlFlexibleServersCapabilityResource.ValidateResourceId(id); - return new MySqlFlexibleServersCapabilityResource(Client, id); + MySqlFlexibleServersPrivateEndpointConnectionResource.ValidateResourceId(id); + return new MySqlFlexibleServersPrivateEndpointConnectionResource(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. + /// 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 MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(ResourceIdentifier id) + /// Returns a object. + public virtual MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(ResourceIdentifier id) { - MySqlFlexibleServerMaintenanceResource.ValidateResourceId(id); - return new MySqlFlexibleServerMaintenanceResource(Client, id); + MySqlFlexibleServersPrivateLinkResource.ValidateResourceId(id); + return new MySqlFlexibleServersPrivateLinkResource(Client, id); } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs index 253a4fb7ab5c..7de3180eff17 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual MySqlFlexibleServerCollection GetMySqlFlexibleServers() /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetMySqlFlexibl /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs similarity index 82% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs index 518dca6e15ff..dc212b3477d9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs @@ -18,18 +18,16 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableMySqlFlexibleServersSubscriptionResource : ArmResource { + private ClientDiagnostics _checkNameAvailabilityWithoutLocationClientDiagnostics; + private CheckNameAvailabilityWithoutLocationRestOperations _checkNameAvailabilityWithoutLocationRestClient; private ClientDiagnostics _mySqlFlexibleServerServersClientDiagnostics; private ServersRestOperations _mySqlFlexibleServerServersRestClient; private ClientDiagnostics _locationBasedCapabilitiesClientDiagnostics; private LocationBasedCapabilitiesRestOperations _locationBasedCapabilitiesRestClient; - private ClientDiagnostics _checkVirtualNetworkSubnetUsageClientDiagnostics; - private CheckVirtualNetworkSubnetUsageRestOperations _checkVirtualNetworkSubnetUsageRestClient; private ClientDiagnostics _checkNameAvailabilityClientDiagnostics; private CheckNameAvailabilityRestOperations _checkNameAvailabilityRestClient; - private ClientDiagnostics _checkNameAvailabilityWithoutLocationClientDiagnostics; - private CheckNameAvailabilityWithoutLocationRestOperations _checkNameAvailabilityWithoutLocationRestClient; - private ClientDiagnostics _operationResultsClientDiagnostics; - private OperationResultsRestOperations _operationResultsRestClient; + private ClientDiagnostics _checkVirtualNetworkSubnetUsageClientDiagnostics; + private CheckVirtualNetworkSubnetUsageRestOperations _checkVirtualNetworkSubnetUsageRestClient; /// Initializes a new instance of the class for mocking. protected MockableMySqlFlexibleServersSubscriptionResource() @@ -43,18 +41,16 @@ internal MockableMySqlFlexibleServersSubscriptionResource(ArmClient client, Reso { } + private ClientDiagnostics CheckNameAvailabilityWithoutLocationClientDiagnostics => _checkNameAvailabilityWithoutLocationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckNameAvailabilityWithoutLocationRestOperations CheckNameAvailabilityWithoutLocationRestClient => _checkNameAvailabilityWithoutLocationRestClient ??= new CheckNameAvailabilityWithoutLocationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics MySqlFlexibleServerServersClientDiagnostics => _mySqlFlexibleServerServersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", MySqlFlexibleServerResource.ResourceType.Namespace, Diagnostics); private ServersRestOperations MySqlFlexibleServerServersRestClient => _mySqlFlexibleServerServersRestClient ??= new ServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MySqlFlexibleServerResource.ResourceType)); private ClientDiagnostics LocationBasedCapabilitiesClientDiagnostics => _locationBasedCapabilitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); private LocationBasedCapabilitiesRestOperations LocationBasedCapabilitiesRestClient => _locationBasedCapabilitiesRestClient ??= new LocationBasedCapabilitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics CheckVirtualNetworkSubnetUsageClientDiagnostics => _checkVirtualNetworkSubnetUsageClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private CheckVirtualNetworkSubnetUsageRestOperations CheckVirtualNetworkSubnetUsageRestClient => _checkVirtualNetworkSubnetUsageRestClient ??= new CheckVirtualNetworkSubnetUsageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics CheckNameAvailabilityClientDiagnostics => _checkNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); private CheckNameAvailabilityRestOperations CheckNameAvailabilityRestClient => _checkNameAvailabilityRestClient ??= new CheckNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics CheckNameAvailabilityWithoutLocationClientDiagnostics => _checkNameAvailabilityWithoutLocationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private CheckNameAvailabilityWithoutLocationRestOperations CheckNameAvailabilityWithoutLocationRestClient => _checkNameAvailabilityWithoutLocationRestClient ??= new CheckNameAvailabilityWithoutLocationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics OperationResultsClientDiagnostics => _operationResultsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private OperationResultsRestOperations OperationResultsRestClient => _operationResultsRestClient ??= new OperationResultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics CheckVirtualNetworkSubnetUsageClientDiagnostics => _checkVirtualNetworkSubnetUsageClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckVirtualNetworkSubnetUsageRestOperations CheckVirtualNetworkSubnetUsageRestClient => _checkVirtualNetworkSubnetUsageRestClient ??= new CheckVirtualNetworkSubnetUsageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -83,7 +79,7 @@ public virtual MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersC /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -115,7 +111,7 @@ public virtual async Task> GetM /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -134,6 +130,82 @@ public virtual Response GetMySqlFlexible return GetMySqlFlexibleServersCapabilities(locationName).Get(capabilitySetName, cancellationToken); } + /// + /// Check the availability of name for server + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailabilityWithoutLocation_Execute + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); + scope.Start(); + try + { + var response = await CheckNameAvailabilityWithoutLocationRestClient.ExecuteAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the availability of name for server + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailabilityWithoutLocation_Execute + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); + scope.Start(); + try + { + var response = CheckNameAvailabilityWithoutLocationRestClient.Execute(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// List all the servers in a given subscription. /// @@ -147,7 +219,7 @@ public virtual Response GetMySqlFlexible /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -177,7 +249,7 @@ public virtual AsyncPageable GetMySqlFlexibleServer /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -207,7 +279,7 @@ public virtual Pageable GetMySqlFlexibleServers(Can /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -234,7 +306,7 @@ public virtual AsyncPageable GetLocatio /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -248,84 +320,6 @@ public virtual Pageable GetLocationBase return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => MySqlFlexibleServerCapabilityProperties.DeserializeMySqlFlexibleServerCapabilityProperties(e), LocationBasedCapabilitiesClientDiagnostics, Pipeline, "MockableMySqlFlexibleServersSubscriptionResource.GetLocationBasedCapabilities", "value", "nextLink", cancellationToken); } - /// - /// Get virtual network subnet usage for a given vNet resource id. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage - /// - /// - /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute - /// - /// - /// Default Api Version - /// 2023-12-30 - /// - /// - /// - /// The name of the location. - /// The required parameters for creating or updating a server. - /// The cancellation token to use. - /// is null. - public virtual async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); - - using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); - scope.Start(); - try - { - var response = await CheckVirtualNetworkSubnetUsageRestClient.ExecuteAsync(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get virtual network subnet usage for a given vNet resource id. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage - /// - /// - /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute - /// - /// - /// Default Api Version - /// 2023-12-30 - /// - /// - /// - /// The name of the location. - /// The required parameters for creating or updating a server. - /// The cancellation token to use. - /// is null. - public virtual Response ExecuteCheckVirtualNetworkSubnetUsage(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); - - using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); - scope.Start(); - try - { - var response = CheckVirtualNetworkSubnetUsageRestClient.Execute(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Check the availability of name for server /// @@ -339,12 +333,12 @@ public virtual Response Exec /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// The name of the location. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// is null. public virtual async Task> CheckMySqlFlexibleServerNameAvailabilityAsync(AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -378,12 +372,12 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// The name of the location. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// is null. public virtual Response CheckMySqlFlexibleServerNameAvailability(AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -405,112 +399,35 @@ public virtual Response CheckMySqlFle } /// - /// Check the availability of name for server - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability - /// - /// - /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute - /// - /// - /// Default Api Version - /// 2023-12-30 - /// - /// - /// - /// The required parameters for checking if server name is available. - /// The cancellation token to use. - /// is null. - public virtual async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); - scope.Start(); - try - { - var response = await CheckNameAvailabilityWithoutLocationRestClient.ExecuteAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Check the availability of name for server - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability - /// - /// - /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute - /// - /// - /// Default Api Version - /// 2023-12-30 - /// - /// - /// - /// The required parameters for checking if server name is available. - /// The cancellation token to use. - /// is null. - public virtual Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); - scope.Start(); - try - { - var response = CheckNameAvailabilityWithoutLocationRestClient.Execute(Id.SubscriptionId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the operation result for a long running operation. + /// Get virtual network subnet usage for a given vNet resource id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage /// /// /// Operation Id - /// OperationResults_Get + /// CheckVirtualNetworkSubnetUsage_Execute /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// The name of the location. - /// The operation Id. + /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetOperationResultAsync(AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); - using var scope = OperationResultsClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.GetOperationResult"); + using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); scope.Start(); try { - var response = await OperationResultsRestClient.GetAsync(Id.SubscriptionId, locationName, operationId, cancellationToken).ConfigureAwait(false); + var response = await CheckVirtualNetworkSubnetUsageRestClient.ExecuteAsync(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -521,36 +438,35 @@ public virtual async Task> GetOperationR } /// - /// Get the operation result for a long running operation. + /// Get virtual network subnet usage for a given vNet resource id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/operationResults/{operationId} + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage /// /// /// Operation Id - /// OperationResults_Get + /// CheckVirtualNetworkSubnetUsage_Execute /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// /// The name of the location. - /// The operation Id. + /// The request body. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetOperationResult(AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) + /// is null. + public virtual Response ExecuteCheckVirtualNetworkSubnetUsage(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); - using var scope = OperationResultsClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.GetOperationResult"); + using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); scope.Start(); try { - var response = OperationResultsRestClient.Get(Id.SubscriptionId, locationName, operationId, cancellationToken); + var response = CheckVirtualNetworkSubnetUsageRestClient.Execute(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs index e9198e9c3a37..940b7ddd7b9b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs @@ -54,7 +54,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -88,7 +88,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Argument.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..7a75b353a061 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..214aaffe6f20 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ChangeTrackingList.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..71a3d0d9346d --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..fb81bc1e2b82 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,409 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + internal static readonly ModelReaderWriterOptions WireV3Options = new ModelReaderWriterOptions("W|v3"); + internal static readonly ModelReaderWriterOptions JsonV3Options = new ModelReaderWriterOptions("J|v3"); + internal static readonly BinaryData SentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray()); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static bool IsSentinelValue(BinaryData value) + { + ReadOnlySpan sentinelSpan = SentinelValue.ToMemory().Span; + ReadOnlySpan valueSpan = value.ToMemory().Span; + return sentinelSpan.SequenceEqual(valueSpan); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Optional.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..3a704656a050 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..62e04fdd8433 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/AdvancedThreatProtectionOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/AdvancedThreatProtectionOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/AdvancedThreatProtectionOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/AdvancedThreatProtectionOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/FlexibleServersArmOperation.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/FlexibleServersArmOperation.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/FlexibleServersArmOperation.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/FlexibleServersArmOperation.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/FlexibleServersArmOperationOfT.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/FlexibleServersArmOperationOfT.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/FlexibleServersArmOperationOfT.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/FlexibleServersArmOperationOfT.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerAadAdministratorOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerAadAdministratorOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerAadAdministratorOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerAadAdministratorOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerBackupAndExportResultOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerBackupAndExportResultOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerBackupAndExportResultOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerBackupAndExportResultOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerBackupV2OperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerBackupV2OperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerBackupV2OperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerBackupV2OperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationsOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationsOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationsOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerConfigurationsOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerDatabaseOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerDatabaseOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerDatabaseOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerDatabaseOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerFirewallRuleOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerFirewallRuleOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerFirewallRuleOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerFirewallRuleOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerMaintenanceOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerMaintenanceOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerMaintenanceOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerMaintenanceOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/LongRunningOperation/MySqlFlexibleServerOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServerOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServersPrivateEndpointConnectionOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServersPrivateEndpointConnectionOperationSource.cs new file mode 100644 index 000000000000..827f86055eaf --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/LongRunningOperation/MySqlFlexibleServersPrivateEndpointConnectionOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal class MySqlFlexibleServersPrivateEndpointConnectionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MySqlFlexibleServersPrivateEndpointConnectionOperationSource(ArmClient client) + { + _client = client; + } + + MySqlFlexibleServersPrivateEndpointConnectionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerMySqlContext.Default); + return new MySqlFlexibleServersPrivateEndpointConnectionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerMySqlContext.Default); + return await Task.FromResult(new MySqlFlexibleServersPrivateEndpointConnectionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs index ded547e95988..ff559626ea3d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static AdvancedThreatProtectionListResult DeserializeAdvancedThreatProt return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static AdvancedThreatProtectionListResult DeserializeAdvancedThreatProt } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionListResult.cs similarity index 81% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionListResult.cs index a82debc2ebff..4e6d9a5ad3a1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of the server's Advanced Threat Protection configurations. + /// The response of a AdvancedThreatProtection list operation. internal partial class AdvancedThreatProtectionListResult { /// @@ -52,19 +52,19 @@ internal AdvancedThreatProtectionListResult() } /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. + /// The AdvancedThreatProtection items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal AdvancedThreatProtectionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal AdvancedThreatProtectionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Array of results. + /// The AdvancedThreatProtection items on this page. public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionName.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionName.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionName.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionName.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionPatch.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionPatch.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionProvisioningState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionProvisioningState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionProvisioningState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionProvisioningState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AdvancedThreatProtectionState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AzureResourceManagerMySqlContext.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AzureResourceManagerMySqlContext.cs similarity index 90% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AzureResourceManagerMySqlContext.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AzureResourceManagerMySqlContext.cs index 6618b3de63d5..d2516a3acd01 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AzureResourceManagerMySqlContext.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AzureResourceManagerMySqlContext.cs @@ -25,6 +25,7 @@ namespace Azure.ResourceManager.MySql [ModelReaderWriterBuildable(typeof(HighAvailabilityValidationEstimation))] [ModelReaderWriterBuildable(typeof(ImportSourceProperties))] [ModelReaderWriterBuildable(typeof(MaintenanceListResult))] + [ModelReaderWriterBuildable(typeof(MaintenancePolicy))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerAadAdministratorData))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerAadAdministratorListResult))] @@ -45,7 +46,6 @@ namespace Azure.ResourceManager.MySql [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerConfigurationData))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerConfigurationForBatchUpdate))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerConfigurationListForBatchUpdate))] - [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerConfigurationListResult))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerConfigurationResource))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerConfigurations))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerData))] @@ -54,7 +54,9 @@ namespace Azure.ResourceManager.MySql [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerDatabaseResource))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerDataEncryption))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerDelegatedSubnetUsage))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerDetachVnetContent))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerEditionCapability))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerFeatureProperty))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerFirewallRuleData))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerFirewallRuleListResult))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerFirewallRuleResource))] @@ -80,7 +82,12 @@ namespace Azure.ResourceManager.MySql [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerServerVersionCapability))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerSku))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerSkuCapability))] - [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnection))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnectionData))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnectionListResult))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnectionResource))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkResource))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkResourceData))] + [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkResourceListResult))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkServiceConnectionState))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerStorage))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerStorageEditionCapability))] diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/CapabilitySetsList.Serialization.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/CapabilitySetsList.Serialization.cs index da6384bb7984..faf1f252252e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/CapabilitySetsList.Serialization.cs @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static CapabilitySetsList DeserializeCapabilitySetsList(JsonElement ele return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static CapabilitySetsList DeserializeCapabilitySetsList(JsonElement ele } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/CapabilitySetsList.cs similarity index 84% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/CapabilitySetsList.cs index 53903a10c368..8875c17c9c2e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/CapabilitySetsList.cs @@ -52,19 +52,19 @@ internal CapabilitySetsList() } /// Initializes a new instance of . - /// A list of supported capability sets. - /// Link to retrieve next page of results. + /// The CapabilitySetsList items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal CapabilitySetsList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal CapabilitySetsList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of supported capability sets. + /// The CapabilitySetsList items on this page. public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/HighAvailabilityValidationEstimation.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/HighAvailabilityValidationEstimation.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ImportSourceProperties.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ImportSourceProperties.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ImportSourceProperties.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ImportSourceProperties.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceStorageType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ImportSourceStorageType.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceStorageType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ImportSourceStorageType.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenanceListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenanceListResult.Serialization.cs index 709c7fc86c51..3ad42c96e9f1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenanceListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MaintenanceListResult DeserializeMaintenanceListResult(JsonEleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MaintenanceListResult DeserializeMaintenanceListResult(JsonEleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenanceListResult.cs similarity index 82% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenanceListResult.cs index 5f3d06f48f43..7fbd59e2f001 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenanceListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of maintenances. + /// The response of a Maintenance list operation. internal partial class MaintenanceListResult { /// @@ -52,19 +52,19 @@ internal MaintenanceListResult() } /// Initializes a new instance of . - /// The list of maintenances in a server. - /// The link used to get the next page of operations. + /// The Maintenance items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MaintenanceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MaintenanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of maintenances in a server. + /// The Maintenance items on this page. public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenancePolicy.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenancePolicy.Serialization.cs new file mode 100644 index 000000000000..b78dc1f7b656 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenancePolicy.Serialization.cs @@ -0,0 +1,133 @@ +// 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.MySql.FlexibleServers.Models +{ + internal partial class MaintenancePolicy : 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(MaintenancePolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PatchStrategy)) + { + writer.WritePropertyName("patchStrategy"u8); + writer.WriteStringValue(PatchStrategy.Value.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MaintenancePolicy 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(MaintenancePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMaintenancePolicy(document.RootElement, options); + } + + internal static MaintenancePolicy DeserializeMaintenancePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MySqlFlexibleServerPatchStrategy? patchStrategy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("patchStrategy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchStrategy = new MySqlFlexibleServerPatchStrategy(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MaintenancePolicy(patchStrategy, 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, AzureResourceManagerMySqlContext.Default); + default: + throw new FormatException($"The model {nameof(MaintenancePolicy)} does not support writing '{options.Format}' format."); + } + } + + MaintenancePolicy 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMaintenancePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MaintenancePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenancePolicy.cs similarity index 64% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenancePolicy.cs index e544d936acc9..78785dfe58a1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MaintenancePolicy.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of server configurations. - internal partial class MySqlFlexibleServerConfigurationListResult + /// Maintenance policy of a server. + internal partial class MaintenancePolicy { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,21 @@ internal partial class MySqlFlexibleServerConfigurationListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal MySqlFlexibleServerConfigurationListResult() + /// Initializes a new instance of . + public MaintenancePolicy() { - Values = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// The list of server configurations. - /// The link used to get the next page of operations. + /// Initializes a new instance of . + /// The patch strategy of this server. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerConfigurationListResult(IReadOnlyList values, string nextLink, IDictionary serializedAdditionalRawData) + internal MaintenancePolicy(MySqlFlexibleServerPatchStrategy? patchStrategy, IDictionary serializedAdditionalRawData) { - Values = values; - NextLink = nextLink; + PatchStrategy = patchStrategy; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of server configurations. - public IReadOnlyList Values { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The patch strategy of this server. + public MySqlFlexibleServerPatchStrategy? PatchStrategy { get; set; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs index 91de7207f2d7..f075402c23ec 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MySqlFlexibleServerAadAdministratorListResult DeserializeMySqlFl return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MySqlFlexibleServerAadAdministratorListResult DeserializeMySqlFl } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.cs index 75799941539f..34263f4bc22c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.cs @@ -55,7 +55,7 @@ internal MySqlFlexibleServerAadAdministratorListResult() /// The list of azure ad administrator of a server. /// The link used to get the next page of operations. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerAadAdministratorListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerAadAdministratorListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -65,6 +65,6 @@ internal MySqlFlexibleServerAadAdministratorListResult(IReadOnlyList The list of azure ad administrator of a server. public IReadOnlyList Value { get; } /// The link used to get the next page of operations. - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAdministratorName.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAdministratorName.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAdministratorName.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAdministratorName.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAdministratorType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAdministratorType.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAdministratorType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerAdministratorType.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportContent.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportContent.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportOperationStatus.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs index ace3a22a0b67..716bc6c8a9f5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs @@ -37,6 +37,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + ((IJsonModel)Error).Write(writer, options); + } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -57,11 +62,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("percentComplete"u8); writer.WriteNumberValue(PercentComplete.Value); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - ((IJsonModel)Error).Write(writer, options); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DatasourceSizeInBytes)) @@ -102,11 +102,11 @@ internal static MySqlFlexibleServerBackupAndExportResult DeserializeMySqlFlexibl { return null; } + ResponseError error = default; MySqlFlexibleServerBackupAndExportOperationStatus? status = default; DateTimeOffset? startTime = default; DateTimeOffset? endTime = default; double? percentComplete = default; - ResponseError error = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -118,6 +118,15 @@ internal static MySqlFlexibleServerBackupAndExportResult DeserializeMySqlFlexibl Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerMySqlContext.Default); + continue; + } if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,15 +163,6 @@ internal static MySqlFlexibleServerBackupAndExportResult DeserializeMySqlFlexibl percentComplete = property.Value.GetDouble(); continue; } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerMySqlContext.Default); - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -233,6 +233,7 @@ internal static MySqlFlexibleServerBackupAndExportResult DeserializeMySqlFlexibl name, type, systemData, + error, status, startTime, endTime, @@ -240,7 +241,6 @@ internal static MySqlFlexibleServerBackupAndExportResult DeserializeMySqlFlexibl datasourceSizeInBytes, dataTransferredInBytes, backupMetadata, - error, serializedAdditionalRawData); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs similarity index 93% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs index 012b4bdf4875..9638f3d1c447 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// Represents BackupAndExport API Response. + /// Represents BackupAndExportAPI Response. public partial class MySqlFlexibleServerBackupAndExportResult : ResourceData { /// @@ -57,6 +57,7 @@ public MySqlFlexibleServerBackupAndExportResult() /// The name. /// The resourceType. /// The systemData. + /// The error object. /// The operation status. /// Start time. /// End time. @@ -64,10 +65,10 @@ public MySqlFlexibleServerBackupAndExportResult() /// Size of datasource in bytes. /// Data transferred in bytes. /// Metadata related to backup to be stored for restoring resource in key-value pairs. - /// The error object. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MySqlFlexibleServerBackupAndExportOperationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, ResponseError error, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResponseError error, MySqlFlexibleServerBackupAndExportOperationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + Error = error; Status = status; StartOn = startOn; EndOn = endOn; @@ -75,10 +76,11 @@ internal MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string DatasourceSizeInBytes = datasourceSizeInBytes; DataTransferredInBytes = dataTransferredInBytes; BackupMetadata = backupMetadata; - Error = error; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The error object. + public ResponseError Error { get; set; } /// The operation status. public MySqlFlexibleServerBackupAndExportOperationStatus? Status { get; set; } /// Start time. @@ -93,7 +95,5 @@ internal MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string public long? DataTransferredInBytes { get; set; } /// Metadata related to backup to be stored for restoring resource in key-value pairs. public string BackupMetadata { get; set; } - /// The error object. - public ResponseError Error { get; set; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupContentBase.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupContentBase.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupFormat.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupFormat.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupFormat.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupFormat.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs index 459329af63de..3beb67e1f32f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MySqlFlexibleServerBackupListResult DeserializeMySqlFlexibleServ return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MySqlFlexibleServerBackupListResult DeserializeMySqlFlexibleServ } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupListResult.cs similarity index 82% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupListResult.cs index a245b5ee5570..82177ea96083 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of server backups. + /// The response of a ServerBackup list operation. internal partial class MySqlFlexibleServerBackupListResult { /// @@ -52,19 +52,19 @@ internal MySqlFlexibleServerBackupListResult() } /// Initializes a new instance of . - /// The list of backups of a server. - /// The link used to get the next page of operations. + /// The ServerBackup items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerBackupListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerBackupListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of backups of a server. + /// The ServerBackup items on this page. public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupProperties.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupProperties.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProvisioningState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupProvisioningState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProvisioningState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupProvisioningState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupSettings.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupSettings.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupStoreDetails.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupStoreDetails.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupType.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupType.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBatchOfMaintenance.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBatchOfMaintenance.cs new file mode 100644 index 000000000000..b64a8e535c3d --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBatchOfMaintenance.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.MySql.FlexibleServers.Models +{ + /// The batch of maintenance when enabled the custom managed maintenance window of a server. + public readonly partial struct MySqlFlexibleServerBatchOfMaintenance : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MySqlFlexibleServerBatchOfMaintenance(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "Default"; + private const string Batch1Value = "Batch1"; + private const string Batch2Value = "Batch2"; + + /// Default. + public static MySqlFlexibleServerBatchOfMaintenance Default { get; } = new MySqlFlexibleServerBatchOfMaintenance(DefaultValue); + /// Batch1. + public static MySqlFlexibleServerBatchOfMaintenance Batch1 { get; } = new MySqlFlexibleServerBatchOfMaintenance(Batch1Value); + /// Batch2. + public static MySqlFlexibleServerBatchOfMaintenance Batch2 { get; } = new MySqlFlexibleServerBatchOfMaintenance(Batch2Value); + /// Determines if two values are the same. + public static bool operator ==(MySqlFlexibleServerBatchOfMaintenance left, MySqlFlexibleServerBatchOfMaintenance right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MySqlFlexibleServerBatchOfMaintenance left, MySqlFlexibleServerBatchOfMaintenance right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MySqlFlexibleServerBatchOfMaintenance(string value) => new MySqlFlexibleServerBatchOfMaintenance(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MySqlFlexibleServerBatchOfMaintenance other && Equals(other); + /// + public bool Equals(MySqlFlexibleServerBatchOfMaintenance 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/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs index f07f820a1aa7..a0be0c5f7ddf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MySqlFlexibleServerCapabilitiesListResult DeserializeMySqlFlexib return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MySqlFlexibleServerCapabilitiesListResult DeserializeMySqlFlexib } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.cs similarity index 84% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.cs index c42577f71165..4ccc72ce98cb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.cs @@ -52,19 +52,19 @@ internal MySqlFlexibleServerCapabilitiesListResult() } /// Initializes a new instance of . - /// A list of supported capabilities. - /// Link to retrieve next page of results. + /// The CapabilityProperties items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerCapabilitiesListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerCapabilitiesListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of supported capabilities. + /// The CapabilityProperties items on this page. public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilityProperties.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCapabilityProperties.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigDynamicState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigDynamicState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigDynamicState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigDynamicState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigPendingRestartState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigPendingRestartState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigPendingRestartState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigPendingRestartState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigReadOnlyState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigReadOnlyState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigReadOnlyState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigReadOnlyState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationResetAllToDefault.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationResetAllToDefault.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationResetAllToDefault.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationResetAllToDefault.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs similarity index 87% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs index a1abc6b30e9c..9344e7dd47ac 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsCollectionDefined(Values)) { - writer.WritePropertyName("values"u8); + writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Values) { @@ -44,6 +44,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -81,12 +86,13 @@ internal static MySqlFlexibleServerConfigurations DeserializeMySqlFlexibleServer { return null; } - IReadOnlyList values = default; + IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("values"u8)) + if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -97,7 +103,16 @@ internal static MySqlFlexibleServerConfigurations DeserializeMySqlFlexibleServer { array.Add(MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(item, options)); } - values = array; + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -106,7 +121,7 @@ internal static MySqlFlexibleServerConfigurations DeserializeMySqlFlexibleServer } } serializedAdditionalRawData = rawDataDictionary; - return new MySqlFlexibleServerConfigurations(values ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new MySqlFlexibleServerConfigurations(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.cs similarity index 81% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.cs index 90df23b5eb1c..93ea5ea4b70b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of server configurations. + /// The response of a Configuration list operation. public partial class MySqlFlexibleServerConfigurations { /// @@ -52,15 +52,19 @@ internal MySqlFlexibleServerConfigurations() } /// Initializes a new instance of . - /// The list of server configurations. + /// The Configuration items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerConfigurations(IReadOnlyList values, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerConfigurations(IReadOnlyList values, Uri nextLink, IDictionary serializedAdditionalRawData) { Values = values; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of server configurations. + /// The Configuration items on this page. public IReadOnlyList Values { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCreateMode.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCreateMode.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCreateMode.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerCreateMode.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryption.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryption.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryptionType.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryptionType.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryptionType.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryptionType.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryptionType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryptionType.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryptionType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDataEncryptionType.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs index e248e3db77b3..300a1055610b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MySqlFlexibleServerDatabaseListResult DeserializeMySqlFlexibleSe return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MySqlFlexibleServerDatabaseListResult DeserializeMySqlFlexibleSe } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDatabaseListResult.cs similarity index 81% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDatabaseListResult.cs index 26857608f7cf..01dbcd636227 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDatabaseListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A List of databases. + /// The response of a Database list operation. internal partial class MySqlFlexibleServerDatabaseListResult { /// @@ -52,19 +52,19 @@ internal MySqlFlexibleServerDatabaseListResult() } /// Initializes a new instance of . - /// The list of databases housed in a server. - /// The link used to get the next page of operations. + /// The Database items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerDatabaseListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerDatabaseListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of databases housed in a server. + /// The Database items on this page. public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDetachVnetContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDetachVnetContent.Serialization.cs new file mode 100644 index 000000000000..b6ac8aa3b75c --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDetachVnetContent.Serialization.cs @@ -0,0 +1,133 @@ +// 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.MySql.FlexibleServers.Models +{ + public partial class MySqlFlexibleServerDetachVnetContent : 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(MySqlFlexibleServerDetachVnetContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess.Value.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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MySqlFlexibleServerDetachVnetContent 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(MySqlFlexibleServerDetachVnetContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMySqlFlexibleServerDetachVnetContent(document.RootElement, options); + } + + internal static MySqlFlexibleServerDetachVnetContent DeserializeMySqlFlexibleServerDetachVnetContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MySqlFlexibleServerEnableStatusEnum? publicNetworkAccess = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicNetworkAccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publicNetworkAccess = new MySqlFlexibleServerEnableStatusEnum(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MySqlFlexibleServerDetachVnetContent(publicNetworkAccess, 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, AzureResourceManagerMySqlContext.Default); + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServerDetachVnetContent)} does not support writing '{options.Format}' format."); + } + } + + MySqlFlexibleServerDetachVnetContent 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMySqlFlexibleServerDetachVnetContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServerDetachVnetContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDetachVnetContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDetachVnetContent.cs new file mode 100644 index 000000000000..755faafa55fd --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerDetachVnetContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// Parameters to detach Vnet. + public partial class MySqlFlexibleServerDetachVnetContent + { + /// + /// 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 MySqlFlexibleServerDetachVnetContent() + { + } + + /// Initializes a new instance of . + /// Whether or not public network access is allowed for this server. Value is 'Disabled' when server has VNet integration. + /// Keeps track of any properties unknown to the library. + internal MySqlFlexibleServerDetachVnetContent(MySqlFlexibleServerEnableStatusEnum? publicNetworkAccess, IDictionary serializedAdditionalRawData) + { + PublicNetworkAccess = publicNetworkAccess; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether or not public network access is allowed for this server. Value is 'Disabled' when server has VNet integration. + public MySqlFlexibleServerEnableStatusEnum? PublicNetworkAccess { get; set; } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEditionCapability.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEditionCapability.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs similarity index 96% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs index e2381a4b15c9..7780bbec6097 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// Enum to indicate whether value is 'Enabled' or 'Disabled'. + /// Whether or not geo redundant backup is enabled. public readonly partial struct MySqlFlexibleServerEnableStatusEnum : IEquatable { private readonly string _value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFeatureProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFeatureProperty.Serialization.cs new file mode 100644 index 000000000000..80b901c69c48 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFeatureProperty.Serialization.cs @@ -0,0 +1,140 @@ +// 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.MySql.FlexibleServers.Models +{ + public partial class MySqlFlexibleServerFeatureProperty : 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(MySqlFlexibleServerFeatureProperty)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(FeatureName)) + { + writer.WritePropertyName("featureName"u8); + writer.WriteStringValue(FeatureName); + } + if (options.Format != "W" && Optional.IsDefined(FeatureValue)) + { + writer.WritePropertyName("featureValue"u8); + writer.WriteStringValue(FeatureValue); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MySqlFlexibleServerFeatureProperty 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(MySqlFlexibleServerFeatureProperty)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMySqlFlexibleServerFeatureProperty(document.RootElement, options); + } + + internal static MySqlFlexibleServerFeatureProperty DeserializeMySqlFlexibleServerFeatureProperty(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string featureName = default; + string featureValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("featureName"u8)) + { + featureName = property.Value.GetString(); + continue; + } + if (property.NameEquals("featureValue"u8)) + { + featureValue = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MySqlFlexibleServerFeatureProperty(featureName, featureValue, 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, AzureResourceManagerMySqlContext.Default); + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServerFeatureProperty)} does not support writing '{options.Format}' format."); + } + } + + MySqlFlexibleServerFeatureProperty 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMySqlFlexibleServerFeatureProperty(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServerFeatureProperty)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFeatureProperty.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFeatureProperty.cs new file mode 100644 index 000000000000..10d0d41461bc --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFeatureProperty.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// Server version capabilities. + public partial class MySqlFlexibleServerFeatureProperty + { + /// + /// 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 MySqlFlexibleServerFeatureProperty() + { + } + + /// Initializes a new instance of . + /// feature name. + /// feature value. + /// Keeps track of any properties unknown to the library. + internal MySqlFlexibleServerFeatureProperty(string featureName, string featureValue, IDictionary serializedAdditionalRawData) + { + FeatureName = featureName; + FeatureValue = featureValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// feature name. + public string FeatureName { get; } + /// feature value. + public string FeatureValue { get; } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs index 7e20bdda7858..a7cbaa926c9a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MySqlFlexibleServerFirewallRuleListResult DeserializeMySqlFlexib return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MySqlFlexibleServerFirewallRuleListResult DeserializeMySqlFlexib } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.cs similarity index 81% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.cs index ceb41025a779..b6d280d7eede 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of firewall rules. + /// The response of a FirewallRule list operation. internal partial class MySqlFlexibleServerFirewallRuleListResult { /// @@ -52,19 +52,19 @@ internal MySqlFlexibleServerFirewallRuleListResult() } /// Initializes a new instance of . - /// The list of firewall rules in a server. - /// The link used to get the next page of operations. + /// The FirewallRule items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerFirewallRuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerFirewallRuleListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of firewall rules in a server. + /// The FirewallRule items on this page. public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerGtidSetContent.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerGtidSetContent.cs index bdffaf46b0f4..0825be1d7ef5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerGtidSetContent.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// Server Gtid set parameters. + /// Server Gtid set parameters: Replication with Global Transaction Identifiers. public partial class MySqlFlexibleServerGtidSetContent { /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailability.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailability.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailabilityMode.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailabilityMode.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailabilityMode.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailabilityMode.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailabilityState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailabilityState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailabilityState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerHighAvailabilityState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs index ba4e89fe4328..89ffb4f3e4ac 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MySqlFlexibleServerListResult DeserializeMySqlFlexibleServerList return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MySqlFlexibleServerListResult DeserializeMySqlFlexibleServerList } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerListResult.cs similarity index 83% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerListResult.cs index 578208d03f2f..2825937ef378 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of servers. + /// The response of a Server list operation. internal partial class MySqlFlexibleServerListResult { /// @@ -52,19 +52,19 @@ internal MySqlFlexibleServerListResult() } /// Initializes a new instance of . - /// The list of servers. - /// The link used to get the next page of operations. + /// The Server items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of servers. + /// The Server items on this page. public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFile.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFile.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs index d063aeb3baa7..56c3699bfbd0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static MySqlFlexibleServerLogFileListResult DeserializeMySqlFlexibleSer return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static MySqlFlexibleServerLogFileListResult DeserializeMySqlFlexibleSer } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFileListResult.cs similarity index 82% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFileListResult.cs index 988ce1c627fe..e8ca2cc2c113 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerLogFileListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A List of logFiles. + /// The response of a LogFile list operation. internal partial class MySqlFlexibleServerLogFileListResult { /// @@ -52,19 +52,19 @@ internal MySqlFlexibleServerLogFileListResult() } /// Initializes a new instance of . - /// The list of logFiles in a server. - /// The link used to get the next page of operations. + /// The LogFile items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerLogFileListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerLogFileListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of logFiles in a server. + /// The LogFile items on this page. public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenancePatch.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenancePatch.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceProvisioningState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceProvisioningState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceProvisioningState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceProvisioningState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceType.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceType.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs similarity index 88% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs index 6dea19f49e25..dca8e94d8652 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("dayOfWeek"u8); writer.WriteNumberValue(DayOfWeek.Value); } + if (Optional.IsDefined(BatchOfMaintenance)) + { + writer.WritePropertyName("batchOfMaintenance"u8); + writer.WriteStringValue(BatchOfMaintenance.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,6 +100,7 @@ internal static MySqlFlexibleServerMaintenanceWindow DeserializeMySqlFlexibleSer int? startHour = default; int? startMinute = default; int? dayOfWeek = default; + MySqlFlexibleServerBatchOfMaintenance? batchOfMaintenance = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -131,13 +137,28 @@ internal static MySqlFlexibleServerMaintenanceWindow DeserializeMySqlFlexibleSer dayOfWeek = property.Value.GetInt32(); continue; } + if (property.NameEquals("batchOfMaintenance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + batchOfMaintenance = new MySqlFlexibleServerBatchOfMaintenance(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MySqlFlexibleServerMaintenanceWindow(customWindow, startHour, startMinute, dayOfWeek, serializedAdditionalRawData); + return new MySqlFlexibleServerMaintenanceWindow( + customWindow, + startHour, + startMinute, + dayOfWeek, + batchOfMaintenance, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceWindow.cs similarity index 84% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceWindow.cs index 8037baa2cb5a..d9c588a9be85 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerMaintenanceWindow.cs @@ -55,13 +55,15 @@ public MySqlFlexibleServerMaintenanceWindow() /// start hour for maintenance window. /// start minute for maintenance window. /// day of week for maintenance window. + /// The batch of maintenance when enabled the custom managed maintenance window of a server. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerMaintenanceWindow(string customWindow, int? startHour, int? startMinute, int? dayOfWeek, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerMaintenanceWindow(string customWindow, int? startHour, int? startMinute, int? dayOfWeek, MySqlFlexibleServerBatchOfMaintenance? batchOfMaintenance, IDictionary serializedAdditionalRawData) { CustomWindow = customWindow; StartHour = startHour; StartMinute = startMinute; DayOfWeek = dayOfWeek; + BatchOfMaintenance = batchOfMaintenance; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -73,5 +75,7 @@ internal MySqlFlexibleServerMaintenanceWindow(string customWindow, int? startHou public int? StartMinute { get; set; } /// day of week for maintenance window. public int? DayOfWeek { get; set; } + /// The batch of maintenance when enabled the custom managed maintenance window of a server. + public MySqlFlexibleServerBatchOfMaintenance? BatchOfMaintenance { get; set; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNetwork.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerNetwork.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs index 9059899edf15..6184648e04d7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs @@ -84,6 +84,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("highAvailability"u8); writer.WriteObjectValue(HighAvailability, options); } + if (Optional.IsDefined(MaintenancePolicy)) + { + writer.WritePropertyName("maintenancePolicy"u8); + writer.WriteObjectValue(MaintenancePolicy, options); + } if (Optional.IsDefined(MaintenanceWindow)) { writer.WritePropertyName("maintenanceWindow"u8); @@ -150,6 +155,7 @@ internal static MySqlFlexibleServerPatch DeserializeMySqlFlexibleServerPatch(Jso MySqlFlexibleServerStorage storage = default; MySqlFlexibleServerBackupProperties backup = default; MySqlFlexibleServerHighAvailability highAvailability = default; + MaintenancePolicy maintenancePolicy = default; MySqlFlexibleServerMaintenanceWindow maintenanceWindow = default; MySqlFlexibleServerReplicationRole? replicationRole = default; MySqlFlexibleServerDataEncryption dataEncryption = default; @@ -240,6 +246,15 @@ internal static MySqlFlexibleServerPatch DeserializeMySqlFlexibleServerPatch(Jso highAvailability = MySqlFlexibleServerHighAvailability.DeserializeMySqlFlexibleServerHighAvailability(property0.Value, options); continue; } + if (property0.NameEquals("maintenancePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maintenancePolicy = MaintenancePolicy.DeserializeMaintenancePolicy(property0.Value, options); + continue; + } if (property0.NameEquals("maintenanceWindow"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -294,6 +309,7 @@ internal static MySqlFlexibleServerPatch DeserializeMySqlFlexibleServerPatch(Jso storage, backup, highAvailability, + maintenancePolicy, maintenanceWindow, replicationRole, dataEncryption, diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.cs similarity index 84% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.cs index 35000c110a6d..4be3aaac147e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.cs @@ -61,12 +61,13 @@ public MySqlFlexibleServerPatch() /// Storage related properties of a server. /// Backup related properties of a server. /// High availability related properties of a server. + /// Maintenance policy of a server. /// Maintenance window of a server. /// The replication role of the server. /// The Data Encryption for CMK. /// Network related properties of a server. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, IDictionary tags, string administratorLoginPassword, MySqlFlexibleServerVersion? version, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, MySqlFlexibleServerReplicationRole? replicationRole, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerNetwork network, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, IDictionary tags, string administratorLoginPassword, MySqlFlexibleServerVersion? version, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MaintenancePolicy maintenancePolicy, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, MySqlFlexibleServerReplicationRole? replicationRole, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerNetwork network, IDictionary serializedAdditionalRawData) { Identity = identity; Sku = sku; @@ -76,6 +77,7 @@ internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexible Storage = storage; Backup = backup; HighAvailability = highAvailability; + MaintenancePolicy = maintenancePolicy; MaintenanceWindow = maintenanceWindow; ReplicationRole = replicationRole; DataEncryption = dataEncryption; @@ -99,6 +101,20 @@ internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexible public MySqlFlexibleServerBackupProperties Backup { get; set; } /// High availability related properties of a server. public MySqlFlexibleServerHighAvailability HighAvailability { get; set; } + /// Maintenance policy of a server. + internal MaintenancePolicy MaintenancePolicy { get; set; } + /// The patch strategy of this server. + public MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy + { + get => MaintenancePolicy is null ? default : MaintenancePolicy.PatchStrategy; + set + { + if (MaintenancePolicy is null) + MaintenancePolicy = new MaintenancePolicy(); + MaintenancePolicy.PatchStrategy = value; + } + } + /// Maintenance window of a server. public MySqlFlexibleServerMaintenanceWindow MaintenanceWindow { get; set; } /// The replication role of the server. diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatchStrategy.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatchStrategy.cs new file mode 100644 index 000000000000..f5c7d9809d08 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatchStrategy.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.MySql.FlexibleServers.Models +{ + /// Enum to indicate the patch strategy of a server. + public readonly partial struct MySqlFlexibleServerPatchStrategy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MySqlFlexibleServerPatchStrategy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegularValue = "Regular"; + private const string VirtualCanaryValue = "VirtualCanary"; + + /// Regular. + public static MySqlFlexibleServerPatchStrategy Regular { get; } = new MySqlFlexibleServerPatchStrategy(RegularValue); + /// VirtualCanary. + public static MySqlFlexibleServerPatchStrategy VirtualCanary { get; } = new MySqlFlexibleServerPatchStrategy(VirtualCanaryValue); + /// Determines if two values are the same. + public static bool operator ==(MySqlFlexibleServerPatchStrategy left, MySqlFlexibleServerPatchStrategy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MySqlFlexibleServerPatchStrategy left, MySqlFlexibleServerPatchStrategy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MySqlFlexibleServerPatchStrategy(string value) => new MySqlFlexibleServerPatchStrategy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MySqlFlexibleServerPatchStrategy other && Equals(other); + /// + public bool Equals(MySqlFlexibleServerPatchStrategy 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/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerReplicationRole.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerReplicationRole.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerReplicationRole.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerReplicationRole.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerRestartParameter.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerRestartParameter.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerServerVersionCapability.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerServerVersionCapability.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSku.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSku.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSku.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSku.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSkuCapability.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSkuCapability.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuTier.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSkuTier.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuTier.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerSkuTier.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs similarity index 92% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs index 487b8dcf3c37..204ef0ad9875 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs @@ -64,6 +64,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("autoIoScaling"u8); writer.WriteStringValue(AutoIoScaling.Value.ToString()); } + if (Optional.IsDefined(StorageRedundancy)) + { + writer.WritePropertyName("storageRedundancy"u8); + writer.WriteStringValue(StorageRedundancy.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -107,6 +112,7 @@ internal static MySqlFlexibleServerStorage DeserializeMySqlFlexibleServerStorage MySqlFlexibleServerEnableStatusEnum? logOnDisk = default; string storageSku = default; MySqlFlexibleServerEnableStatusEnum? autoIoScaling = default; + MySqlFlexibleServerStorageRedundancyType? storageRedundancy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -161,6 +167,15 @@ internal static MySqlFlexibleServerStorage DeserializeMySqlFlexibleServerStorage autoIoScaling = new MySqlFlexibleServerEnableStatusEnum(property.Value.GetString()); continue; } + if (property.NameEquals("storageRedundancy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageRedundancy = new MySqlFlexibleServerStorageRedundancyType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -174,6 +189,7 @@ internal static MySqlFlexibleServerStorage DeserializeMySqlFlexibleServerStorage logOnDisk, storageSku, autoIoScaling, + storageRedundancy, serializedAdditionalRawData); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorage.cs similarity index 87% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorage.cs index 28fdc98c2c47..ec3ec5847493 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorage.cs @@ -57,8 +57,9 @@ public MySqlFlexibleServerStorage() /// Enable Log On Disk or not. /// The sku name of the server storage. /// Enable IO Auto Scaling or not. + /// The redundant type of the server storage. The parameter is used for server creation. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, MySqlFlexibleServerEnableStatusEnum? autoGrow, MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, MySqlFlexibleServerEnableStatusEnum? autoIoScaling, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, MySqlFlexibleServerEnableStatusEnum? autoGrow, MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, MySqlFlexibleServerEnableStatusEnum? autoIoScaling, MySqlFlexibleServerStorageRedundancyType? storageRedundancy, IDictionary serializedAdditionalRawData) { StorageSizeInGB = storageSizeInGB; Iops = iops; @@ -66,6 +67,7 @@ internal MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, MySqlFlexib LogOnDisk = logOnDisk; StorageSku = storageSku; AutoIoScaling = autoIoScaling; + StorageRedundancy = storageRedundancy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -81,5 +83,7 @@ internal MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, MySqlFlexib public string StorageSku { get; } /// Enable IO Auto Scaling or not. public MySqlFlexibleServerEnableStatusEnum? AutoIoScaling { get; set; } + /// The redundant type of the server storage. The parameter is used for server creation. + public MySqlFlexibleServerStorageRedundancyType? StorageRedundancy { get; set; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageEditionCapability.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageEditionCapability.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageRedundancyType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageRedundancyType.cs new file mode 100644 index 000000000000..b86ed7716f13 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageRedundancyType.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.MySql.FlexibleServers.Models +{ + /// The redundant type of the server storage. The parameter is used for server creation. + public readonly partial struct MySqlFlexibleServerStorageRedundancyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MySqlFlexibleServerStorageRedundancyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LocalRedundancyValue = "LocalRedundancy"; + private const string ZoneRedundancyValue = "ZoneRedundancy"; + + /// LocalRedundancy. + public static MySqlFlexibleServerStorageRedundancyType LocalRedundancy { get; } = new MySqlFlexibleServerStorageRedundancyType(LocalRedundancyValue); + /// ZoneRedundancy. + public static MySqlFlexibleServerStorageRedundancyType ZoneRedundancy { get; } = new MySqlFlexibleServerStorageRedundancyType(ZoneRedundancyValue); + /// Determines if two values are the same. + public static bool operator ==(MySqlFlexibleServerStorageRedundancyType left, MySqlFlexibleServerStorageRedundancyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MySqlFlexibleServerStorageRedundancyType left, MySqlFlexibleServerStorageRedundancyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MySqlFlexibleServerStorageRedundancyType(string value) => new MySqlFlexibleServerStorageRedundancyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MySqlFlexibleServerStorageRedundancyType other && Equals(other); + /// + public bool Equals(MySqlFlexibleServerStorageRedundancyType 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/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerValidateBackupResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerValidateBackupResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVersion.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVersion.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVersion.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVersion.cs index 36ee149bdc86..c9a121221f7e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVersion.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVersion.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// The version of a server. + /// The major version of a server. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7. public readonly partial struct MySqlFlexibleServerVersion : IEquatable { private readonly string _value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionListResult.Serialization.cs new file mode 100644 index 000000000000..f8b25e56afa1 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.MySql.FlexibleServers.Models +{ + internal partial class MySqlFlexibleServersPrivateEndpointConnectionListResult : 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(MySqlFlexibleServersPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MySqlFlexibleServersPrivateEndpointConnectionListResult 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(MySqlFlexibleServersPrivateEndpointConnectionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement, options); + } + + internal static MySqlFlexibleServersPrivateEndpointConnectionListResult DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MySqlFlexibleServersPrivateEndpointConnectionListResult(value, nextLink, 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, AzureResourceManagerMySqlContext.Default); + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateEndpointConnectionListResult)} does not support writing '{options.Format}' format."); + } + } + + MySqlFlexibleServersPrivateEndpointConnectionListResult 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateEndpointConnectionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionListResult.cs new file mode 100644 index 000000000000..db8406cddd57 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionListResult.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; +using System.Linq; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// The response of a PrivateEndpointConnection list operation. + internal partial class MySqlFlexibleServersPrivateEndpointConnectionListResult + { + /// + /// 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 PrivateEndpointConnection items on this page. + /// is null. + internal MySqlFlexibleServersPrivateEndpointConnectionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The PrivateEndpointConnection items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal MySqlFlexibleServersPrivateEndpointConnectionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MySqlFlexibleServersPrivateEndpointConnectionListResult() + { + } + + /// The PrivateEndpointConnection items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.Serialization.cs similarity index 56% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.Serialization.cs index fdf187aa9080..4f93c7391a2e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - internal partial class MySqlFlexibleServerConfigurationListResult : IUtf8JsonSerializable, IJsonModel + internal partial class MySqlFlexibleServersPrivateLinkResourceListResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,27 +28,22 @@ void IJsonModel.Write(Utf8JsonWriter /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationListResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Values)) + if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteStartArray(); - foreach (var item in Values) + foreach (var item in Value) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -66,19 +61,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MySqlFlexibleServerConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + MySqlFlexibleServersPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationListResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMySqlFlexibleServerConfigurationListResult(document.RootElement, options); + return DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement, options); } - internal static MySqlFlexibleServerConfigurationListResult DeserializeMySqlFlexibleServerConfigurationListResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static MySqlFlexibleServersPrivateLinkResourceListResult DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,8 +81,7 @@ internal static MySqlFlexibleServerConfigurationListResult DeserializeMySqlFlexi { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -98,57 +92,52 @@ internal static MySqlFlexibleServerConfigurationListResult DeserializeMySqlFlexi { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(item, options)); + array.Add(MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(item, options)); } value = array; continue; } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MySqlFlexibleServerConfigurationListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new MySqlFlexibleServersPrivateLinkResourceListResult(value ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerMySqlContext.Default); default: - throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationListResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support writing '{options.Format}' format."); } } - MySqlFlexibleServerConfigurationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + MySqlFlexibleServersPrivateLinkResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMySqlFlexibleServerConfigurationListResult(document.RootElement, options); + return DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationListResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.cs new file mode 100644 index 000000000000..54b375d2db91 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// A list of private link resources. + internal partial class MySqlFlexibleServersPrivateLinkResourceListResult + { + /// + /// 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 MySqlFlexibleServersPrivateLinkResourceListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Array of private link resources. + /// Keeps track of any properties unknown to the library. + internal MySqlFlexibleServersPrivateLinkResourceListResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Array of private link resources. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusExtendedResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusExtendedResult.cs new file mode 100644 index 000000000000..80c3ffdff231 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusExtendedResult.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// Represents Operation Results API Response. + public partial class OperationStatusExtendedResult : OperationStatusResult + { + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusResult.cs new file mode 100644 index 000000000000..44d4bbb133d4 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusResult.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// The current status of an async operation. + public partial class OperationStatusResult + { + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerBackupV2ListResult.Serialization.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerBackupV2ListResult.Serialization.cs index be30d7aa53cb..998a8eee0f1a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerBackupV2ListResult.Serialization.cs @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,7 +87,7 @@ internal static ServerBackupV2ListResult DeserializeServerBackupV2ListResult(Jso return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,7 +108,11 @@ internal static ServerBackupV2ListResult DeserializeServerBackupV2ListResult(Jso } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerBackupV2ListResult.cs similarity index 82% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerBackupV2ListResult.cs index bd2368e28261..251788095c92 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerBackupV2ListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// A list of server backups. + /// The response of a ServerBackupV2 list operation. internal partial class ServerBackupV2ListResult { /// @@ -52,19 +52,19 @@ internal ServerBackupV2ListResult() } /// Initializes a new instance of . - /// The list of backups of a server. - /// The link used to get the next page of operations. + /// The ServerBackupV2 items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ServerBackupV2ListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ServerBackupV2ListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of backups of a server. + /// The ServerBackupV2 items on this page. public IReadOnlyList Value { get; } - /// The link used to get the next page of operations. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerEditionCapabilityV2.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerEditionCapabilityV2.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerEditionCapabilityV2.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerEditionCapabilityV2.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerVersionCapabilityV2.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerVersionCapabilityV2.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerVersionCapabilityV2.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/ServerVersionCapabilityV2.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/SkuCapabilityV2.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/SkuCapabilityV2.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/SkuCapabilityV2.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/SkuCapabilityV2.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/UnknownBackupStoreDetails.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/UnknownBackupStoreDetails.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/UnknownBackupStoreDetails.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/UnknownBackupStoreDetails.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorCollection.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorCollection.cs index 00be7936126f..5e73991695e7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(MySqlFl /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(MySqlFlexibleServerAdminis /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(MySqlFlexibleServerAdministratorName admini /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.cs index 5a565e90fd59..ed3a900c3c4a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupCollection.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupCollection.cs index 6dd9d033ee06..e47e449ed625 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupName /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.cs index 9aec86dbc0aa..4ad4bc27ac0d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Collection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Collection.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Collection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Collection.cs index 76c606199e45..1a76d0371b2f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Collection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Collection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string backupNa /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Data.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Data.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.cs index 7b5c16d760e9..3dfbaada233b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -232,7 +232,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerCollection.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerCollection.cs index f2c5df8ffa56..bc8a59e28c79 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string serverName, Canc /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -348,7 +348,7 @@ public virtual AsyncPageable GetReplicasAsync(strin /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -379,7 +379,7 @@ public virtual Pageable GetReplicas(string serverNa /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> ExistsAsync(string serverName, Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -465,7 +465,7 @@ public virtual Response Exists(string serverName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -510,7 +510,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationCollection.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationCollection.cs index 61bcfd718bc3..de450950c3f9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string con /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.cs index e4adc25ae9b8..7bee8e42a604 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.Serialization.cs similarity index 90% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.Serialization.cs index ccd2ed52886b..acea77e9c510 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.Serialization.cs @@ -65,6 +65,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("version"u8); writer.WriteStringValue(Version.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(FullVersion)) + { + writer.WritePropertyName("fullVersion"u8); + writer.WriteStringValue(FullVersion); + } if (Optional.IsDefined(AvailabilityZone)) { writer.WritePropertyName("availabilityZone"u8); @@ -110,6 +115,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("fullyQualifiedDomainName"u8); writer.WriteStringValue(FullyQualifiedDomainName); } + if (Optional.IsDefined(DatabasePort)) + { + writer.WritePropertyName("databasePort"u8); + writer.WriteNumberValue(DatabasePort.Value); + } if (Optional.IsDefined(Storage)) { writer.WritePropertyName("storage"u8); @@ -130,16 +140,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("network"u8); writer.WriteObjectValue(Network, options); } - if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) + if (options.Format != "W" && Optional.IsCollectionDefined(ServerPrivateEndpointConnections)) { writer.WritePropertyName("privateEndpointConnections"u8); writer.WriteStartArray(); - foreach (var item in PrivateEndpointConnections) + foreach (var item in ServerPrivateEndpointConnections) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } + if (Optional.IsDefined(MaintenancePolicy)) + { + writer.WritePropertyName("maintenancePolicy"u8); + writer.WriteObjectValue(MaintenancePolicy, options); + } if (Optional.IsDefined(MaintenanceWindow)) { writer.WritePropertyName("maintenanceWindow"u8); @@ -184,6 +199,7 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE string administratorLogin = default; string administratorLoginPassword = default; MySqlFlexibleServerVersion? version = default; + string fullVersion = default; string availabilityZone = default; MySqlFlexibleServerCreateMode? createMode = default; ResourceIdentifier sourceServerResourceId = default; @@ -193,11 +209,13 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE MySqlFlexibleServerDataEncryption dataEncryption = default; MySqlFlexibleServerState? state = default; string fullyQualifiedDomainName = default; + int? databasePort = default; MySqlFlexibleServerStorage storage = default; MySqlFlexibleServerBackupProperties backup = default; MySqlFlexibleServerHighAvailability highAvailability = default; MySqlFlexibleServerNetwork network = default; - IReadOnlyList privateEndpointConnections = default; + IReadOnlyList privateEndpointConnections = default; + MaintenancePolicy maintenancePolicy = default; MySqlFlexibleServerMaintenanceWindow maintenanceWindow = default; ImportSourceProperties importSourceProperties = default; IDictionary serializedAdditionalRawData = default; @@ -293,6 +311,11 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE version = new MySqlFlexibleServerVersion(property0.Value.GetString()); continue; } + if (property0.NameEquals("fullVersion"u8)) + { + fullVersion = property0.Value.GetString(); + continue; + } if (property0.NameEquals("availabilityZone"u8)) { availabilityZone = property0.Value.GetString(); @@ -366,6 +389,15 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE fullyQualifiedDomainName = property0.Value.GetString(); continue; } + if (property0.NameEquals("databasePort"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databasePort = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("storage"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -408,14 +440,23 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(MySqlFlexibleServersPrivateEndpointConnection.DeserializeMySqlFlexibleServersPrivateEndpointConnection(item, options)); + array.Add(MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(item, options)); } privateEndpointConnections = array; continue; } + if (property0.NameEquals("maintenancePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maintenancePolicy = MaintenancePolicy.DeserializeMaintenancePolicy(property0.Value, options); + continue; + } if (property0.NameEquals("maintenanceWindow"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -455,6 +496,7 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE administratorLogin, administratorLoginPassword, version, + fullVersion, availabilityZone, createMode, sourceServerResourceId, @@ -464,11 +506,13 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE dataEncryption, state, fullyQualifiedDomainName, + databasePort, storage, backup, highAvailability, network, - privateEndpointConnections ?? new ChangeTrackingList(), + privateEndpointConnections ?? new ChangeTrackingList(), + maintenancePolicy, maintenanceWindow, importSourceProperties, serializedAdditionalRawData); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.cs similarity index 74% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.cs index 83b142ffd94c..c8c2c88130ad 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.cs @@ -55,7 +55,7 @@ public partial class MySqlFlexibleServerData : TrackedResourceData /// The location. public MySqlFlexibleServerData(AzureLocation location) : base(location) { - PrivateEndpointConnections = new ChangeTrackingList(); + ServerPrivateEndpointConnections = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -69,7 +69,8 @@ public MySqlFlexibleServerData(AzureLocation location) : base(location) /// The SKU (pricing tier) of the server. /// The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). /// The password of the administrator login (required for server creation). - /// Server version. + /// Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7. + /// Major version and actual engine version. /// availability Zone information of the server. /// The mode to create a new MySQL server. /// The source MySQL server id. @@ -79,21 +80,24 @@ public MySqlFlexibleServerData(AzureLocation location) : base(location) /// The Data Encryption for CMK. /// The state of a server. /// The fully qualified domain name of a server. + /// The server database port. Can only be specified when the server is being created. /// Storage related properties of a server. /// Backup related properties of a server. /// High availability related properties of a server. /// Network related properties of a server. - /// PrivateEndpointConnections related properties of a server. - /// Maintenance window of a server. + /// PrivateEndpointConnections related properties of a server. + /// Maintenance policy of a server. + /// Maintenance window of a server. Known issue: cannot be set during server creation or updated with other properties during server update; must be updated separately. /// Source properties for import from storage. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, MySqlFlexibleServerVersion? version, string availabilityZone, MySqlFlexibleServerCreateMode? createMode, ResourceIdentifier sourceServerResourceId, DateTimeOffset? restorePointInTime, MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerState? state, string fullyQualifiedDomainName, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MySqlFlexibleServerNetwork network, IReadOnlyList privateEndpointConnections, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, ImportSourceProperties importSourceProperties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, MySqlFlexibleServerVersion? version, string fullVersion, string availabilityZone, MySqlFlexibleServerCreateMode? createMode, ResourceIdentifier sourceServerResourceId, DateTimeOffset? restorePointInTime, MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerState? state, string fullyQualifiedDomainName, int? databasePort, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MySqlFlexibleServerNetwork network, IReadOnlyList serverPrivateEndpointConnections, MaintenancePolicy maintenancePolicy, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, ImportSourceProperties importSourceProperties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; AdministratorLogin = administratorLogin; AdministratorLoginPassword = administratorLoginPassword; Version = version; + FullVersion = fullVersion; AvailabilityZone = availabilityZone; CreateMode = createMode; SourceServerResourceId = sourceServerResourceId; @@ -103,11 +107,13 @@ internal MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceTyp DataEncryption = dataEncryption; State = state; FullyQualifiedDomainName = fullyQualifiedDomainName; + DatabasePort = databasePort; Storage = storage; Backup = backup; HighAvailability = highAvailability; Network = network; - PrivateEndpointConnections = privateEndpointConnections; + ServerPrivateEndpointConnections = serverPrivateEndpointConnections; + MaintenancePolicy = maintenancePolicy; MaintenanceWindow = maintenanceWindow; ImportSourceProperties = importSourceProperties; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -126,8 +132,10 @@ internal MySqlFlexibleServerData() public string AdministratorLogin { get; set; } /// The password of the administrator login (required for server creation). public string AdministratorLoginPassword { get; set; } - /// Server version. + /// Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7. public MySqlFlexibleServerVersion? Version { get; set; } + /// Major version and actual engine version. + public string FullVersion { get; } /// availability Zone information of the server. public string AvailabilityZone { get; set; } /// The mode to create a new MySQL server. @@ -146,6 +154,8 @@ internal MySqlFlexibleServerData() public MySqlFlexibleServerState? State { get; } /// The fully qualified domain name of a server. public string FullyQualifiedDomainName { get; } + /// The server database port. Can only be specified when the server is being created. + public int? DatabasePort { get; set; } /// Storage related properties of a server. public MySqlFlexibleServerStorage Storage { get; set; } /// Backup related properties of a server. @@ -155,8 +165,22 @@ internal MySqlFlexibleServerData() /// Network related properties of a server. public MySqlFlexibleServerNetwork Network { get; set; } /// PrivateEndpointConnections related properties of a server. - public IReadOnlyList PrivateEndpointConnections { get; } - /// Maintenance window of a server. + public IReadOnlyList ServerPrivateEndpointConnections { get; } + /// Maintenance policy of a server. + internal MaintenancePolicy MaintenancePolicy { get; set; } + /// The patch strategy of this server. + public MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy + { + get => MaintenancePolicy is null ? default : MaintenancePolicy.PatchStrategy; + set + { + if (MaintenancePolicy is null) + MaintenancePolicy = new MaintenancePolicy(); + MaintenancePolicy.PatchStrategy = value; + } + } + + /// Maintenance window of a server. Known issue: cannot be set during server creation or updated with other properties during server update; must be updated separately. public MySqlFlexibleServerMaintenanceWindow MaintenanceWindow { get; set; } /// Source properties for import from storage. public ImportSourceProperties ImportSourceProperties { get; set; } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseCollection.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseCollection.cs index bbe4a648e560..bfee7197b9b1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string database /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string databaseName, Cance /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string databaseName, CancellationToken canc /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.cs index 6801dace9631..9eab0f8192b9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleCollection.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleCollection.cs index 3dba39f4e983..bb2b4d8fe3e5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string fire /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.cs index 4d9eb8bdce96..30e56431ed21 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceCollection.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceCollection.cs index db495fa99bc2..2dbce3ba6543 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string maint /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string maintenanceName, Ca /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string maintenanceName, CancellationToken c /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.cs index 3453e3c8d919..0189c2de7099 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.cs similarity index 87% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.cs index fb1e2460ee58..e386049ef43f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.cs @@ -128,7 +128,7 @@ public virtual MySqlFlexibleServerAadAdministratorCollection GetMySqlFlexibleSer /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -157,7 +157,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -173,6 +173,71 @@ public virtual Response GetMySqlFle return GetMySqlFlexibleServerAadAdministrators().Get(administratorName, cancellationToken); } + /// Gets a collection of AdvancedThreatProtectionResources in the MySqlFlexibleServer. + /// An object representing collection of AdvancedThreatProtectionResources and their operations over a AdvancedThreatProtectionResource. + public virtual AdvancedThreatProtectionCollection GetAdvancedThreatProtections() + { + return GetCachedClient(client => new AdvancedThreatProtectionCollection(client, Id)); + } + + /// + /// Get a server's Advanced Threat Protection state + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} + /// + /// + /// Operation Id + /// AdvancedThreatProtectionSettings_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Advanced Threat Protection state. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetAdvancedThreatProtectionAsync(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + { + return await GetAdvancedThreatProtections().GetAsync(advancedThreatProtectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a server's Advanced Threat Protection state + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} + /// + /// + /// Operation Id + /// AdvancedThreatProtectionSettings_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Advanced Threat Protection state. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetAdvancedThreatProtection(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + { + return GetAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); + } + /// Gets a collection of MySqlFlexibleServerBackupResources in the MySqlFlexibleServer. /// An object representing collection of MySqlFlexibleServerBackupResources and their operations over a MySqlFlexibleServerBackupResource. public virtual MySqlFlexibleServerBackupCollection GetMySqlFlexibleServerBackups() @@ -193,7 +258,7 @@ public virtual MySqlFlexibleServerBackupCollection GetMySqlFlexibleServerBackups /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -224,7 +289,7 @@ public virtual async Task> GetMySqlF /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -262,7 +327,7 @@ public virtual MySqlFlexibleServerBackupV2Collection GetMySqlFlexibleServerBacku /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -293,7 +358,7 @@ public virtual async Task> GetMySq /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -331,7 +396,7 @@ public virtual MySqlFlexibleServerConfigurationCollection GetMySqlFlexibleServer /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -362,7 +427,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -400,7 +465,7 @@ public virtual MySqlFlexibleServerDatabaseCollection GetMySqlFlexibleServerDatab /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -431,7 +496,7 @@ public virtual async Task> GetMySq /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -469,7 +534,7 @@ public virtual MySqlFlexibleServerFirewallRuleCollection GetMySqlFlexibleServerF /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -500,7 +565,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -518,138 +583,211 @@ public virtual Response GetMySqlFlexibl return GetMySqlFlexibleServerFirewallRules().Get(firewallRuleName, cancellationToken); } - /// Gets a collection of AdvancedThreatProtectionResources in the MySqlFlexibleServer. - /// An object representing collection of AdvancedThreatProtectionResources and their operations over a AdvancedThreatProtectionResource. - public virtual AdvancedThreatProtectionCollection GetAdvancedThreatProtections() + /// Gets a collection of MySqlFlexibleServerMaintenanceResources in the MySqlFlexibleServer. + /// An object representing collection of MySqlFlexibleServerMaintenanceResources and their operations over a MySqlFlexibleServerMaintenanceResource. + public virtual MySqlFlexibleServerMaintenanceCollection GetMySqlFlexibleServerMaintenances() { - return GetCachedClient(client => new AdvancedThreatProtectionCollection(client, Id)); + return GetCachedClient(client => new MySqlFlexibleServerMaintenanceCollection(client, Id)); } /// - /// Get a server's Advanced Threat Protection state + /// Read maintenance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// Maintenances_Read /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Advanced Threat Protection state. + /// The name of the maintenance. /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetAdvancedThreatProtectionAsync(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetMySqlFlexibleServerMaintenanceAsync(string maintenanceName, CancellationToken cancellationToken = default) { - return await GetAdvancedThreatProtections().GetAsync(advancedThreatProtectionName, cancellationToken).ConfigureAwait(false); + return await GetMySqlFlexibleServerMaintenances().GetAsync(maintenanceName, cancellationToken).ConfigureAwait(false); } /// - /// Get a server's Advanced Threat Protection state + /// Read maintenance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// Maintenances_Read /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the Advanced Threat Protection state. + /// The name of the maintenance. /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetAdvancedThreatProtection(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public virtual Response GetMySqlFlexibleServerMaintenance(string maintenanceName, CancellationToken cancellationToken = default) { - return GetAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); + return GetMySqlFlexibleServerMaintenances().Get(maintenanceName, cancellationToken); } - /// Gets a collection of MySqlFlexibleServerMaintenanceResources in the MySqlFlexibleServer. - /// An object representing collection of MySqlFlexibleServerMaintenanceResources and their operations over a MySqlFlexibleServerMaintenanceResource. - public virtual MySqlFlexibleServerMaintenanceCollection GetMySqlFlexibleServerMaintenances() + /// Gets a collection of MySqlFlexibleServersPrivateEndpointConnectionResources in the MySqlFlexibleServer. + /// An object representing collection of MySqlFlexibleServersPrivateEndpointConnectionResources and their operations over a MySqlFlexibleServersPrivateEndpointConnectionResource. + public virtual MySqlFlexibleServersPrivateEndpointConnectionCollection GetMySqlFlexibleServersPrivateEndpointConnections() { - return GetCachedClient(client => new MySqlFlexibleServerMaintenanceCollection(client, Id)); + return GetCachedClient(client => new MySqlFlexibleServersPrivateEndpointConnectionCollection(client, Id)); } /// - /// Read maintenance. + /// Gets a private endpoint connection. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} /// /// /// Operation Id - /// Maintenances_Read + /// PrivateEndpointConnections_Get /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the maintenance. + /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMySqlFlexibleServerMaintenanceAsync(string maintenanceName, CancellationToken cancellationToken = default) + public virtual async Task> GetMySqlFlexibleServersPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) { - return await GetMySqlFlexibleServerMaintenances().GetAsync(maintenanceName, cancellationToken).ConfigureAwait(false); + return await GetMySqlFlexibleServersPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); } /// - /// Read maintenance. + /// Gets a private endpoint connection. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} /// /// /// Operation Id - /// Maintenances_Read + /// PrivateEndpointConnections_Get /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the maintenance. + /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMySqlFlexibleServerMaintenance(string maintenanceName, CancellationToken cancellationToken = default) + public virtual Response GetMySqlFlexibleServersPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) { - return GetMySqlFlexibleServerMaintenances().Get(maintenanceName, cancellationToken); + return GetMySqlFlexibleServersPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); + } + + /// Gets a collection of MySqlFlexibleServersPrivateLinkResources in the MySqlFlexibleServer. + /// An object representing collection of MySqlFlexibleServersPrivateLinkResources and their operations over a MySqlFlexibleServersPrivateLinkResource. + public virtual MySqlFlexibleServersPrivateLinkResourceCollection GetMySqlFlexibleServersPrivateLinkResources() + { + return GetCachedClient(client => new MySqlFlexibleServersPrivateLinkResourceCollection(client, Id)); + } + + /// + /// Gets a private link resource for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetMySqlFlexibleServersPrivateLinkResourceAsync(string groupName, CancellationToken cancellationToken = default) + { + return await GetMySqlFlexibleServersPrivateLinkResources().GetAsync(groupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a private link resource for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetMySqlFlexibleServersPrivateLinkResource(string groupName, CancellationToken cancellationToken = default) + { + return GetMySqlFlexibleServersPrivateLinkResources().Get(groupName, cancellationToken); } /// @@ -665,7 +803,7 @@ public virtual Response GetMySqlFlexible /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -705,7 +843,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -745,7 +883,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -787,7 +925,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -829,7 +967,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -875,7 +1013,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -909,36 +1047,40 @@ public virtual ArmOperation Update(WaitUntil waitUn } /// - /// Exports the backup of the given server by creating a backup if not existing. + /// Detach VNet on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupAndExport + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/detachVNet /// /// /// Operation Id - /// BackupAndExport_Create + /// Servers_DetachVNet /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 required parameters for creating and exporting backup of the given server. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. /// is null. - public virtual async Task> CreateBackupAndExportAsync(WaitUntil waitUntil, MySqlFlexibleServerBackupAndExportContent content, CancellationToken cancellationToken = default) + public virtual async Task> DetachVnetAsync(WaitUntil waitUntil, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.CreateBackupAndExport"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.DetachVnet"); scope.Start(); try { - var response = await _backupAndExportRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerBackupAndExportResultOperationSource(), _backupAndExportClientDiagnostics, Pipeline, _backupAndExportRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _mySqlFlexibleServerServersRestClient.DetachVNetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerOperationSource(Client), _mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateDetachVNetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -951,36 +1093,40 @@ public virtual async Task } /// - /// Exports the backup of the given server by creating a backup if not existing. + /// Detach VNet on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupAndExport + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/detachVNet /// /// /// Operation Id - /// BackupAndExport_Create + /// Servers_DetachVNet /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 required parameters for creating and exporting backup of the given server. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. /// is null. - public virtual ArmOperation CreateBackupAndExport(WaitUntil waitUntil, MySqlFlexibleServerBackupAndExportContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation DetachVnet(WaitUntil waitUntil, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.CreateBackupAndExport"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.DetachVnet"); scope.Start(); try { - var response = _backupAndExportRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerBackupAndExportResultOperationSource(), _backupAndExportClientDiagnostics, Pipeline, _backupAndExportRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _mySqlFlexibleServerServersRestClient.DetachVNet(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerOperationSource(Client), _mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateDetachVNetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -993,31 +1139,39 @@ public virtual ArmOperation CreateBack } /// - /// Validates if backup can be performed for given server. + /// Manual failover a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateBackup + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover /// /// /// Operation Id - /// BackupAndExport_ValidateBackup + /// Servers_Failover /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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> ValidateBackupAsync(CancellationToken cancellationToken = default) + public virtual async Task FailoverAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateBackup"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); scope.Start(); try { - var response = await _backupAndExportRestClient.ValidateBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var response = await _mySqlFlexibleServerServersRestClient.FailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1027,31 +1181,39 @@ public virtual async Task> Val } /// - /// Validates if backup can be performed for given server. + /// Manual failover a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateBackup + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover /// /// /// Operation Id - /// BackupAndExport_ValidateBackup + /// Servers_Failover /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 Response ValidateBackup(CancellationToken cancellationToken = default) + public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateBackup"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); scope.Start(); try { - var response = _backupAndExportRestClient.ValidateBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; + var response = _mySqlFlexibleServerServersRestClient.Failover(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; } catch (Exception e) { @@ -1061,42 +1223,42 @@ public virtual Response ValidateBackup( } /// - /// Update a list of configurations in a given server. + /// Resets GTID on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid /// /// /// Operation Id - /// Configurations_BatchUpdate + /// Servers_ResetGtid /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 parameters for updating a list of server configuration. + /// The required parameters for resetting GTID on a server. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateConfigurationsAsync(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); scope.Start(); try { - var response = await _mySqlFlexibleServerConfigurationConfigurationsRestClient.BatchUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateBatchUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _mySqlFlexibleServerServersRestClient.ResetGtidAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -1107,42 +1269,42 @@ public virtual async Task> Updat } /// - /// Update a list of configurations in a given server. + /// Resets GTID on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid /// /// /// Operation Id - /// Configurations_BatchUpdate + /// Servers_ResetGtid /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 parameters for updating a list of server configuration. + /// The required parameters for resetting GTID on a server. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateConfigurations(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); scope.Start(); try { - var response = _mySqlFlexibleServerConfigurationConfigurationsRestClient.BatchUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateBatchUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _mySqlFlexibleServerServersRestClient.ResetGtid(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + operation.WaitForCompletionResponse(cancellationToken); return operation; } catch (Exception e) @@ -1153,19 +1315,19 @@ public virtual ArmOperation UpdateConfigurati } /// - /// Manual failover a server. + /// Restarts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart /// /// /// Operation Id - /// Servers_Failover + /// Servers_Restart /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1174,15 +1336,19 @@ public virtual ArmOperation UpdateConfigurati /// /// /// 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 required parameters for restarting a server. /// The cancellation token to use. - public virtual async Task FailoverAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); + Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.FailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _mySqlFlexibleServerServersRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1195,19 +1361,19 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Cance } /// - /// Manual failover a server. + /// Restarts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart /// /// /// Operation Id - /// Servers_Failover + /// Servers_Restart /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1216,15 +1382,19 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Cance /// /// /// 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 required parameters for restarting a server. /// The cancellation token to use. - public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); + Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Failover(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _mySqlFlexibleServerServersRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1237,19 +1407,19 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken canc } /// - /// Validate a deployment of high availability. + /// Starts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start /// /// /// Operation Id - /// Servers_ValidateEstimateHighAvailability + /// Servers_Start /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1257,19 +1427,19 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken canc /// /// /// - /// The required parameters for validation of high availability deployment. + /// 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. - /// is null. - public virtual async Task> ValidateEstimateHighAvailabilityAsync(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken).ConfigureAwait(false); - return response; + var response = await _mySqlFlexibleServerServersRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1279,19 +1449,19 @@ public virtual async Task> Valida } /// - /// Validate a deployment of high availability. + /// Starts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start /// /// /// Operation Id - /// Servers_ValidateEstimateHighAvailability + /// Servers_Start /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1299,19 +1469,19 @@ public virtual async Task> Valida /// /// /// - /// The required parameters for validation of high availability deployment. + /// 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. - /// is null. - public virtual Response ValidateEstimateHighAvailability(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken); - return response; + var response = _mySqlFlexibleServerServersRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; } catch (Exception e) { @@ -1321,19 +1491,19 @@ public virtual Response ValidateEstimateHi } /// - /// Restarts a server. + /// Stops a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop /// /// /// Operation Id - /// Servers_Restart + /// Servers_Stop /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1342,19 +1512,15 @@ public virtual Response ValidateEstimateHi /// /// /// 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 required parameters for restarting a server. /// The cancellation token to use. - /// is null. - public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) + public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); + var response = await _mySqlFlexibleServerServersRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1367,19 +1533,19 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlF } /// - /// Restarts a server. + /// Stops a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop /// /// /// Operation Id - /// Servers_Restart + /// Servers_Stop /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1388,19 +1554,15 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlF /// /// /// 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 required parameters for restarting a server. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) + public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); + var response = _mySqlFlexibleServerServersRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1413,19 +1575,19 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRest } /// - /// Starts a server. + /// Validate a deployment of high availability. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability /// /// /// Operation Id - /// Servers_Start + /// Servers_ValidateEstimateHighAvailability /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1433,19 +1595,19 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRest /// /// /// - /// 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 required parameters for validation of high availability deployment. /// The cancellation token to use. - public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ValidateEstimateHighAvailabilityAsync(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1455,19 +1617,19 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella } /// - /// Starts a server. + /// Validate a deployment of high availability. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability /// /// /// Operation Id - /// Servers_Start + /// Servers_ValidateEstimateHighAvailability /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1475,18 +1637,60 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// /// + /// The required parameters for validation of high availability deployment. + /// The cancellation token to use. + /// is null. + public virtual Response ValidateEstimateHighAvailability(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); + scope.Start(); + try + { + var response = _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Exports the backup of the given server by creating a backup if not existing. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupAndExport + /// + /// + /// Operation Id + /// BackupAndExport_Create + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// /// 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 required parameters for creating and exporting backup of the given server. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CreateBackupAndExportAsync(WaitUntil waitUntil, MySqlFlexibleServerBackupAndExportContent content, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.CreateBackupAndExport"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _backupAndExportRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerBackupAndExportResultOperationSource(), _backupAndExportClientDiagnostics, Pipeline, _backupAndExportRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -1497,38 +1701,38 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell } /// - /// Stops a server. + /// Exports the backup of the given server by creating a backup if not existing. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupAndExport /// /// /// Operation Id - /// Servers_Stop + /// BackupAndExport_Create /// /// /// Default Api Version - /// 2023-12-30 - /// - /// - /// Resource - /// + /// 2024-12-01-preview /// /// /// /// 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 required parameters for creating and exporting backup of the given server. /// The cancellation token to use. - public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation CreateBackupAndExport(WaitUntil waitUntil, MySqlFlexibleServerBackupAndExportContent content, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.CreateBackupAndExport"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _backupAndExportRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerBackupAndExportResultOperationSource(), _backupAndExportClientDiagnostics, Pipeline, _backupAndExportRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -1539,39 +1743,65 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat } /// - /// Stops a server. + /// Validates if backup can be performed for given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateBackup /// /// /// Operation Id - /// Servers_Stop + /// BackupAndExport_ValidateBackup /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> ValidateBackupAsync(CancellationToken cancellationToken = default) + { + using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateBackup"); + scope.Start(); + try + { + var response = await _backupAndExportRestClient.ValidateBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates if backup can be performed for given server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateBackup /// /// - /// Resource - /// + /// Operation Id + /// BackupAndExport_ValidateBackup + /// + /// + /// Default Api Version + /// 2024-12-01-preview /// /// /// - /// 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 Response ValidateBackup(CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); + using var scope = _backupAndExportClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateBackup"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _backupAndExportRestClient.ValidateBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; } catch (Exception e) { @@ -1581,42 +1811,42 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella } /// - /// Resets GTID on a server. + /// Update a list of configurations in a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations /// /// /// Operation Id - /// Servers_ResetGtid + /// Configurations_BatchUpdate /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 required parameters for resetting GTID on a server. + /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// is null. - public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateConfigurationsAsync(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); + using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.ResetGtidAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _mySqlFlexibleServerConfigurationConfigurationsRestClient.BatchUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateBatchUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -1627,42 +1857,42 @@ public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySq } /// - /// Resets GTID on a server. + /// Update a list of configurations in a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations /// /// /// Operation Id - /// Servers_ResetGtid + /// Configurations_BatchUpdate /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-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 required parameters for resetting GTID on a server. + /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation UpdateConfigurations(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); + using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.ResetGtid(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _mySqlFlexibleServerConfigurationConfigurationsRestClient.BatchUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateBatchUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -1685,7 +1915,7 @@ public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGt /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -1723,7 +1953,7 @@ public virtual async Task> CutoverMigr /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -1761,7 +1991,7 @@ public virtual ArmOperation CutoverMigrationServers /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -1787,7 +2017,7 @@ public virtual AsyncPageable GetLogFilesAsync(Cancel /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// @@ -1813,7 +2043,7 @@ public virtual Pageable GetLogFiles(CancellationToke /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1875,7 +2105,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1937,7 +2167,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -1994,7 +2224,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -2051,7 +2281,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -2111,7 +2341,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityCollection.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityCollection.cs index ca34891d168e..0555da5cdc5f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string capab /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string capabilitySetName, /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string capabilitySetName, CancellationToken /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs similarity index 88% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs index 51e6be9fb8af..a3a44fea5487 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs @@ -70,6 +70,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(SupportedFeatures)) + { + writer.WritePropertyName("supportedFeatures"u8); + writer.WriteStartArray(); + foreach (var item in SupportedFeatures) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); } @@ -100,6 +110,7 @@ internal static MySqlFlexibleServersCapabilityData DeserializeMySqlFlexibleServe IReadOnlyList supportedGeoBackupRegions = default; IReadOnlyList supportedFlexibleServerEditions = default; IReadOnlyList supportedServerVersions = default; + IReadOnlyList supportedFeatures = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -179,6 +190,20 @@ internal static MySqlFlexibleServersCapabilityData DeserializeMySqlFlexibleServe supportedServerVersions = array; continue; } + if (property0.NameEquals("supportedFeatures"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(MySqlFlexibleServerFeatureProperty.DeserializeMySqlFlexibleServerFeatureProperty(item, options)); + } + supportedFeatures = array; + continue; + } } continue; } @@ -196,6 +221,7 @@ internal static MySqlFlexibleServersCapabilityData DeserializeMySqlFlexibleServe supportedGeoBackupRegions ?? new ChangeTrackingList(), supportedFlexibleServerEditions ?? new ChangeTrackingList(), supportedServerVersions ?? new ChangeTrackingList(), + supportedFeatures ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityData.cs similarity index 88% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityData.cs index 43f2e07cb33d..e405d293fd89 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityData.cs @@ -57,6 +57,7 @@ public MySqlFlexibleServersCapabilityData() SupportedGeoBackupRegions = new ChangeTrackingList(); SupportedFlexibleServerEditions = new ChangeTrackingList(); SupportedServerVersions = new ChangeTrackingList(); + SupportedFeatures = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -67,12 +68,14 @@ public MySqlFlexibleServersCapabilityData() /// supported geo backup regions. /// A list of supported flexible server editions. /// A list of supported server versions. + /// A list of supported features. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServersCapabilityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList supportedGeoBackupRegions, IReadOnlyList supportedFlexibleServerEditions, IReadOnlyList supportedServerVersions, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal MySqlFlexibleServersCapabilityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList supportedGeoBackupRegions, IReadOnlyList supportedFlexibleServerEditions, IReadOnlyList supportedServerVersions, IReadOnlyList supportedFeatures, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { SupportedGeoBackupRegions = supportedGeoBackupRegions; SupportedFlexibleServerEditions = supportedFlexibleServerEditions; SupportedServerVersions = supportedServerVersions; + SupportedFeatures = supportedFeatures; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -82,5 +85,7 @@ internal MySqlFlexibleServersCapabilityData(ResourceIdentifier id, string name, public IReadOnlyList SupportedFlexibleServerEditions { get; } /// A list of supported server versions. public IReadOnlyList SupportedServerVersions { get; } + /// A list of supported features. + public IReadOnlyList SupportedFeatures { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.cs index 95e0bea7b987..fa39a38839d6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-12-30 + /// 2024-12-01-preview /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionCollection.cs new file mode 100644 index 000000000000..20f3d66f0b4f --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionCollection.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMySqlFlexibleServersPrivateEndpointConnections method from an instance of . + /// + public partial class MySqlFlexibleServersPrivateEndpointConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics; + private readonly PrivateEndpointConnectionsRestOperations _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MySqlFlexibleServersPrivateEndpointConnectionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MySqlFlexibleServersPrivateEndpointConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", MySqlFlexibleServersPrivateEndpointConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MySqlFlexibleServersPrivateEndpointConnectionResource.ResourceType, out string mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); + _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient = new PrivateEndpointConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MySqlFlexibleServerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MySqlFlexibleServerResource.ResourceType), nameof(id)); + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-12-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 name of the private endpoint connection associated with the Azure resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServersPrivateEndpointConnectionOperationSource(Client), _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-12-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 name of the private endpoint connection associated with the Azure resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServersPrivateEndpointConnectionOperationSource(Client), _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private endpoint connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private endpoint connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.Get"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all private endpoint connections on a server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections + /// + /// + /// Operation Id + /// PrivateEndpointConnections_ListByServer + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(e)), _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "MySqlFlexibleServersPrivateEndpointConnectionCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Gets all private endpoint connections on a server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections + /// + /// + /// Operation Id + /// PrivateEndpointConnections_ListByServer + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(e)), _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "MySqlFlexibleServersPrivateEndpointConnectionCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.Serialization.cs new file mode 100644 index 000000000000..f23babe41b5c --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.Serialization.cs @@ -0,0 +1,230 @@ +// 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; +using Azure.ResourceManager.MySql.FlexibleServers.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + public partial class MySqlFlexibleServersPrivateEndpointConnectionData : 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(MySqlFlexibleServersPrivateEndpointConnectionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(GroupIds)) + { + writer.WritePropertyName("groupIds"u8); + writer.WriteStartArray(); + foreach (var item in GroupIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PrivateEndpoint)) + { + writer.WritePropertyName("privateEndpoint"u8); + ((IJsonModel)PrivateEndpoint).Write(writer, options); + } + if (Optional.IsDefined(ConnectionState)) + { + writer.WritePropertyName("privateLinkServiceConnectionState"u8); + writer.WriteObjectValue(ConnectionState, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); + } + + MySqlFlexibleServersPrivateEndpointConnectionData 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(MySqlFlexibleServersPrivateEndpointConnectionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement, options); + } + + internal static MySqlFlexibleServersPrivateEndpointConnectionData DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(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; + IReadOnlyList groupIds = default; + SubResource privateEndpoint = default; + MySqlFlexibleServersPrivateLinkServiceConnectionState privateLinkServiceConnectionState = default; + MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = 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 = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerMySqlContext.Default); + 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("groupIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + groupIds = array; + continue; + } + if (property0.NameEquals("privateEndpoint"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateEndpoint = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property0.Value.GetRawText())), options, AzureResourceManagerMySqlContext.Default); + continue; + } + if (property0.NameEquals("privateLinkServiceConnectionState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateLinkServiceConnectionState = MySqlFlexibleServersPrivateLinkServiceConnectionState.DeserializeMySqlFlexibleServersPrivateLinkServiceConnectionState(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new MySqlFlexibleServersPrivateEndpointConnectionProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MySqlFlexibleServersPrivateEndpointConnectionData( + id, + name, + type, + systemData, + groupIds ?? new ChangeTrackingList(), + privateEndpoint, + privateLinkServiceConnectionState, + provisioningState, + 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, AzureResourceManagerMySqlContext.Default); + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateEndpointConnectionData)} does not support writing '{options.Format}' format."); + } + } + + MySqlFlexibleServersPrivateEndpointConnectionData 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateEndpointConnectionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.cs new file mode 100644 index 000000000000..887e33907b32 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.cs @@ -0,0 +1,95 @@ +// 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; +using Azure.ResourceManager.MySql.FlexibleServers.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A class representing the MySqlFlexibleServersPrivateEndpointConnection data model. + /// The private endpoint connection resource. + /// + public partial class MySqlFlexibleServersPrivateEndpointConnectionData : 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 MySqlFlexibleServersPrivateEndpointConnectionData() + { + GroupIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The group ids for the private endpoint resource. + /// The private endpoint resource. + /// A collection of information about the state of the connection between service consumer and provider. + /// The provisioning state of the private endpoint connection resource. + /// Keeps track of any properties unknown to the library. + internal MySqlFlexibleServersPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList groupIds, SubResource privateEndpoint, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + GroupIds = groupIds; + PrivateEndpoint = privateEndpoint; + ConnectionState = connectionState; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The group ids for the private endpoint resource. + public IReadOnlyList GroupIds { get; } + /// The private endpoint resource. + internal SubResource PrivateEndpoint { get; set; } + /// Gets Id. + public ResourceIdentifier PrivateEndpointId + { + get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; + } + + /// A collection of information about the state of the connection between service consumer and provider. + public MySqlFlexibleServersPrivateLinkServiceConnectionState ConnectionState { get; set; } + /// The provisioning state of the private endpoint connection resource. + public MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.Serialization.cs new file mode 100644 index 000000000000..59f500388b7e --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + public partial class MySqlFlexibleServersPrivateEndpointConnectionResource : IJsonModel + { + private static MySqlFlexibleServersPrivateEndpointConnectionData s_dataDeserializationInstance; + private static MySqlFlexibleServersPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + MySqlFlexibleServersPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); + + MySqlFlexibleServersPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..99c0f1e9eeab --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A Class representing a MySqlFlexibleServersPrivateEndpointConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMySqlFlexibleServersPrivateEndpointConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetMySqlFlexibleServersPrivateEndpointConnection method. + /// + public partial class MySqlFlexibleServersPrivateEndpointConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serverName. + /// The privateEndpointConnectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics; + private readonly PrivateEndpointConnectionsRestOperations _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient; + private readonly MySqlFlexibleServersPrivateEndpointConnectionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DBforMySQL/flexibleServers/privateEndpointConnections"; + + /// Initializes a new instance of the class for mocking. + protected MySqlFlexibleServersPrivateEndpointConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MySqlFlexibleServersPrivateEndpointConnectionResource(ArmClient client, MySqlFlexibleServersPrivateEndpointConnectionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MySqlFlexibleServersPrivateEndpointConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); + _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient = new PrivateEndpointConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MySqlFlexibleServersPrivateEndpointConnectionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a private endpoint connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionResource.Get"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private endpoint connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionResource.Get"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Delete + /// + /// + /// Default Api Version + /// 2024-12-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 DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a private endpoint connection with a given name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Delete + /// + /// + /// Default Api Version + /// 2024-12-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 Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionResource.Delete"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-12-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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionResource.Update"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServersPrivateEndpointConnectionOperationSource(Client), _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Approve or reject a private endpoint connection with a given name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-12-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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateEndpointConnectionResource.Update"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServersPrivateEndpointConnectionOperationSource(Client), _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _mySqlFlexibleServersPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.Serialization.cs new file mode 100644 index 000000000000..6fd0c4859afd --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + public partial class MySqlFlexibleServersPrivateLinkResource : IJsonModel + { + private static MySqlFlexibleServersPrivateLinkResourceData s_dataDeserializationInstance; + private static MySqlFlexibleServersPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + MySqlFlexibleServersPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); + + MySqlFlexibleServersPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.cs new file mode 100644 index 000000000000..a8d06c66c38b --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A Class representing a MySqlFlexibleServersPrivateLinkResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMySqlFlexibleServersPrivateLinkResource method. + /// Otherwise you can get one from its parent resource using the GetMySqlFlexibleServersPrivateLinkResource method. + /// + public partial class MySqlFlexibleServersPrivateLinkResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serverName. + /// The groupName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string groupName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; + private readonly PrivateLinkResourcesRestOperations _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient; + private readonly MySqlFlexibleServersPrivateLinkResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DBforMySQL/flexibleServers/privateLinkResources"; + + /// Initializes a new instance of the class for mocking. + protected MySqlFlexibleServersPrivateLinkResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MySqlFlexibleServersPrivateLinkResource(ArmClient client, MySqlFlexibleServersPrivateLinkResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MySqlFlexibleServersPrivateLinkResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); + _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MySqlFlexibleServersPrivateLinkResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a private link resource for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResource.Get"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private link resource for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResource.Get"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceCollection.cs new file mode 100644 index 000000000000..92319c288b9f --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceCollection.cs @@ -0,0 +1,393 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMySqlFlexibleServersPrivateLinkResources method from an instance of . + /// + public partial class MySqlFlexibleServersPrivateLinkResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; + private readonly PrivateLinkResourcesRestOperations _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient; + + /// Initializes a new instance of the class for mocking. + protected MySqlFlexibleServersPrivateLinkResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MySqlFlexibleServersPrivateLinkResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", MySqlFlexibleServersPrivateLinkResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MySqlFlexibleServersPrivateLinkResource.ResourceType, out string mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); + _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MySqlFlexibleServerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MySqlFlexibleServerResource.ResourceType), nameof(id)); + } + + /// + /// Gets a private link resource for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Get"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a private link resource for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Get"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the private link resources for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources + /// + /// + /// Operation Id + /// PrivateLinkResources_ListByServer + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new MySqlFlexibleServersPrivateLinkResource(Client, MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(e)), _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "MySqlFlexibleServersPrivateLinkResourceCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Lists the private link resources for MySQL server. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources + /// + /// + /// Operation Id + /// PrivateLinkResources_ListByServer + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new MySqlFlexibleServersPrivateLinkResource(Client, MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(e)), _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "MySqlFlexibleServersPrivateLinkResourceCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Exists"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// PrivateLinkResources_Get + /// + /// + /// Default Api Version + /// 2024-12-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.Serialization.cs new file mode 100644 index 000000000000..7ab755361fc1 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.Serialization.cs @@ -0,0 +1,218 @@ +// 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.MySql.FlexibleServers +{ + public partial class MySqlFlexibleServersPrivateLinkResourceData : 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(MySqlFlexibleServersPrivateLinkResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"u8); + writer.WriteStringValue(GroupId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(RequiredMembers)) + { + writer.WritePropertyName("requiredMembers"u8); + writer.WriteStartArray(); + foreach (var item in RequiredMembers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RequiredZoneNames)) + { + writer.WritePropertyName("requiredZoneNames"u8); + writer.WriteStartArray(); + foreach (var item in RequiredZoneNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + MySqlFlexibleServersPrivateLinkResourceData 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(MySqlFlexibleServersPrivateLinkResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement, options); + } + + internal static MySqlFlexibleServersPrivateLinkResourceData DeserializeMySqlFlexibleServersPrivateLinkResourceData(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; + string groupId = default; + IReadOnlyList requiredMembers = default; + IList requiredZoneNames = 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 = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerMySqlContext.Default); + 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("groupId"u8)) + { + groupId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("requiredMembers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredMembers = array; + continue; + } + if (property0.NameEquals("requiredZoneNames"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredZoneNames = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MySqlFlexibleServersPrivateLinkResourceData( + id, + name, + type, + systemData, + groupId, + requiredMembers ?? new ChangeTrackingList(), + requiredZoneNames ?? new ChangeTrackingList(), + 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, AzureResourceManagerMySqlContext.Default); + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceData)} does not support writing '{options.Format}' format."); + } + } + + MySqlFlexibleServersPrivateLinkResourceData 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.cs new file mode 100644 index 000000000000..ad3b650b9b2a --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.cs @@ -0,0 +1,84 @@ +// 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.MySql.FlexibleServers +{ + /// + /// A class representing the MySqlFlexibleServersPrivateLinkResource data model. + /// A private link resource. + /// + public partial class MySqlFlexibleServersPrivateLinkResourceData : 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 MySqlFlexibleServersPrivateLinkResourceData() + { + RequiredMembers = new ChangeTrackingList(); + RequiredZoneNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource private link DNS zone name. + /// Keeps track of any properties unknown to the library. + internal MySqlFlexibleServersPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + GroupId = groupId; + RequiredMembers = requiredMembers; + RequiredZoneNames = requiredZoneNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The private link resource group id. + public string GroupId { get; } + /// The private link resource required member names. + public IReadOnlyList RequiredMembers { get; } + /// The private link resource private link DNS zone name. + public IList RequiredZoneNames { get; } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/ProviderConstants.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ProviderConstants.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/ProviderConstants.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ProviderConstants.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs index c61c0f91b077..ca2c8fabf42d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs @@ -32,11 +32,11 @@ public AdvancedThreatProtectionSettingsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,13 +46,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings/", false); - uri.AppendPath(advancedThreatProtectionName.ToString(), true); + uri.AppendPath("/advancedThreatProtectionSettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,8 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings/", false); - uri.AppendPath(advancedThreatProtectionName.ToString(), true); + uri.AppendPath("/advancedThreatProtectionSettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -74,71 +72,65 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a server's Advanced Threat Protection state. + /// Gets a list of server's Advanced Threat Protection states. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Advanced Threat Protection state. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AdvancedThreatProtectionData value = default; + AdvancedThreatProtectionListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); + value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a server's Advanced Threat Protection state. + /// Gets a list of server's Advanced Threat Protection states. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Advanced Threat Protection state. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AdvancedThreatProtectionData value = default; + AdvancedThreatProtectionListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); + value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -154,11 +146,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -172,65 +164,69 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a server's Advanced Threat Protection state. + /// Get a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Advanced Threat Protection state. - /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AdvancedThreatProtectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Updates a server's Advanced Threat Protection state. + /// Get a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Advanced Threat Protection state. - /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AdvancedThreatProtectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -336,7 +332,7 @@ public Response UpdatePut(string subscriptionId, string resourceGroupName, strin } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,16 +342,17 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings", false); + uri.AppendPath("/advancedThreatProtectionSettings/", false); + uri.AppendPath(advancedThreatProtectionName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -364,67 +361,70 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings", false); + uri.AppendPath("/advancedThreatProtectionSettings/", false); + uri.AppendPath(advancedThreatProtectionName.ToString(), true); 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets a list of server's Advanced Threat Protection states. + /// Updates a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Advanced Threat Protection state. + /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - AdvancedThreatProtectionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets a list of server's Advanced Threat Protection states. + /// Updates a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Advanced Threat Protection state. + /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - AdvancedThreatProtectionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AzureADAdministratorsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AzureADAdministratorsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AzureADAdministratorsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AzureADAdministratorsRestOperations.cs index 627a28895f7b..b8db22ee6b19 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AzureADAdministratorsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AzureADAdministratorsRestOperations.cs @@ -32,11 +32,11 @@ public AzureADAdministratorsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,17 +46,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators/", false); - uri.AppendPath(administratorName.ToString(), true); + uri.AppendPath("/administrators", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -65,78 +64,73 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators/", false); - uri.AppendPath(administratorName.ToString(), true); + uri.AppendPath("/administrators", 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(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates or updates an existing Azure Active Directory administrator. + /// List all the AAD administrators in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Azure AD Administrator. - /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerAadAdministratorListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Creates or updates an existing Azure Active Directory administrator. + /// List all the AAD administrators in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Azure AD Administrator. - /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerAadAdministratorListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -152,11 +146,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -174,7 +168,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes an Azure AD Administrator. + /// Gets information about an azure ad administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -182,26 +176,31 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerAadAdministratorData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Deletes an Azure AD Administrator. + /// Gets information about an azure ad administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -209,26 +208,31 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerAadAdministratorData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -244,11 +248,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -262,75 +266,73 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about an azure ad administrator. + /// Creates or updates an existing Azure Active Directory administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Azure AD Administrator. + /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerAadAdministratorData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about an azure ad administrator. + /// Creates or updates an existing Azure Active Directory administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Azure AD Administrator. + /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerAadAdministratorData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -340,16 +342,17 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators", false); + uri.AppendPath("/administrators/", false); + uri.AppendPath(administratorName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -358,7 +361,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators", false); + uri.AppendPath("/administrators/", false); + uri.AppendPath(administratorName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -366,59 +370,55 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// List all the AAD administrators in a given server. + /// Deletes an Azure AD Administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Azure AD Administrator. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerAadAdministratorListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all the AAD administrators in a given server. + /// Deletes an Azure AD Administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Azure AD Administrator. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerAadAdministratorListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupAndExportRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupAndExportRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupAndExportRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupAndExportRestOperations.cs index 37c17bc6be09..07938a897ca3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupAndExportRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupAndExportRestOperations.cs @@ -32,7 +32,7 @@ public BackupAndExportRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupsRestOperations.cs index a2863fb9c10b..72fcde2bf98f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupsRestOperations.cs @@ -32,11 +32,11 @@ public BackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,17 +46,16 @@ internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backups", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -65,8 +64,7 @@ internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backups", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -74,30 +72,28 @@ internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGrou return message; } - /// Create backup for a given server with specified backup name. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> PutAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupData value = default; + MySqlFlexibleServerBackupListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); + value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -105,30 +101,28 @@ public async Task> PutAsync(string subsc } } - /// Create backup for a given server with specified backup name. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Put(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupData value = default; + MySqlFlexibleServerBackupListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); + value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -240,7 +234,7 @@ public Response Get(string subscriptionId, string } } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,16 +244,17 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups", false); + uri.AppendPath("/backups/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -268,7 +263,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups", false); + uri.AppendPath("/backups/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -276,28 +272,30 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// List all the backups for a given server. + /// Create backup for a given server with specified backup name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> PutAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupListResult value = default; + MySqlFlexibleServerBackupData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); + value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -305,28 +303,30 @@ public async Task> ListByServerAsy } } - /// List all the backups for a given server. + /// Create backup for a given server with specified backup name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Put(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupListResult value = default; + MySqlFlexibleServerBackupData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); + value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs similarity index 96% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs index b4075c3fbfb9..b6e46df0d4f5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs @@ -32,7 +32,7 @@ public CheckNameAvailabilityRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateExecuteRequest(string subscriptionId, AzureLocation l /// Check the availability of name for server. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -103,7 +103,7 @@ public async Task> ExecuteAs /// Check the availability of name for server. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs similarity index 96% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs index fb407ec4ac6a..9fb73f0ef59b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs @@ -32,7 +32,7 @@ public CheckNameAvailabilityWithoutLocationRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -70,7 +70,7 @@ internal HttpMessage CreateExecuteRequest(string subscriptionId, MySqlFlexibleSe /// Check the availability of name for server. /// The ID of the target subscription. The value must be an UUID. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -97,7 +97,7 @@ public async Task> ExecuteAs /// Check the availability of name for server. /// The ID of the target subscription. The value must be an UUID. - /// The required parameters for checking if server name is available. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs index fe775437dd57..d1e9573a2632 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs @@ -32,7 +32,7 @@ public CheckVirtualNetworkSubnetUsageRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateExecuteRequest(string subscriptionId, AzureLocation l /// Get virtual network subnet usage for a given vNet resource id. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. - /// The required parameters for creating or updating a server. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -103,7 +103,7 @@ public async Task> /// Get virtual network subnet usage for a given vNet resource id. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. - /// The required parameters for creating or updating a server. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ConfigurationsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ConfigurationsRestOperations.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ConfigurationsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ConfigurationsRestOperations.cs index 9eba0cd8b9ab..e42b31d058b6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ConfigurationsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ConfigurationsRestOperations.cs @@ -32,11 +32,11 @@ public ConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,17 +46,32 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations/", false); - uri.AppendPath(configurationName, true); + uri.AppendPath("/configurations", false); uri.AppendQuery("api-version", _apiVersion, true); + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (keyword != null) + { + uri.AppendQuery("keyword", keyword, true); + } + if (page != null) + { + uri.AppendQuery("page", page.Value, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -65,78 +80,97 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations/", false); - uri.AppendPath(configurationName, true); + uri.AppendPath("/configurations", false); uri.AppendQuery("api-version", _apiVersion, true); + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (keyword != null) + { + uri.AppendQuery("keyword", keyword, true); + } + if (page != null) + { + uri.AppendQuery("page", page.Value, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a configuration of a server. + /// List all the configurations in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server configuration. - /// The required parameters for updating a server configuration. + /// The tags of the server configuration. + /// The keyword of the server configuration. + /// The page of the server configuration. + /// The pageSize of the server configuration. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerConfigurations value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Updates a configuration of a server. + /// List all the configurations in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server configuration. - /// The required parameters for updating a server configuration. + /// The tags of the server configuration. + /// The keyword of the server configuration. + /// The page of the server configuration. + /// The pageSize of the server configuration. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerConfigurations value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -152,11 +186,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -170,73 +204,77 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG 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(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a configuration of a server. + /// Gets information about a configuration of server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server configuration. - /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Updates a configuration of a server. + /// Gets information about a configuration of server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server configuration. - /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -252,11 +290,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -270,77 +308,73 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about a configuration of server. + /// Updates a configuration of a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server configuration. + /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerConfigurationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about a configuration of server. + /// Updates a configuration of a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server configuration. + /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerConfigurationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateBatchUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,16 +384,17 @@ internal RequestUriBuilder CreateBatchUpdateRequestUri(string subscriptionId, st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/updateConfigurations", false); + uri.AppendPath("/configurations/", false); + uri.AppendPath(configurationName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateBatchUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,34 +403,37 @@ internal HttpMessage CreateBatchUpdateRequest(string subscriptionId, string reso uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/updateConfigurations", false); + uri.AppendPath("/configurations/", false); + uri.AppendPath(configurationName, true); 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(mySqlFlexibleServerConfigurationListForBatchUpdate, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; } - /// Update a list of configurations in a given server. + /// Updates a configuration of a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The parameters for updating a list of server configuration. + /// The name of the server configuration. + /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task BatchUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateBatchUpdateRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -407,22 +445,24 @@ public async Task BatchUpdateAsync(string subscriptionId, string resou } } - /// Update a list of configurations in a given server. + /// Updates a configuration of a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The parameters for updating a list of server configuration. + /// The name of the server configuration. + /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response BatchUpdate(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateBatchUpdateRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -434,7 +474,7 @@ public Response BatchUpdate(string subscriptionId, string resourceGroupName, str } } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) + internal RequestUriBuilder CreateBatchUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,32 +484,16 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations", false); + uri.AppendPath("/updateConfigurations", false); uri.AppendQuery("api-version", _apiVersion, true); - if (tags != null) - { - uri.AppendQuery("tags", tags, true); - } - if (keyword != null) - { - uri.AppendQuery("keyword", keyword, true); - } - if (page != null) - { - uri.AppendQuery("page", page.Value, true); - } - if (pageSize != null) - { - uri.AppendQuery("pageSize", pageSize.Value, true); - } return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) + internal HttpMessage CreateBatchUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -478,91 +502,67 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations", false); + uri.AppendPath("/updateConfigurations", false); uri.AppendQuery("api-version", _apiVersion, true); - if (tags != null) - { - uri.AppendQuery("tags", tags, true); - } - if (keyword != null) - { - uri.AppendQuery("keyword", keyword, true); - } - if (page != null) - { - uri.AppendQuery("page", page.Value, true); - } - if (pageSize != null) - { - uri.AppendQuery("pageSize", pageSize.Value, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(mySqlFlexibleServerConfigurationListForBatchUpdate, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// List all the configurations in a given server. + /// Update a list of configurations in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The tags of the server configuration. - /// The keyword of the server configuration. - /// The page of the server configuration. - /// The pageSize of the server configuration. + /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) + public async Task BatchUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); + using var message = CreateBatchUpdateRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerConfigurationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerConfigurationListResult.DeserializeMySqlFlexibleServerConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all the configurations in a given server. + /// Update a list of configurations in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The tags of the server configuration. - /// The keyword of the server configuration. - /// The page of the server configuration. - /// The pageSize of the server configuration. + /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) + public Response BatchUpdate(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); + using var message = CreateBatchUpdateRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerConfigurationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerConfigurationListResult.DeserializeMySqlFlexibleServerConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -602,7 +602,7 @@ internal HttpMessage CreateListByServerNextPageRequest(string nextLink, string s /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) + public async Task> ListByServerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -615,9 +615,9 @@ public async Task> ListBySe { case 200: { - MySqlFlexibleServerConfigurationListResult value = default; + MySqlFlexibleServerConfigurations value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerConfigurationListResult.DeserializeMySqlFlexibleServerConfigurationListResult(document.RootElement); + value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -637,7 +637,7 @@ public async Task> ListBySe /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByServerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) + public Response ListByServerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -650,9 +650,9 @@ public Response ListByServerNextPage { case 200: { - MySqlFlexibleServerConfigurationListResult value = default; + MySqlFlexibleServerConfigurations value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerConfigurationListResult.DeserializeMySqlFlexibleServerConfigurationListResult(document.RootElement); + value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/DatabasesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/DatabasesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/DatabasesRestOperations.cs index 35c4f6f2acce..64423060834e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/DatabasesRestOperations.cs @@ -32,11 +32,11 @@ public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,17 +46,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); + uri.AppendPath("/databases", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -65,80 +64,73 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); + uri.AppendPath("/databases", 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(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates a new database or updates an existing database. + /// List all the databases in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the database. - /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Creates a new database or updates an existing database. + /// List all the databases in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the database. - /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -154,11 +146,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -176,7 +168,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes a database. + /// Gets information about a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -184,27 +176,32 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerDatabaseData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Deletes a database. + /// Gets information about a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -212,27 +209,32 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerDatabaseData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -248,11 +250,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -266,77 +268,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about a database. + /// Creates a new database or updates an existing database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the database. + /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerDatabaseData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about a database. + /// Creates a new database or updates an existing database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the database. + /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerDatabaseData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,16 +346,17 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases", false); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -364,7 +365,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases", false); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -372,59 +374,57 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// List all the databases in a given server. + /// Deletes a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the database. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerDatabaseListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all the databases in a given server. + /// Deletes a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the database. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerDatabaseListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/FirewallRulesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/FirewallRulesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/FirewallRulesRestOperations.cs index e9ecb920d1d8..82fe146fc644 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -32,11 +32,11 @@ public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,17 +46,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules/", false); - uri.AppendPath(firewallRuleName, true); + uri.AppendPath("/firewallRules", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -65,80 +64,73 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules/", false); - uri.AppendPath(firewallRuleName, true); + uri.AppendPath("/firewallRules", 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(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates a new firewall rule or updates an existing firewall rule. + /// List all the firewall rules in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server firewall rule. - /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerFirewallRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Creates a new firewall rule or updates an existing firewall rule. + /// List all the firewall rules in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server firewall rule. - /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerFirewallRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -154,11 +146,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -176,7 +168,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes a firewall rule. + /// Gets information about a server firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -184,27 +176,32 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerFirewallRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Deletes a firewall rule. + /// Gets information about a server firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -212,27 +209,32 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerFirewallRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -248,11 +250,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -266,77 +268,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about a server firewall rule. + /// Creates a new firewall rule or updates an existing firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server firewall rule. + /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerFirewallRuleData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about a server firewall rule. + /// Creates a new firewall rule or updates an existing firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server firewall rule. + /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerFirewallRuleData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,16 +346,17 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules", false); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -364,7 +365,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules", false); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -372,59 +374,57 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// List all the firewall rules in a given server. + /// Deletes a firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the server firewall rule. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerFirewallRuleListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all the firewall rules in a given server. + /// Deletes a firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the server firewall rule. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerFirewallRuleListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs index 4c54f0f0dcbf..d87b4986d00d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs @@ -32,7 +32,7 @@ public GetPrivateDnsZoneSuffixRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs index ed5aba0407d7..9bb1981167aa 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs @@ -32,7 +32,7 @@ public LocationBasedCapabilitiesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs index 804b715c38a4..ab2a86da7e25 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs @@ -32,7 +32,7 @@ public LocationBasedCapabilitySetRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LogFilesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LogFilesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LogFilesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LogFilesRestOperations.cs index 15ba2e987300..4c36bb838a53 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LogFilesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LogFilesRestOperations.cs @@ -32,7 +32,7 @@ public LogFilesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupRestOperations.cs index 91264145e332..f619ba5c0b6e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupRestOperations.cs @@ -30,7 +30,7 @@ public LongRunningBackupRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupsRestOperations.cs index 27aa2787543f..098f93e69a4d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupsRestOperations.cs @@ -32,11 +32,11 @@ public LongRunningBackupsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,13 +46,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backupsV2", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,8 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backupsV2", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -74,73 +72,65 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get backup for a given server. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupV2Data value = default; + ServerBackupV2ListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); + value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get backup for a given server. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupV2Data value = default; + ServerBackupV2ListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); + value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -150,12 +140,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2", false); + uri.AppendPath("/backupsV2/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -168,7 +159,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2", false); + uri.AppendPath("/backupsV2/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -176,59 +168,67 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List all the backups for a given server. + /// Get backup for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServerBackupV2ListResult value = default; + MySqlFlexibleServerBackupV2Data value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); + value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all the backups for a given server. + /// Get backup for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServerBackupV2ListResult value = default; + MySqlFlexibleServerBackupV2Data value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); + value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/MaintenancesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/MaintenancesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/MaintenancesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/MaintenancesRestOperations.cs index c9b17effbd30..0dbda9b857d5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/MaintenancesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/MaintenancesRestOperations.cs @@ -32,11 +32,11 @@ public MaintenancesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateReadRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,13 +46,12 @@ internal RequestUriBuilder CreateReadRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances/", false); - uri.AppendPath(maintenanceName, true); + uri.AppendPath("/maintenances", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateReadRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,8 +64,7 @@ internal HttpMessage CreateReadRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances/", false); - uri.AppendPath(maintenanceName, true); + uri.AppendPath("/maintenances", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -74,73 +72,65 @@ internal HttpMessage CreateReadRequest(string subscriptionId, string resourceGro return message; } - /// Read maintenance. + /// List maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the maintenance. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ReadAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerMaintenanceData value = default; + MaintenanceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); + value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Read maintenance. + /// List maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the maintenance. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Read(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerMaintenanceData value = default; + MaintenanceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); + value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) + internal RequestUriBuilder CreateReadRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -156,11 +146,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) + internal HttpMessage CreateReadRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -174,73 +164,77 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update maintenances. + /// Read maintenance. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the maintenance. - /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) + public async Task> ReadAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); + using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerMaintenanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Update maintenances. + /// Read maintenance. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the maintenance. - /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) + public Response Read(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); + using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerMaintenanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,16 +244,17 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances", false); + uri.AppendPath("/maintenances/", false); + uri.AppendPath(maintenanceName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -268,67 +263,72 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances", false); + uri.AppendPath("/maintenances/", false); + uri.AppendPath(maintenanceName, true); 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// List maintenances. + /// Update maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the maintenance. + /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MaintenanceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List maintenances. + /// Update maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the maintenance. + /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MaintenanceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs new file mode 100644 index 000000000000..70e2351bc356 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MySql.FlexibleServers.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal partial class PrivateEndpointConnectionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-12-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + { + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all private endpoint connections on a server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServersPrivateEndpointConnectionListResult.DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all private endpoint connections on a server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServersPrivateEndpointConnectionListResult.DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + { + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a private endpoint connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateEndpointConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServersPrivateEndpointConnectionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a private endpoint connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateEndpointConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServersPrivateEndpointConnectionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data) + { + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Approve or reject a private endpoint connection with a given name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Approve or reject a private endpoint connection with a given name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + { + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a private endpoint connection with a given name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a private endpoint connection with a given name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs new file mode 100644 index 000000000000..bf4d2e73ee76 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MySql.FlexibleServers.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + internal partial class PrivateLinkResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PrivateLinkResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-12-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + { + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the private link resources for MySQL server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateLinkResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServersPrivateLinkResourceListResult.DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the private link resources for MySQL server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateLinkResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServersPrivateLinkResourceListResult.DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string groupName) + { + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(groupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string groupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + 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.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(groupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a private link resource for MySQL server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private link resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, groupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateLinkResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServersPrivateLinkResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a private link resource for MySQL server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The name of the private link resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string groupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, groupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServersPrivateLinkResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServersPrivateLinkResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ReplicasRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ReplicasRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ReplicasRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ReplicasRestOperations.cs index 8dd9c9121285..7df5acb63a3a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ReplicasRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ReplicasRestOperations.cs @@ -32,7 +32,7 @@ public ReplicasRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersMigrationRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersMigrationRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersMigrationRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersMigrationRestOperations.cs index bb57de9f3d38..3cd791a716d8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersMigrationRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersMigrationRestOperations.cs @@ -30,7 +30,7 @@ public ServersMigrationRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersRestOperations.cs similarity index 92% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersRestOperations.cs index f41788097e4d..0bc3996a5a83 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersRestOperations.cs @@ -32,11 +32,89 @@ public ServersRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; + _apiVersion = apiVersion ?? "2024-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the servers in a given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the servers in a given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,93 +122,85 @@ internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; 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.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", 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(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates a new server or updates an existing server. The update action will overwrite the existing server. + /// List all the servers in a given resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The required parameters for creating or updating a server. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, serverName, data); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Creates a new server or updates an existing server. The update action will overwrite the existing server. + /// List all the servers in a given resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The required parameters for creating or updating a server. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, serverName, data); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - case 202: - return message.Response; + { + MySqlFlexibleServerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -144,11 +214,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -160,69 +230,73 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. + /// Gets information about a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for updating a server. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, patch); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerData.DeserializeMySqlFlexibleServerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. + /// Gets information about a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for updating a server. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, patch); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerData.DeserializeMySqlFlexibleServerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MySqlFlexibleServerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -236,11 +310,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -252,63 +326,71 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a server. + /// Creates a new server or updates an existing server. The update action will overwrite the existing server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The required parameters for creating or updating a server. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, serverName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: + case 201: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a server. + /// Creates a new server or updates an existing server. The update action will overwrite the existing server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The required parameters for creating or updating a server. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, serverName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: + case 201: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -322,11 +404,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -338,73 +420,69 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about a server. + /// Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The required parameters for updating a server. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerData.DeserializeMySqlFlexibleServerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about a server. + /// Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The required parameters for updating a server. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerData.DeserializeMySqlFlexibleServerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -412,23 +490,25 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; 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.DBforMySQL/flexibleServers", false); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -436,133 +516,147 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str return message; } - /// List all the servers in a given resource group. + /// Deletes a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the server. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all the servers in a given resource group. + /// Deletes a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the server. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal RequestUriBuilder CreateDetachVNetRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/detachVNet", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateDetachVNetRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/detachVNet", 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; } - /// List all the servers in a given subscription. + /// Detach VNet on a server. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DetachVNetAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateDetachVNetRequest(subscriptionId, resourceGroupName, serverName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all the servers in a given subscription. + /// Detach VNet on a server. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DetachVNet(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateDetachVNetRequest(subscriptionId, resourceGroupName, serverName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -654,7 +748,7 @@ public Response Failover(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateValidateEstimateHighAvailabilityRequestUri(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) + internal RequestUriBuilder CreateResetGtidRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -664,12 +758,12 @@ internal RequestUriBuilder CreateValidateEstimateHighAvailabilityRequestUri(stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/validateEstimateHighAvailability", false); + uri.AppendPath("/resetGtid", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateValidateEstimateHighAvailabilityRequest(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) + internal HttpMessage CreateResetGtidRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -682,75 +776,67 @@ internal HttpMessage CreateValidateEstimateHighAvailabilityRequest(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/validateEstimateHighAvailability", false); + uri.AppendPath("/resetGtid", 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(highAvailabilityValidationEstimation, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Validate a deployment of high availability. + /// Resets GTID on a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for validation of high availability deployment. + /// The required parameters for resetting GTID on a server. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ValidateEstimateHighAvailabilityAsync(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + public async Task ResetGtidAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); + using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - HighAvailabilityValidationEstimation value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Validate a deployment of high availability. + /// Resets GTID on a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for validation of high availability deployment. + /// The required parameters for resetting GTID on a server. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ValidateEstimateHighAvailability(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + public Response ResetGtid(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); + using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - HighAvailabilityValidationEstimation value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -1022,7 +1108,7 @@ public Response Stop(string subscriptionId, string resourceGroupName, string ser } } - internal RequestUriBuilder CreateResetGtidRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) + internal RequestUriBuilder CreateValidateEstimateHighAvailabilityRequestUri(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1032,12 +1118,12 @@ internal RequestUriBuilder CreateResetGtidRequestUri(string subscriptionId, stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/resetGtid", false); + uri.AppendPath("/validateEstimateHighAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResetGtidRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) + internal HttpMessage CreateValidateEstimateHighAvailabilityRequest(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1050,73 +1136,81 @@ internal HttpMessage CreateResetGtidRequest(string subscriptionId, string resour uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/resetGtid", false); + uri.AppendPath("/validateEstimateHighAvailability", 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; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(highAvailabilityValidationEstimation, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Resets GTID on a server. + /// Validate a deployment of high availability. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for resetting GTID on a server. + /// The required parameters for validation of high availability deployment. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ResetGtidAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + public async Task> ValidateEstimateHighAvailabilityAsync(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); - using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); + using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + HighAvailabilityValidationEstimation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Resets GTID on a server. + /// Validate a deployment of high availability. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for resetting GTID on a server. + /// The required parameters for validation of high availability deployment. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ResetGtid(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + public Response ValidateEstimateHighAvailability(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); - using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); + using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + HighAvailabilityValidationEstimation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1124,7 +1218,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1138,20 +1232,18 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// List all the servers in a given resource group. + /// List all the servers in a given subscription. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1167,20 +1259,18 @@ public async Task> ListByResourceGroupNe } } - /// List all the servers in a given resource group. + /// List all the servers in a given subscription. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1196,7 +1286,7 @@ public Response ListByResourceGroupNextPage(strin } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1204,7 +1294,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1218,18 +1308,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List all the servers in a given subscription. + /// List all the servers in a given resource group. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1245,18 +1337,20 @@ public async Task> ListNextPageAsync(str } } - /// List all the servers in a given subscription. + /// List all the servers in a given resource group. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/ArmMySqlModelFactory.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ArmMySqlModelFactory.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/ArmMySqlModelFactory.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ArmMySqlModelFactory.cs index 7ab91be4271d..bee62d6c7fdb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/ArmMySqlModelFactory.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ArmMySqlModelFactory.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -731,4 +729,4 @@ public static MySqlServerPropertiesForReplica MySqlServerPropertiesForReplica(My sourceServerId); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlArmClient.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlArmClient.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlArmClient.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlArmClient.cs index 5d6f4aa4f531..0939305c501f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlArmClient.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlArmClient.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using Azure.Core; @@ -214,4 +212,4 @@ public virtual MySqlServerKeyResource GetMySqlServerKeyResource(ResourceIdentifi return new MySqlServerKeyResource(Client, id); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlResourceGroupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlResourceGroupResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlResourceGroupResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlResourceGroupResource.cs index f7b04ea0e523..13b2888f559e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlResourceGroupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlResourceGroupResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -102,4 +100,4 @@ public virtual Response GetMySqlServer(string serverName, C return GetMySqlServers().Get(serverName, cancellationToken); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlSubscriptionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlSubscriptionResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlSubscriptionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlSubscriptionResource.cs index a5aae7fba7c2..273c8c08a4c1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MockableMySqlSubscriptionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlSubscriptionResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -236,4 +234,4 @@ public virtual Response CheckMySqlNameAvailability( } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MySqlExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MySqlExtensions.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MySqlExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MySqlExtensions.cs index b9729caf5fa8..f84a2c2320d7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Extensions/MySqlExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MySqlExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -613,4 +611,4 @@ public static Response CheckMySqlNameAvailability(t return GetMockableMySqlSubscriptionResource(subscriptionResource).CheckMySqlNameAvailability(content, cancellationToken); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Argument.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Argument.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Argument.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Argument.cs index a9d3f5a252b3..fc606755b152 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Argument.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Argument.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -126,4 +124,4 @@ public static void AssertNull(T value, string name, string message = null) } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingDictionary.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ChangeTrackingDictionary.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingDictionary.cs index 6bdea3272ac8..ce475cf33dbd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ChangeTrackingDictionary.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingDictionary.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -164,4 +162,4 @@ public IDictionary EnsureDictionary() return _innerDictionary ??= new Dictionary(); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ChangeTrackingList.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingList.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ChangeTrackingList.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingList.cs index bac0f4860637..8483c004b362 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ChangeTrackingList.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingList.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -150,4 +148,4 @@ public IList EnsureList() return _innerList ??= new List(); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ModelSerializationExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ModelSerializationExtensions.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ModelSerializationExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ModelSerializationExtensions.cs index 9e4215f0cf70..a49e047a2918 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/ModelSerializationExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ModelSerializationExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -406,4 +404,4 @@ public static byte[] FromBase64UrlString(string value) }; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Optional.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Optional.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Optional.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Optional.cs index 28b628345c51..c82b8f4d6944 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Optional.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Optional.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.Collections.Generic; @@ -48,4 +46,4 @@ public static bool IsDefined(string value) return value != null; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Utf8JsonRequestContent.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Utf8JsonRequestContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Utf8JsonRequestContent.cs index 57021a365aed..5b2053b25328 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Internal/Utf8JsonRequestContent.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Utf8JsonRequestContent.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.IO; @@ -52,4 +50,4 @@ public override void Dispose() _stream.Dispose(); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlArmOperation.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperation.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlArmOperation.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperation.cs index 90e63014ec43..549ed89690f6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlArmOperation.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperation.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -93,4 +91,4 @@ private string GetOperationId(RehydrationToken? rehydrationToken) /// public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlArmOperationOfT.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperationOfT.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlArmOperationOfT.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperationOfT.cs index b3525d05c199..6f5599085acf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlArmOperationOfT.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperationOfT.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -99,4 +97,4 @@ private string GetOperationId(RehydrationToken? rehydrationToken) /// public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlConfigurationOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlConfigurationOperationSource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlConfigurationOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlConfigurationOperationSource.cs index 698aef00b946..619d283ebd66 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlConfigurationOperationSource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlConfigurationOperationSource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource - #nullable disable using System.Text.Json; @@ -27,4 +25,4 @@ async ValueTask IOperationSource.Creat return MySqlConfigurations.DeserializeMySqlConfigurations(document.RootElement); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlDatabaseOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlDatabaseOperationSource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlDatabaseOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlDatabaseOperationSource.cs index ca52a71774e2..3f447c40e596 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlDatabaseOperationSource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlDatabaseOperationSource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource.C return await Task.FromResult(new MySqlDatabaseResource(_client, data)).ConfigureAwait(false); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlFirewallRuleOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlFirewallRuleOperationSource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlFirewallRuleOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlFirewallRuleOperationSource.cs index 5c018e5de817..bacc846caf0c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlFirewallRuleOperationSource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlFirewallRuleOperationSource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource return await Task.FromResult(new MySqlServerKeyResource(_client, data)).ConfigureAwait(false); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlServerOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerOperationSource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlServerOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerOperationSource.cs index 29caa607800a..5d01d105de52 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlServerOperationSource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerOperationSource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource.Creat return await Task.FromResult(new MySqlServerResource(_client, data)).ConfigureAwait(false); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs index e959eb987f23..ce22ef63c55a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource - #nullable disable using System.ClientModel.Primitives; @@ -33,4 +31,4 @@ async ValueTask IOperationSource - #nullable disable using System.ClientModel.Primitives; @@ -96,4 +94,4 @@ namespace Azure.ResourceManager.MySql public partial class AzureResourceManagerMySqlContext : ModelReaderWriterContext { } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdministratorType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdministratorType.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdministratorType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdministratorType.cs index 74742f227d22..e3017484c3a7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdministratorType.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdministratorType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public MySqlAdministratorType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.Serialization.cs index eaa99155db40..68aa526cc5a5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlAdvisorListResult IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.cs index e9afd2cabfc9..60c418287801 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlAdvisorListResult(IReadOnlyList value, string ne /// Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.Serialization.cs index eda4ff4a7e2c..950c34e046cd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -140,4 +138,4 @@ MySqlConfigurations IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.cs index 5eb74cdabcd9..12e2d9c708b7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlConfigurations(IList values, IDictionary The list of server configurations. public IList Values { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlCreateMode.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlCreateMode.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlCreateMode.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlCreateMode.cs index 6e48650c5770..d2b11a404856 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlCreateMode.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlCreateMode.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -54,4 +52,4 @@ public MySqlCreateMode(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.Serialization.cs index aaf03501d07f..327990102676 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -140,4 +138,4 @@ MySqlDatabaseListResult IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.cs index 7a0e4c47da14..9d740609acb5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlDatabaseListResult(IReadOnlyList value, IDictio /// The list of databases housed in a server. public IReadOnlyList Value { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.Serialization.cs index a02476734245..828c1c759f0e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -140,4 +138,4 @@ MySqlFirewallRuleListResult IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.cs index 7ab85a136901..9f8987a41a6f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlFirewallRuleListResult(IReadOnlyList value, /// The list of firewall rules in a server. public IReadOnlyList Value { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlGeoRedundantBackup.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlGeoRedundantBackup.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlGeoRedundantBackup.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlGeoRedundantBackup.cs index cbd5273e73b4..99e0d24067ed 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlGeoRedundantBackup.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlGeoRedundantBackup.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -48,4 +46,4 @@ public MySqlGeoRedundantBackup(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlInfrastructureEncryption.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlInfrastructureEncryption.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlInfrastructureEncryption.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlInfrastructureEncryption.cs index addcb06e7a7e..d251d78949e9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlInfrastructureEncryption.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlInfrastructureEncryption.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -48,4 +46,4 @@ public MySqlInfrastructureEncryption(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.Serialization.cs index 37daa9338b01..d7b29283d394 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -227,4 +225,4 @@ MySqlLogFile IPersistableModel.Create(BinaryData data, ModelReader string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.cs index 00b6bfb95a35..e5cde8e903fb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -84,4 +82,4 @@ internal MySqlLogFile(ResourceIdentifier id, string name, ResourceType resourceT /// The url to download the log file from. public Uri Uri { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.Serialization.cs index 3684f288f62a..3260ca673f92 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -140,4 +138,4 @@ MySqlLogFileListResult IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.cs index ea3f7ea4e899..b615b11be59b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlLogFileListResult(IReadOnlyList value, IDictionary The list of log files. public IReadOnlyList Value { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlMinimalTlsVersionEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlMinimalTlsVersionEnum.cs index 29676dec1d39..be615cb779ac 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlMinimalTlsVersionEnum.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlMinimalTlsVersionEnum.cs @@ -3,21 +3,52 @@ #nullable disable -using Azure.Core; +using System; +using System.ComponentModel; namespace Azure.ResourceManager.MySql.Models { - [CodeGenModel("MySqlMinimalTlsVersionEnum")] - public readonly partial struct MySqlMinimalTlsVersionEnum + /// Enforce a minimal Tls version for the server. + public readonly partial struct MySqlMinimalTlsVersionEnum : IEquatable { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MySqlMinimalTlsVersionEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Tls1_0Value = "TLS1_0"; + private const string Tls1_1Value = "TLS1_1"; + private const string Tls1_2Value = "TLS1_2"; + private const string TLSEnforcementDisabledValue = "TLSEnforcementDisabled"; /// TLS1_0. - [CodeGenMember("TLS10")] public static MySqlMinimalTlsVersionEnum Tls1_0 { get; } = new MySqlMinimalTlsVersionEnum(Tls1_0Value); /// TLS1_1. - [CodeGenMember("TLS11")] public static MySqlMinimalTlsVersionEnum Tls1_1 { get; } = new MySqlMinimalTlsVersionEnum(Tls1_1Value); /// TLS1_2. - [CodeGenMember("TLS12")] public static MySqlMinimalTlsVersionEnum Tls1_2 { get; } = new MySqlMinimalTlsVersionEnum(Tls1_2Value); + /// TLSEnforcementDisabled. + public static MySqlMinimalTlsVersionEnum TLSEnforcementDisabled { get; } = new MySqlMinimalTlsVersionEnum(TLSEnforcementDisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MySqlMinimalTlsVersionEnum left, MySqlMinimalTlsVersionEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MySqlMinimalTlsVersionEnum left, MySqlMinimalTlsVersionEnum right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MySqlMinimalTlsVersionEnum(string value) => new MySqlMinimalTlsVersionEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MySqlMinimalTlsVersionEnum other && Equals(other); + /// + public bool Equals(MySqlMinimalTlsVersionEnum 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/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.Serialization.cs index 5b4f8d5d407f..9742aac91711 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -138,4 +136,4 @@ MySqlNameAvailabilityContent IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.cs index 18b2b6b1b803..3743fac1a5a2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -77,4 +75,4 @@ internal MySqlNameAvailabilityContent() /// Resource type used for verification. public ResourceType? ResourceType { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.Serialization.cs index 60c65b12b18f..d927eaa94c99 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -152,4 +150,4 @@ MySqlNameAvailabilityResult IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.cs index bf4fbfc650bd..62045aecd934 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -70,4 +68,4 @@ internal MySqlNameAvailabilityResult(string message, bool? isNameAvailable, stri /// Reason for name being unavailable. public string Reason { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.Serialization.cs index 1d5dc2f64e94..f9bdb0940126 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -250,4 +248,4 @@ MySqlPerformanceTier IPersistableModel.Create(BinaryData d string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.cs index 9f9c84ce1250..1431a53d0d14 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -91,4 +89,4 @@ internal MySqlPerformanceTier(string id, int? maxBackupRetentionDays, int? minBa /// Service level objectives associated with the performance tier. public IReadOnlyList ServiceLevelObjectives { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.Serialization.cs index 3e300aa813ec..be85ad79c3a0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -140,4 +138,4 @@ MySqlPerformanceTierListResult IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.cs index d16a7b58114d..48a19b636bb7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlPerformanceTierListResult(IReadOnlyList valu /// The list of performance tiers. public IReadOnlyList Value { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs index 7e0df12ed5d0..a08ce68f6e01 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -232,4 +230,4 @@ MySqlPerformanceTierServiceLevelObjectives IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.cs index 0132267e14ac..9001c8e30c52 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -90,4 +88,4 @@ internal MySqlPerformanceTierServiceLevelObjectives(string id, string edition, i /// Max storage allowed for a server. public int? MinStorageInMB { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs index f6c25fdee91c..efd7bbfa3a52 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlPrivateEndpointConnectionListResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.cs index 313a208ab599..c77aea4b9d2f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlPrivateEndpointConnectionListResult(IReadOnlyList Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs index 61a1176c8570..5178d3a51f0e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -141,4 +139,4 @@ MySqlPrivateEndpointConnectionPatch IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.cs index f7f7cd33ce6d..82b534ec734f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlPrivateEndpointConnectionPatch(IDictionary tags, I /// Resource tags. public IDictionary Tags { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointProvisioningState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointProvisioningState.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointProvisioningState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointProvisioningState.cs index eb45ec22cca7..e66ecb34f329 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointProvisioningState.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointProvisioningState.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -57,4 +55,4 @@ public MySqlPrivateEndpointProvisioningState(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.Serialization.cs index 5a078bc140ea..4c82b3d643c0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlPrivateLinkResourceListResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.cs index e456fd964dc4..2be0fe8baa9e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlPrivateLinkResourceListResult(IReadOnlyList Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.Serialization.cs index c5ad34e11614..7ebb8170e3b7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlPrivateLinkResourceProperties IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.cs index 8177c7f3a0e0..28a205e71f87 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlPrivateLinkResourceProperties(string groupId, IReadOnlyList The private link resource required member names. public IReadOnlyList RequiredMembers { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs index 83d1cee5e6b4..0b3c88a98f71 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -142,4 +140,4 @@ MySqlPrivateLinkServiceConnectionStateProperty IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs index 7596f9821e53..341fe4943973 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -83,4 +81,4 @@ internal MySqlPrivateLinkServiceConnectionStateProperty() /// The actions required for private link service connection. public string ActionsRequired { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs index b33d3664865b..55e7a54c9614 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public MySqlPrivateLinkServiceConnectionStateRequiredAction(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs index 27bf2404d40a..6e8f17ff698b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -54,4 +52,4 @@ public MySqlPrivateLinkServiceConnectionStateStatus(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPublicNetworkAccessEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPublicNetworkAccessEnum.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPublicNetworkAccessEnum.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPublicNetworkAccessEnum.cs index d275abd68859..0687ee1c79ee 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPublicNetworkAccessEnum.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPublicNetworkAccessEnum.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -48,4 +46,4 @@ public MySqlPublicNetworkAccessEnum(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs index bcc7ac43fe5d..2d6e4c3227c1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -141,4 +139,4 @@ MySqlQueryPerformanceInsightResetDataResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.cs index 14ea6762feb2..9082b8222c64 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -66,4 +64,4 @@ internal MySqlQueryPerformanceInsightResetDataResult(MySqlQueryPerformanceInsigh /// operation message. public string Message { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResultState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResultState.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResultState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResultState.cs index ecbdc5afb278..80de3d5c4338 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResultState.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResultState.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -48,4 +46,4 @@ public MySqlQueryPerformanceInsightResetDataResultState(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.Serialization.cs index 9ae47aa39b82..74a968de8d2a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlQueryTextListResult IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.cs index 67a0687bae38..73a54f7632d0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlQueryTextListResult(IReadOnlyList value, strin /// Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.Serialization.cs index d3b83045f236..67a56d3bde59 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlRecommendationActionListResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.cs index 138be0fc6ae2..eb1f9661ac0e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlRecommendationActionListResult(IReadOnlyList Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.Serialization.cs index 139f4c7c4cc6..12c91db6f6ad 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -231,4 +229,4 @@ MySqlRecoverableServerResourceData IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.cs index 86b4698a72a4..1b7ce770fd28 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -88,4 +86,4 @@ internal MySqlRecoverableServerResourceData(ResourceIdentifier id, string name, /// The MySQL version. public string Version { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSecurityAlertPolicyName.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSecurityAlertPolicyName.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSecurityAlertPolicyName.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSecurityAlertPolicyName.cs index 3041fdf0c041..679cc16727e8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSecurityAlertPolicyName.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSecurityAlertPolicyName.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public MySqlSecurityAlertPolicyName(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.Serialization.cs index fdc03be7fe40..105106e23caa 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -140,4 +138,4 @@ MySqlServerAdministratorListResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.cs index 28b3ef651568..fcf25bb57c8d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlServerAdministratorListResult(IReadOnlyList The list of server Active Directory Administrators for the server. public IReadOnlyList Value { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.Serialization.cs index 48102e97a469..a1f64689c41f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -195,4 +193,4 @@ MySqlServerCreateOrUpdateContent IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.cs index f684061803a7..bcd9ed23d9ee 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -105,4 +103,4 @@ internal MySqlServerCreateOrUpdateContent() /// Application-specific metadata in the form of key-value pairs. public IDictionary Tags { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.Serialization.cs index fad7fa416de6..29a145e26a94 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlServerKeyListResult IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.cs index 00a63a81388a..b446a3f4187a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlServerKeyListResult(IReadOnlyList value, strin /// Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyType.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyType.cs index b7710a0fe266..2c79d9650d33 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyType.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public MySqlServerKeyType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.Serialization.cs index 42d7d50ebdcf..f406e220fcd4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -140,4 +138,4 @@ MySqlServerListResult IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.cs index d1a153524075..31f66374de3c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -63,4 +61,4 @@ internal MySqlServerListResult(IReadOnlyList value, IDictionary /// The list of servers. public IReadOnlyList Value { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.Serialization.cs index f41246ab65da..76b7d951992b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -296,4 +294,4 @@ MySqlServerPatch IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.cs index 31f1e925e432..14e656c3cde1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -100,4 +98,4 @@ internal MySqlServerPatch(ManagedServiceIdentity identity, MySqlSku sku, IDictio /// The replication role of the server. public string ReplicationRole { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.Serialization.cs index 319336c3c1a1..7f8f485e8268 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -145,4 +143,4 @@ MySqlServerPrivateEndpointConnection IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.cs index b54f3533d54d..d5267d6f5e8c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlServerPrivateEndpointConnection(ResourceIdentifier id, MySqlServer /// Private endpoint connection properties. public MySqlServerPrivateEndpointConnectionProperties Properties { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs index 72bd94487526..eabeecb64571 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -162,4 +160,4 @@ MySqlServerPrivateEndpointConnectionProperties IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.cs index 9ecd800d4765..2d320500d987 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -78,4 +76,4 @@ public ResourceIdentifier PrivateEndpointId /// State of the private endpoint connection. public MySqlPrivateEndpointProvisioningState? ProvisioningState { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs index e49edd925d13..c8e750a516f1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -146,4 +144,4 @@ MySqlServerPrivateLinkServiceConnectionStateProperty IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs index c9e0fa254dea..4baa7db24325 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -82,4 +80,4 @@ internal MySqlServerPrivateLinkServiceConnectionStateProperty() /// The actions required for private link service connection. public MySqlPrivateLinkServiceConnectionStateRequiredAction? ActionsRequired { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.Serialization.cs index 1b8d16ac0bc5..d58eae57cd42 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -147,4 +145,4 @@ MySqlServerPropertiesForCreate IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.cs index 84fbb9e22a83..32b7446c9b26 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -90,4 +88,4 @@ internal MySqlServerPropertiesForCreate(MySqlServerVersion? version, MySqlSslEnf /// The mode to create a new server. internal MySqlCreateMode CreateMode { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs index 356816e30890..06eed448a290 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -193,4 +191,4 @@ MySqlServerPropertiesForDefaultCreate IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.cs index 4556c3c84eef..bcc6c0a4c46c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -55,4 +53,4 @@ internal MySqlServerPropertiesForDefaultCreate() /// The password of the administrator login. public string AdministratorLoginPassword { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs index 3b297f2af9bf..28186c78f485 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -184,4 +182,4 @@ MySqlServerPropertiesForGeoRestore IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.cs index f1e6061f2b6b..d9da82808c0f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -49,4 +47,4 @@ internal MySqlServerPropertiesForGeoRestore() /// The source server id to restore from. public ResourceIdentifier SourceServerId { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.Serialization.cs index e324916279f9..4c83d3d7a99e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -184,4 +182,4 @@ MySqlServerPropertiesForReplica IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.cs index 333614c5f59b..0c0994497a53 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -49,4 +47,4 @@ internal MySqlServerPropertiesForReplica() /// The master server id to create replica from. public ResourceIdentifier SourceServerId { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.Serialization.cs index efaeb0509628..02305bee64a0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -193,4 +191,4 @@ MySqlServerPropertiesForRestore IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.cs index b3a68dc95631..f845bfa009cd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -55,4 +53,4 @@ internal MySqlServerPropertiesForRestore() /// Restore point creation time (ISO8601 format), specifying the time to restore from. public DateTimeOffset RestorePointInTime { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs index b4ea784e711c..8cefd4929113 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlServerSecurityAlertPolicyListResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.cs index bfd00f8ea578..b7e2abeb1b9f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlServerSecurityAlertPolicyListResult(IReadOnlyList Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs index e65ca80a2a8a..1966b34b7932 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -25,4 +23,4 @@ public static MySqlServerSecurityAlertPolicyState ToMySqlServerSecurityAlertPoli throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MySqlServerSecurityAlertPolicyState value."); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.cs index 8bfa14fb4a1b..95743c8da221 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyState.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable namespace Azure.ResourceManager.MySql.Models @@ -15,4 +13,4 @@ public enum MySqlServerSecurityAlertPolicyState /// Disabled. Disabled } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerState.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerState.cs index d02b874c2e42..414883ef54c1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerState.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerState.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -54,4 +52,4 @@ public MySqlServerState(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.Serialization.cs index c48cf52a18d2..9d88ca927ef2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -141,4 +139,4 @@ MySqlServerUpgradeContent IPersistableModel.Create(Bi string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.cs index 48425131b0ee..49e41583dd07 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -62,4 +60,4 @@ internal MySqlServerUpgradeContent(string targetServerVersion, IDictionary Represents an server storage profile. public string TargetServerVersion { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerVersion.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerVersion.cs index 21890a5b4575..160fa888dc39 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerVersion.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerVersion.cs @@ -1,27 +1,51 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; using System.ComponentModel; -using Azure.Core; namespace Azure.ResourceManager.MySql.Models { /// The version of a server. public readonly partial struct MySqlServerVersion : IEquatable { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MySqlServerVersion(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Ver5_6Value = "5.6"; + private const string Ver5_7Value = "5.7"; + private const string Ver8_0Value = "8.0"; /// 5.6. - [CodeGenMember("FivePointSix")] public static MySqlServerVersion Ver5_6 { get; } = new MySqlServerVersion(Ver5_6Value); /// 5.7. - [CodeGenMember("FivePointSeven")] public static MySqlServerVersion Ver5_7 { get; } = new MySqlServerVersion(Ver5_7Value); /// 8.0. - [CodeGenMember("EightPointZero")] public static MySqlServerVersion Ver8_0 { get; } = new MySqlServerVersion(Ver8_0Value); + /// Determines if two values are the same. + public static bool operator ==(MySqlServerVersion left, MySqlServerVersion right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MySqlServerVersion left, MySqlServerVersion right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MySqlServerVersion(string value) => new MySqlServerVersion(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MySqlServerVersion other && Equals(other); + /// + public bool Equals(MySqlServerVersion 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/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.Serialization.cs index 9dcd446c6ed9..89093a8991ce 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -181,4 +179,4 @@ MySqlSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOp string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.cs index 6e55e2b2a327..67354bd1726c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -88,4 +86,4 @@ internal MySqlSku() /// The family of hardware. public string Family { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSkuTier.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSkuTier.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSkuTier.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSkuTier.cs index 0299db3b2f27..22d8a929cbba 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSkuTier.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSkuTier.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -51,4 +49,4 @@ public MySqlSkuTier(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSslEnforcementEnum.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.Serialization.cs similarity index 97% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSslEnforcementEnum.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.Serialization.cs index b4187e7d208c..da1e890aca5d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSslEnforcementEnum.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -25,4 +23,4 @@ public static MySqlSslEnforcementEnum ToMySqlSslEnforcementEnum(this string valu throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MySqlSslEnforcementEnum value."); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSslEnforcementEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSslEnforcementEnum.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.cs index 5cfa387dce12..ca411260872a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSslEnforcementEnum.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable namespace Azure.ResourceManager.MySql.Models @@ -15,4 +13,4 @@ public enum MySqlSslEnforcementEnum /// Disabled. Disabled } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageAutogrow.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageAutogrow.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageAutogrow.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageAutogrow.cs index 6eb71cca6b3f..45217714bdb9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageAutogrow.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageAutogrow.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -48,4 +46,4 @@ public MySqlStorageAutogrow(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.Serialization.cs index 826d5c5e975b..034a42f579aa 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -175,4 +173,4 @@ MySqlStorageProfile IPersistableModel.Create(BinaryData dat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.cs index aa6dbd0e5389..905ba2467d38 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -74,4 +72,4 @@ internal MySqlStorageProfile(int? backupRetentionDays, MySqlGeoRedundantBackup? /// Enable Storage Auto Grow. public MySqlStorageAutogrow? StorageAutogrow { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.Serialization.cs index d90055fb226d..802d5be2ffdf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -185,4 +183,4 @@ MySqlTopQueryStatisticsInput IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.cs index fc8250822fea..66ea70ffeaa5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -104,4 +102,4 @@ internal MySqlTopQueryStatisticsInput() /// Aggregation interval type in ISO 8601 format. public string AggregationWindow { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.Serialization.cs index a1d04fcd3308..ee841d17b15a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlTopQueryStatisticsListResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.cs index fa10a4be19cc..e33566845ea5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlTopQueryStatisticsListResult(IReadOnlyList Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs index 9508c8f77103..caac6c8cbb86 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlVirtualNetworkRuleListResult IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.cs index 8c5ada751223..ed12d64f8c0a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlVirtualNetworkRuleListResult(IReadOnlyList Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleState.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleState.cs index f97740200f36..3de414fba1bc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleState.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleState.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -57,4 +55,4 @@ public MySqlVirtualNetworkRuleState(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.Serialization.cs index 3abfecda9539..2d441389c364 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -154,4 +152,4 @@ MySqlWaitStatisticsInput IPersistableModel.Create(Bina string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.cs index 908b0b5e5805..6608d84a5584 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -84,4 +82,4 @@ internal MySqlWaitStatisticsInput() /// Aggregation interval type in ISO 8601 format. public string AggregationWindow { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.Serialization.cs index 63256f34b7cb..55ff28896e44 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -151,4 +149,4 @@ MySqlWaitStatisticsListResult IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.cs index 9e5157d73655..348a7ea4de48 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -67,4 +65,4 @@ internal MySqlWaitStatisticsListResult(IReadOnlyList val /// Link to retrieve next page of results. public string NextLink { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.Serialization.cs index 2fd4b6cbebdf..7e08d05df31e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -175,4 +173,4 @@ MySqlServerPropertiesForCreate IPersistableModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.cs index ab4631710827..e180a770d19d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -32,4 +30,4 @@ internal UnknownServerPropertiesForCreate() { } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorCollection.cs index 4084ed1644f7..ddeb1a46cf55 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -392,4 +390,4 @@ IAsyncEnumerator IAsyncEnumerable.Ge return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.Serialization.cs index ced649205140..3cab4d0881ba 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -159,4 +157,4 @@ MySqlAdvisorData IPersistableModel.Create(BinaryData data, Mod string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.cs index 707f114152de..4c6a5325523e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -100,4 +98,4 @@ internal MySqlAdvisorData(ResourceIdentifier id, string name, ResourceType resou /// public BinaryData Properties { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.Serialization.cs index 34ad3da2b84f..8bc9d92f60e3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlAdvisorResource : IJsonModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.cs index 0008e69e751d..556c68d340b4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -325,4 +323,4 @@ public virtual ArmOperation CreateRecommendedActionSession(WaitUntil waitUntil, } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationCollection.cs index 0ce2b7b29df9..c1ae65f493b1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -488,4 +486,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -223,4 +221,4 @@ MySqlConfigurationData IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationData.cs index d86ccbd6b5e7..153b247bb9f5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -91,4 +89,4 @@ internal MySqlConfigurationData(ResourceIdentifier id, string name, ResourceType /// Source of the configuration. public string Source { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.Serialization.cs index 20803d3b2400..9f3676cf625d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlConfigurationResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.cs index 0bdc2e1eade0..fc1f880d074d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -260,4 +258,4 @@ public virtual ArmOperation Update(WaitUntil waitUnt } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseCollection.cs index 1f9c31f51b70..78645f81b87c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -488,4 +486,4 @@ IAsyncEnumerator IAsyncEnumerable. return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.Serialization.cs index 976126dfcfb5..eabf0c24b2e3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -175,4 +173,4 @@ MySqlDatabaseData IPersistableModel.Create(BinaryData data, M string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.cs index 6fe6540f887d..aa5676de728e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -75,4 +73,4 @@ internal MySqlDatabaseData(ResourceIdentifier id, string name, ResourceType reso /// The collation of the database. public string Collation { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.Serialization.cs index 1005cd4b77b3..f4c627dff884 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlDatabaseResource : IJsonModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.cs index 5719be086f9f..b3c42e4f2b38 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -344,4 +342,4 @@ public virtual ArmOperation Update(WaitUntil waitUntil, M } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleCollection.cs index 6f55d0aa3f4c..4d8f0f4da689 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -488,4 +486,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -170,4 +168,4 @@ MySqlFirewallRuleData IPersistableModel.Create(BinaryData string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleData.cs index b9da228cb4f3..7c87bd06346f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -89,4 +87,4 @@ internal MySqlFirewallRuleData() /// The end IP address of the server firewall rule. Must be IPv4 format. public IPAddress EndIPAddress { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.Serialization.cs index f374c7b7fee9..097cb0a7b010 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlFirewallRuleResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.cs index 26ae25924296..3814eb3c5d2f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -344,4 +342,4 @@ public virtual ArmOperation Update(WaitUntil waitUnti } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionCollection.cs index 8e27101f6a68..76e62e3668f7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -490,4 +488,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -197,4 +195,4 @@ MySqlPrivateEndpointConnectionData IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionData.cs index 1c67002f12f3..5e60c8c9bd60 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -93,4 +91,4 @@ public ResourceIdentifier PrivateEndpointId /// State of the private endpoint connection. public string ProvisioningState { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.Serialization.cs index 3095969c9541..b62210a26065 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlPrivateEndpointConnectionResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.cs index c925bb500336..313db2acefe5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -345,4 +343,4 @@ public virtual ArmOperation Update(WaitU } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.Serialization.cs index 7fadf6770ec1..843fd5ee0df7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlPrivateLinkResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.cs index 19feb3881b1d..ef232fe78433 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -168,4 +166,4 @@ public virtual Response Get(CancellationToken cancella } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceCollection.cs index 0c3a8782c5ce..3d8a8c4b3e39 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -392,4 +390,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -153,4 +151,4 @@ MySqlPrivateLinkResourceData IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceData.cs index 2b097f983288..fda389fdcdaf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -72,4 +70,4 @@ internal MySqlPrivateLinkResourceData(ResourceIdentifier id, string name, Resour /// The private link resource group id. public MySqlPrivateLinkResourceProperties Properties { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticCollection.cs index 08ca41d1915a..7f540306ed93 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -384,4 +382,4 @@ public virtual NullableResponse GetIfExists(string } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.Serialization.cs index 9561e9d3f716..d4b2ba5566f4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -301,4 +299,4 @@ MySqlQueryStatisticData IPersistableModel.Create(Binary string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.cs index 896a2982b954..48154e5c448e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -108,4 +106,4 @@ internal MySqlQueryStatisticData(ResourceIdentifier id, string name, ResourceTyp /// Metric value unit. public string MetricValueUnit { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.Serialization.cs index 102f51e235a5..71367274b1f5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlQueryStatisticResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.cs index 2441d310294c..d83976dcfa87 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -168,4 +166,4 @@ public virtual Response Get(CancellationToken cance } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextCollection.cs index e6d6e86de531..961073337fe1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -384,4 +382,4 @@ public virtual NullableResponse GetIfExists(string query } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.Serialization.cs index 00480b563ddc..f1e0db6ed1d8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -175,4 +173,4 @@ MySqlQueryTextData IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.cs index b4543723b140..21bea9309dec 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -75,4 +73,4 @@ internal MySqlQueryTextData(ResourceIdentifier id, string name, ResourceType res /// Query text. public string QueryText { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.Serialization.cs index d715aaa6cc0b..7f4dd61b1f00 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlQueryTextResource : IJsonModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.cs index a80b2cb2e306..5bc1cefe605d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -168,4 +166,4 @@ public virtual Response Get(CancellationToken cancellati } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionCollection.cs index 9ac5146bf922..2d0a88334952 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -394,4 +392,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -278,4 +276,4 @@ MySqlRecommendationActionData IPersistableModel.C string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionData.cs index fce95cc4759e..5954f28b769c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -100,4 +98,4 @@ internal MySqlRecommendationActionData(ResourceIdentifier id, string name, Resou /// Recommendation action details. public IDictionary Details { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.Serialization.cs index 03c20752e857..0209a077033f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlRecommendationActionResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.cs index 8eea54b308f4..3314e4ad413e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -169,4 +167,4 @@ public virtual Response Get(CancellationToken } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.Serialization.cs index 04221861c193..9404da0edc1c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -212,4 +210,4 @@ MySqlServerAdministratorData IPersistableModel.Cre string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.cs index 42dd0532001d..c5d470adaab5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -84,4 +82,4 @@ internal MySqlServerAdministratorData(ResourceIdentifier id, string name, Resour /// The server Active Directory Administrator tenant id. public Guid? TenantId { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.Serialization.cs index ca6aa5c9f898..42c9b70358d5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlServerAdministratorResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.cs index 3c4f7976c42c..fb29629b7776 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -343,4 +341,4 @@ public virtual ArmOperation CreateOrUpdate(Wai } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerCollection.cs index dd7c5cc32393..de50cb71c865 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -554,4 +552,4 @@ IAsyncEnumerator IAsyncEnumerable.GetA return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.Serialization.cs similarity index 66% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.Serialization.cs index acfdd178513a..c79f1e59acff 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.Serialization.cs @@ -16,6 +16,146 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlServerData : 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(MySqlServerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, options); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(AdministratorLogin)) + { + writer.WritePropertyName("administratorLogin"u8); + writer.WriteStringValue(AdministratorLogin); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version.Value.ToString()); + } + if (Optional.IsDefined(SslEnforcement)) + { + writer.WritePropertyName("sslEnforcement"u8); + writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); + } + if (Optional.IsDefined(MinimalTlsVersion)) + { + writer.WritePropertyName("minimalTlsVersion"u8); + writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ByokEnforcement)) + { + writer.WritePropertyName("byokEnforcement"u8); + writer.WriteStringValue(ByokEnforcement); + } + if (Optional.IsDefined(InfrastructureEncryption)) + { + writer.WritePropertyName("infrastructureEncryption"u8); + writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); + } + if (Optional.IsDefined(UserVisibleState)) + { + writer.WritePropertyName("userVisibleState"u8); + writer.WriteStringValue(UserVisibleState.Value.ToString()); + } + if (Optional.IsDefined(FullyQualifiedDomainName)) + { + writer.WritePropertyName("fullyQualifiedDomainName"u8); + writer.WriteStringValue(FullyQualifiedDomainName); + } + if (Optional.IsDefined(EarliestRestoreOn)) + { + writer.WritePropertyName("earliestRestoreDate"u8); + writer.WriteStringValue(EarliestRestoreOn.Value, "O"); + } + if (Optional.IsDefined(StorageProfile)) + { + writer.WritePropertyName("storageProfile"u8); + writer.WriteObjectValue(StorageProfile, options); + } + if (Optional.IsDefined(ReplicationRole)) + { + writer.WritePropertyName("replicationRole"u8); + writer.WriteStringValue(ReplicationRole); + } + if (Optional.IsDefined(MasterServerId)) + { + writer.WritePropertyName("masterServerId"u8); + writer.WriteStringValue(MasterServerId); + } + if (Optional.IsDefined(ReplicaCapacity)) + { + writer.WritePropertyName("replicaCapacity"u8); + writer.WriteNumberValue(ReplicaCapacity.Value); + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + writer.WritePropertyName("privateEndpointConnections"u8); + writer.WriteStartArray(); + foreach (var item in PrivateEndpointConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + MySqlServerData 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(MySqlServerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMySqlServerData(document.RootElement, options); + } + + 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, AzureResourceManagerMySqlContext.Default); + default: + throw new FormatException($"The model {nameof(MySqlServerData)} does not support writing '{options.Format}' format."); + } + } + internal static MySqlServerData DeserializeMySqlServerData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= new ModelReaderWriterOptions("W"); @@ -299,5 +439,23 @@ internal static MySqlServerData DeserializeMySqlServerData(JsonElement element, privateEndpointConnections ?? new ChangeTrackingList(), serializedAdditionalRawData); } + + MySqlServerData 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, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMySqlServerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MySqlServerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.cs index 6fbf6ead5c07..b354794357dd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -145,4 +143,4 @@ internal MySqlServerData() /// List of private endpoint connections on a server. public IReadOnlyList PrivateEndpointConnections { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyCollection.cs index 38b03fd82550..557267b5b0a8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -490,4 +488,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -212,4 +210,4 @@ MySqlServerKeyData IPersistableModel.Create(BinaryData data, string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyData.cs index 25940da0be8b..6bd59c410b9c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -84,4 +82,4 @@ internal MySqlServerKeyData(ResourceIdentifier id, string name, ResourceType res /// The key creation date. public DateTimeOffset? CreatedOn { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.Serialization.cs index 848d2de5152e..729f3321c46b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlServerKeyResource : IJsonModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.cs index 54431cfc68b1..703f99faa18c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -344,4 +342,4 @@ public virtual ArmOperation Update(WaitUntil waitUntil, } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.Serialization.cs index e367265eb3f9..b0f54c3a1e39 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlServerResource : IJsonModel string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.cs index 3bd4051b22d9..06e2a3314010 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -2200,4 +2198,4 @@ public virtual Response RemoveTag(string key, CancellationT } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyCollection.cs index b75d010eb8ca..a24487199682 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -463,4 +461,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -276,4 +274,4 @@ MySqlServerSecurityAlertPolicyData IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyData.cs index ddaff315f12c..7c7577cf85ea 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -98,4 +96,4 @@ internal MySqlServerSecurityAlertPolicyData(ResourceIdentifier id, string name, /// Specifies the number of days to keep in the Threat Detection audit logs. public int? RetentionDays { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.Serialization.cs index 5df1a04dca64..16958700e63e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlServerSecurityAlertPolicyResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.cs index e68db889c9aa..9207d49940f0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -261,4 +259,4 @@ public virtual ArmOperation Update(WaitU } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleCollection.cs index a5f4876ba6ff..d35c86af2620 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -490,4 +488,4 @@ IAsyncEnumerator IAsyncEnumerable - #nullable disable using System; @@ -200,4 +198,4 @@ MySqlVirtualNetworkRuleData IPersistableModel.Creat string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleData.cs index c343b96f581e..d719f792a63a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -80,4 +78,4 @@ internal MySqlVirtualNetworkRuleData(ResourceIdentifier id, string name, Resourc /// Virtual Network Rule State. public MySqlVirtualNetworkRuleState? State { get; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.Serialization.cs index 5ef508256e9a..8ac16f37744a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlVirtualNetworkRuleResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.cs index 10faa9ede7a8..27ea4ded83a7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -344,4 +342,4 @@ public virtual ArmOperation Update(WaitUntil wa } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticCollection.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticCollection.cs index f74d70b2b7b4..10c9dd36b6ce 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -384,4 +382,4 @@ public virtual NullableResponse GetIfExists(string w } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.Serialization.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.Serialization.cs index 7b4dfeb6f5e6..1162e2c9ae48 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -283,4 +281,4 @@ MySqlWaitStatisticData IPersistableModel.Create(BinaryDa string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.cs index dba5ebd38a3a..fa9bb373b9c0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -103,4 +101,4 @@ internal MySqlWaitStatisticData(ResourceIdentifier id, string name, ResourceType /// Total time of wait in milliseconds in this time interval. public double? TotalTimeInMinutes { get; set; } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.Serialization.cs similarity index 98% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.Serialization.cs index a7dc83724b5b..822b806c9d6f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -26,4 +24,4 @@ public partial class MySqlWaitStatisticResource : IJsonModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.cs index d967fad88d8c..392669d2182c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -168,4 +166,4 @@ public virtual Response Get(CancellationToken cancel } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/ProviderConstants.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ProviderConstants.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/ProviderConstants.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ProviderConstants.cs index 0d7065ca2ff4..b900a522f7a1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/ProviderConstants.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ProviderConstants.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using Azure.Core.Pipeline; @@ -13,4 +11,4 @@ internal static class ProviderConstants { public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/AdvisorsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/AdvisorsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/AdvisorsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/AdvisorsRestOperations.cs index ec2ec216668f..03a6c4a15b9e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/AdvisorsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/AdvisorsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -318,4 +316,4 @@ public Response ListByServerNextPage(string nextLink, st } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/CheckNameAvailabilityRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/CheckNameAvailabilityRestOperations.cs index 47d0793d810c..6db75592da83 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/CheckNameAvailabilityRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -122,4 +120,4 @@ public Response Execute(string subscriptionId, MySq } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ConfigurationsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ConfigurationsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ConfigurationsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ConfigurationsRestOperations.cs index b72a146f160b..390279f74de4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ConfigurationsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ConfigurationsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -334,4 +332,4 @@ public Response ListByServer(string subscriptionId, string } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/DatabasesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/DatabasesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/DatabasesRestOperations.cs index 3488b985b71a..996c360d104a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/DatabasesRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -430,4 +428,4 @@ public Response ListByServer(string subscriptionId, str } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/FirewallRulesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/FirewallRulesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/FirewallRulesRestOperations.cs index 7da009be17dc..bcd2f0ac4786 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/FirewallRulesRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -430,4 +428,4 @@ public Response ListByServer(string subscriptionId, } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/LocationBasedPerformanceTierRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LocationBasedPerformanceTierRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/LocationBasedPerformanceTierRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LocationBasedPerformanceTierRestOperations.cs index 292d2357388e..0c94c0af2123 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/LocationBasedPerformanceTierRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LocationBasedPerformanceTierRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -120,4 +118,4 @@ public Response List(string subscriptionId, Azur } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/LogFilesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LogFilesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/LogFilesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LogFilesRestOperations.cs index 39e871f72441..8ee8d5738584 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/LogFilesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LogFilesRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -130,4 +128,4 @@ public Response ListByServer(string subscriptionId, stri } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/MySQLManagementRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySQLManagementRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/MySQLManagementRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySQLManagementRestOperations.cs index 9d15717ed110..3a32d1221496 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/MySQLManagementRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySQLManagementRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -229,4 +227,4 @@ public Response CreateRecommendedActionSession(string subscriptionId, string res } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/MySqlServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySqlServersRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/MySqlServersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySqlServersRestOperations.cs index f42e079af261..2e41baad9d82 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/MySqlServersRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySqlServersRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -301,4 +299,4 @@ public Response Upgrade(string subscriptionId, string resourceGroupName, string } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateEndpointConnectionsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 20bf69c2dfb7..a21226c03dcd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -610,4 +608,4 @@ public Response ListByServerNextPage(s } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateLinkResourcesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateLinkResourcesRestOperations.cs index d8153ed7f149..25435c347121 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -318,4 +316,4 @@ public Response ListByServerNextPage(string } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/QueryTextsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/QueryTextsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/QueryTextsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/QueryTextsRestOperations.cs index 55bb9e545d2a..5f1260eae00b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/QueryTextsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/QueryTextsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -341,4 +339,4 @@ public Response ListByServerNextPage(string nextLink, } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/RecommendedActionsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecommendedActionsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/RecommendedActionsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecommendedActionsRestOperations.cs index c5bbf80e978e..efb39703662f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/RecommendedActionsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecommendedActionsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -350,4 +348,4 @@ public Response ListByServerNextPage(string } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/RecoverableServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecoverableServersRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/RecoverableServersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecoverableServersRestOperations.cs index c232fb7dbdaa..4d407bded6e3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/RecoverableServersRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecoverableServersRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -130,4 +128,4 @@ public Response Get(string subscriptionId, s } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ReplicasRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ReplicasRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ReplicasRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ReplicasRestOperations.cs index 5d7c4394d9dc..b9ade75d2335 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ReplicasRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ReplicasRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -130,4 +128,4 @@ public Response ListByServer(string subscriptionId, strin } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerAdministratorsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerAdministratorsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerAdministratorsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerAdministratorsRestOperations.cs index f9b264ee61e8..b844d5e411d2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerAdministratorsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerAdministratorsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -410,4 +408,4 @@ public Response List(string subscriptionId, } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerBasedPerformanceTierRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerBasedPerformanceTierRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerBasedPerformanceTierRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerBasedPerformanceTierRestOperations.cs index a6628b8bc533..f292c3517d94 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerBasedPerformanceTierRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerBasedPerformanceTierRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -130,4 +128,4 @@ public Response List(string subscriptionId, stri } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerKeysRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerKeysRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerKeysRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerKeysRestOperations.cs index e55b49650fda..46dd6b8d4fe3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerKeysRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerKeysRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -512,4 +510,4 @@ public Response ListNextPage(string nextLink, string s } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerParametersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerParametersRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerParametersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerParametersRestOperations.cs index 36e3a36699b0..0d34930a48bc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerParametersRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerParametersRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -129,4 +127,4 @@ public Response ListUpdateConfigurations(string subscriptionId, string resourceG } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs index 5bfd6b4df818..cfcfb82f380d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -414,4 +412,4 @@ public Response ListByServerNextPage(s } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServersRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServersRestOperations.cs index 8b2da9b9ea36..926d71d6cc65 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServersRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -654,4 +652,4 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/TopQueryStatisticsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/TopQueryStatisticsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/TopQueryStatisticsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/TopQueryStatisticsRestOperations.cs index 435299b24543..32a5c8038c5e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/TopQueryStatisticsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/TopQueryStatisticsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -330,4 +328,4 @@ public Response ListByServerNextPage(string n } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/VirtualNetworkRulesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/VirtualNetworkRulesRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/VirtualNetworkRulesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/VirtualNetworkRulesRestOperations.cs index c759086bc37d..37e20006b4be 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/VirtualNetworkRulesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/VirtualNetworkRulesRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -513,4 +511,4 @@ public Response ListByServerNextPage(string n } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/WaitStatisticsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/WaitStatisticsRestOperations.cs similarity index 99% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/WaitStatisticsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/WaitStatisticsRestOperations.cs index 4e2846b92aec..c79300e18bfb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/RestOperations/WaitStatisticsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/WaitStatisticsRestOperations.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -330,4 +328,4 @@ public Response ListByServerNextPage(string nextL } } } -} +} \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlMinimalTlsVersionEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlMinimalTlsVersionEnum.cs deleted file mode 100644 index 2e24a532ef29..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlMinimalTlsVersionEnum.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MySql.Models -{ - /// Enforce a minimal Tls version for the server. - public readonly partial struct MySqlMinimalTlsVersionEnum : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MySqlMinimalTlsVersionEnum(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Tls1_0Value = "TLS1_0"; - private const string Tls1_1Value = "TLS1_1"; - private const string Tls1_2Value = "TLS1_2"; - private const string TLSEnforcementDisabledValue = "TLSEnforcementDisabled"; - /// TLSEnforcementDisabled. - public static MySqlMinimalTlsVersionEnum TLSEnforcementDisabled { get; } = new MySqlMinimalTlsVersionEnum(TLSEnforcementDisabledValue); - /// Determines if two values are the same. - public static bool operator ==(MySqlMinimalTlsVersionEnum left, MySqlMinimalTlsVersionEnum right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MySqlMinimalTlsVersionEnum left, MySqlMinimalTlsVersionEnum right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MySqlMinimalTlsVersionEnum(string value) => new MySqlMinimalTlsVersionEnum(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MySqlMinimalTlsVersionEnum other && Equals(other); - /// - public bool Equals(MySqlMinimalTlsVersionEnum 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/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerVersion.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerVersion.cs deleted file mode 100644 index 201f588d33dd..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerVersion.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MySql.Models -{ - /// The version of a server. - public readonly partial struct MySqlServerVersion : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MySqlServerVersion(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Ver5_6Value = "5.6"; - private const string Ver5_7Value = "5.7"; - private const string Ver8_0Value = "8.0"; - /// Determines if two values are the same. - public static bool operator ==(MySqlServerVersion left, MySqlServerVersion right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MySqlServerVersion left, MySqlServerVersion right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MySqlServerVersion(string value) => new MySqlServerVersion(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MySqlServerVersion other && Equals(other); - /// - public bool Equals(MySqlServerVersion 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/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs deleted file mode 100644 index 41ebb42cb42a..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.MySql.Models; - -namespace Azure.ResourceManager.MySql -{ - public partial class MySqlServerData : 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(MySqlServerData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - ((IJsonModel)Identity).Write(writer, options); - } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(AdministratorLogin)) - { - writer.WritePropertyName("administratorLogin"u8); - writer.WriteStringValue(AdministratorLogin); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ByokEnforcement)) - { - writer.WritePropertyName("byokEnforcement"u8); - writer.WriteStringValue(ByokEnforcement); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(UserVisibleState)) - { - writer.WritePropertyName("userVisibleState"u8); - writer.WriteStringValue(UserVisibleState.Value.ToString()); - } - if (Optional.IsDefined(FullyQualifiedDomainName)) - { - writer.WritePropertyName("fullyQualifiedDomainName"u8); - writer.WriteStringValue(FullyQualifiedDomainName); - } - if (Optional.IsDefined(EarliestRestoreOn)) - { - writer.WritePropertyName("earliestRestoreDate"u8); - writer.WriteStringValue(EarliestRestoreOn.Value, "O"); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - if (Optional.IsDefined(ReplicationRole)) - { - writer.WritePropertyName("replicationRole"u8); - writer.WriteStringValue(ReplicationRole); - } - if (Optional.IsDefined(MasterServerId)) - { - writer.WritePropertyName("masterServerId"u8); - writer.WriteStringValue(MasterServerId); - } - if (Optional.IsDefined(ReplicaCapacity)) - { - writer.WritePropertyName("replicaCapacity"u8); - writer.WriteNumberValue(ReplicaCapacity.Value); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) - { - writer.WritePropertyName("privateEndpointConnections"u8); - writer.WriteStartArray(); - foreach (var item in PrivateEndpointConnections) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - MySqlServerData 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(MySqlServerData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMySqlServerData(document.RootElement, options); - } - - 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, AzureResourceManagerMySqlContext.Default); - default: - throw new FormatException($"The model {nameof(MySqlServerData)} does not support writing '{options.Format}' format."); - } - } - - MySqlServerData 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMySqlServerData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MySqlServerData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/Extensions/FlexibleServersExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/Extensions/FlexibleServersExtensions.cs deleted file mode 100644 index 0bd12f3f4edb..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Custom/Extensions/FlexibleServersExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - [CodeGenType("MySqlFlexibleServersExtensions")] - public static partial class FlexibleServersExtensions - { - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/OperationResultsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/OperationResultsRestOperations.cs deleted file mode 100644 index 1d303d200e5c..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/OperationResultsRestOperations.cs +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MySql.FlexibleServers.Models; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - internal partial class OperationResultsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of OperationResultsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public OperationResultsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-30"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation locationName, string operationId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/locations/", false); - uri.AppendPath(locationName, true); - uri.AppendPath("/operationResults/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locationName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/locations/", false); - uri.AppendPath(locationName, true); - uri.AppendPath("/operationResults/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get the operation result for a long running operation. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the location. - /// The operation Id. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, locationName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatusExtendedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OperationStatusExtendedResult.DeserializeOperationStatusExtendedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get the operation result for a long running operation. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the location. - /// The operation Id. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, locationName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatusExtendedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OperationStatusExtendedResult.DeserializeOperationStatusExtendedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md index 33901f3feba0..887fd76edbcf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md @@ -13,182 +13,13 @@ library-name: MySql use-model-reader-writer: true batch: - - tag: package-2020-01-01 - - tag: package-flexibleserver-2024-01-01 + - tag: package-flexibleserver-2024-12-01-preview ``` -``` yaml $(tag) == 'package-2020-01-01' -namespace: Azure.ResourceManager.MySql -require: https://github.com/Azure/azure-rest-api-specs/blob/c45a7f47c1901149828eb8a33c74898c554659c0/specification/mysql/resource-manager/readme.md -output-folder: $(this-folder)/MySql/Generated -sample-gen: - output-folder: $(this-folder)/../tests/Generated - clear-output-folder: true -modelerfour: - flatten-payloads: false - lenient-model-deduplication: true - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - 'locationName': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - 'sessionId': 'uuid' - 'PrincipalId': 'uuid' - '*ServerId': 'arm-id' - '*SubnetId': 'arm-id' - '*ResourceId': 'arm-id' - 'ResourceType': 'resource-type' - '*IPAddress': 'ip-address' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - Five6: FivePointSix - Five7: FivePointSeven - Eight0: EightPointZero - -prepend-rp-prefix: - - Advisor - - Capability - - Configuration - - Database - - FirewallRule - - QueryStatistic - - QueryText - - RecommendationAction - - Server - - ServerKey - - ServerSecurityAlertPolicy - - ServerVersion - - VirtualNetworkRule - - WaitStatistic - - AdministratorType - - AdvisorResultList - - ConfigurationListContent - - CreateMode - - DatabaseListResult - - FirewallRuleListResult - - LogFile - - LogFileListResult - - MinimalTlsVersionEnum - - GeoRedundantBackup - - InfrastructureEncryption - - PerformanceTierListResult - - PerformanceTierServiceLevelObjectives - - PrivateEndpointProvisioningState - - PrivateLinkServiceConnectionStateStatus - - PublicNetworkAccessEnum - - QueryPerformanceInsightResetDataResult - - QueryPerformanceInsightResetDataResultState - - RecommendedActionSessionsOperationStatus - - StorageProfile - - ServerPropertiesForCreate - - ServerPropertiesForDefaultCreate - - ServerPropertiesForRestore - - ServerPropertiesForGeoRestore - - ServerPropertiesForReplica - - SecurityAlertPolicyName - - ServerKeyListResult - - ServerKeyType - - ServerListResult - - ServerPrivateEndpointConnection - - ServerPrivateEndpointConnectionProperties - - ServerPrivateLinkServiceConnectionStateProperty - - ServerSecurityAlertPolicyListResult - - ServerSecurityAlertPolicyState - - ServerState - - ServerUpgradeParameters - - SslEnforcementEnum - - StorageAutogrow - - TopQueryStatisticsInput - - VirtualNetworkRuleListResult - - VirtualNetworkRuleState - - WaitStatisticsInput -rename-mapping: - ServerAdministratorResource: MySqlServerAdministrator - ServerAdministratorResource.properties.login: LoginAccountName - ServerAdministratorResource.properties.sid: SecureId - ServerAdministratorResourceListResult: MySqlServerAdministratorListResult - AdvisorsResultList: MySqlAdvisorListResult - QueryTextsResultList: MySqlQueryTextListResult - TopQueryStatisticsResultList: MySqlTopQueryStatisticsListResult - RecommendationActionsResultList: MySqlRecommendationActionListResult - WaitStatisticsResultList: MySqlWaitStatisticsListResult - PrivateLinkServiceConnectionStateActionsRequire: MySqlPrivateLinkServiceConnectionStateRequiredActions - RecoverableServerResource: MySqlRecoverableServerResourceData - RecoverableServerResource.properties.vCore: VCores - ServerSecurityAlertPolicy.properties.emailAccountAdmins: SendToEmailAccountAdmins - NameAvailability.nameAvailable: IsNameAvailable - StorageProfile.storageMB: StorageInMB - WaitStatistic.properties.totalTimeInMs: TotalTimeInMinutes - PerformanceTierProperties.minStorageMB: MinStorageInMB - PerformanceTierProperties.maxStorageMB: MaxStorageInMB - PerformanceTierProperties.minLargeStorageMB: MinLargeStorageInMB - PerformanceTierProperties.maxLargeStorageMB: MaxLargeStorageInMB - PerformanceTierServiceLevelObjectives.maxStorageMB: MaxStorageInMB - PerformanceTierServiceLevelObjectives.minStorageMB: MinStorageInMB - PerformanceTierServiceLevelObjectives.vCore: VCores - NameAvailability: MySqlNameAvailabilityResult - PerformanceTierProperties: MySqlPerformanceTier - ConfigurationListResult: MySqlConfigurations - LogFile.properties.type: LogFileType - ConfigurationListResult.value: Values - NameAvailabilityRequest: MySqlNameAvailabilityContent - -override-operation-name: - ServerParameters_ListUpdateConfigurations: UpdateConfigurations - MySqlServers_Start: Start - MySqlServers_Stop: Stop - MySqlServers_Upgrade: Upgrade - CheckNameAvailability_Execute: CheckMySqlNameAvailability - -directive: - # These 2 operations read like some LRO related operations. Remove them first. - - remove-operation: LocationBasedRecommendedActionSessionsResult_List - - remove-operation: LocationBasedRecommendedActionSessionsOperationStatus_Get - - rename-operation: - from: Servers_Start - to: MySqlServers_Start - - rename-operation: - from: Servers_Stop - to: MySqlServers_Stop - - rename-operation: - from: Servers_Upgrade - to: MySqlServers_Upgrade - - from: mysql.json - where: $.definitions - transform: > - $.ServerPrivateEndpointConnection.properties.id['x-ms-format'] = 'arm-id'; - $.RecoverableServerProperties.properties.lastAvailableBackupDateTime['format'] = 'date-time'; - -``` - -``` yaml $(tag) == 'package-flexibleserver-2024-01-01' +``` yaml $(tag) == 'package-flexibleserver-2024-12-01-preview' namespace: Azure.ResourceManager.MySql.FlexibleServers -require: https://github.com/Azure/azure-rest-api-specs/blob/928047803788f7377fa003a26ba2bdc2e0fcccc0/specification/mysql/resource-manager/readme.md -output-folder: $(this-folder)/MySqlFlexibleServers/Generated +require: https://github.com/Azure/azure-rest-api-specs/blob/bb58530b93212845aeb78120d6762677c7610ef7/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/readme.md +output-folder: $(this-folder)/Generated sample-gen: output-folder: $(this-folder)/../samples/Generated clear-output-folder: false @@ -232,6 +63,9 @@ acronym-mapping: URI: Uri Etag: ETag|etag +prepend-rp-prefix: + - Capability + rename-mapping: Storage.storageSizeGB: StorageSizeInGB SkuCapability.supportedMemoryPerVCoreMB: SupportedMemoryPerVCoreInMB @@ -255,18 +89,15 @@ rename-mapping: HighAvailability: MySqlFlexibleServerHighAvailability HighAvailabilityMode: MySqlFlexibleServerHighAvailabilityMode HighAvailabilityState: MySqlFlexibleServerHighAvailabilityState - ServerProperties: MySqlFlexibleServerProperties - ServerPropertiesForUpdate: MySqlFlexibleServerPropertiesForUpdate ServerForUpdate: MySqlFlexibleServerForUpdate ServerListResult: MySqlFlexibleServerListResult ServerRestartParameter: MySqlFlexibleServerRestartParameter ServerState: MySqlFlexibleServerState ServerBackupListResult: MySqlFlexibleServerBackupListResult - FirewallRuleProperties: MySqlFlexibleServerFirewallRuleProperties FirewallRuleListResult: MySqlFlexibleServerFirewallRuleListResult DatabaseListResult: MySqlFlexibleServerDatabaseListResult ConfigurationSource: MySqlFlexibleServerConfigurationSource - ConfigurationListResult: MySqlFlexibleServerConfigurationListResult + ConfigurationListResult: MySqlFlexibleServerConfigurations ConfigurationForBatchUpdate: MySqlFlexibleServerConfigurationForBatchUpdate ConfigurationListForBatchUpdate: MySqlFlexibleServerConfigurationListForBatchUpdate VirtualNetworkSubnetUsageParameter: MySqlFlexibleServerVirtualNetworkSubnetUsageParameter @@ -311,43 +142,22 @@ rename-mapping: MaintenanceProvisioningState: MySqlFlexibleServerMaintenanceProvisioningState BackupType: MySqlFlexibleServerBackupType ProvisioningState: MySqlFlexibleServerBackupProvisioningState + Server.properties.privateEndpointConnections: ServerPrivateEndpointConnections + BatchOfMaintenance: MySqlFlexibleServerBatchOfMaintenance + FeatureProperty: MySqlFlexibleServerFeatureProperty + PatchStrategy: MySqlFlexibleServerPatchStrategy + StorageRedundancyEnum: MySqlFlexibleServerStorageRedundancyType + ServerDetachVNetParameter: MySqlFlexibleServerDetachVnetContent override-operation-name: CheckNameAvailability_Execute: CheckMySqlFlexibleServerNameAvailability CheckNameAvailabilityWithoutLocation_Execute: CheckMySqlFlexibleServerNameAvailabilityWithoutLocation Configurations_BatchUpdate: UpdateConfigurations BackupAndExport_ValidateBackup: ValidateBackup + Servers_DetachVNet: DetachVnet directive: - remove-operation: OperationProgress_Get - - from: FlexibleServers.json - where: $.definitions - transform: > - $.MySQLServerIdentity['x-ms-client-flatten'] = false; - $.MySQLServerIdentity.properties.userAssignedIdentities.additionalProperties['$ref'] = '#/definitions/UserAssignedIdentity'; - delete $.MySQLServerIdentity.properties.userAssignedIdentities.additionalProperties.items; - $.ServerProperties.properties.privateEndpointConnections.items['$ref'] = '../../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection'; - - # Add a new mode for update operation - - from: Configurations.json - where: $.definitions - transform: > - $.MySqlFlexibleServerConfigurations = { - 'type': 'object', - 'properties': { - 'values': { - 'type': 'array', - 'items': { - '$ref': '#/definitions/Configuration' - }, - 'description': 'The list of server configurations.' - } - }, - 'description': 'A list of server configurations.' - }; - - from: Configurations.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations'].post - transform: > - $.responses['200']['schema']['$ref'] = '#/definitions/MySqlFlexibleServerConfigurations'; + - remove-operation: OperationResults_Get ``` diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs index 17ea8713374e..45c90e2316e5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AdvancedThreatProtectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DisableAServerSAdvancedThreatProtectionSettingsWithAllParametersUsingPUT() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPutDisabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_UpdatePut" 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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_DisableAServerSAdvancedThreatProtectionSettings [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EnableAServerSAdvancedThreatProtectionSettingsUsingPUT() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutEnabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPutEnabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_UpdatePut" 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 CreateOrUpdate_EnableAServerSAdvancedThreatProtectionSettingsU [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_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 @@ -132,7 +132,7 @@ public async Task Get_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetListOfServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsList.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_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 @@ -168,7 +168,7 @@ public async Task GetAll_GetListOfServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_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 @@ -198,7 +198,7 @@ public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs index 23b70962a551..ca159b98415e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AdvancedThreatProtectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_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 @@ -51,7 +51,7 @@ public async Task Get_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Update_DisableAServerSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPatchDisabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_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 @@ -87,7 +87,7 @@ public async Task Update_DisableAServerSAdvancedThreatProtectionSettingsWithAllP [Ignore("Only validating compilation of examples")] public async Task Update_EnableAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchEnabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPatchEnabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs index 152b1259361a..8f246e867178 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerAadAdministratorCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorCreate.json // this example is just showing the usage of "AzureADAdministrators_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 @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_CreateAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_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 @@ -97,7 +97,7 @@ public async Task Get_GetAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAzureADAdministratorsInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorsListByServer.json // this example is just showing the usage of "AzureADAdministrators_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 @@ -133,7 +133,7 @@ public async Task GetAll_ListAzureADAdministratorsInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_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 @@ -163,7 +163,7 @@ public async Task Exists_GetAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs index 6a8187c56396..6be5430cda18 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerAadAdministratorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_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 @@ -51,7 +51,7 @@ public async Task Get_GetAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorDelete.json // this example is just showing the usage of "AzureADAdministrators_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 @@ -78,7 +78,7 @@ public async Task Delete_DeleteAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorCreate.json // this example is just showing the usage of "AzureADAdministrators_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs index 7b7cbba2f47c..5f8bdc04211c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupPut.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupPut.json // this example is just showing the usage of "Backups_Put" 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 @@ -54,7 +54,7 @@ public async Task CreateOrUpdate_CreateBackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json // this example is just showing the usage of "Backups_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 @@ -88,7 +88,7 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListBackupsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupsListByServer.json // this example is just showing the usage of "Backups_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 @@ -124,7 +124,7 @@ public async Task GetAll_ListBackupsForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json // this example is just showing the usage of "Backups_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 @@ -154,7 +154,7 @@ public async Task Exists_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json // this example is just showing the usage of "Backups_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs index 362899de933a..af67307a8ccc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json // this example is just showing the usage of "Backups_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 @@ -50,7 +50,7 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Update_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupPut.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupPut.json // this example is just showing the usage of "Backups_Put" 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/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs index bf07bdc1d411..60e62b3ccd79 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupV2Collection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackup.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackup.json // this example is just showing the usage of "LongRunningBackup_Create" 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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_CreateBackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_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 @@ -89,7 +89,7 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListBackupsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupsListByServer.json // this example is just showing the usage of "LongRunningBackups_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 @@ -125,7 +125,7 @@ public async Task GetAll_ListBackupsForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_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 @@ -155,7 +155,7 @@ public async Task Exists_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs index c7e572a2cdd8..0c471e93dc94 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupV2Resource [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_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 @@ -50,7 +50,7 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Update_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackup.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackup.json // this example is just showing the usage of "LongRunningBackup_Create" 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/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs similarity index 85% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs index 53a471cb1da7..46a6fb89a65d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_MySqlFlexibleServerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateANewServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreate.json // this example is just showing the usage of "Servers_Create" 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 @@ -55,6 +55,7 @@ public async Task CreateOrUpdate_CreateANewServer() StorageSizeInGB = 100, Iops = 600, AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, + StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.ZoneRedundancy, }, Backup = new MySqlFlexibleServerBackupProperties { @@ -86,7 +87,7 @@ public async Task CreateOrUpdate_CreateANewServer() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAReplicaServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateReplica.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateReplica.json // this example is just showing the usage of "Servers_Create" 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 @@ -125,7 +126,7 @@ public async Task CreateOrUpdate_CreateAReplicaServer() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithPointInTimeRestore.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateWithPointInTimeRestore.json // this example is just showing the usage of "Servers_Create" 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 @@ -170,7 +171,7 @@ public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAServerWithByok() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithBYOK.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateWithBYOK.json // this example is just showing the usage of "Servers_Create" 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 @@ -218,6 +219,73 @@ public async Task CreateOrUpdate_CreateAServerWithByok() StorageSizeInGB = 100, Iops = 600, AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, + StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.LocalRedundancy, + }, + Backup = new MySqlFlexibleServerBackupProperties + { + BackupRetentionDays = 7, + BackupIntervalHours = 24, + GeoRedundantBackup = MySqlFlexibleServerEnableStatusEnum.Disabled, + }, + HighAvailability = new MySqlFlexibleServerHighAvailability + { + Mode = MySqlFlexibleServerHighAvailabilityMode.ZoneRedundant, + StandbyAvailabilityZone = "3", + }, + Tags = +{ +["num"] = "1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serverName, data); + MySqlFlexibleServerResource 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 + MySqlFlexibleServerData 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_CreateAServerWithNonDefaultDatabasePort() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateWithDatabasePort.json + // this example is just showing the usage of "Servers_Create" 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 = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MySqlFlexibleServerResource + MySqlFlexibleServerCollection collection = resourceGroupResource.GetMySqlFlexibleServers(); + + // invoke the operation + string serverName = "mysqltestserver"; + MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("southeastasia")) + { + Sku = new MySqlFlexibleServerSku("Standard_D2ds_v4", MySqlFlexibleServerSkuTier.GeneralPurpose), + AdministratorLogin = "cloudsa", + AdministratorLoginPassword = "your_password", + Version = MySqlFlexibleServerVersion.Ver5_7, + AvailabilityZone = "1", + CreateMode = MySqlFlexibleServerCreateMode.Default, + DatabasePort = 8888, + Storage = new MySqlFlexibleServerStorage + { + StorageSizeInGB = 100, + Iops = 600, + AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, + StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.LocalRedundancy, }, Backup = new MySqlFlexibleServerBackupProperties { @@ -249,7 +317,7 @@ public async Task CreateOrUpdate_CreateAServerWithByok() [Ignore("Only validating compilation of examples")] public async Task Get_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 @@ -282,7 +350,7 @@ public async Task Get_GetAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_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 +383,7 @@ public async Task Get_GetAServerWithVnet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListServersInAResourceGroup() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersListByResourceGroup.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServersListByResourceGroup.json // this example is just showing the usage of "Servers_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 @@ -350,7 +418,7 @@ public async Task GetAll_ListServersInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetReplicas_ListReplicasForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ReplicasListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ReplicasListByServer.json // this example is just showing the usage of "Replicas_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 @@ -386,7 +454,7 @@ public async Task GetReplicas_ListReplicasForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 @@ -415,7 +483,7 @@ public async Task Exists_GetAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_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 @@ -444,7 +512,7 @@ public async Task Exists_GetAServerWithVnet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 @@ -485,7 +553,7 @@ public async Task GetIfExists_GetAServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs index 22e08c61add2..edcbc83d6661 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConfigurationCreateOrUpdate() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationCreateOrUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationCreateOrUpdate.json // this example is just showing the usage of "Configurations_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 @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_ConfigurationCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_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 @@ -94,7 +94,7 @@ public async Task Get_GetAConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllConfigurationsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationsListByServer.json // this example is just showing the usage of "Configurations_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 @@ -132,7 +132,7 @@ public async Task GetAll_ListAllConfigurationsForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_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 @@ -162,7 +162,7 @@ public async Task Exists_GetAConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs index 61c67450c629..38743271895f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_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 @@ -51,7 +51,7 @@ public async Task Get_GetAConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAUserConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationUpdate.json // this example is just showing the usage of "Configurations_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs index b8b97582803c..1d4370be8b92 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseCreate.json // this example is just showing the usage of "Databases_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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateADatabase() [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json // this example is just showing the usage of "Databases_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 @@ -93,7 +93,7 @@ public async Task Get_GetADatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabasesInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabasesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabasesListByServer.json // this example is just showing the usage of "Databases_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 @@ -129,7 +129,7 @@ public async Task GetAll_ListDatabasesInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json // this example is just showing the usage of "Databases_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 @@ -159,7 +159,7 @@ public async Task Exists_GetADatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json // this example is just showing the usage of "Databases_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs index 1286a4fd565a..41cf0e086c1d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json // this example is just showing the usage of "Databases_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 @@ -50,7 +50,7 @@ public async Task Get_GetADatabase() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseDelete.json // this example is just showing the usage of "Databases_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 @@ -77,7 +77,7 @@ public async Task Delete_DeleteADatabase() [Ignore("Only validating compilation of examples")] public async Task Update_CreateADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseCreate.json // this example is just showing the usage of "Databases_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs index 5ed10228414c..bf8d0c550dc4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerFirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_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 @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_CreateAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_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 @@ -90,7 +90,7 @@ public async Task Get_GetAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllFirewallRulesInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRulesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRulesListByServer.json // this example is just showing the usage of "FirewallRules_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 @@ -126,7 +126,7 @@ public async Task GetAll_ListAllFirewallRulesInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_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 @@ -156,7 +156,7 @@ public async Task Exists_GetAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs index 87af959aa49c..1d82c98f782b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerFirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_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 @@ -51,7 +51,7 @@ public async Task Get_GetAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleDelete.json // this example is just showing the usage of "FirewallRules_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 @@ -78,7 +78,7 @@ public async Task Delete_DeleteAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs index 5df2523ca2cc..89a15604f68d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerMaintenanceCollection [Ignore("Only validating compilation of examples")] public async Task Get_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" 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 @@ -53,7 +53,7 @@ public async Task Get_ReadAMaintenance() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListMaintenancesOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenancesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenancesListByServer.json // this example is just showing the usage of "Maintenances_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 @@ -89,7 +89,7 @@ public async Task GetAll_ListMaintenancesOnAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" 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 @@ -119,7 +119,7 @@ public async Task Exists_ReadAMaintenance() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" 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/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs index 7d47c1fcd699..b033fa4e7d53 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerMaintenanceResource [Ignore("Only validating compilation of examples")] public async Task Get_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" 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,7 +51,7 @@ public async Task Get_ReadAMaintenance() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateMaintenanceOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceUpdate.json // this example is just showing the usage of "Maintenances_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerResource.cs similarity index 78% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerResource.cs index 6a3b3098f990..ca75f3cc9528 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServerResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MySqlFlexibleServerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_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 @@ -51,7 +51,7 @@ public async Task Get_GetAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_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 @@ -81,7 +81,7 @@ public async Task Get_GetAServerWithVnet() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerDelete.json // this example is just showing the usage of "Servers_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 @@ -107,7 +107,7 @@ public async Task Delete_DeleteAServer() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerUpdate.json // this example is just showing the usage of "Servers_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 @@ -132,6 +132,7 @@ public async Task Update_UpdateAServer() Iops = 200, AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, AutoIoScaling = MySqlFlexibleServerEnableStatusEnum.Disabled, + StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.LocalRedundancy, }, Network = new MySqlFlexibleServerNetwork { @@ -152,7 +153,7 @@ public async Task Update_UpdateAServer() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateServerCustomerMaintenanceWindow() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json // this example is just showing the usage of "Servers_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 @@ -177,6 +178,7 @@ public async Task Update_UpdateServerCustomerMaintenanceWindow() StartHour = 8, StartMinute = 0, DayOfWeek = 1, + BatchOfMaintenance = MySqlFlexibleServerBatchOfMaintenance.Batch1, }, }; ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); @@ -191,9 +193,9 @@ public async Task Update_UpdateServerCustomerMaintenanceWindow() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateServerWithByok() + public async Task Update_UpdateServerToOptInVirtualCanary() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenancePolicyPatchOptInVirtualCanary.json // this example is just showing the usage of "Servers_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 @@ -212,21 +214,7 @@ public async Task Update_UpdateServerWithByok() // invoke the operation MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch { - Identity = new ManagedServiceIdentity("UserAssigned") - { - UserAssignedIdentities = -{ -[new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity")] = new UserAssignedIdentity() -}, - }, - DataEncryption = new MySqlFlexibleServerDataEncryption - { - PrimaryUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"), - PrimaryKeyUri = new Uri("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), - GeoBackupUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"), - GeoBackupKeyUri = new Uri("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), - EncryptionType = MySqlFlexibleServerDataEncryptionType.AzureKeyVault, - }, + MaintenancePatchStrategy = MySqlFlexibleServerPatchStrategy.VirtualCanary, }; ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); MySqlFlexibleServerResource result = lro.Value; @@ -240,10 +228,10 @@ public async Task Update_UpdateServerWithByok() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateBackupAndExport_CreateAndExportBackup() + public async Task Update_UpdateServerToOptOutVirtualCanary() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupAndExport.json - // this example is just showing the usage of "BackupAndExport_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenancePolicyPatchOptOutVirtualCanary.json + // this example is just showing the usage of "Servers_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 TokenCredential cred = new DefaultAzureCredential(); @@ -253,25 +241,32 @@ public async Task CreateBackupAndExport_CreateAndExportBackup() // this example assumes you already have this MySqlFlexibleServerResource created on azure // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - string resourceGroupName = "TestGroup"; + string resourceGroupName = "testrg"; string serverName = "mysqltestserver"; ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerBackupAndExportContent content = new MySqlFlexibleServerBackupAndExportContent(new MySqlFlexibleServerBackupSettings("customer-backup-name"), new MySqlFlexibleServerFullBackupStoreDetails(new string[] { "sasuri1", "sasuri2" })); - ArmOperation lro = await mySqlFlexibleServer.CreateBackupAndExportAsync(WaitUntil.Completed, content); - MySqlFlexibleServerBackupAndExportResult result = lro.Value; + MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch + { + MaintenancePatchStrategy = new MySqlFlexibleServerPatchStrategy("Default"), + }; + ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); + MySqlFlexibleServerResource result = lro.Value; - Console.WriteLine($"Succeeded: {result}"); + // 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 + MySqlFlexibleServerData 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 ValidateBackup_ValidateBackup() + public async Task Update_UpdateServerWithByok() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/ValidateBackup.json - // this example is just showing the usage of "BackupAndExport_ValidateBackup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerUpdateWithBYOK.json + // this example is just showing the usage of "Servers_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 TokenCredential cred = new DefaultAzureCredential(); @@ -281,23 +276,46 @@ public async Task ValidateBackup_ValidateBackup() // this example assumes you already have this MySqlFlexibleServerResource created on azure // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - string resourceGroupName = "TestGroup"; + string resourceGroupName = "testrg"; string serverName = "mysqltestserver"; ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerValidateBackupResult result = await mySqlFlexibleServer.ValidateBackupAsync(); + MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity")] = new UserAssignedIdentity() +}, + }, + DataEncryption = new MySqlFlexibleServerDataEncryption + { + PrimaryUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"), + PrimaryKeyUri = new Uri("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), + GeoBackupUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"), + GeoBackupKeyUri = new Uri("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), + EncryptionType = MySqlFlexibleServerDataEncryptionType.AzureKeyVault, + }, + }; + ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); + MySqlFlexibleServerResource result = lro.Value; - Console.WriteLine($"Succeeded: {result}"); + // 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 + MySqlFlexibleServerData 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 UpdateConfigurations_ConfigurationList() + public async Task DetachVnet_DetachVNetOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationsBatchUpdate.json - // this example is just showing the usage of "Configurations_BatchUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerDetachVNet.json + // this example is just showing the usage of "Servers_DetachVNet" 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(); @@ -307,36 +325,31 @@ public async Task UpdateConfigurations_ConfigurationList() // this example assumes you already have this MySqlFlexibleServerResource created on azure // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - string resourceGroupName = "testrg"; - string serverName = "mysqltestserver"; + string resourceGroupName = "TestGroup"; + string serverName = "testserver"; ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate = new MySqlFlexibleServerConfigurationListForBatchUpdate + MySqlFlexibleServerDetachVnetContent content = new MySqlFlexibleServerDetachVnetContent { - Values = {new MySqlFlexibleServerConfigurationForBatchUpdate -{ -Name = "event_scheduler", -Value = "OFF", -}, new MySqlFlexibleServerConfigurationForBatchUpdate -{ -Name = "div_precision_increment", -Value = "8", -}}, - ResetAllToDefault = MySqlFlexibleServerConfigurationResetAllToDefault.False, + PublicNetworkAccess = MySqlFlexibleServerEnableStatusEnum.Enabled, }; - ArmOperation lro = await mySqlFlexibleServer.UpdateConfigurationsAsync(WaitUntil.Completed, mySqlFlexibleServerConfigurationListForBatchUpdate); - MySqlFlexibleServerConfigurations result = lro.Value; + ArmOperation lro = await mySqlFlexibleServer.DetachVnetAsync(WaitUntil.Completed, content); + MySqlFlexibleServerResource result = lro.Value; - Console.WriteLine($"Succeeded: {result}"); + // 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 + MySqlFlexibleServerData 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 Failover_RestartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerFailover.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerFailover.json // this example is just showing the usage of "Servers_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 @@ -360,10 +373,10 @@ public async Task Failover_RestartAServer() [Test] [Ignore("Only validating compilation of examples")] - public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimationOfHighAvailability() + public async Task ResetGtid_ResetGTIDOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerValidateEstimateHighAvailability.json - // this example is just showing the usage of "Servers_ValidateEstimateHighAvailability" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerResetGtid.json + // this example is just showing the usage of "Servers_ResetGtid" 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(); @@ -379,20 +392,20 @@ public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimat MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - HighAvailabilityValidationEstimation highAvailabilityValidationEstimation = new HighAvailabilityValidationEstimation + MySqlFlexibleServerGtidSetContent content = new MySqlFlexibleServerGtidSetContent { - ExpectedStandbyAvailabilityZone = "1", + GtidSet = "4aff5b51-97ba-11ed-a955-002248036acc:1-16", }; - HighAvailabilityValidationEstimation result = await mySqlFlexibleServer.ValidateEstimateHighAvailabilityAsync(highAvailabilityValidationEstimation); + await mySqlFlexibleServer.ResetGtidAsync(WaitUntil.Completed, content); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] public async Task Restart_RestartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerRestart.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerRestart.json // this example is just showing the usage of "Servers_Restart" 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 @@ -423,7 +436,7 @@ public async Task Restart_RestartAServer() [Ignore("Only validating compilation of examples")] public async Task Start_StartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStart.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerStart.json // this example is just showing the usage of "Servers_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 @@ -449,7 +462,7 @@ public async Task Start_StartAServer() [Ignore("Only validating compilation of examples")] public async Task Stop_StopAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStop.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerStop.json // this example is just showing the usage of "Servers_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 @@ -473,10 +486,10 @@ public async Task Stop_StopAServer() [Test] [Ignore("Only validating compilation of examples")] - public async Task ResetGtid_ResetGTIDOnAServer() + public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimationOfHighAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerResetGtid.json - // this example is just showing the usage of "Servers_ResetGtid" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerValidateEstimateHighAvailability.json + // this example is just showing the usage of "Servers_ValidateEstimateHighAvailability" 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(); @@ -492,20 +505,114 @@ public async Task ResetGtid_ResetGTIDOnAServer() MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerGtidSetContent content = new MySqlFlexibleServerGtidSetContent + HighAvailabilityValidationEstimation highAvailabilityValidationEstimation = new HighAvailabilityValidationEstimation { - GtidSet = "4aff5b51-97ba-11ed-a955-002248036acc:1-16", + ExpectedStandbyAvailabilityZone = "1", }; - await mySqlFlexibleServer.ResetGtidAsync(WaitUntil.Completed, content); + HighAvailabilityValidationEstimation result = await mySqlFlexibleServer.ValidateEstimateHighAvailabilityAsync(highAvailabilityValidationEstimation); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateBackupAndExport_CreateAndExportBackup() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupAndExport.json + // this example is just showing the usage of "BackupAndExport_Create" 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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string serverName = "mysqltestserver"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // invoke the operation + MySqlFlexibleServerBackupAndExportContent content = new MySqlFlexibleServerBackupAndExportContent(new MySqlFlexibleServerBackupSettings("customer-backup-name"), new MySqlFlexibleServerFullBackupStoreDetails(new string[] { "sasuri1", "sasuri2" })); + ArmOperation lro = await mySqlFlexibleServer.CreateBackupAndExportAsync(WaitUntil.Completed, content); + MySqlFlexibleServerBackupAndExportResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ValidateBackup_ValidateBackup() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ValidateBackup.json + // this example is just showing the usage of "BackupAndExport_ValidateBackup" 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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string serverName = "mysqltestserver"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // invoke the operation + MySqlFlexibleServerValidateBackupResult result = await mySqlFlexibleServer.ValidateBackupAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task UpdateConfigurations_ConfigurationList() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationsBatchUpdate.json + // this example is just showing the usage of "Configurations_BatchUpdate" 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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "testrg"; + string serverName = "mysqltestserver"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // invoke the operation + MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate = new MySqlFlexibleServerConfigurationListForBatchUpdate + { + Values = {new MySqlFlexibleServerConfigurationForBatchUpdate +{ +Name = "event_scheduler", +Value = "OFF", +}, new MySqlFlexibleServerConfigurationForBatchUpdate +{ +Name = "div_precision_increment", +Value = "8", +}}, + ResetAllToDefault = MySqlFlexibleServerConfigurationResetAllToDefault.False, + }; + ArmOperation lro = await mySqlFlexibleServer.UpdateConfigurationsAsync(WaitUntil.Completed, mySqlFlexibleServerConfigurationListForBatchUpdate); + MySqlFlexibleServerConfigurations result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] public async Task CutoverMigrationServersMigration_CutoverMigrationForMySQLImport() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/CutoverMigration.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CutoverMigration.json // this example is just showing the usage of "ServersMigration_CutoverMigration" 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 @@ -536,7 +643,7 @@ public async Task CutoverMigrationServersMigration_CutoverMigrationForMySQLImpor [Ignore("Only validating compilation of examples")] public async Task GetLogFiles_ListAllServerLogFilesForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/stable/2023-12-30/examples/LogFilesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LogFilesListByServer.json // this example is just showing the usage of "LogFiles_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs similarity index 94% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs index 9f5d0561f9e1..b38ed4185045 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServersCapabilityCollection [Ignore("Only validating compilation of examples")] public async Task Get_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_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 @@ -53,7 +53,7 @@ public async Task Get_CapabilityResult() [Ignore("Only validating compilation of examples")] public async Task GetAll_CapabilitySetsResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetListByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_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 @@ -88,7 +88,7 @@ public async Task GetAll_CapabilitySetsResult() [Ignore("Only validating compilation of examples")] public async Task Exists_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_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 @@ -117,7 +117,7 @@ public async Task Exists_CapabilityResult() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs similarity index 95% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs index 843e6b24e83c..fed2ef2ff778 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServersCapabilityResource [Ignore("Only validating compilation of examples")] public async Task Get_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_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 diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection.cs new file mode 100644 index 000000000000..fc103cca4052 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MySql.FlexibleServers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Samples +{ + public partial class Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionUpdate.json + // this example is just showing the usage of "PrivateEndpointConnections_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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateEndpointConnectionResource + MySqlFlexibleServersPrivateEndpointConnectionCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "private-endpoint-connection-name"; + MySqlFlexibleServersPrivateEndpointConnectionData data = new MySqlFlexibleServersPrivateEndpointConnectionData + { + ConnectionState = new MySqlFlexibleServersPrivateLinkServiceConnectionState + { + Status = MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.Approved, + Description = "Approved by johndoe@contoso.com", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); + MySqlFlexibleServersPrivateEndpointConnectionResource 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 + MySqlFlexibleServersPrivateEndpointConnectionData 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_GetsPrivateEndpointConnection() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateEndpointConnectionResource + MySqlFlexibleServersPrivateEndpointConnectionCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "private-endpoint-connection-name"; + MySqlFlexibleServersPrivateEndpointConnectionResource result = await collection.GetAsync(privateEndpointConnectionName); + + // 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 + MySqlFlexibleServersPrivateEndpointConnectionData 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 GetAll_GetsListOfPrivateEndpointConnectionsOnAServer() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionList.json + // this example is just showing the usage of "PrivateEndpointConnections_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(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateEndpointConnectionResource + MySqlFlexibleServersPrivateEndpointConnectionCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateEndpointConnections(); + + // invoke the operation and iterate over the result + await foreach (MySqlFlexibleServersPrivateEndpointConnectionResource item in collection.GetAllAsync()) + { + // 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 + MySqlFlexibleServersPrivateEndpointConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsPrivateEndpointConnection() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateEndpointConnectionResource + MySqlFlexibleServersPrivateEndpointConnectionCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "private-endpoint-connection-name"; + bool result = await collection.ExistsAsync(privateEndpointConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsPrivateEndpointConnection() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateEndpointConnectionResource + MySqlFlexibleServersPrivateEndpointConnectionCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "private-endpoint-connection-name"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionName); + MySqlFlexibleServersPrivateEndpointConnectionResource 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 + MySqlFlexibleServersPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..03cb879aca5a --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionResource.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.MySql.FlexibleServers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Samples +{ + public partial class Sample_MySqlFlexibleServersPrivateEndpointConnectionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsPrivateEndpointConnection() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnections_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 MySqlFlexibleServersPrivateEndpointConnectionResource created on azure + // for more information of creating MySqlFlexibleServersPrivateEndpointConnectionResource, please refer to the document of MySqlFlexibleServersPrivateEndpointConnectionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + string privateEndpointConnectionName = "private-endpoint-connection-name"; + ResourceIdentifier mySqlFlexibleServersPrivateEndpointConnectionResourceId = MySqlFlexibleServersPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + MySqlFlexibleServersPrivateEndpointConnectionResource mySqlFlexibleServersPrivateEndpointConnection = client.GetMySqlFlexibleServersPrivateEndpointConnectionResource(mySqlFlexibleServersPrivateEndpointConnectionResourceId); + + // invoke the operation + MySqlFlexibleServersPrivateEndpointConnectionResource result = await mySqlFlexibleServersPrivateEndpointConnection.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 + MySqlFlexibleServersPrivateEndpointConnectionData 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 Delete_DeletesAPrivateEndpointConnectionWithAGivenName() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionDelete.json + // this example is just showing the usage of "PrivateEndpointConnections_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MySqlFlexibleServersPrivateEndpointConnectionResource created on azure + // for more information of creating MySqlFlexibleServersPrivateEndpointConnectionResource, please refer to the document of MySqlFlexibleServersPrivateEndpointConnectionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + string privateEndpointConnectionName = "private-endpoint-connection-name"; + ResourceIdentifier mySqlFlexibleServersPrivateEndpointConnectionResourceId = MySqlFlexibleServersPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + MySqlFlexibleServersPrivateEndpointConnectionResource mySqlFlexibleServersPrivateEndpointConnection = client.GetMySqlFlexibleServersPrivateEndpointConnectionResource(mySqlFlexibleServersPrivateEndpointConnectionResourceId); + + // invoke the operation + await mySqlFlexibleServersPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionUpdate.json + // this example is just showing the usage of "PrivateEndpointConnections_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 MySqlFlexibleServersPrivateEndpointConnectionResource created on azure + // for more information of creating MySqlFlexibleServersPrivateEndpointConnectionResource, please refer to the document of MySqlFlexibleServersPrivateEndpointConnectionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + string privateEndpointConnectionName = "private-endpoint-connection-name"; + ResourceIdentifier mySqlFlexibleServersPrivateEndpointConnectionResourceId = MySqlFlexibleServersPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + MySqlFlexibleServersPrivateEndpointConnectionResource mySqlFlexibleServersPrivateEndpointConnection = client.GetMySqlFlexibleServersPrivateEndpointConnectionResource(mySqlFlexibleServersPrivateEndpointConnectionResourceId); + + // invoke the operation + MySqlFlexibleServersPrivateEndpointConnectionData data = new MySqlFlexibleServersPrivateEndpointConnectionData + { + ConnectionState = new MySqlFlexibleServersPrivateLinkServiceConnectionState + { + Status = MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.Approved, + Description = "Approved by johndoe@contoso.com", + }, + }; + ArmOperation lro = await mySqlFlexibleServersPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); + MySqlFlexibleServersPrivateEndpointConnectionResource 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 + MySqlFlexibleServersPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResource.cs new file mode 100644 index 000000000000..3cecce24f6fa --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Samples +{ + public partial class Sample_MySqlFlexibleServersPrivateLinkResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsAPrivateLinkResourceForMySQL() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json + // this example is just showing the usage of "PrivateLinkResources_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 MySqlFlexibleServersPrivateLinkResource created on azure + // for more information of creating MySqlFlexibleServersPrivateLinkResource, please refer to the document of MySqlFlexibleServersPrivateLinkResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + string groupName = "plr"; + ResourceIdentifier mySqlFlexibleServersPrivateLinkResourceId = MySqlFlexibleServersPrivateLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, groupName); + MySqlFlexibleServersPrivateLinkResource mySqlFlexibleServersPrivateLinkResource = client.GetMySqlFlexibleServersPrivateLinkResource(mySqlFlexibleServersPrivateLinkResourceId); + + // invoke the operation + MySqlFlexibleServersPrivateLinkResource result = await mySqlFlexibleServersPrivateLinkResource.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 + MySqlFlexibleServersPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResourceCollection.cs new file mode 100644 index 000000000000..867f1160a933 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResourceCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Samples +{ + public partial class Sample_MySqlFlexibleServersPrivateLinkResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsAPrivateLinkResourceForMySQL() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json + // this example is just showing the usage of "PrivateLinkResources_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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateLinkResource + MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); + + // invoke the operation + string groupName = "plr"; + MySqlFlexibleServersPrivateLinkResource result = await collection.GetAsync(groupName); + + // 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 + MySqlFlexibleServersPrivateLinkResourceData 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 GetAll_GetsPrivateLinkResourcesForMySQL() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesList.json + // this example is just showing the usage of "PrivateLinkResources_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(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateLinkResource + MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); + + // invoke the operation and iterate over the result + await foreach (MySqlFlexibleServersPrivateLinkResource item in collection.GetAllAsync()) + { + // 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 + MySqlFlexibleServersPrivateLinkResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsAPrivateLinkResourceForMySQL() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json + // this example is just showing the usage of "PrivateLinkResources_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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateLinkResource + MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); + + // invoke the operation + string groupName = "plr"; + bool result = await collection.ExistsAsync(groupName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsAPrivateLinkResourceForMySQL() + { + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json + // this example is just showing the usage of "PrivateLinkResources_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 MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "test-svr"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // get the collection of this MySqlFlexibleServersPrivateLinkResource + MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); + + // invoke the operation + string groupName = "plr"; + NullableResponse response = await collection.GetIfExistsAsync(groupName); + MySqlFlexibleServersPrivateLinkResource 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 + MySqlFlexibleServersPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 80% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 89935669b3f9..b9f607b4677a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetMySqlFlexibleServers_ListServersInASubscription() + public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckNameAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersList.json - // this example is just showing the usage of "Servers_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CheckNameAvailabilityWithoutLocation.json + // this example is just showing the usage of "CheckNameAvailabilityWithoutLocation_Execute" 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(); @@ -35,25 +35,22 @@ public async Task GetMySqlFlexibleServers_ListServersInASubscription() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (MySqlFlexibleServerResource item in subscriptionResource.GetMySqlFlexibleServersAsync()) + // invoke the operation + MySqlFlexibleServerNameAvailabilityContent content = new MySqlFlexibleServerNameAvailabilityContent("name1") { - // 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 - MySqlFlexibleServerData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + ResourceType = new ResourceType("Microsoft.DBforMySQL/flexibleServers"), + }; + MySqlFlexibleServerNameAvailabilityResult result = await subscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLocationBasedCapabilities_CapabilitiesList() + public async Task GetMySqlFlexibleServers_ListServersInASubscription() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json - // this example is just showing the usage of "LocationBasedCapabilities_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServersList.json + // this example is just showing the usage of "Servers_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(); @@ -67,10 +64,13 @@ public async Task GetLocationBasedCapabilities_CapabilitiesList() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation locationName = new AzureLocation("WestUS"); - await foreach (MySqlFlexibleServerCapabilityProperties item in subscriptionResource.GetLocationBasedCapabilitiesAsync(locationName)) + await foreach (MySqlFlexibleServerResource item in subscriptionResource.GetMySqlFlexibleServersAsync()) { - Console.WriteLine($"Succeeded: {item}"); + // 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 + MySqlFlexibleServerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); @@ -78,10 +78,10 @@ public async Task GetLocationBasedCapabilities_CapabilitiesList() [Test] [Ignore("Only validating compilation of examples")] - public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubnetUsage() + public async Task GetLocationBasedCapabilities_CapabilitiesList() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json - // this example is just showing the usage of "CheckVirtualNetworkSubnetUsage_Execute" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitiesByLocationList.json + // this example is just showing the usage of "LocationBasedCapabilities_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(); @@ -94,22 +94,21 @@ public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubne ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation + // invoke the operation and iterate over the result AzureLocation locationName = new AzureLocation("WestUS"); - MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter = new MySqlFlexibleServerVirtualNetworkSubnetUsageParameter + await foreach (MySqlFlexibleServerCapabilityProperties item in subscriptionResource.GetLocationBasedCapabilitiesAsync(locationName)) { - VirtualNetworkResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), - }; - MySqlFlexibleServerVirtualNetworkSubnetUsageResult result = await subscriptionResource.ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter); + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] public async Task CheckMySqlFlexibleServerNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CheckNameAvailability.json // this example is just showing the usage of "CheckNameAvailability_Execute" 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 @@ -136,10 +135,10 @@ public async Task CheckMySqlFlexibleServerNameAvailability_CheckNameAvailability [Test] [Ignore("Only validating compilation of examples")] - public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckNameAvailability() + public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubnetUsage() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json - // this example is just showing the usage of "CheckNameAvailabilityWithoutLocation_Execute" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json + // this example is just showing the usage of "CheckVirtualNetworkSubnetUsage_Execute" 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(); @@ -153,37 +152,12 @@ public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckN SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - MySqlFlexibleServerNameAvailabilityContent content = new MySqlFlexibleServerNameAvailabilityContent("name1") + AzureLocation locationName = new AzureLocation("WestUS"); + MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter = new MySqlFlexibleServerVirtualNetworkSubnetUsageParameter { - ResourceType = new ResourceType("Microsoft.DBforMySQL/flexibleServers"), + VirtualNetworkResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), }; - MySqlFlexibleServerNameAvailabilityResult result = await subscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetOperationResult_OperationResultsGet() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.json - // this example is just showing the usage of "OperationResults_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 SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation - AzureLocation locationName = new AzureLocation("westus"); - string operationId = "00000000-0000-0000-0000-000000000000"; - OperationStatusExtendedResult result = await subscriptionResource.GetOperationResultAsync(locationName, operationId); + MySqlFlexibleServerVirtualNetworkSubnetUsageResult result = await subscriptionResource.ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_TenantResourceExtensions.cs similarity index 92% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_TenantResourceExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_TenantResourceExtensions.cs index d62b8f6e4ada..8107ccad616c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlFlexibleServers/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_TenantResourceExtensions [Ignore("Only validating compilation of examples")] public async Task ExecuteGetPrivateDnsZoneSuffix_GetPrivateDnsZoneSuffix() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/GetPrivateDnsZoneSuffix.json // this example is just showing the usage of "GetPrivateDnsZoneSuffix_Execute" 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/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlAdvisorCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlAdvisorCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlAdvisorResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlAdvisorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlAdvisorResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlConfigurationCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlConfigurationCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlConfigurationResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlConfigurationResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlConfigurationResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlDatabaseCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlDatabaseCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlDatabaseResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlDatabaseResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlDatabaseResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlFirewallRuleCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlFirewallRuleCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlFirewallRuleResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlFirewallRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlFirewallRuleResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateEndpointConnectionCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateEndpointConnectionCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateEndpointConnectionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateEndpointConnectionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResourceCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlPrivateLinkResourceCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResourceCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryStatisticCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryStatisticCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryStatisticResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryStatisticResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryTextCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryTextCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryTextResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlQueryTextResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlQueryTextResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlRecommendationActionCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlRecommendationActionCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlRecommendationActionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlRecommendationActionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlRecommendationActionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerAdministratorResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerAdministratorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerAdministratorResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerKeyCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerKeyCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerKeyResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerKeyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerKeyResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerSecurityAlertPolicyCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerSecurityAlertPolicyCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerSecurityAlertPolicyResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlServerSecurityAlertPolicyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlServerSecurityAlertPolicyResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlVirtualNetworkRuleCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlVirtualNetworkRuleCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlVirtualNetworkRuleResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlVirtualNetworkRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlVirtualNetworkRuleResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlWaitStatisticCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlWaitStatisticCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlWaitStatisticResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_MySqlWaitStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlWaitStatisticResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_SubscriptionResourceExtensions.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/tests/MySql/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_SubscriptionResourceExtensions.cs