From a9bdddff097839edc56a144590138df0d3463eba Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 31 May 2022 08:11:02 +0000 Subject: [PATCH] CodeGen from PR 19278 in Azure/azure-rest-api-specs Merge 5ab39d034d8188ef7cae8378ce2e1b66b37d52f0 into ef2dedc629c54795597b7e11affad0cd6e804a8b --- .../src/Generated/Models/CloudError.cs | 6 +++--- .../src/Generated/Models/CloudErrorBody.cs | 18 +++++++++--------- .../src/Generated/Models/Zone.Serialization.cs | 13 ++++++++++++- .../src/Generated/Models/Zone.cs | 6 +++++- .../Azure.ResourceManager.Dns/src/autorest.md | 4 ++-- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudError.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudError.cs index c7dc25f4dd8d..a5b82ed622f2 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudError.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudError.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Dns.Models { - /// An error message. + /// An error response from the service. internal partial class CloudError { /// Initializes a new instance of CloudError. @@ -16,13 +16,13 @@ internal CloudError() } /// Initializes a new instance of CloudError. - /// The error message body. + /// Cloud error body. internal CloudError(CloudErrorBody error) { Error = error; } - /// The error message body. + /// Cloud error body. public CloudErrorBody Error { get; } } } diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudErrorBody.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudErrorBody.cs index 4580456621e2..0fbde7204f0f 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudErrorBody.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/CloudErrorBody.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Dns.Models { - /// The body of an error message. + /// An error response from the service. internal partial class CloudErrorBody { /// Initializes a new instance of CloudErrorBody. @@ -20,10 +20,10 @@ internal CloudErrorBody() } /// Initializes a new instance of CloudErrorBody. - /// The error code. - /// A description of what caused the error. - /// The target resource of the error message. - /// Extra error information. + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the error, intended to be suitable for display in a user interface. + /// The target of the particular error. For example, the name of the property in error. + /// A list of additional details about the error. internal CloudErrorBody(string code, string message, string target, IReadOnlyList details) { Code = code; @@ -32,13 +32,13 @@ internal CloudErrorBody(string code, string message, string target, IReadOnlyLis Details = details; } - /// The error code. + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. public string Code { get; } - /// A description of what caused the error. + /// A message describing the error, intended to be suitable for display in a user interface. public string Message { get; } - /// The target resource of the error message. + /// The target of the particular error. For example, the name of the property in error. public string Target { get; } - /// Extra error information. + /// A list of additional details about the error. public IReadOnlyList Details { get; } } } diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.Serialization.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.Serialization.cs index 5f77f6622038..fc17c5fca092 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.Serialization.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.Serialization.cs @@ -74,6 +74,7 @@ internal static Zone DeserializeZone(JsonElement element) string location = default; Optional> tags = default; Optional maxNumberOfRecordSets = default; + Optional maxNumberOfRecordsPerRecordSet = default; Optional numberOfRecordSets = default; Optional> nameServers = default; Optional zoneType = default; @@ -140,6 +141,16 @@ internal static Zone DeserializeZone(JsonElement element) maxNumberOfRecordSets = property0.Value.GetInt64(); continue; } + if (property0.NameEquals("maxNumberOfRecordsPerRecordSet")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + maxNumberOfRecordsPerRecordSet = property0.Value.GetInt64(); + continue; + } if (property0.NameEquals("numberOfRecordSets")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -209,7 +220,7 @@ internal static Zone DeserializeZone(JsonElement element) continue; } } - return new Zone(id.Value, name.Value, type.Value, location, Optional.ToDictionary(tags), etag.Value, Optional.ToNullable(maxNumberOfRecordSets), Optional.ToNullable(numberOfRecordSets), Optional.ToList(nameServers), Optional.ToNullable(zoneType), Optional.ToList(registrationVirtualNetworks), Optional.ToList(resolutionVirtualNetworks)); + return new Zone(id.Value, name.Value, type.Value, location, Optional.ToDictionary(tags), etag.Value, Optional.ToNullable(maxNumberOfRecordSets), Optional.ToNullable(maxNumberOfRecordsPerRecordSet), Optional.ToNullable(numberOfRecordSets), Optional.ToList(nameServers), Optional.ToNullable(zoneType), Optional.ToList(registrationVirtualNetworks), Optional.ToList(resolutionVirtualNetworks)); } } } diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.cs index 172f43b35bc8..0223748bf6f3 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Models/Zone.cs @@ -37,15 +37,17 @@ public Zone(string location) : base(location) /// Resource tags. /// The etag of the zone. /// The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + /// The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. /// The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. /// The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. /// The type of this DNS zone (Public or Private). /// A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. /// A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. - internal Zone(string id, string name, string type, string location, IDictionary tags, string etag, long? maxNumberOfRecordSets, long? numberOfRecordSets, IReadOnlyList nameServers, ZoneType? zoneType, IList registrationVirtualNetworks, IList resolutionVirtualNetworks) : base(id, name, type, location, tags) + internal Zone(string id, string name, string type, string location, IDictionary tags, string etag, long? maxNumberOfRecordSets, long? maxNumberOfRecordsPerRecordSet, long? numberOfRecordSets, IReadOnlyList nameServers, ZoneType? zoneType, IList registrationVirtualNetworks, IList resolutionVirtualNetworks) : base(id, name, type, location, tags) { Etag = etag; MaxNumberOfRecordSets = maxNumberOfRecordSets; + MaxNumberOfRecordsPerRecordSet = maxNumberOfRecordsPerRecordSet; NumberOfRecordSets = numberOfRecordSets; NameServers = nameServers; ZoneType = zoneType; @@ -57,6 +59,8 @@ internal Zone(string id, string name, string type, string location, IDictionary< public string Etag { get; set; } /// The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. public long? MaxNumberOfRecordSets { get; } + /// The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + public long? MaxNumberOfRecordsPerRecordSet { get; } /// The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. public long? NumberOfRecordSets { get; } /// The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md b/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md index 2e64b4e0336d..aa9ca7fa1db7 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md +++ b/sdk/dns/Azure.ResourceManager.Dns/src/autorest.md @@ -5,7 +5,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e0996d4f6dbca40ebf2fa4abf9a1cba45ada94d8/specification/dns/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/6b99a68f01d4ff7da9fcf5d6d315652ebc1d3031/specification/dns/resource-manager/readme.md -``` \ No newline at end of file +```