diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/ArmDevTestLabsModelFactory.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/ArmDevTestLabsModelFactory.cs
index 97edfcd6beee..e9ee9acdcc3e 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/ArmDevTestLabsModelFactory.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/ArmDevTestLabsModelFactory.cs
@@ -119,7 +119,7 @@ public static DevTestLabAnnouncement DevTestLabAnnouncement(string title = null,
/// If the schedule will occur only some days of the week, specify the weekly recurrence.
/// If the schedule will occur once each day of the week, specify the daily recurrence.
/// If the schedule will occur multiple times a day, specify the hourly recurrence.
- /// The time zone ID (e.g. Pacific Standard time).
+ /// The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in `IReadOnlyCollection<string> TimeZoneConverter.TZConvert.KnownWindowsTimeZoneIds` (https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/README.md).
/// Notification settings.
/// The creation date of the schedule.
/// The resource ID to which the schedule belongs.
@@ -370,6 +370,38 @@ public static DevTestLabResourceCost DevTestLabResourceCost(string resourceName
serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The name of the virtual machine or environment.
+ /// The location of the new virtual machine or environment.
+ /// The tags of the resource.
+ /// The status of the schedule (i.e. Enabled, Disabled).
+ /// The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).
+ /// If the schedule will occur only some days of the week, specify the weekly recurrence.
+ /// If the schedule will occur once each day of the week, specify the daily recurrence.
+ /// If the schedule will occur multiple times a day, specify the hourly recurrence.
+ /// The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in `IReadOnlyCollection<string> TimeZoneConverter.TZConvert.KnownWindowsTimeZoneIds` (https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/README.md).
+ /// Notification settings.
+ /// The resource ID to which the schedule belongs.
+ /// A new instance for mocking.
+ public static DevTestLabScheduleCreationParameter DevTestLabScheduleCreationParameter(string name = null, AzureLocation? location = null, IDictionary tags = null, DevTestLabEnableStatus? status = null, string taskType = null, DevTestLabWeekDetails weeklyRecurrence = null, string dailyRecurrenceTime = null, int? hourlyRecurrenceMinute = null, string timeZoneId = null, DevTestLabNotificationSettings notificationSettings = null, ResourceIdentifier targetResourceId = null)
+ {
+ tags ??= new Dictionary();
+
+ return new DevTestLabScheduleCreationParameter(
+ name,
+ location,
+ tags,
+ status,
+ taskType,
+ weeklyRecurrence,
+ dailyRecurrenceTime != null ? new DayDetails(dailyRecurrenceTime, serializedAdditionalRawData: null) : null,
+ hourlyRecurrenceMinute != null ? new HourDetails(hourlyRecurrenceMinute, serializedAdditionalRawData: null) : null,
+ timeZoneId,
+ notificationSettings,
+ targetResourceId,
+ serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -455,38 +487,6 @@ public static DevTestLabFormulaData DevTestLabFormulaData(ResourceIdentifier id
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The name of the virtual machine or environment.
- /// The location of the new virtual machine or environment.
- /// The tags of the resource.
- /// The status of the schedule (i.e. Enabled, Disabled).
- /// The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).
- /// If the schedule will occur only some days of the week, specify the weekly recurrence.
- /// If the schedule will occur once each day of the week, specify the daily recurrence.
- /// If the schedule will occur multiple times a day, specify the hourly recurrence.
- /// The time zone ID (e.g. Pacific Standard time).
- /// Notification settings.
- /// The resource ID to which the schedule belongs.
- /// A new instance for mocking.
- public static DevTestLabScheduleCreationParameter DevTestLabScheduleCreationParameter(string name = null, AzureLocation? location = null, IDictionary tags = null, DevTestLabEnableStatus? status = null, string taskType = null, DevTestLabWeekDetails weeklyRecurrence = null, string dailyRecurrenceTime = null, int? hourlyRecurrenceMinute = null, string timeZoneId = null, DevTestLabNotificationSettings notificationSettings = null, ResourceIdentifier targetResourceId = null)
- {
- tags ??= new Dictionary();
-
- return new DevTestLabScheduleCreationParameter(
- name,
- location,
- tags,
- status,
- taskType,
- weeklyRecurrence,
- dailyRecurrenceTime != null ? new DayDetails(dailyRecurrenceTime, serializedAdditionalRawData: null) : null,
- hourlyRecurrenceMinute != null ? new HourDetails(hourlyRecurrenceMinute, serializedAdditionalRawData: null) : null,
- timeZoneId,
- notificationSettings,
- targetResourceId,
- serializedAdditionalRawData: null);
- }
-
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -525,6 +525,14 @@ public static DevTestLabGalleryImage DevTestLabGalleryImage(ResourceIdentifier i
serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The upload URI for the VHD.
+ /// A new instance for mocking.
+ public static DevTestLabGenerateUploadUriResult DevTestLabGenerateUploadUriResult(Uri uploadUri = null)
+ {
+ return new DevTestLabGenerateUploadUriResult(uploadUri, serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -1063,13 +1071,5 @@ public static DevTestLabExternalSubnet DevTestLabExternalSubnet(ResourceIdentifi
{
return new DevTestLabExternalSubnet(id, name, serializedAdditionalRawData: null);
}
-
- /// Initializes a new instance of .
- /// The upload URI for the VHD.
- /// A new instance for mocking.
- public static DevTestLabGenerateUploadUriResult DevTestLabGenerateUploadUriResult(Uri uploadUri = null)
- {
- return new DevTestLabGenerateUploadUriResult(uploadUri, serializedAdditionalRawData: null);
- }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.cs
index 8912727eb70b..436667131ca6 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.cs
@@ -1656,7 +1656,7 @@ public virtual Pageable GetVhds(CancellationToken cancellationToken
///
///
///
- /// Specify the $expand query. Example: 'properties($select=author)'.
+ /// Specify the $expand query. Example: 'properties($select=displayName)'.
/// The filter to apply to the operation. Example: '$filter=contains(name,'myName').
/// The maximum number of resources to return from the operation. Example: '$top=10'.
/// The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
@@ -1686,7 +1686,7 @@ public virtual AsyncPageable GetGalleryImagesAsync(strin
///
///
///
- /// Specify the $expand query. Example: 'properties($select=author)'.
+ /// Specify the $expand query. Example: 'properties($select=displayName)'.
/// The filter to apply to the operation. Example: '$filter=contains(name,'myName').
/// The maximum number of resources to return from the operation. Example: '$top=10'.
/// The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.cs
index 0388dc264a1b..8ed87ca81b88 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.cs
@@ -69,7 +69,7 @@ public DevTestLabScheduleData(AzureLocation location) : base(location)
/// If the schedule will occur only some days of the week, specify the weekly recurrence.
/// If the schedule will occur once each day of the week, specify the daily recurrence.
/// If the schedule will occur multiple times a day, specify the hourly recurrence.
- /// The time zone ID (e.g. Pacific Standard time).
+ /// The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in `IReadOnlyCollection<string> TimeZoneConverter.TZConvert.KnownWindowsTimeZoneIds` (https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/README.md).
/// Notification settings.
/// The creation date of the schedule.
/// The resource ID to which the schedule belongs.
@@ -131,7 +131,7 @@ public int? HourlyRecurrenceMinute
}
}
- /// The time zone ID (e.g. Pacific Standard time).
+ /// The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in `IReadOnlyCollection<string> TimeZoneConverter.TZConvert.KnownWindowsTimeZoneIds` (https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/README.md).
public string TimeZoneId { get; set; }
/// Notification settings.
public DevTestLabNotificationSettings NotificationSettings { get; set; }
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs
index e127960fa80e..c91aa1142fa9 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(ArmTemplateList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static ArmTemplateList DeserializeArmTemplateList(JsonElement element,
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static ArmTemplateList DeserializeArmTemplateList(JsonElement element,
}
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")
@@ -117,7 +114,7 @@ internal static ArmTemplateList DeserializeArmTemplateList(JsonElement element,
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new ArmTemplateList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new ArmTemplateList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.cs
index 982136e39329..3ed8a61f3139 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class ArmTemplateList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal ArmTemplateList()
+ /// The ArmTemplate items on this page.
+ /// is null.
+ internal ArmTemplateList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The ArmTemplate items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal ArmTemplateList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal ArmTemplateList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal ArmTemplateList()
+ {
+ }
+
+ /// The ArmTemplate items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs
index d594832843d4..e6748e58ebf6 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(ArtifactList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static ArtifactList DeserializeArtifactList(JsonElement element, ModelR
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static ArtifactList DeserializeArtifactList(JsonElement element, ModelR
}
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")
@@ -117,7 +114,7 @@ internal static ArtifactList DeserializeArtifactList(JsonElement element, ModelR
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new ArtifactList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new ArtifactList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.cs
index a07695d4f5f0..57e10eb82ded 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class ArtifactList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal ArtifactList()
+ /// The Artifact items on this page.
+ /// is null.
+ internal ArtifactList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The Artifact items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal ArtifactList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal ArtifactList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal ArtifactList()
+ {
+ }
+
+ /// The Artifact items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs
index b5718f63c903..5e7b9ae4a45c 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(ArtifactSourceList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static ArtifactSourceList DeserializeArtifactSourceList(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())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static ArtifactSourceList DeserializeArtifactSourceList(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")
@@ -117,7 +114,7 @@ internal static ArtifactSourceList DeserializeArtifactSourceList(JsonElement ele
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new ArtifactSourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new ArtifactSourceList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.cs
index 9e103338069e..59d6ecadeb43 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class ArtifactSourceList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal ArtifactSourceList()
+ /// The ArtifactSource items on this page.
+ /// is null.
+ internal ArtifactSourceList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The ArtifactSource items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal ArtifactSourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal ArtifactSourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal ArtifactSourceList()
+ {
+ }
+
+ /// The ArtifactSource items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs
index 30e2721c4fe3..3fa3f33eaa3a 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(CustomImageList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static CustomImageList DeserializeCustomImageList(JsonElement element,
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static CustomImageList DeserializeCustomImageList(JsonElement element,
}
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")
@@ -117,7 +114,7 @@ internal static CustomImageList DeserializeCustomImageList(JsonElement element,
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new CustomImageList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new CustomImageList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.cs
index 4b1ea75f9101..ae3c02dfdf15 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class CustomImageList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal CustomImageList()
+ /// The CustomImage items on this page.
+ /// is null.
+ internal CustomImageList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The CustomImage items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal CustomImageList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal CustomImageList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal CustomImageList()
+ {
+ }
+
+ /// The CustomImage items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.cs
index 6dda7f9ffebd..f047fd36f00d 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.cs
@@ -61,7 +61,7 @@ public DevTestLabScheduleCreationParameter()
/// If the schedule will occur only some days of the week, specify the weekly recurrence.
/// If the schedule will occur once each day of the week, specify the daily recurrence.
/// If the schedule will occur multiple times a day, specify the hourly recurrence.
- /// The time zone ID (e.g. Pacific Standard time).
+ /// The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in `IReadOnlyCollection<string> TimeZoneConverter.TZConvert.KnownWindowsTimeZoneIds` (https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/README.md).
/// Notification settings.
/// The resource ID to which the schedule belongs.
/// Keeps track of any properties unknown to the library.
@@ -121,7 +121,7 @@ public int? HourlyRecurrenceMinute
}
}
- /// The time zone ID (e.g. Pacific Standard time).
+ /// The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in `IReadOnlyCollection<string> TimeZoneConverter.TZConvert.KnownWindowsTimeZoneIds` (https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/README.md).
public string TimeZoneId { get; set; }
/// Notification settings.
public DevTestLabNotificationSettings NotificationSettings { get; set; }
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabStorageType.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabStorageType.cs
index f2f67aded4ca..069b1271412c 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabStorageType.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabStorageType.cs
@@ -10,7 +10,7 @@
namespace Azure.ResourceManager.DevTestLabs.Models
{
- /// The storage type for the disk (i.e. Standard, Premium).
+ /// Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
public readonly partial struct DevTestLabStorageType : IEquatable
{
private readonly string _value;
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs
index efaee3feedc6..252b0dac60ae 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(DiskList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static DiskList DeserializeDiskList(JsonElement element, ModelReaderWri
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static DiskList DeserializeDiskList(JsonElement element, ModelReaderWri
}
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")
@@ -117,7 +114,7 @@ internal static DiskList DeserializeDiskList(JsonElement element, ModelReaderWri
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new DiskList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new DiskList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.cs
index 8a76ceac4dbd..05c3de274eea 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class DiskList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal DiskList()
+ /// The Disk items on this page.
+ /// is null.
+ internal DiskList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The Disk items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal DiskList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal DiskList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal DiskList()
+ {
+ }
+
+ /// The Disk items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs
index 160543fdfbb0..79c21f8bb81c 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(DtlEnvironmentList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static DtlEnvironmentList DeserializeDtlEnvironmentList(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())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static DtlEnvironmentList DeserializeDtlEnvironmentList(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")
@@ -117,7 +114,7 @@ internal static DtlEnvironmentList DeserializeDtlEnvironmentList(JsonElement ele
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new DtlEnvironmentList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new DtlEnvironmentList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.cs
index d7d19eeac19c..80a97ff7d6d4 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class DtlEnvironmentList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal DtlEnvironmentList()
+ /// The DtlEnvironment items on this page.
+ /// is null.
+ internal DtlEnvironmentList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The DtlEnvironment items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal DtlEnvironmentList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal DtlEnvironmentList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal DtlEnvironmentList()
+ {
+ }
+
+ /// The DtlEnvironment items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs
index 097ef6626d6e..18fe17237d3e 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(FormulaList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static FormulaList DeserializeFormulaList(JsonElement element, ModelRea
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static FormulaList DeserializeFormulaList(JsonElement element, ModelRea
}
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")
@@ -117,7 +114,7 @@ internal static FormulaList DeserializeFormulaList(JsonElement element, ModelRea
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new FormulaList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new FormulaList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.cs
index 3f7e228b3cd2..a6e17b779ec9 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class FormulaList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal FormulaList()
+ /// The Formula items on this page.
+ /// is null.
+ internal FormulaList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The Formula items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal FormulaList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal FormulaList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal FormulaList()
+ {
+ }
+
+ /// The Formula items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs
index a5d647e39527..4f6233697c5d 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(GalleryImageList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static GalleryImageList DeserializeGalleryImageList(JsonElement element
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static GalleryImageList DeserializeGalleryImageList(JsonElement element
}
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")
@@ -117,7 +114,7 @@ internal static GalleryImageList DeserializeGalleryImageList(JsonElement element
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new GalleryImageList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new GalleryImageList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.cs
index 64e27a5e30d4..5d33aff12810 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class GalleryImageList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal GalleryImageList()
+ /// The GalleryImage items on this page.
+ /// is null.
+ internal GalleryImageList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The GalleryImage items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal GalleryImageList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal GalleryImageList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal GalleryImageList()
+ {
+ }
+
+ /// The GalleryImage items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs
index c0cf90c158f5..2d6a36b66e0b 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(LabList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static LabList DeserializeLabList(JsonElement element, ModelReaderWrite
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static LabList DeserializeLabList(JsonElement element, ModelReaderWrite
}
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")
@@ -117,7 +114,7 @@ internal static LabList DeserializeLabList(JsonElement element, ModelReaderWrite
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new LabList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new LabList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.cs
index 16444640dd62..7c8b0bda6601 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class LabList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal LabList()
+ /// The Lab items on this page.
+ /// is null.
+ internal LabList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The Lab items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal LabList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal LabList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal LabList()
+ {
+ }
+
+ /// The Lab items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs
index 8e280df72713..c7da15d65417 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs
@@ -35,20 +35,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(LabVhdList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- JsonSerializer.Serialize(writer, item);
- }
- writer.WriteEndArray();
+ JsonSerializer.Serialize(writer, item);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -88,17 +85,13 @@ internal static LabVhdList DeserializeLabVhdList(JsonElement element, ModelReade
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -109,7 +102,11 @@ internal static LabVhdList DeserializeLabVhdList(JsonElement element, ModelReade
}
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")
@@ -118,7 +115,7 @@ internal static LabVhdList DeserializeLabVhdList(JsonElement element, ModelReade
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new LabVhdList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new LabVhdList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.cs
index 06a31aab0ce6..101dbe6f9447 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.DevTestLabs.Models
@@ -47,25 +48,34 @@ internal partial class LabVhdList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal LabVhdList()
+ /// The LabVhd items on this page.
+ /// is null.
+ internal LabVhdList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The LabVhd items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal LabVhdList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal LabVhdList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal LabVhdList()
+ {
+ }
+
+ /// The LabVhd items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs
index f69fc190bb62..b7143a527dd6 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(LabVmList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static LabVmList DeserializeLabVmList(JsonElement element, ModelReaderW
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static LabVmList DeserializeLabVmList(JsonElement element, ModelReaderW
}
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")
@@ -117,7 +114,7 @@ internal static LabVmList DeserializeLabVmList(JsonElement element, ModelReaderW
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new LabVmList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new LabVmList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.cs
index 3a523c69db1b..dd7bb7e65f03 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class LabVmList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal LabVmList()
+ /// The LabVirtualMachine items on this page.
+ /// is null.
+ internal LabVmList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The LabVirtualMachine items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal LabVmList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal LabVmList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal LabVmList()
+ {
+ }
+
+ /// The LabVirtualMachine items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs
index 21e985a55037..dad9e270d56f 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(NotificationChannelList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static NotificationChannelList DeserializeNotificationChannelList(JsonE
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static NotificationChannelList DeserializeNotificationChannelList(JsonE
}
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")
@@ -117,7 +114,7 @@ internal static NotificationChannelList DeserializeNotificationChannelList(JsonE
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new NotificationChannelList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new NotificationChannelList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.cs
index 1f92d5ba8543..729af3081ea1 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class NotificationChannelList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal NotificationChannelList()
+ /// The NotificationChannel items on this page.
+ /// is null.
+ internal NotificationChannelList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The NotificationChannel items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal NotificationChannelList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal NotificationChannelList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal NotificationChannelList()
+ {
+ }
+
+ /// The NotificationChannel items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs
index 9ab950c8af12..a29a45b52793 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(PolicyList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static PolicyList DeserializePolicyList(JsonElement element, ModelReade
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static PolicyList DeserializePolicyList(JsonElement element, ModelReade
}
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")
@@ -117,7 +114,7 @@ internal static PolicyList DeserializePolicyList(JsonElement element, ModelReade
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new PolicyList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new PolicyList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.cs
index e1436379cbb5..306ee1a7eb07 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class PolicyList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal PolicyList()
+ /// The Policy items on this page.
+ /// is null.
+ internal PolicyList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The Policy items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal PolicyList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal PolicyList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal PolicyList()
+ {
+ }
+
+ /// The Policy items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs
index f72a4ac114e4..c269c6a5cb6a 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(ScheduleList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static ScheduleList DeserializeScheduleList(JsonElement element, ModelR
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static ScheduleList DeserializeScheduleList(JsonElement element, ModelR
}
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")
@@ -117,7 +114,7 @@ internal static ScheduleList DeserializeScheduleList(JsonElement element, ModelR
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new ScheduleList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new ScheduleList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.cs
index 29f840eefddb..7136a672481c 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class ScheduleList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal ScheduleList()
+ /// The Schedule items on this page.
+ /// is null.
+ internal ScheduleList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The Schedule items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal ScheduleList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal ScheduleList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal ScheduleList()
+ {
+ }
+
+ /// The Schedule items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs
index 7f17a6254772..02f6cab7fcb3 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(SecretList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static SecretList DeserializeSecretList(JsonElement element, ModelReade
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static SecretList DeserializeSecretList(JsonElement element, ModelReade
}
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")
@@ -117,7 +114,7 @@ internal static SecretList DeserializeSecretList(JsonElement element, ModelReade
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new SecretList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new SecretList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.cs
index 12488a687cad..053c2df5b60f 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
namespace Azure.ResourceManager.DevTestLabs.Models
{
@@ -46,25 +47,34 @@ internal partial class SecretList
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- internal SecretList()
+ /// The Secret items on this page.
+ /// is null.
+ internal SecretList(IEnumerable value)
{
- Value = new ChangeTrackingList();
+ Argument.AssertNotNull(value, nameof(value));
+
+ Value = value.ToList();
}
/// Initializes a new instance of .
- /// Results of the list operation.
- /// Link for next set of results.
+ /// The Secret items on this page.
+ /// The link to the next page of items.
/// Keeps track of any properties unknown to the library.
- internal SecretList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ internal SecretList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData)
{
Value = value;
NextLink = nextLink;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Results of the list operation.
+ /// Initializes a new instance of for deserialization.
+ internal SecretList()
+ {
+ }
+
+ /// The Secret items on this page.
public IReadOnlyList Value { get; }
- /// Link for next set of results.
- public string NextLink { get; }
+ /// The link to the next page of items.
+ public Uri NextLink { get; }
}
}
diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs
index 821915ffa2aa..c97ef705a7db 100644
--- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs
+++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs
@@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
throw new FormatException($"The model {nameof(ServiceFabricList)} does not support writing '{format}' format.");
}
- if (Optional.IsCollectionDefined(Value))
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
{
- writer.WritePropertyName("value"u8);
- writer.WriteStartArray();
- foreach (var item in Value)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
if (Optional.IsDefined(NextLink))
{
writer.WritePropertyName("nextLink"u8);
- writer.WriteStringValue(NextLink);
+ writer.WriteStringValue(NextLink.AbsoluteUri);
}
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -87,17 +84,13 @@ internal static ServiceFabricList DeserializeServiceFabricList(JsonElement eleme
return null;
}
IReadOnlyList value = default;
- string nextLink = default;
+ Uri nextLink = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("value"u8))
{
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
List array = new List();
foreach (var item in property.Value.EnumerateArray())
{
@@ -108,7 +101,11 @@ internal static ServiceFabricList DeserializeServiceFabricList(JsonElement eleme
}
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")
@@ -117,7 +114,7 @@ internal static ServiceFabricList DeserializeServiceFabricList(JsonElement eleme
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new ServiceFabricList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ return new ServiceFabricList(value, nextLink, serializedAdditionalRawData);
}
BinaryData IPersistableModel