From 45e7e2f3e891834eeeb7453c90a6dd23e78a9d78 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 23 May 2023 09:29:02 +0000 Subject: [PATCH] CodeGen from PR 24062 in Azure/azure-rest-api-specs Merge 7114320314a5e1daaa071fce9e1911a68b792500 into c183bb012de8e9e1d0d2e67a0994748df4747d2c --- ...ure.ResourceManager.PostgreSql.netstandard2.0.cs | 11 ++++------- .../PostgreSqlFlexibleServerData.Serialization.cs | 5 ----- .../PostgreSqlFlexibleServerDataEncryption.cs | 4 ++-- .../Models/PostgreSqlFlexibleServerIdentityType.cs | 5 +---- .../Models/PostgreSqlFlexibleServerKeyType.cs | 8 ++++---- .../Models/PostgreSqlFlexibleServerNetwork.cs | 8 ++++---- .../PostgreSqlFlexibleServerPatch.Serialization.cs | 5 +++++ .../Models/PostgreSqlFlexibleServerPatch.cs | 2 ++ .../PostgreSqlFlexibleServerReplicationRole.cs | 12 ------------ ...xibleServerUserAssignedIdentity.Serialization.cs | 13 ++++++++++++- .../PostgreSqlFlexibleServerUserAssignedIdentity.cs | 13 +++++++++---- .../Generated/PostgreSqlFlexibleServerData.cs | 10 +++++----- .../src/autorest.md | 4 ++-- 13 files changed, 50 insertions(+), 50 deletions(-) diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/api/Azure.ResourceManager.PostgreSql.netstandard2.0.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/api/Azure.ResourceManager.PostgreSql.netstandard2.0.cs index 7c02cf257eda..00cb149aac54 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/api/Azure.ResourceManager.PostgreSql.netstandard2.0.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/api/Azure.ResourceManager.PostgreSql.netstandard2.0.cs @@ -589,7 +589,7 @@ public PostgreSqlFlexibleServerData(Azure.Core.AzureLocation location) : base (d public string MinorVersion { get { throw null; } } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerNetwork Network { get { throw null; } set { } } public System.DateTimeOffset? PointInTimeUtc { get { throw null; } set { } } - public int? ReplicaCapacity { get { throw null; } set { } } + public int? ReplicaCapacity { get { throw null; } } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerSku Sku { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceServerResourceId { get { throw null; } set { } } @@ -971,7 +971,6 @@ internal PostgreSqlFlexibleServerHyperscaleNodeEditionCapability() { } private readonly int _dummyPrimitive; public PostgreSqlFlexibleServerIdentityType(string value) { throw null; } public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerIdentityType None { get { throw null; } } - public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerIdentityType SystemAssigned { get { throw null; } } public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerIdentityType UserAssigned { get { throw null; } } public bool Equals(Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerIdentityType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -990,7 +989,7 @@ internal PostgreSqlFlexibleServerHyperscaleNodeEditionCapability() { } private readonly int _dummyPrimitive; public PostgreSqlFlexibleServerKeyType(string value) { throw null; } public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerKeyType AzureKeyVault { get { throw null; } } - public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerKeyType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerKeyType SystemManaged { get { throw null; } } public bool Equals(Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerKeyType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1090,6 +1089,7 @@ public PostgreSqlFlexibleServerPatch() { } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerUserAssignedIdentity Identity { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerMaintenanceWindow MaintenanceWindow { get { throw null; } set { } } + public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerNetwork Network { get { throw null; } set { } } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerSku Sku { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } @@ -1142,12 +1142,8 @@ public PostgreSqlFlexibleServerPatch() { } public PostgreSqlFlexibleServerReplicationRole(string value) { throw null; } public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole AsyncReplica { get { throw null; } } public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole GeoAsyncReplica { get { throw null; } } - public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole GeoSyncReplica { get { throw null; } } public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole None { get { throw null; } } public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole Primary { get { throw null; } } - public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole Secondary { get { throw null; } } - public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole SyncReplica { get { throw null; } } - public static Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole WalReplica { get { throw null; } } public bool Equals(Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1249,6 +1245,7 @@ public partial class PostgreSqlFlexibleServerUserAssignedIdentity { public PostgreSqlFlexibleServerUserAssignedIdentity(Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerIdentityType identityType) { } public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerIdentityType IdentityType { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } } public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } } public partial class PostgreSqlFlexibleServerVCoreCapability diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerData.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerData.Serialization.cs index 94d4636d745b..b32a7d71436d 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerData.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerData.Serialization.cs @@ -114,11 +114,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("replicationRole"u8); writer.WriteStringValue(ReplicationRole.Value.ToString()); } - if (Optional.IsDefined(ReplicaCapacity)) - { - writer.WritePropertyName("replicaCapacity"u8); - writer.WriteNumberValue(ReplicaCapacity.Value); - } if (Optional.IsDefined(CreateMode)) { writer.WritePropertyName("createMode"u8); diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs index 365884adabb4..111c992ac848 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerDataEncryption.cs @@ -21,7 +21,7 @@ public PostgreSqlFlexibleServerDataEncryption() /// Initializes a new instance of PostgreSqlFlexibleServerDataEncryption. /// URI for the key for data encryption for primary server. /// Resource Id for the User assigned identity to be used for data encryption for primary server. - /// Data encryption type to depict if it is System assigned vs Azure Key vault. + /// Data encryption type to depict if it is System Managed vs Azure Key vault. internal PostgreSqlFlexibleServerDataEncryption(Uri primaryKeyUri, ResourceIdentifier primaryUserAssignedIdentityId, PostgreSqlFlexibleServerKeyType? keyType) { PrimaryKeyUri = primaryKeyUri; @@ -33,7 +33,7 @@ internal PostgreSqlFlexibleServerDataEncryption(Uri primaryKeyUri, ResourceIdent public Uri PrimaryKeyUri { get; set; } /// Resource Id for the User assigned identity to be used for data encryption for primary server. public ResourceIdentifier PrimaryUserAssignedIdentityId { get; set; } - /// Data encryption type to depict if it is System assigned vs Azure Key vault. + /// Data encryption type to depict if it is System Managed vs Azure Key vault. public PostgreSqlFlexibleServerKeyType? KeyType { get; set; } } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerIdentityType.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerIdentityType.cs index fdc200e8082c..797e0f9410b5 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerIdentityType.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerIdentityType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers.Models { - /// the types of identities associated with this resource; currently restricted to 'SystemAssigned and UserAssigned'. + /// the types of identities associated with this resource; currently restricted to 'None and UserAssigned'. public readonly partial struct PostgreSqlFlexibleServerIdentityType : IEquatable { private readonly string _value; @@ -23,13 +23,10 @@ public PostgreSqlFlexibleServerIdentityType(string value) } private const string NoneValue = "None"; - private const string SystemAssignedValue = "SystemAssigned"; private const string UserAssignedValue = "UserAssigned"; /// None. public static PostgreSqlFlexibleServerIdentityType None { get; } = new PostgreSqlFlexibleServerIdentityType(NoneValue); - /// SystemAssigned. - public static PostgreSqlFlexibleServerIdentityType SystemAssigned { get; } = new PostgreSqlFlexibleServerIdentityType(SystemAssignedValue); /// UserAssigned. public static PostgreSqlFlexibleServerIdentityType UserAssigned { get; } = new PostgreSqlFlexibleServerIdentityType(UserAssignedValue); /// Determines if two values are the same. diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerKeyType.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerKeyType.cs index 4c2c933963e9..51613de146b0 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerKeyType.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerKeyType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers.Models { - /// Data encryption type to depict if it is System assigned vs Azure Key vault. + /// Data encryption type to depict if it is System Managed vs Azure Key vault. public readonly partial struct PostgreSqlFlexibleServerKeyType : IEquatable { private readonly string _value; @@ -22,11 +22,11 @@ public PostgreSqlFlexibleServerKeyType(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string SystemAssignedValue = "SystemAssigned"; + private const string SystemManagedValue = "SystemManaged"; private const string AzureKeyVaultValue = "AzureKeyVault"; - /// SystemAssigned. - public static PostgreSqlFlexibleServerKeyType SystemAssigned { get; } = new PostgreSqlFlexibleServerKeyType(SystemAssignedValue); + /// SystemManaged. + public static PostgreSqlFlexibleServerKeyType SystemManaged { get; } = new PostgreSqlFlexibleServerKeyType(SystemManagedValue); /// AzureKeyVault. public static PostgreSqlFlexibleServerKeyType AzureKeyVault { get; } = new PostgreSqlFlexibleServerKeyType(AzureKeyVaultValue); /// Determines if two values are the same. diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerNetwork.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerNetwork.cs index 8a455ebd58f1..ec926b8582e3 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerNetwork.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerNetwork.cs @@ -19,8 +19,8 @@ public PostgreSqlFlexibleServerNetwork() /// Initializes a new instance of PostgreSqlFlexibleServerNetwork. /// public network access is enabled or not. - /// delegated subnet arm resource id. - /// private dns zone arm resource id. + /// Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. + /// Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. internal PostgreSqlFlexibleServerNetwork(PostgreSqlFlexibleServerPublicNetworkAccessState? publicNetworkAccess, ResourceIdentifier delegatedSubnetResourceId, ResourceIdentifier privateDnsZoneArmResourceId) { PublicNetworkAccess = publicNetworkAccess; @@ -30,9 +30,9 @@ internal PostgreSqlFlexibleServerNetwork(PostgreSqlFlexibleServerPublicNetworkAc /// public network access is enabled or not. public PostgreSqlFlexibleServerPublicNetworkAccessState? PublicNetworkAccess { get; } - /// delegated subnet arm resource id. + /// Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. public ResourceIdentifier DelegatedSubnetResourceId { get; set; } - /// private dns zone arm resource id. + /// Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone. public ResourceIdentifier PrivateDnsZoneArmResourceId { get; set; } } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.Serialization.cs index 6eb3d92cb9b9..9469bf4d1536 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.Serialization.cs @@ -93,6 +93,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("replicationRole"u8); writer.WriteStringValue(ReplicationRole.Value.ToString()); } + if (Optional.IsDefined(Network)) + { + writer.WritePropertyName("network"u8); + writer.WriteObjectValue(Network); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.cs index fbbb5681fd83..5e359e8c34a8 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerPatch.cs @@ -59,5 +59,7 @@ public int? StorageSizeInGB public PostgreSqlFlexibleServerCreateModeForUpdate? CreateMode { get; set; } /// Replication role of the server. public PostgreSqlFlexibleServerReplicationRole? ReplicationRole { get; set; } + /// Network properties of a server. These are required to be passed only in case if server is a private access server. + public PostgreSqlFlexibleServerNetwork Network { get; set; } } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerReplicationRole.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerReplicationRole.cs index 2bcb72478ded..119ec06dd4e2 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerReplicationRole.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerReplicationRole.cs @@ -24,27 +24,15 @@ public PostgreSqlFlexibleServerReplicationRole(string value) private const string NoneValue = "None"; private const string PrimaryValue = "Primary"; - private const string SecondaryValue = "Secondary"; - private const string WalReplicaValue = "WalReplica"; - private const string SyncReplicaValue = "SyncReplica"; private const string AsyncReplicaValue = "AsyncReplica"; - private const string GeoSyncReplicaValue = "GeoSyncReplica"; private const string GeoAsyncReplicaValue = "GeoAsyncReplica"; /// None. public static PostgreSqlFlexibleServerReplicationRole None { get; } = new PostgreSqlFlexibleServerReplicationRole(NoneValue); /// Primary. public static PostgreSqlFlexibleServerReplicationRole Primary { get; } = new PostgreSqlFlexibleServerReplicationRole(PrimaryValue); - /// Secondary. - public static PostgreSqlFlexibleServerReplicationRole Secondary { get; } = new PostgreSqlFlexibleServerReplicationRole(SecondaryValue); - /// WalReplica. - public static PostgreSqlFlexibleServerReplicationRole WalReplica { get; } = new PostgreSqlFlexibleServerReplicationRole(WalReplicaValue); - /// SyncReplica. - public static PostgreSqlFlexibleServerReplicationRole SyncReplica { get; } = new PostgreSqlFlexibleServerReplicationRole(SyncReplicaValue); /// AsyncReplica. public static PostgreSqlFlexibleServerReplicationRole AsyncReplica { get; } = new PostgreSqlFlexibleServerReplicationRole(AsyncReplicaValue); - /// GeoSyncReplica. - public static PostgreSqlFlexibleServerReplicationRole GeoSyncReplica { get; } = new PostgreSqlFlexibleServerReplicationRole(GeoSyncReplicaValue); /// GeoAsyncReplica. public static PostgreSqlFlexibleServerReplicationRole GeoAsyncReplica { get; } = new PostgreSqlFlexibleServerReplicationRole(GeoAsyncReplicaValue); /// Determines if two values are the same. diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.Serialization.cs index 3d1b391c7c96..8b956299f7ce 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -41,6 +42,7 @@ internal static PostgreSqlFlexibleServerUserAssignedIdentity DeserializePostgreS } Optional> userAssignedIdentities = default; PostgreSqlFlexibleServerIdentityType type = default; + Optional tenantId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("userAssignedIdentities"u8)) @@ -62,8 +64,17 @@ internal static PostgreSqlFlexibleServerUserAssignedIdentity DeserializePostgreS type = new PostgreSqlFlexibleServerIdentityType(property.Value.GetString()); continue; } + if (property.NameEquals("tenantId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property.Value.GetGuid(); + continue; + } } - return new PostgreSqlFlexibleServerUserAssignedIdentity(Optional.ToDictionary(userAssignedIdentities), type); + return new PostgreSqlFlexibleServerUserAssignedIdentity(Optional.ToDictionary(userAssignedIdentities), type, Optional.ToNullable(tenantId)); } } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs index ff2c4f3289a7..9b2ece1ead7d 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/Models/PostgreSqlFlexibleServerUserAssignedIdentity.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; @@ -15,7 +16,7 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers.Models public partial class PostgreSqlFlexibleServerUserAssignedIdentity { /// Initializes a new instance of PostgreSqlFlexibleServerUserAssignedIdentity. - /// the types of identities associated with this resource; currently restricted to 'SystemAssigned and UserAssigned'. + /// the types of identities associated with this resource; currently restricted to 'None and UserAssigned'. public PostgreSqlFlexibleServerUserAssignedIdentity(PostgreSqlFlexibleServerIdentityType identityType) { UserAssignedIdentities = new ChangeTrackingDictionary(); @@ -24,16 +25,20 @@ public PostgreSqlFlexibleServerUserAssignedIdentity(PostgreSqlFlexibleServerIden /// Initializes a new instance of PostgreSqlFlexibleServerUserAssignedIdentity. /// represents user assigned identities map. - /// the types of identities associated with this resource; currently restricted to 'SystemAssigned and UserAssigned'. - internal PostgreSqlFlexibleServerUserAssignedIdentity(IDictionary userAssignedIdentities, PostgreSqlFlexibleServerIdentityType identityType) + /// the types of identities associated with this resource; currently restricted to 'None and UserAssigned'. + /// Tenant id of the server. + internal PostgreSqlFlexibleServerUserAssignedIdentity(IDictionary userAssignedIdentities, PostgreSqlFlexibleServerIdentityType identityType, Guid? tenantId) { UserAssignedIdentities = userAssignedIdentities; IdentityType = identityType; + TenantId = tenantId; } /// represents user assigned identities map. public IDictionary UserAssignedIdentities { get; } - /// the types of identities associated with this resource; currently restricted to 'SystemAssigned and UserAssigned'. + /// the types of identities associated with this resource; currently restricted to 'None and UserAssigned'. public PostgreSqlFlexibleServerIdentityType IdentityType { get; set; } + /// Tenant id of the server. + public Guid? TenantId { get; } } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerData.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerData.cs index 03cbfd39c8e1..55a9435da047 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerData.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerData.cs @@ -44,10 +44,10 @@ public PostgreSqlFlexibleServerData(AzureLocation location) : base(location) /// AuthConfig properties of a server. /// Data encryption properties of a server. /// Backup properties of a server. - /// Network properties of a server. + /// Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server. /// High availability properties of a server. /// Maintenance window properties of a server. - /// The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. + /// The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica server. /// Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'. /// availability zone information of the server. /// Replication role of the server. @@ -114,13 +114,13 @@ public int? StorageSizeInGB public PostgreSqlFlexibleServerDataEncryption DataEncryption { get; set; } /// Backup properties of a server. public PostgreSqlFlexibleServerBackupProperties Backup { get; set; } - /// Network properties of a server. + /// Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server. public PostgreSqlFlexibleServerNetwork Network { get; set; } /// High availability properties of a server. public PostgreSqlFlexibleServerHighAvailability HighAvailability { get; set; } /// Maintenance window properties of a server. public PostgreSqlFlexibleServerMaintenanceWindow MaintenanceWindow { get; set; } - /// The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. + /// The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica server. public ResourceIdentifier SourceServerResourceId { get; set; } /// Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'. public DateTimeOffset? PointInTimeUtc { get; set; } @@ -129,7 +129,7 @@ public int? StorageSizeInGB /// Replication role of the server. public PostgreSqlFlexibleServerReplicationRole? ReplicationRole { get; set; } /// Replicas allowed for a server. - public int? ReplicaCapacity { get; set; } + public int? ReplicaCapacity { get; } /// The mode to create a new PostgreSQL server. public PostgreSqlFlexibleServerCreateMode? CreateMode { get; set; } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/autorest.md b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/autorest.md index d97f998ed589..cf2ddea56f2c 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/autorest.md +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/autorest.md @@ -21,7 +21,7 @@ batch: ``` yaml $(tag) == 'package-2020-01-01' namespace: Azure.ResourceManager.PostgreSql -require: https://github.com/Azure/azure-rest-api-specs/blob/eca38ee0caf445cb1e79c8e7bbaf9e1dca36479a/specification/postgresql/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/postgresql/resource-manager/readme.md output-folder: $(this-folder)/PostgreSql/Generated format-by-name-rules: @@ -146,7 +146,7 @@ directive: ``` yaml $(tag) == 'package-flexibleserver-2022-12-01' namespace: Azure.ResourceManager.PostgreSql.FlexibleServers -require: https://github.com/Azure/azure-rest-api-specs/blob/deba715c80b5b523a84d32fa2764c0f6e867b4d0/specification/postgresql/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/postgresql/resource-manager/readme.md output-folder: $(this-folder)/PostgreSqlFlexibleServers/Generated format-by-name-rules: