diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationData.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationData.Serialization.cs
new file mode 100644
index 000000000000..dc3b1dde4432
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationData.Serialization.cs
@@ -0,0 +1,756 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.DesktopVirtualization.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.DesktopVirtualization
+{
+ public partial class ActiveSessionHostConfigurationData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (options.Format != "W" && Optional.IsDefined(Version))
+ {
+ writer.WritePropertyName("version"u8);
+ writer.WriteStringValue(Version.Value, "O");
+ }
+ if (Optional.IsDefined(FriendlyName))
+ {
+ writer.WritePropertyName("friendlyName"u8);
+ writer.WriteStringValue(FriendlyName);
+ }
+ if (Optional.IsCollectionDefined(VmTags))
+ {
+ writer.WritePropertyName("vmTags"u8);
+ writer.WriteStartObject();
+ foreach (var item in VmTags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ if (Optional.IsDefined(VmLocation))
+ {
+ writer.WritePropertyName("vmLocation"u8);
+ writer.WriteStringValue(VmLocation);
+ }
+ if (Optional.IsDefined(VmResourceGroup))
+ {
+ writer.WritePropertyName("vmResourceGroup"u8);
+ writer.WriteStringValue(VmResourceGroup);
+ }
+ writer.WritePropertyName("vmNamePrefix"u8);
+ writer.WriteStringValue(VmNamePrefix);
+ if (Optional.IsCollectionDefined(AvailabilityZones))
+ {
+ writer.WritePropertyName("availabilityZones"u8);
+ writer.WriteStartArray();
+ foreach (var item in AvailabilityZones)
+ {
+ writer.WriteNumberValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WritePropertyName("networkInfo"u8);
+ writer.WriteObjectValue(NetworkInfo, options);
+ writer.WritePropertyName("vmSizeId"u8);
+ writer.WriteStringValue(VmSizeId);
+ writer.WritePropertyName("diskInfo"u8);
+ writer.WriteObjectValue(DiskInfo, options);
+ if (Optional.IsDefined(CustomConfigurationScriptUri))
+ {
+ writer.WritePropertyName("customConfigurationScriptUrl"u8);
+ writer.WriteStringValue(CustomConfigurationScriptUri.AbsoluteUri);
+ }
+ writer.WritePropertyName("imageInfo"u8);
+ writer.WriteObjectValue(ImageInfo, options);
+ writer.WritePropertyName("domainInfo"u8);
+ writer.WriteObjectValue(DomainInfo, options);
+ if (Optional.IsDefined(SecurityInfo))
+ {
+ writer.WritePropertyName("securityInfo"u8);
+ writer.WriteObjectValue(SecurityInfo, options);
+ }
+ writer.WritePropertyName("vmAdminCredentials"u8);
+ writer.WriteObjectValue(VmAdminCredentials, options);
+ if (Optional.IsDefined(BootDiagnosticsInfo))
+ {
+ writer.WritePropertyName("bootDiagnosticsInfo"u8);
+ writer.WriteObjectValue(BootDiagnosticsInfo, options);
+ }
+ writer.WriteEndObject();
+ }
+
+ ActiveSessionHostConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeActiveSessionHostConfigurationData(document.RootElement, options);
+ }
+
+ internal static ActiveSessionHostConfigurationData DeserializeActiveSessionHostConfigurationData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ DateTimeOffset? version = default;
+ string friendlyName = default;
+ IDictionary vmTags = default;
+ string vmLocation = default;
+ string vmResourceGroup = default;
+ string vmNamePrefix = default;
+ IList availabilityZones = default;
+ NetworkInfoProperties networkInfo = default;
+ string vmSizeId = default;
+ DiskInfoProperties diskInfo = default;
+ Uri customConfigurationScriptUrl = default;
+ ImageInfoProperties imageInfo = default;
+ DomainInfoProperties domainInfo = default;
+ SecurityInfoProperties securityInfo = default;
+ KeyVaultCredentialsProperties vmAdminCredentials = default;
+ BootDiagnosticsInfoProperties bootDiagnosticsInfo = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("version"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ version = property0.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property0.NameEquals("friendlyName"u8))
+ {
+ friendlyName = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("vmTags"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property1 in property0.Value.EnumerateObject())
+ {
+ dictionary.Add(property1.Name, property1.Value.GetString());
+ }
+ vmTags = dictionary;
+ continue;
+ }
+ if (property0.NameEquals("vmLocation"u8))
+ {
+ vmLocation = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("vmResourceGroup"u8))
+ {
+ vmResourceGroup = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("vmNamePrefix"u8))
+ {
+ vmNamePrefix = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("availabilityZones"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ array.Add(item.GetInt32());
+ }
+ availabilityZones = array;
+ continue;
+ }
+ if (property0.NameEquals("networkInfo"u8))
+ {
+ networkInfo = NetworkInfoProperties.DeserializeNetworkInfoProperties(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("vmSizeId"u8))
+ {
+ vmSizeId = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("diskInfo"u8))
+ {
+ diskInfo = DiskInfoProperties.DeserializeDiskInfoProperties(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("customConfigurationScriptUrl"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ customConfigurationScriptUrl = new Uri(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("imageInfo"u8))
+ {
+ imageInfo = ImageInfoProperties.DeserializeImageInfoProperties(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("domainInfo"u8))
+ {
+ domainInfo = DomainInfoProperties.DeserializeDomainInfoProperties(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("securityInfo"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ securityInfo = SecurityInfoProperties.DeserializeSecurityInfoProperties(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("vmAdminCredentials"u8))
+ {
+ vmAdminCredentials = KeyVaultCredentialsProperties.DeserializeKeyVaultCredentialsProperties(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("bootDiagnosticsInfo"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ bootDiagnosticsInfo = BootDiagnosticsInfoProperties.DeserializeBootDiagnosticsInfoProperties(property0.Value, options);
+ continue;
+ }
+ }
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ActiveSessionHostConfigurationData(
+ id,
+ name,
+ type,
+ systemData,
+ version,
+ friendlyName,
+ vmTags ?? new ChangeTrackingDictionary(),
+ vmLocation,
+ vmResourceGroup,
+ vmNamePrefix,
+ availabilityZones ?? new ChangeTrackingList(),
+ networkInfo,
+ vmSizeId,
+ diskInfo,
+ customConfigurationScriptUrl,
+ imageInfo,
+ domainInfo,
+ securityInfo,
+ vmAdminCredentials,
+ bootDiagnosticsInfo,
+ serializedAdditionalRawData);
+ }
+
+ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
+ {
+ StringBuilder builder = new StringBuilder();
+ BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions;
+ IDictionary propertyOverrides = null;
+ bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides);
+ bool hasPropertyOverride = false;
+ string propertyOverride = null;
+
+ builder.AppendLine("{");
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" name: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(Name))
+ {
+ builder.Append(" name: ");
+ if (Name.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{Name}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{Name}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" id: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(Id))
+ {
+ builder.Append(" id: ");
+ builder.AppendLine($"'{Id.ToString()}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" systemData: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(SystemData))
+ {
+ builder.Append(" systemData: ");
+ builder.AppendLine($"'{SystemData.ToString()}'");
+ }
+ }
+
+ builder.Append(" properties:");
+ builder.AppendLine(" {");
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" version: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(Version))
+ {
+ builder.Append(" version: ");
+ var formattedDateTimeString = TypeFormatters.ToString(Version.Value, "o");
+ builder.AppendLine($"'{formattedDateTimeString}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FriendlyName), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" friendlyName: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(FriendlyName))
+ {
+ builder.Append(" friendlyName: ");
+ if (FriendlyName.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{FriendlyName}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{FriendlyName}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmTags), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" vmTags: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsCollectionDefined(VmTags))
+ {
+ if (VmTags.Any())
+ {
+ builder.Append(" vmTags: ");
+ builder.AppendLine("{");
+ foreach (var item in VmTags)
+ {
+ builder.Append($" '{item.Key}': ");
+ if (item.Value == null)
+ {
+ builder.Append("null");
+ continue;
+ }
+ if (item.Value.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{item.Value}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{item.Value}'");
+ }
+ }
+ builder.AppendLine(" }");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmLocation), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" vmLocation: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(VmLocation))
+ {
+ builder.Append(" vmLocation: ");
+ if (VmLocation.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{VmLocation}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{VmLocation}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmResourceGroup), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" vmResourceGroup: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(VmResourceGroup))
+ {
+ builder.Append(" vmResourceGroup: ");
+ if (VmResourceGroup.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{VmResourceGroup}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{VmResourceGroup}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmNamePrefix), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" vmNamePrefix: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(VmNamePrefix))
+ {
+ builder.Append(" vmNamePrefix: ");
+ if (VmNamePrefix.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{VmNamePrefix}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{VmNamePrefix}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailabilityZones), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" availabilityZones: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsCollectionDefined(AvailabilityZones))
+ {
+ if (AvailabilityZones.Any())
+ {
+ builder.Append(" availabilityZones: ");
+ builder.AppendLine("[");
+ foreach (var item in AvailabilityZones)
+ {
+ builder.AppendLine($" {item}");
+ }
+ builder.AppendLine(" ]");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkInfo), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" networkInfo: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(NetworkInfo))
+ {
+ builder.Append(" networkInfo: ");
+ BicepSerializationHelpers.AppendChildObject(builder, NetworkInfo, options, 4, false, " networkInfo: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmSizeId), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" vmSizeId: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(VmSizeId))
+ {
+ builder.Append(" vmSizeId: ");
+ if (VmSizeId.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{VmSizeId}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{VmSizeId}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DiskInfo), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" diskInfo: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(DiskInfo))
+ {
+ builder.Append(" diskInfo: ");
+ BicepSerializationHelpers.AppendChildObject(builder, DiskInfo, options, 4, false, " diskInfo: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomConfigurationScriptUri), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" customConfigurationScriptUrl: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(CustomConfigurationScriptUri))
+ {
+ builder.Append(" customConfigurationScriptUrl: ");
+ builder.AppendLine($"'{CustomConfigurationScriptUri.AbsoluteUri}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ImageInfo), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" imageInfo: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(ImageInfo))
+ {
+ builder.Append(" imageInfo: ");
+ BicepSerializationHelpers.AppendChildObject(builder, ImageInfo, options, 4, false, " imageInfo: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DomainInfo), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" domainInfo: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(DomainInfo))
+ {
+ builder.Append(" domainInfo: ");
+ BicepSerializationHelpers.AppendChildObject(builder, DomainInfo, options, 4, false, " domainInfo: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecurityInfo), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" securityInfo: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(SecurityInfo))
+ {
+ builder.Append(" securityInfo: ");
+ BicepSerializationHelpers.AppendChildObject(builder, SecurityInfo, options, 4, false, " securityInfo: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmAdminCredentials), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" vmAdminCredentials: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(VmAdminCredentials))
+ {
+ builder.Append(" vmAdminCredentials: ");
+ BicepSerializationHelpers.AppendChildObject(builder, VmAdminCredentials, options, 4, false, " vmAdminCredentials: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BootDiagnosticsInfo), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" bootDiagnosticsInfo: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(BootDiagnosticsInfo))
+ {
+ builder.Append(" bootDiagnosticsInfo: ");
+ BicepSerializationHelpers.AppendChildObject(builder, BootDiagnosticsInfo, options, 4, false, " bootDiagnosticsInfo: ");
+ }
+ }
+
+ builder.AppendLine(" }");
+ builder.AppendLine("}");
+ return BinaryData.FromString(builder.ToString());
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ case "bicep":
+ return SerializeBicep(options);
+ default:
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ActiveSessionHostConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeActiveSessionHostConfigurationData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationData.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationData.cs
new file mode 100644
index 000000000000..f64eed0f5e90
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationData.cs
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.DesktopVirtualization.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.DesktopVirtualization
+{
+ ///
+ /// A class representing the ActiveSessionHostConfiguration data model.
+ /// Represents a ActiveSessionHostConfiguration definition. This has all of the sessionHostConfiguration properties except provisioningState
+ ///
+ public partial class ActiveSessionHostConfigurationData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The prefix that should be associated with session host names.
+ /// Network information.
+ /// The id of the size of a virtual machine connected to a hostpool. Example: Standard_D2as_v6.
+ /// Disk information.
+ /// Image configurations of HostPool.
+ /// Domain configurations of session hosts.
+ /// Local Admin credentials for session hosts.
+ /// , , , , , or is null.
+ public ActiveSessionHostConfigurationData(string vmNamePrefix, NetworkInfoProperties networkInfo, string vmSizeId, DiskInfoProperties diskInfo, ImageInfoProperties imageInfo, DomainInfoProperties domainInfo, KeyVaultCredentialsProperties vmAdminCredentials)
+ {
+ Argument.AssertNotNull(vmNamePrefix, nameof(vmNamePrefix));
+ Argument.AssertNotNull(networkInfo, nameof(networkInfo));
+ Argument.AssertNotNull(vmSizeId, nameof(vmSizeId));
+ Argument.AssertNotNull(diskInfo, nameof(diskInfo));
+ Argument.AssertNotNull(imageInfo, nameof(imageInfo));
+ Argument.AssertNotNull(domainInfo, nameof(domainInfo));
+ Argument.AssertNotNull(vmAdminCredentials, nameof(vmAdminCredentials));
+
+ VmTags = new ChangeTrackingDictionary();
+ VmNamePrefix = vmNamePrefix;
+ AvailabilityZones = new ChangeTrackingList();
+ NetworkInfo = networkInfo;
+ VmSizeId = vmSizeId;
+ DiskInfo = diskInfo;
+ ImageInfo = imageInfo;
+ DomainInfo = domainInfo;
+ VmAdminCredentials = vmAdminCredentials;
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The timestamp of the last update.
+ /// Friendly name to describe this version of the SessionHostConfiguration.
+ /// Hashtable that lists key/value pair tags to apply to the VMs.
+ /// The Location for the session host to be created in. It will default to the location of the hostpool if not provided.
+ /// The ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided.
+ /// The prefix that should be associated with session host names.
+ /// Value for availability zones to be used by the session host. Should be from [1,2,3].
+ /// Network information.
+ /// The id of the size of a virtual machine connected to a hostpool. Example: Standard_D2as_v6.
+ /// Disk information.
+ /// The uri to the storage blob containing the arm template to be run on the virtual machine after provisioning.
+ /// Image configurations of HostPool.
+ /// Domain configurations of session hosts.
+ /// Security information.
+ /// Local Admin credentials for session hosts.
+ /// Boot Diagnostics information.
+ /// Keeps track of any properties unknown to the library.
+ internal ActiveSessionHostConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? version, string friendlyName, IDictionary vmTags, string vmLocation, string vmResourceGroup, string vmNamePrefix, IList availabilityZones, NetworkInfoProperties networkInfo, string vmSizeId, DiskInfoProperties diskInfo, Uri customConfigurationScriptUri, ImageInfoProperties imageInfo, DomainInfoProperties domainInfo, SecurityInfoProperties securityInfo, KeyVaultCredentialsProperties vmAdminCredentials, BootDiagnosticsInfoProperties bootDiagnosticsInfo, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Version = version;
+ FriendlyName = friendlyName;
+ VmTags = vmTags;
+ VmLocation = vmLocation;
+ VmResourceGroup = vmResourceGroup;
+ VmNamePrefix = vmNamePrefix;
+ AvailabilityZones = availabilityZones;
+ NetworkInfo = networkInfo;
+ VmSizeId = vmSizeId;
+ DiskInfo = diskInfo;
+ CustomConfigurationScriptUri = customConfigurationScriptUri;
+ ImageInfo = imageInfo;
+ DomainInfo = domainInfo;
+ SecurityInfo = securityInfo;
+ VmAdminCredentials = vmAdminCredentials;
+ BootDiagnosticsInfo = bootDiagnosticsInfo;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal ActiveSessionHostConfigurationData()
+ {
+ }
+
+ /// The timestamp of the last update.
+ [WirePath("properties.version")]
+ public DateTimeOffset? Version { get; }
+ /// Friendly name to describe this version of the SessionHostConfiguration.
+ [WirePath("properties.friendlyName")]
+ public string FriendlyName { get; set; }
+ /// Hashtable that lists key/value pair tags to apply to the VMs.
+ [WirePath("properties.vmTags")]
+ public IDictionary VmTags { get; }
+ /// The Location for the session host to be created in. It will default to the location of the hostpool if not provided.
+ [WirePath("properties.vmLocation")]
+ public string VmLocation { get; set; }
+ /// The ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided.
+ [WirePath("properties.vmResourceGroup")]
+ public string VmResourceGroup { get; set; }
+ /// The prefix that should be associated with session host names.
+ [WirePath("properties.vmNamePrefix")]
+ public string VmNamePrefix { get; set; }
+ /// Value for availability zones to be used by the session host. Should be from [1,2,3].
+ [WirePath("properties.availabilityZones")]
+ public IList AvailabilityZones { get; }
+ /// Network information.
+ [WirePath("properties.networkInfo")]
+ public NetworkInfoProperties NetworkInfo { get; set; }
+ /// The id of the size of a virtual machine connected to a hostpool. Example: Standard_D2as_v6.
+ [WirePath("properties.vmSizeId")]
+ public string VmSizeId { get; set; }
+ /// Disk information.
+ [WirePath("properties.diskInfo")]
+ public DiskInfoProperties DiskInfo { get; set; }
+ /// The uri to the storage blob containing the arm template to be run on the virtual machine after provisioning.
+ [WirePath("properties.customConfigurationScriptUrl")]
+ public Uri CustomConfigurationScriptUri { get; set; }
+ /// Image configurations of HostPool.
+ [WirePath("properties.imageInfo")]
+ public ImageInfoProperties ImageInfo { get; set; }
+ /// Domain configurations of session hosts.
+ [WirePath("properties.domainInfo")]
+ public DomainInfoProperties DomainInfo { get; set; }
+ /// Security information.
+ [WirePath("properties.securityInfo")]
+ public SecurityInfoProperties SecurityInfo { get; set; }
+ /// Local Admin credentials for session hosts.
+ [WirePath("properties.vmAdminCredentials")]
+ public KeyVaultCredentialsProperties VmAdminCredentials { get; set; }
+ /// Boot Diagnostics information.
+ [WirePath("properties.bootDiagnosticsInfo")]
+ public BootDiagnosticsInfoProperties BootDiagnosticsInfo { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationResource.Serialization.cs
new file mode 100644
index 000000000000..02ea848ec80e
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.DesktopVirtualization
+{
+ public partial class ActiveSessionHostConfigurationResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ ActiveSessionHostConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+
+ ActiveSessionHostConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationResource.cs
new file mode 100644
index 000000000000..a9616e1a5b76
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ActiveSessionHostConfigurationResource.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.DesktopVirtualization
+{
+ ///
+ /// A Class representing an ActiveSessionHostConfiguration along with the instance operations that can be performed on it.
+ /// If you have a you can construct an
+ /// from an instance of using the GetActiveSessionHostConfigurationResource method.
+ /// Otherwise you can get one from its parent resource using the GetActiveSessionHostConfiguration method.
+ ///
+ public partial class ActiveSessionHostConfigurationResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The hostPoolName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string hostPoolName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/activeSessionHostConfigurations/default";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _activeSessionHostConfigurationClientDiagnostics;
+ private readonly ActiveSessionHostConfigurationsRestOperations _activeSessionHostConfigurationRestClient;
+ private readonly ActiveSessionHostConfigurationData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.DesktopVirtualization/hostPools/activeSessionHostConfigurations";
+
+ /// Initializes a new instance of the class for mocking.
+ protected ActiveSessionHostConfigurationResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ActiveSessionHostConfigurationResource(ArmClient client, ActiveSessionHostConfigurationData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal ActiveSessionHostConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _activeSessionHostConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string activeSessionHostConfigurationApiVersion);
+ _activeSessionHostConfigurationRestClient = new ActiveSessionHostConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, activeSessionHostConfigurationApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual ActiveSessionHostConfigurationData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get the ActiveSessionHostConfiguration for the hostPool that is currently being used for update operations.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/activeSessionHostConfigurations/default
+ ///
+ /// -
+ /// Operation Id
+ /// ActiveSessionHostConfigurations_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _activeSessionHostConfigurationClientDiagnostics.CreateScope("ActiveSessionHostConfigurationResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _activeSessionHostConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ActiveSessionHostConfigurationResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the ActiveSessionHostConfiguration for the hostPool that is currently being used for update operations.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/activeSessionHostConfigurations/default
+ ///
+ /// -
+ /// Operation Id
+ /// ActiveSessionHostConfigurations_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _activeSessionHostConfigurationClientDiagnostics.CreateScope("ActiveSessionHostConfigurationResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _activeSessionHostConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ActiveSessionHostConfigurationResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs
index a8a7cee93187..2b0f3cccd3c6 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -74,7 +74,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// Object containing App Attach Package definitions.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
@@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdate
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -125,7 +125,7 @@ public virtual async Task> CreateOrUpdate
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// Object containing App Attach Package definitions.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
@@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -175,7 +175,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string ap
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -220,7 +220,7 @@ public virtual async Task> GetAsync(string ap
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -257,7 +257,7 @@ public virtual Response Get(string appAttachPackageNam
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -265,7 +265,7 @@ public virtual Response Get(string appAttachPackageNam
///
///
///
- /// OData filter expression. Valid properties for filtering are package name and host pool.
+ /// OData filter expression. Valid properties for filtering are package name, host pool, package owner name, and custom data.
/// The cancellation token to use.
/// An async collection of that may take multiple service requests to iterate over.
public virtual AsyncPageable GetAllAsync(string filter = null, CancellationToken cancellationToken = default)
@@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(string filter
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -296,7 +296,7 @@ public virtual AsyncPageable GetAllAsync(string filter
///
///
///
- /// OData filter expression. Valid properties for filtering are package name and host pool.
+ /// OData filter expression. Valid properties for filtering are package name, host pool, package owner name, and custom data.
/// The cancellation token to use.
/// A collection of that may take multiple service requests to iterate over.
public virtual Pageable GetAll(string filter = null, CancellationToken cancellationToken = default)
@@ -319,7 +319,7 @@ public virtual Pageable GetAll(string filter = null, C
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = null, C
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string appAttachPackageNam
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string appAttachPackageNam
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -405,7 +405,7 @@ public virtual Response Exists(string appAttachPackageName, CancellationTo
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -413,7 +413,7 @@ public virtual Response Exists(string appAttachPackageName, CancellationTo
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -450,7 +450,7 @@ public virtual async Task> GetIfExist
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -458,7 +458,7 @@ public virtual async Task> GetIfExist
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs
index 61eb87ae10fa..14b5dd5d2b48 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs
@@ -6,6 +6,7 @@
#nullable disable
using System;
+using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
@@ -102,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -142,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -182,7 +183,7 @@ public virtual Response Get(CancellationToken cancella
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -191,15 +192,16 @@ public virtual Response Get(CancellationToken cancella
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Force flag to delete App Attach package.
/// The cancellation token to use.
- public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? force = null, CancellationToken cancellationToken = default)
{
using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Delete");
scope.Start();
try
{
- var response = await _appAttachPackageRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
- var uri = _appAttachPackageRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ var response = await _appAttachPackageRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, force, cancellationToken).ConfigureAwait(false);
+ var uri = _appAttachPackageRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, force);
var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
var operation = new DesktopVirtualizationArmOperation(response, rehydrationToken);
if (waitUntil == WaitUntil.Completed)
@@ -226,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -235,15 +237,16 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Force flag to delete App Attach package.
/// The cancellation token to use.
- public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, CancellationToken cancellationToken = default)
{
using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Delete");
scope.Start();
try
{
- var response = _appAttachPackageRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
- var uri = _appAttachPackageRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ var response = _appAttachPackageRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, force, cancellationToken);
+ var uri = _appAttachPackageRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, force);
var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
var operation = new DesktopVirtualizationArmOperation(response, rehydrationToken);
if (waitUntil == WaitUntil.Completed)
@@ -270,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -312,7 +315,7 @@ public virtual async Task> UpdateAsync(AppAtt
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -340,5 +343,363 @@ public virtual Response Update(AppAttachPackagePatch p
throw;
}
}
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}
+ ///
+ /// -
+ /// Operation Id
+ /// AppAttachPackage_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues[key] = value;
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new AppAttachPackagePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}
+ ///
+ /// -
+ /// Operation Id
+ /// AppAttachPackage_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues[key] = value;
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new AppAttachPackagePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}
+ ///
+ /// -
+ /// Operation Id
+ /// AppAttachPackage_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new AppAttachPackagePatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}
+ ///
+ /// -
+ /// Operation Id
+ /// AppAttachPackage_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken);
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new AppAttachPackagePatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}
+ ///
+ /// -
+ /// Operation Id
+ /// AppAttachPackage_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.Remove(key);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new AppAttachPackagePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}
+ ///
+ /// -
+ /// Operation Id
+ /// AppAttachPackage_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.Remove(key);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new AppAttachPackagePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
}
}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs
index 41d4d2aba32f..890103075ba8 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs
@@ -34,9 +34,9 @@ public static partial class ArmDesktopVirtualizationModelFactory
/// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
/// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
/// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- /// Gets or sets the identity. Current supported identity types: SystemAssigned.
+ /// Managed service identity (system assigned and/or user assigned identities).
/// The resource model definition representing SKU.
- /// Gets or sets the plan.
+ /// Plan for the resource.
/// A new instance for mocking.
public static VirtualWorkspaceData VirtualWorkspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string objectId = null, string description = null, string friendlyName = null, IEnumerable applicationGroupReferences = null, bool? isCloudPCResource = null, DesktopVirtualizationPublicNetworkAccess? publicNetworkAccess = null, IEnumerable privateEndpointConnections = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null)
{
@@ -157,14 +157,14 @@ public static DesktopVirtualizationPrivateLinkResourceData DesktopVirtualization
/// Timezone of the scaling plan.
/// HostPool type for desktop.
/// Exclusion tag for scaling plan.
- /// List of ScalingPlanPooledSchedule definitions.
+ /// List of Pooled ScalingSchedule definitions.
/// List of ScalingHostPoolReference definitions.
/// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
/// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
/// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- /// Gets or sets the identity. Current supported identity types: SystemAssigned.
+ /// Managed service identity (system assigned and/or user assigned identities).
/// The resource model definition representing SKU.
- /// Gets or sets the plan.
+ /// Plan for the resource.
/// A new instance for mocking.
public static ScalingPlanData ScalingPlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string objectId = null, string description = null, string friendlyName = null, string timeZone = null, ScalingHostPoolType? scalingHostPoolType = null, string exclusionTag = null, IEnumerable schedules = null, IEnumerable hostPoolReferences = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null)
{
@@ -201,7 +201,10 @@ public static ScalingPlanData ScalingPlanData(ResourceIdentifier id = null, stri
/// The name.
/// The resourceType.
/// The systemData.
+ /// Name of the ScalingPlanPooledSchedule.
/// Set of days of the week on which this schedule is active.
+ /// The desired scaling method to be used to scale the hosts in the assigned host pool.
+ /// The properties that control how Scaling will manage the size of the hostpool by creating and deleting hosts.
/// Starting time for ramp up period.
/// Load balancing algorithm for ramp up period.
/// Minimum host percentage for ramp up period.
@@ -219,7 +222,7 @@ public static ScalingPlanData ScalingPlanData(ResourceIdentifier id = null, stri
/// Starting time for off-peak period.
/// Load balancing algorithm for off-peak period.
/// A new instance for mocking.
- public static ScalingPlanPooledScheduleData ScalingPlanPooledScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable daysOfWeek = null, ScalingActionTime rampUpStartTime = null, SessionHostLoadBalancingAlgorithm? rampUpLoadBalancingAlgorithm = null, int? rampUpMinimumHostsPct = null, int? rampUpCapacityThresholdPct = null, ScalingActionTime peakStartTime = null, SessionHostLoadBalancingAlgorithm? peakLoadBalancingAlgorithm = null, ScalingActionTime rampDownStartTime = null, SessionHostLoadBalancingAlgorithm? rampDownLoadBalancingAlgorithm = null, int? rampDownMinimumHostsPct = null, int? rampDownCapacityThresholdPct = null, bool? rampDownForceLogoffUsers = null, DesktopVirtualizationStopHostsWhen? rampDownStopHostsWhen = null, int? rampDownWaitTimeMinutes = null, string rampDownNotificationMessage = null, ScalingActionTime offPeakStartTime = null, SessionHostLoadBalancingAlgorithm? offPeakLoadBalancingAlgorithm = null)
+ public static ScalingPlanPooledScheduleData ScalingPlanPooledScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string namePropertiesName = null, IEnumerable daysOfWeek = null, ScalingMethod? scalingMethod = null, CreateDeleteProperties createDelete = null, ScalingActionTime rampUpStartTime = null, SessionHostLoadBalancingAlgorithm? rampUpLoadBalancingAlgorithm = null, int? rampUpMinimumHostsPct = null, int rampUpCapacityThresholdPct = default, ScalingActionTime peakStartTime = null, SessionHostLoadBalancingAlgorithm? peakLoadBalancingAlgorithm = null, ScalingActionTime rampDownStartTime = null, SessionHostLoadBalancingAlgorithm? rampDownLoadBalancingAlgorithm = null, int? rampDownMinimumHostsPct = null, int rampDownCapacityThresholdPct = default, bool? rampDownForceLogoffUsers = null, DesktopVirtualizationStopHostsWhen? rampDownStopHostsWhen = null, int? rampDownWaitTimeMinutes = null, string rampDownNotificationMessage = null, ScalingActionTime offPeakStartTime = null, SessionHostLoadBalancingAlgorithm? offPeakLoadBalancingAlgorithm = null)
{
daysOfWeek ??= new List();
@@ -228,7 +231,10 @@ public static ScalingPlanPooledScheduleData ScalingPlanPooledScheduleData(Resour
name,
resourceType,
systemData,
+ namePropertiesName,
daysOfWeek?.ToList(),
+ scalingMethod,
+ createDelete,
rampUpStartTime,
rampUpLoadBalancingAlgorithm,
rampUpMinimumHostsPct,
@@ -253,7 +259,10 @@ public static ScalingPlanPooledScheduleData ScalingPlanPooledScheduleData(Resour
/// The name.
/// The resourceType.
/// The systemData.
+ /// Name of the ScalingPlanPooledSchedule.
/// Set of days of the week on which this schedule is active.
+ /// The desired scaling method to be used to scale the hosts in the assigned host pool.
+ /// The properties that control how Scaling will manage the size of the hostpool by creating and deleting hosts.
/// Starting time for ramp up period.
/// Load balancing algorithm for ramp up period.
/// Minimum host percentage for ramp up period.
@@ -271,7 +280,7 @@ public static ScalingPlanPooledScheduleData ScalingPlanPooledScheduleData(Resour
/// Starting time for off-peak period.
/// Load balancing algorithm for off-peak period.
/// A new instance for mocking.
- public static ScalingPlanPooledSchedulePatch ScalingPlanPooledSchedulePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable daysOfWeek = null, ScalingActionTime rampUpStartTime = null, SessionHostLoadBalancingAlgorithm? rampUpLoadBalancingAlgorithm = null, int? rampUpMinimumHostsPct = null, int? rampUpCapacityThresholdPct = null, ScalingActionTime peakStartTime = null, SessionHostLoadBalancingAlgorithm? peakLoadBalancingAlgorithm = null, ScalingActionTime rampDownStartTime = null, SessionHostLoadBalancingAlgorithm? rampDownLoadBalancingAlgorithm = null, int? rampDownMinimumHostsPct = null, int? rampDownCapacityThresholdPct = null, bool? rampDownForceLogoffUsers = null, DesktopVirtualizationStopHostsWhen? rampDownStopHostsWhen = null, int? rampDownWaitTimeMinutes = null, string rampDownNotificationMessage = null, ScalingActionTime offPeakStartTime = null, SessionHostLoadBalancingAlgorithm? offPeakLoadBalancingAlgorithm = null)
+ public static ScalingPlanPooledSchedulePatch ScalingPlanPooledSchedulePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string namePropertiesName = null, IEnumerable daysOfWeek = null, ScalingMethod? scalingMethod = null, CreateDeleteProperties createDelete = null, ScalingActionTime rampUpStartTime = null, SessionHostLoadBalancingAlgorithm? rampUpLoadBalancingAlgorithm = null, int? rampUpMinimumHostsPct = null, int? rampUpCapacityThresholdPct = null, ScalingActionTime peakStartTime = null, SessionHostLoadBalancingAlgorithm? peakLoadBalancingAlgorithm = null, ScalingActionTime rampDownStartTime = null, SessionHostLoadBalancingAlgorithm? rampDownLoadBalancingAlgorithm = null, int? rampDownMinimumHostsPct = null, int? rampDownCapacityThresholdPct = null, bool? rampDownForceLogoffUsers = null, DesktopVirtualizationStopHostsWhen? rampDownStopHostsWhen = null, int? rampDownWaitTimeMinutes = null, string rampDownNotificationMessage = null, ScalingActionTime offPeakStartTime = null, SessionHostLoadBalancingAlgorithm? offPeakLoadBalancingAlgorithm = null)
{
daysOfWeek ??= new List();
@@ -280,7 +289,10 @@ public static ScalingPlanPooledSchedulePatch ScalingPlanPooledSchedulePatch(Reso
name,
resourceType,
systemData,
+ namePropertiesName,
daysOfWeek?.ToList(),
+ scalingMethod,
+ createDelete,
rampUpStartTime,
rampUpLoadBalancingAlgorithm,
rampUpMinimumHostsPct,
@@ -388,9 +400,9 @@ public static ScalingPlanPersonalScheduleData ScalingPlanPersonalScheduleData(Re
/// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
/// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
/// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- /// Gets or sets the identity. Current supported identity types: SystemAssigned.
+ /// Managed service identity (system assigned and/or user assigned identities).
/// The resource model definition representing SKU.
- /// Gets or sets the plan.
+ /// Plan for the resource.
/// A new instance for mocking.
public static VirtualApplicationGroupData VirtualApplicationGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string objectId = null, string description = null, string friendlyName = null, ResourceIdentifier hostPoolId = null, ResourceIdentifier workspaceId = null, VirtualApplicationGroupType applicationGroupType = default, bool? isCloudPCResource = null, bool? showInFeed = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null)
{
@@ -559,8 +571,9 @@ public static VirtualDesktopData VirtualDesktopData(ResourceIdentifier id = null
/// The type of the load balancer.
/// The ring number of HostPool.
/// Is validation environment.
- /// The registration info of HostPool.
+ /// The registration info of HostPool. This is not returned on GET. In order to get the registration token use the retrieveRegistrationToken or listRegistrationTokens POST calls.
/// VM template for sessionhosts configuration within hostpool.
+ /// The type of management for this hostpool, Automated or Standard. The default value is Automated.
/// List of applicationGroup links.
/// List of App Attach Package links.
/// URL to customer ADFS server for signing WVD SSO certificates.
@@ -573,14 +586,18 @@ public static VirtualDesktopData VirtualDesktopData(ResourceIdentifier id = null
/// Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints.
/// The session host configuration for updating agent, monitoring agent, and stack component.
/// List of private endpoint connection associated with the specified resource.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
/// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
/// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
/// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- /// Gets or sets the identity. Current supported identity types: SystemAssigned.
+ /// Managed service identity (system assigned and/or user assigned identities).
/// The resource model definition representing SKU.
- /// Gets or sets the plan.
+ /// Plan for the resource.
/// A new instance for mocking.
- public static HostPoolData HostPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string objectId = null, string friendlyName = null, string description = null, HostPoolType hostPoolType = default, PersonalDesktopAssignmentType? personalDesktopAssignmentType = null, string customRdpProperty = null, int? maxSessionLimit = null, HostPoolLoadBalancerType loadBalancerType = default, int? ring = null, bool? isValidationEnvironment = null, HostPoolRegistrationInfo registrationInfo = null, string vmTemplate = null, IEnumerable applicationGroupReferences = null, IEnumerable appAttachPackageReferences = null, string ssoAdfsAuthority = null, string ssoClientId = null, string ssoClientSecretKeyVaultPath = null, HostPoolSsoSecretType? ssoSecretType = null, PreferredAppGroupType preferredAppGroupType = default, bool? startVmOnConnect = null, bool? isCloudPCResource = null, HostPoolPublicNetworkAccess? publicNetworkAccess = null, SessionHostAgentUpdateProperties agentUpdate = null, IEnumerable privateEndpointConnections = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null)
+ public static HostPoolData HostPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string objectId = null, string friendlyName = null, string description = null, HostPoolType hostPoolType = default, PersonalDesktopAssignmentType? personalDesktopAssignmentType = null, string customRdpProperty = null, int? maxSessionLimit = null, HostPoolLoadBalancerType loadBalancerType = default, int? ring = null, bool? isValidationEnvironment = null, HostPoolRegistrationInfo registrationInfo = null, string vmTemplate = null, ManagementType? managementType = null, IEnumerable applicationGroupReferences = null, IEnumerable appAttachPackageReferences = null, string ssoAdfsAuthority = null, string ssoClientId = null, string ssoClientSecretKeyVaultPath = null, HostPoolSsoSecretType? ssoSecretType = null, PreferredAppGroupType preferredAppGroupType = default, bool? startVmOnConnect = null, bool? isCloudPCResource = null, HostPoolPublicNetworkAccess? publicNetworkAccess = null, SessionHostAgentUpdateProperties agentUpdate = null, IEnumerable privateEndpointConnections = null, ManagedPrivateUDP? managedPrivateUDP = null, DirectUDP? directUDP = null, PublicUDP? publicUDP = null, RelayUDP? relayUDP = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null)
{
tags ??= new Dictionary();
applicationGroupReferences ??= new List();
@@ -606,6 +623,7 @@ public static HostPoolData HostPoolData(ResourceIdentifier id = null, string nam
isValidationEnvironment,
registrationInfo,
vmTemplate,
+ managementType,
applicationGroupReferences?.ToList(),
appAttachPackageReferences?.ToList(),
ssoAdfsAuthority,
@@ -618,6 +636,10 @@ public static HostPoolData HostPoolData(ResourceIdentifier id = null, string nam
publicNetworkAccess,
agentUpdate,
privateEndpointConnections?.ToList(),
+ managedPrivateUDP,
+ directUDP,
+ publicUDP,
+ relayUDP,
managedBy,
kind,
etag,
@@ -641,7 +663,7 @@ public static HostPoolData HostPoolData(ResourceIdentifier id = null, string nam
/// The type of the load balancer.
/// The ring number of HostPool.
/// Is validation environment.
- /// The registration info of HostPool.
+ /// The registration info of HostPool. This is not returned on GET. In order to get the registration token use the retrieveRegistrationToken or listRegistrationTokens POST calls.
/// VM template for sessionhosts configuration within hostpool.
/// URL to customer ADFS server for signing WVD SSO certificates.
/// ClientId for the registered Relying Party used to issue WVD SSO certificates.
@@ -651,8 +673,12 @@ public static HostPoolData HostPoolData(ResourceIdentifier id = null, string nam
/// The flag to turn on/off StartVMOnConnect feature.
/// Enabled to allow this resource to be access from the public network.
/// The session host configuration for updating agent, monitoring agent, and stack component.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
/// A new instance for mocking.
- public static HostPoolPatch HostPoolPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, string friendlyName = null, string description = null, string customRdpProperty = null, int? maxSessionLimit = null, PersonalDesktopAssignmentType? personalDesktopAssignmentType = null, HostPoolLoadBalancerType? loadBalancerType = null, int? ring = null, bool? isValidationEnvironment = null, HostPoolRegistrationInfoPatch registrationInfo = null, string vmTemplate = null, string ssoAdfsAuthority = null, string ssoClientId = null, string ssoClientSecretKeyVaultPath = null, HostPoolSsoSecretType? ssoSecretType = null, PreferredAppGroupType? preferredAppGroupType = null, bool? startVmOnConnect = null, HostPoolPublicNetworkAccess? publicNetworkAccess = null, SessionHostAgentUpdatePatchProperties agentUpdate = null)
+ public static HostPoolPatch HostPoolPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, string friendlyName = null, string description = null, string customRdpProperty = null, int? maxSessionLimit = null, PersonalDesktopAssignmentType? personalDesktopAssignmentType = null, HostPoolLoadBalancerType? loadBalancerType = null, int? ring = null, bool? isValidationEnvironment = null, HostPoolRegistrationInfoPatch registrationInfo = null, string vmTemplate = null, string ssoAdfsAuthority = null, string ssoClientId = null, string ssoClientSecretKeyVaultPath = null, HostPoolSsoSecretType? ssoSecretType = null, PreferredAppGroupType? preferredAppGroupType = null, bool? startVmOnConnect = null, HostPoolPublicNetworkAccess? publicNetworkAccess = null, SessionHostAgentUpdatePatchProperties agentUpdate = null, ManagedPrivateUDP? managedPrivateUDP = null, DirectUDP? directUDP = null, PublicUDP? publicUDP = null, RelayUDP? relayUDP = null)
{
tags ??= new Dictionary();
@@ -680,9 +706,264 @@ public static HostPoolPatch HostPoolPatch(ResourceIdentifier id = null, string n
startVmOnConnect,
publicNetworkAccess,
agentUpdate,
+ managedPrivateUDP,
+ directUDP,
+ publicUDP,
+ relayUDP,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Time zone for sessionHostManagement operations as defined in https://docs.microsoft.com/dotnet/api/system.timezoneinfo.findsystemtimezonebyid. Must be set if useLocalTime is true.
+ /// Parameters for a hostpool update.
+ /// Parameters that apply when session hosts are provisioned.
+ /// The policy that should be applied when the Session Host provisioning operation fails.
+ /// A new instance for mocking.
+ public static SessionHostManagementData SessionHostManagementData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string scheduledDateTimeZone = null, HostPoolUpdateConfigurationProperties update = null, SessionHostProvisioningConfigurationProperties provisioning = null, FailedSessionHostCleanupPolicySHC? failedSessionHostCleanupPolicy = null)
+ {
+ return new SessionHostManagementData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ scheduledDateTimeZone,
+ update,
+ provisioning,
+ failedSessionHostCleanupPolicy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Action types for controlling hostpool update.
+ /// The cancel message sent to the user on the session host. This is can only be specified if the action is 'Cancel'.
+ /// A new instance for mocking.
+ public static HostPoolUpdateControlParameter HostPoolUpdateControlParameter(HostPoolUpdateAction action = default, string cancelMessage = null)
+ {
+ return new HostPoolUpdateControlParameter(action, cancelMessage, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Action types for controlling hostpool provisioning.
+ /// The cancel message sent to the user on the session host.
+ /// A new instance for mocking.
+ public static HostPoolProvisioningControlParameter HostPoolProvisioningControlParameter(HostPoolProvisioningAction action = default, string cancelMessage = null)
+ {
+ return new HostPoolProvisioningControlParameter(action, cancelMessage, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified ID for the async operation.
+ /// Name of the async operation.
+ /// Operation status. Current defined values are < Error | Scheduled | UpdatingSessionHosts | ValidatingSessionHostUpdate | Paused | Pausing | Cancelling > | Succeeded | Failed | Canceled.
+ /// Percent of the operation that is complete.
+ /// The start time of the operation.
+ /// The end time of the operation.
+ /// If present, details of the operation error.
+ /// The correlation Id for Log Analytics.
+ /// Progress information on the sessionHostManagement operation.
+ /// The timestamp that the update is scheduled for.
+ /// SessionHostManagement properties used for the operation.
+ /// A new instance for mocking.
+ public static SessionHostManagementUpdateStatus SessionHostManagementUpdateStatus(string id = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ResponseError error = null, string correlationId = null, SessionHostManagementOperationProgress progress = null, DateTimeOffset? scheduledOn = null, SessionHostManagementData sessionHostManagement = null)
+ {
+ return new SessionHostManagementUpdateStatus(
+ id,
+ name,
+ status,
+ percentComplete,
+ startOn,
+ endOn,
+ error,
+ correlationId,
+ progress,
+ scheduledOn,
+ sessionHostManagement,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Time that the sessionHostManagement operation was created.
+ /// The number of sessionHosts to be started in the sessionHostManagement operation.
+ /// The number of sessionHosts in progress in the sessionHostManagement operation.
+ /// The number of sessionHosts completed in the sessionHostManagement operation.
+ /// The number of sessionHosts rollback failed in the sessionHostManagement operation.
+ /// A new instance for mocking.
+ public static SessionHostManagementOperationProgress SessionHostManagementOperationProgress(DateTimeOffset? executionStartOn = null, int? totalSessionHosts = null, int? sessionHostsInProgress = null, int? sessionHostsCompleted = null, int? sessionHostsRollbackFailed = null)
+ {
+ return new SessionHostManagementOperationProgress(
+ executionStartOn,
+ totalSessionHosts,
+ sessionHostsInProgress,
+ sessionHostsCompleted,
+ sessionHostsRollbackFailed,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified ID for the async operation.
+ /// Name of the async operation.
+ /// Operation status. Current defined values are < Scheduled | ValidatingSessionHostProvisioning | Cancelling | ProvisioningSessionHosts > | Succeeded | Failed | Canceled.
+ /// Percent of the operation that is complete.
+ /// The start time of the operation.
+ /// The end time of the operation.
+ /// If present, details of the operation error.
+ /// The correlation Id for Log Analytics.
+ /// Progress information on the sessionHostManagement operation.
+ /// The timestamp that the update is scheduled for.
+ /// SessionHostManagement properties used for the operation.
+ /// A new instance for mocking.
+ public static SessionHostManagementProvisioningStatus SessionHostManagementProvisioningStatus(string id = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ResponseError error = null, string correlationId = null, SessionHostManagementProvisioningOperationProgress progress = null, DateTimeOffset? scheduledOn = null, SessionHostManagementData sessionHostManagement = null)
+ {
+ return new SessionHostManagementProvisioningStatus(
+ id,
+ name,
+ status,
+ percentComplete,
+ startOn,
+ endOn,
+ error,
+ correlationId,
+ progress,
+ scheduledOn,
+ sessionHostManagement,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Time that the sessionHostManagement operation was created.
+ /// The number of sessionHosts in progress in the sessionHostManagement provisioning operation.
+ /// The number of sessionHosts completed in the sessionHostManagement provisioning operation.
+ /// The final instance count of the host pool for this provisioning operation.
+ /// The initial instance count of the host pool for this provisioning operation.
+ /// A new instance for mocking.
+ public static SessionHostManagementProvisioningOperationProgress SessionHostManagementProvisioningOperationProgress(DateTimeOffset? executionStartOn = null, int? sessionHostsInProgress = null, int? sessionHostsCompleted = null, int? finalSessionHostsCount = null, int? initialSessionHostsCount = null)
+ {
+ return new SessionHostManagementProvisioningOperationProgress(
+ executionStartOn,
+ sessionHostsInProgress,
+ sessionHostsCompleted,
+ finalSessionHostsCount,
+ initialSessionHostsCount,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The timestamp of the last update.
+ /// Friendly name to describe this version of the SessionHostConfiguration.
+ /// Provisioning state of the Session Host Configuration.
+ /// Hashtable that lists key/value pair tags to apply to the VMs.
+ /// The Location for the session host to be created in. It will default to the location of the hostpool if not provided.
+ /// The ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided.
+ /// The prefix that should be associated with session host names.
+ /// Value for availability zones to be used by the session host. Should be from [1,2,3].
+ /// Network information.
+ /// The id of the size of a virtual machine connected to a hostpool. Example: Standard_D2as_v6.
+ /// Disk information.
+ /// The uri to the storage blob containing the arm template to be run on the virtual machine after provisioning.
+ /// Image configurations of HostPool.
+ /// Domain configurations of session hosts.
+ /// Security information.
+ /// Local Admin credentials for session hosts.
+ /// Boot Diagnostics information.
+ /// A new instance for mocking.
+ public static SessionHostConfigurationData SessionHostConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? version = null, string friendlyName = null, ProvisioningStateSHC? provisioningState = null, IDictionary vmTags = null, string vmLocation = null, string vmResourceGroup = null, string vmNamePrefix = null, IEnumerable availabilityZones = null, NetworkInfoProperties networkInfo = null, string vmSizeId = null, DiskInfoProperties diskInfo = null, Uri customConfigurationScriptUri = null, ImageInfoProperties imageInfo = null, DomainInfoProperties domainInfo = null, SecurityInfoProperties securityInfo = null, KeyVaultCredentialsProperties vmAdminCredentials = null, BootDiagnosticsInfoProperties bootDiagnosticsInfo = null)
+ {
+ vmTags ??= new Dictionary();
+ availabilityZones ??= new List();
+
+ return new SessionHostConfigurationData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ version,
+ friendlyName,
+ provisioningState,
+ vmTags,
+ vmLocation,
+ vmResourceGroup,
+ vmNamePrefix,
+ availabilityZones?.ToList(),
+ networkInfo,
+ vmSizeId,
+ diskInfo,
+ customConfigurationScriptUri,
+ imageInfo,
+ domainInfo,
+ securityInfo,
+ vmAdminCredentials,
+ bootDiagnosticsInfo,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The timestamp of the last update.
+ /// Friendly name to describe this version of the SessionHostConfiguration.
+ /// Hashtable that lists key/value pair tags to apply to the VMs.
+ /// The Location for the session host to be created in. It will default to the location of the hostpool if not provided.
+ /// The ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided.
+ /// The prefix that should be associated with session host names.
+ /// Value for availability zones to be used by the session host. Should be from [1,2,3].
+ /// Network information.
+ /// The id of the size of a virtual machine connected to a hostpool. Example: Standard_D2as_v6.
+ /// Disk information.
+ /// The uri to the storage blob containing the arm template to be run on the virtual machine after provisioning.
+ /// Image configurations of HostPool.
+ /// Domain configurations of session hosts.
+ /// Security information.
+ /// Local Admin credentials for session hosts.
+ /// Boot Diagnostics information.
+ /// A new instance for mocking.
+ public static ActiveSessionHostConfigurationData ActiveSessionHostConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? version = null, string friendlyName = null, IDictionary vmTags = null, string vmLocation = null, string vmResourceGroup = null, string vmNamePrefix = null, IEnumerable availabilityZones = null, NetworkInfoProperties networkInfo = null, string vmSizeId = null, DiskInfoProperties diskInfo = null, Uri customConfigurationScriptUri = null, ImageInfoProperties imageInfo = null, DomainInfoProperties domainInfo = null, SecurityInfoProperties securityInfo = null, KeyVaultCredentialsProperties vmAdminCredentials = null, BootDiagnosticsInfoProperties bootDiagnosticsInfo = null)
+ {
+ vmTags ??= new Dictionary();
+ availabilityZones ??= new List();
+
+ return new ActiveSessionHostConfigurationData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ version,
+ friendlyName,
+ vmTags,
+ vmLocation,
+ vmResourceGroup,
+ vmNamePrefix,
+ availabilityZones?.ToList(),
+ networkInfo,
+ vmSizeId,
+ diskInfo,
+ customConfigurationScriptUri,
+ imageInfo,
+ domainInfo,
+ securityInfo,
+ vmAdminCredentials,
+ bootDiagnosticsInfo,
serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// Expiration time of registration token.
+ /// The registration token base64 encoded string.
+ /// A new instance for mocking.
+ public static RegistrationTokenMinimal RegistrationTokenMinimal(DateTimeOffset? expireOn = null, string token = null)
+ {
+ return new RegistrationTokenMinimal(expireOn, token, serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -716,6 +997,9 @@ public static UserSessionData UserSessionData(ResourceIdentifier id = null, stri
/// The name.
/// The resourceType.
/// The systemData.
+ /// Number of active sessions on SessionHost.
+ /// Number of disconnected sessions on SessionHost.
+ /// Number of pending sessions on SessionHost.
/// ObjectId of SessionHost. (internal use).
/// Last heart beat from SessionHost.
/// Number of sessions on SessionHost.
@@ -732,9 +1016,11 @@ public static UserSessionData UserSessionData(ResourceIdentifier id = null, stri
/// Update state of a SessionHost.
/// The timestamp of the last update.
/// The error message.
+ /// The last time update was completed.
+ /// SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. Example: 2024-04-26T04:56:45Z.
/// List of SessionHostHealthCheckReports.
/// A new instance for mocking.
- public static SessionHostData SessionHostData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string objectId = null, DateTimeOffset? lastHeartBeatOn = null, int? sessions = null, string agentVersion = null, bool? allowNewSession = null, string vmId = null, ResourceIdentifier resourceId = null, string assignedUser = null, string friendlyName = null, SessionHostStatus? status = null, DateTimeOffset? statusTimestamp = null, string osVersion = null, string sxsStackVersion = null, SessionHostUpdateState? updateState = null, DateTimeOffset? lastUpdatedOn = null, string updateErrorMessage = null, IEnumerable sessionHostHealthCheckResults = null)
+ public static SessionHostData SessionHostData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? activeSessions = null, int? disconnectedSessions = null, int? pendingSessions = null, string objectId = null, DateTimeOffset? lastHeartBeatOn = null, int? sessions = null, string agentVersion = null, bool? allowNewSession = null, string vmId = null, ResourceIdentifier resourceId = null, string assignedUser = null, string friendlyName = null, SessionHostStatus? status = null, DateTimeOffset? statusTimestamp = null, string osVersion = null, string sxsStackVersion = null, SessionHostUpdateState? updateState = null, DateTimeOffset? lastUpdatedOn = null, string updateErrorMessage = null, DateTimeOffset? lastSessionHostUpdateOn = null, string sessionHostConfiguration = null, IEnumerable sessionHostHealthCheckResults = null)
{
sessionHostHealthCheckResults ??= new List();
@@ -743,6 +1029,9 @@ public static SessionHostData SessionHostData(ResourceIdentifier id = null, stri
name,
resourceType,
systemData,
+ activeSessions,
+ disconnectedSessions,
+ pendingSessions,
objectId,
lastHeartBeatOn,
sessions,
@@ -759,6 +1048,8 @@ public static SessionHostData SessionHostData(ResourceIdentifier id = null, stri
updateState,
lastUpdatedOn,
updateErrorMessage,
+ lastSessionHostUpdateOn,
+ sessionHostConfiguration,
sessionHostHealthCheckResults?.ToList(),
serializedAdditionalRawData: null);
}
@@ -818,7 +1109,7 @@ public static SessionHostPatch SessionHostPatch(ResourceIdentifier id = null, st
/// Specifies how to register Package in feed.
/// Make this version of the package the active one across the hostpool.
/// List of package dependencies.
- /// Package version found in the appxmanifest.xml.
+ /// Package Version found in the appxmanifest.xml.
/// Date Package was last updated, found in the appxmanifest.xml.
/// List of package applications.
/// A new instance for mocking.
@@ -896,10 +1187,13 @@ public static AppAttachPackageData AppAttachPackageData(ResourceIdentifier id =
/// The provisioning state of the App Attach Package.
/// Detailed properties for App Attach Package.
/// List of Hostpool resource Ids.
- /// URL path to certificate name located in keyVault.
+ /// URL of keyvault location to store certificate.
/// Parameter indicating how the health check should behave if this package fails staging.
+ /// Specific name of package owner, is "AppAttach" for native app attach packages.
+ /// Lookback url to third party control plane, is null for native app attach packages.
+ /// Field that can be populated with custom data and filtered on in list GET calls.
/// A new instance for mocking.
- public static AppAttachPackageProperties AppAttachPackageProperties(AppAttachPackageProvisioningState? provisioningState = null, AppAttachPackageInfoProperties image = null, IEnumerable hostPoolReferences = null, Uri keyVaultUri = null, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure = null)
+ public static AppAttachPackageProperties AppAttachPackageProperties(AppAttachPackageProvisioningState? provisioningState = null, AppAttachPackageInfoProperties image = null, IEnumerable hostPoolReferences = null, Uri keyVaultUri = null, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure = null, string packageOwnerName = null, Uri packageLookbackUri = null, string customData = null)
{
hostPoolReferences ??= new List();
@@ -909,6 +1203,9 @@ public static AppAttachPackageProperties AppAttachPackageProperties(AppAttachPac
hostPoolReferences?.ToList(),
keyVaultUri,
failHealthCheckOnStagingFailure,
+ packageOwnerName,
+ packageLookbackUri,
+ customData,
serializedAdditionalRawData: null);
}
@@ -927,7 +1224,7 @@ public static AppAttachPackageProperties AppAttachPackageProperties(AppAttachPac
/// Specifies how to register Package in feed.
/// Make this version of the package the active one across the hostpool.
/// List of package dependencies.
- /// Package version found in the appxmanifest.xml.
+ /// Package Version found in the appxmanifest.xml.
/// Date Package was last updated, found in the appxmanifest.xml.
/// List of package applications.
/// Certificate name found in the appxmanifest.xml.
@@ -966,19 +1263,211 @@ public static ExpandMsixImage ExpandMsixImage(ResourceIdentifier id = null, stri
/// The name.
/// The resourceType.
/// The systemData.
+ /// tags to be updated.
/// Detailed properties for App Attach Package.
/// A new instance for mocking.
- public static AppAttachPackagePatch AppAttachPackagePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AppAttachPackagePatchProperties properties = null)
+ public static AppAttachPackagePatch AppAttachPackagePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AppAttachPackagePatchProperties properties = null)
{
+ tags ??= new Dictionary();
+
return new AppAttachPackagePatch(
id,
name,
resourceType,
systemData,
+ tags,
properties,
serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Set of days of the week on which this schedule is active.
+ /// Starting time for ramp up period.
+ /// Load balancing algorithm for ramp up period.
+ /// Minimum host percentage for ramp up period.
+ /// Capacity threshold for ramp up period.
+ /// Starting time for peak period.
+ /// Load balancing algorithm for peak period.
+ /// Starting time for ramp down period.
+ /// Load balancing algorithm for ramp down period.
+ /// Minimum host percentage for ramp down period.
+ /// Capacity threshold for ramp down period.
+ /// Should users be logged off forcefully from hosts.
+ /// Specifies when to stop hosts during ramp down period.
+ /// Number of minutes to wait to stop hosts during ramp down period.
+ /// Notification message for users during ramp down period.
+ /// Starting time for off-peak period.
+ /// Load balancing algorithm for off-peak period.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ScalingPlanPooledScheduleData ScalingPlanPooledScheduleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IEnumerable daysOfWeek, ScalingActionTime rampUpStartTime, SessionHostLoadBalancingAlgorithm? rampUpLoadBalancingAlgorithm, int? rampUpMinimumHostsPct, int? rampUpCapacityThresholdPct, ScalingActionTime peakStartTime, SessionHostLoadBalancingAlgorithm? peakLoadBalancingAlgorithm, ScalingActionTime rampDownStartTime, SessionHostLoadBalancingAlgorithm? rampDownLoadBalancingAlgorithm, int? rampDownMinimumHostsPct, int? rampDownCapacityThresholdPct, bool? rampDownForceLogoffUsers, DesktopVirtualizationStopHostsWhen? rampDownStopHostsWhen, int? rampDownWaitTimeMinutes, string rampDownNotificationMessage, ScalingActionTime offPeakStartTime, SessionHostLoadBalancingAlgorithm? offPeakLoadBalancingAlgorithm)
+ {
+ return ScalingPlanPooledScheduleData(id: id, name: name, resourceType: resourceType, systemData: systemData, namePropertiesName: default, daysOfWeek: daysOfWeek, scalingMethod: default, createDelete: default, rampUpStartTime: rampUpStartTime, rampUpLoadBalancingAlgorithm: rampUpLoadBalancingAlgorithm, rampUpMinimumHostsPct: rampUpMinimumHostsPct, rampUpCapacityThresholdPct: rampUpCapacityThresholdPct, peakStartTime: peakStartTime, peakLoadBalancingAlgorithm: peakLoadBalancingAlgorithm, rampDownStartTime: rampDownStartTime, rampDownLoadBalancingAlgorithm: rampDownLoadBalancingAlgorithm, rampDownMinimumHostsPct: rampDownMinimumHostsPct, rampDownCapacityThresholdPct: rampDownCapacityThresholdPct, rampDownForceLogoffUsers: rampDownForceLogoffUsers, rampDownStopHostsWhen: rampDownStopHostsWhen, rampDownWaitTimeMinutes: rampDownWaitTimeMinutes, rampDownNotificationMessage: rampDownNotificationMessage, offPeakStartTime: offPeakStartTime, offPeakLoadBalancingAlgorithm: offPeakLoadBalancingAlgorithm);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Set of days of the week on which this schedule is active.
+ /// Starting time for ramp up period.
+ /// Load balancing algorithm for ramp up period.
+ /// Minimum host percentage for ramp up period.
+ /// Capacity threshold for ramp up period.
+ /// Starting time for peak period.
+ /// Load balancing algorithm for peak period.
+ /// Starting time for ramp down period.
+ /// Load balancing algorithm for ramp down period.
+ /// Minimum host percentage for ramp down period.
+ /// Capacity threshold for ramp down period.
+ /// Should users be logged off forcefully from hosts.
+ /// Specifies when to stop hosts during ramp down period.
+ /// Number of minutes to wait to stop hosts during ramp down period.
+ /// Notification message for users during ramp down period.
+ /// Starting time for off-peak period.
+ /// Load balancing algorithm for off-peak period.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ScalingPlanPooledSchedulePatch ScalingPlanPooledSchedulePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IEnumerable daysOfWeek, ScalingActionTime rampUpStartTime, SessionHostLoadBalancingAlgorithm? rampUpLoadBalancingAlgorithm, int? rampUpMinimumHostsPct, int? rampUpCapacityThresholdPct, ScalingActionTime peakStartTime, SessionHostLoadBalancingAlgorithm? peakLoadBalancingAlgorithm, ScalingActionTime rampDownStartTime, SessionHostLoadBalancingAlgorithm? rampDownLoadBalancingAlgorithm, int? rampDownMinimumHostsPct, int? rampDownCapacityThresholdPct, bool? rampDownForceLogoffUsers, DesktopVirtualizationStopHostsWhen? rampDownStopHostsWhen, int? rampDownWaitTimeMinutes, string rampDownNotificationMessage, ScalingActionTime offPeakStartTime, SessionHostLoadBalancingAlgorithm? offPeakLoadBalancingAlgorithm)
+ {
+ return ScalingPlanPooledSchedulePatch(id: id, name: name, resourceType: resourceType, systemData: systemData, namePropertiesName: default, daysOfWeek: daysOfWeek, scalingMethod: default, createDelete: default, rampUpStartTime: rampUpStartTime, rampUpLoadBalancingAlgorithm: rampUpLoadBalancingAlgorithm, rampUpMinimumHostsPct: rampUpMinimumHostsPct, rampUpCapacityThresholdPct: rampUpCapacityThresholdPct, peakStartTime: peakStartTime, peakLoadBalancingAlgorithm: peakLoadBalancingAlgorithm, rampDownStartTime: rampDownStartTime, rampDownLoadBalancingAlgorithm: rampDownLoadBalancingAlgorithm, rampDownMinimumHostsPct: rampDownMinimumHostsPct, rampDownCapacityThresholdPct: rampDownCapacityThresholdPct, rampDownForceLogoffUsers: rampDownForceLogoffUsers, rampDownStopHostsWhen: rampDownStopHostsWhen, rampDownWaitTimeMinutes: rampDownWaitTimeMinutes, rampDownNotificationMessage: rampDownNotificationMessage, offPeakStartTime: offPeakStartTime, offPeakLoadBalancingAlgorithm: offPeakLoadBalancingAlgorithm);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// ObjectId of HostPool. (internal use).
+ /// Friendly name of HostPool.
+ /// Description of HostPool.
+ /// HostPool type for desktop.
+ /// PersonalDesktopAssignment type for HostPool.
+ /// Custom rdp property of HostPool.
+ /// The max session limit of HostPool.
+ /// The type of the load balancer.
+ /// The ring number of HostPool.
+ /// Is validation environment.
+ /// The registration info of HostPool.
+ /// VM template for sessionhosts configuration within hostpool.
+ /// List of applicationGroup links.
+ /// List of App Attach Package links.
+ /// URL to customer ADFS server for signing WVD SSO certificates.
+ /// ClientId for the registered Relying Party used to issue WVD SSO certificates.
+ /// Path to Azure KeyVault storing the secret used for communication to ADFS.
+ /// The type of single sign on Secret Type.
+ /// The type of preferred application group type, default to Desktop Application Group.
+ /// The flag to turn on/off StartVMOnConnect feature.
+ /// Is cloud pc resource.
+ /// Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints.
+ /// The session host configuration for updating agent, monitoring agent, and stack component.
+ /// List of private endpoint connection associated with the specified resource.
+ /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
+ /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
+ /// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
+ /// Gets or sets the identity. Current supported identity types: SystemAssigned.
+ /// The resource model definition representing SKU.
+ /// Gets or sets the plan.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static HostPoolData HostPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string objectId, string friendlyName, string description, HostPoolType hostPoolType, PersonalDesktopAssignmentType? personalDesktopAssignmentType, string customRdpProperty, int? maxSessionLimit, HostPoolLoadBalancerType loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfo registrationInfo, string vmTemplate, IEnumerable applicationGroupReferences, IEnumerable appAttachPackageReferences, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType preferredAppGroupType, bool? startVmOnConnect, bool? isCloudPCResource, HostPoolPublicNetworkAccess? publicNetworkAccess, SessionHostAgentUpdateProperties agentUpdate, IEnumerable privateEndpointConnections, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan)
+ {
+ return HostPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, objectId: objectId, friendlyName: friendlyName, description: description, hostPoolType: hostPoolType, personalDesktopAssignmentType: personalDesktopAssignmentType, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, managementType: default, applicationGroupReferences: applicationGroupReferences, appAttachPackageReferences: appAttachPackageReferences, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, isCloudPCResource: isCloudPCResource, publicNetworkAccess: publicNetworkAccess, agentUpdate: agentUpdate, privateEndpointConnections: privateEndpointConnections, managedPrivateUDP: default, directUDP: default, publicUDP: default, relayUDP: default, managedBy: managedBy, kind: kind, etag: etag, identity: identity, sku: sku, plan: plan);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// tags to be updated.
+ /// Friendly name of HostPool.
+ /// Description of HostPool.
+ /// Custom rdp property of HostPool.
+ /// The max session limit of HostPool.
+ /// PersonalDesktopAssignment type for HostPool.
+ /// The type of the load balancer.
+ /// The ring number of HostPool.
+ /// Is validation environment.
+ /// The registration info of HostPool.
+ /// VM template for sessionhosts configuration within hostpool.
+ /// URL to customer ADFS server for signing WVD SSO certificates.
+ /// ClientId for the registered Relying Party used to issue WVD SSO certificates.
+ /// Path to Azure KeyVault storing the secret used for communication to ADFS.
+ /// The type of single sign on Secret Type.
+ /// The type of preferred application group type, default to Desktop Application Group.
+ /// The flag to turn on/off StartVMOnConnect feature.
+ /// Enabled to allow this resource to be access from the public network.
+ /// The session host configuration for updating agent, monitoring agent, and stack component.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static HostPoolPatch HostPoolPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, string friendlyName, string description, string customRdpProperty, int? maxSessionLimit, PersonalDesktopAssignmentType? personalDesktopAssignmentType, HostPoolLoadBalancerType? loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfoPatch registrationInfo, string vmTemplate, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType? preferredAppGroupType, bool? startVmOnConnect, HostPoolPublicNetworkAccess? publicNetworkAccess, SessionHostAgentUpdatePatchProperties agentUpdate)
+ {
+ return HostPoolPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, friendlyName: friendlyName, description: description, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, personalDesktopAssignmentType: personalDesktopAssignmentType, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, publicNetworkAccess: publicNetworkAccess, agentUpdate: agentUpdate, managedPrivateUDP: default, directUDP: default, publicUDP: default, relayUDP: default);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// ObjectId of SessionHost. (internal use).
+ /// Last heart beat from SessionHost.
+ /// Number of sessions on SessionHost.
+ /// Version of agent on SessionHost.
+ /// Allow a new session.
+ /// Virtual Machine Id of SessionHost's underlying virtual machine.
+ /// Resource Id of SessionHost's underlying virtual machine.
+ /// User assigned to SessionHost.
+ /// Friendly name of SessionHost.
+ /// Status for a SessionHost.
+ /// The timestamp of the status.
+ /// The version of the OS on the session host.
+ /// The version of the side by side stack on the session host.
+ /// Update state of a SessionHost.
+ /// The timestamp of the last update.
+ /// The error message.
+ /// List of SessionHostHealthCheckReports.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static SessionHostData SessionHostData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string objectId, DateTimeOffset? lastHeartBeatOn, int? sessions, string agentVersion, bool? allowNewSession, string vmId, ResourceIdentifier resourceId, string assignedUser, string friendlyName, SessionHostStatus? status, DateTimeOffset? statusTimestamp, string osVersion, string sxsStackVersion, SessionHostUpdateState? updateState, DateTimeOffset? lastUpdatedOn, string updateErrorMessage, IEnumerable sessionHostHealthCheckResults)
+ {
+ return SessionHostData(id: id, name: name, resourceType: resourceType, systemData: systemData, activeSessions: default, disconnectedSessions: default, pendingSessions: default, objectId: objectId, lastHeartBeatOn: lastHeartBeatOn, sessions: sessions, agentVersion: agentVersion, allowNewSession: allowNewSession, vmId: vmId, resourceId: resourceId, assignedUser: assignedUser, friendlyName: friendlyName, status: status, statusTimestamp: statusTimestamp, osVersion: osVersion, sxsStackVersion: sxsStackVersion, updateState: updateState, lastUpdatedOn: lastUpdatedOn, updateErrorMessage: updateErrorMessage, lastSessionHostUpdateOn: default, sessionHostConfiguration: default, sessionHostHealthCheckResults: sessionHostHealthCheckResults);
+ }
+
+ /// Initializes a new instance of .
+ /// The provisioning state of the App Attach Package.
+ /// Detailed properties for App Attach Package.
+ /// List of Hostpool resource Ids.
+ /// URL path to certificate name located in keyVault.
+ /// Parameter indicating how the health check should behave if this package fails staging.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static AppAttachPackageProperties AppAttachPackageProperties(AppAttachPackageProvisioningState? provisioningState, AppAttachPackageInfoProperties image, IEnumerable hostPoolReferences, Uri keyVaultUri, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure)
+ {
+ return AppAttachPackageProperties(provisioningState: provisioningState, image: image, hostPoolReferences: hostPoolReferences, keyVaultUri: keyVaultUri, failHealthCheckOnStagingFailure: failHealthCheckOnStagingFailure, packageOwnerName: default, packageLookbackUri: default, customData: default);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Detailed properties for App Attach Package.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static AppAttachPackagePatch AppAttachPackagePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AppAttachPackagePatchProperties properties)
+ {
+ return AppAttachPackagePatch(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: default, properties: properties);
+ }
+
/// The id.
/// The name.
/// The resourceType.
@@ -1015,7 +1504,7 @@ public static AppAttachPackagePatch AppAttachPackagePatch(ResourceIdentifier id
[EditorBrowsable(EditorBrowsableState.Never)]
public static HostPoolData HostPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string objectId, string friendlyName, string description, HostPoolType hostPoolType, PersonalDesktopAssignmentType? personalDesktopAssignmentType, string customRdpProperty, int? maxSessionLimit, HostPoolLoadBalancerType loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfo registrationInfo, string vmTemplate, IEnumerable applicationGroupReferences, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType preferredAppGroupType, bool? startVmOnConnect, bool? isCloudPCResource, SessionHostAgentUpdateProperties agentUpdate, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan)
{
- return HostPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, objectId: objectId, friendlyName: friendlyName, description: description, hostPoolType: hostPoolType, personalDesktopAssignmentType: personalDesktopAssignmentType, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, applicationGroupReferences: applicationGroupReferences, appAttachPackageReferences: default, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, isCloudPCResource: isCloudPCResource, publicNetworkAccess: default, agentUpdate: agentUpdate, privateEndpointConnections: default, managedBy: managedBy, kind: kind, etag: etag, identity: identity, sku: sku, plan: plan);
+ return HostPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, objectId: objectId, friendlyName: friendlyName, description: description, hostPoolType: hostPoolType, personalDesktopAssignmentType: personalDesktopAssignmentType, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, managementType: default, applicationGroupReferences: applicationGroupReferences, appAttachPackageReferences: default, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, isCloudPCResource: isCloudPCResource, publicNetworkAccess: default, agentUpdate: agentUpdate, privateEndpointConnections: default, managedPrivateUDP: default, directUDP: default, publicUDP: default, relayUDP: default, managedBy: managedBy, kind: kind, etag: etag, identity: identity, sku: sku, plan: plan);
}
/// Initializes a new instance of HostPoolPatch.
@@ -1044,7 +1533,7 @@ public static HostPoolData HostPoolData(ResourceIdentifier id, string name, Reso
[EditorBrowsable(EditorBrowsableState.Never)]
public static HostPoolPatch HostPoolPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, string friendlyName, string description, string customRdpProperty, int? maxSessionLimit, PersonalDesktopAssignmentType? personalDesktopAssignmentType, HostPoolLoadBalancerType? loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfoPatch registrationInfo, string vmTemplate, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType? preferredAppGroupType, bool? startVmOnConnect, SessionHostAgentUpdatePatchProperties agentUpdate)
{
- return HostPoolPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, friendlyName: friendlyName, description: description, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, personalDesktopAssignmentType: personalDesktopAssignmentType, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, publicNetworkAccess: default, agentUpdate: agentUpdate);
+ return HostPoolPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, friendlyName: friendlyName, description: description, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, personalDesktopAssignmentType: personalDesktopAssignmentType, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, publicNetworkAccess: default, agentUpdate: agentUpdate, managedPrivateUDP: default, directUDP: default, publicUDP: default, relayUDP: default);
}
/// Initializes a new instance of VirtualApplicationGroupData.
@@ -1181,7 +1670,7 @@ public static DesktopVirtualizationPrivateEndpointConnectionDataData DesktopVirt
[EditorBrowsable(EditorBrowsableState.Never)]
public static HostPoolData HostPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string objectId, string friendlyName, string description, HostPoolType hostPoolType, PersonalDesktopAssignmentType? personalDesktopAssignmentType, string customRdpProperty, int? maxSessionLimit, HostPoolLoadBalancerType loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfo registrationInfo, string vmTemplate, IEnumerable applicationGroupReferences, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType preferredAppGroupType, bool? startVmOnConnect, bool? isCloudPCResource, HostPoolPublicNetworkAccess? publicNetworkAccess, SessionHostAgentUpdateProperties agentUpdate, IEnumerable privateEndpointConnections, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan)
{
- return HostPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, objectId: objectId, friendlyName: friendlyName, description: description, hostPoolType: hostPoolType, personalDesktopAssignmentType: personalDesktopAssignmentType, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, applicationGroupReferences: applicationGroupReferences, appAttachPackageReferences: default, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, isCloudPCResource: isCloudPCResource, publicNetworkAccess: publicNetworkAccess, agentUpdate: agentUpdate, privateEndpointConnections: privateEndpointConnections, managedBy: managedBy, kind: kind, etag: etag, identity: identity, sku: sku, plan: plan);
+ return HostPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, objectId: objectId, friendlyName: friendlyName, description: description, hostPoolType: hostPoolType, personalDesktopAssignmentType: personalDesktopAssignmentType, customRdpProperty: customRdpProperty, maxSessionLimit: maxSessionLimit, loadBalancerType: loadBalancerType, ring: ring, isValidationEnvironment: isValidationEnvironment, registrationInfo: registrationInfo, vmTemplate: vmTemplate, managementType: default, applicationGroupReferences: applicationGroupReferences, appAttachPackageReferences: default, ssoAdfsAuthority: ssoAdfsAuthority, ssoClientId: ssoClientId, ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath, ssoSecretType: ssoSecretType, preferredAppGroupType: preferredAppGroupType, startVmOnConnect: startVmOnConnect, isCloudPCResource: isCloudPCResource, publicNetworkAccess: publicNetworkAccess, agentUpdate: agentUpdate, privateEndpointConnections: privateEndpointConnections, managedPrivateUDP: default, directUDP: default, publicUDP: default, relayUDP: default, managedBy: managedBy, kind: kind, etag: etag, identity: identity, sku: sku, plan: plan);
}
/// Initializes a new instance of ExpandMsixImage.
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs
index 641ebfdd02b5..8d06d5fce2f5 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs
@@ -222,6 +222,63 @@ public static HostPoolResource GetHostPoolResource(this ArmClient client, Resour
return GetMockableDesktopVirtualizationArmClient(client).GetHostPoolResource(id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SessionHostManagementResource GetSessionHostManagementResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableDesktopVirtualizationArmClient(client).GetSessionHostManagementResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SessionHostConfigurationResource GetSessionHostConfigurationResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableDesktopVirtualizationArmClient(client).GetSessionHostConfigurationResource(id);
+ }
+
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static ActiveSessionHostConfigurationResource GetActiveSessionHostConfigurationResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableDesktopVirtualizationArmClient(client).GetActiveSessionHostConfigurationResource(id);
+ }
+
///
/// Gets an object representing an along with the instance operations that can be performed on it but with no data.
/// You can use to create an from its components.
@@ -328,7 +385,7 @@ public static VirtualWorkspaceCollection GetVirtualWorkspaces(this ResourceGroup
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -366,7 +423,7 @@ public static async Task> GetVirtualWorkspace
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -421,7 +478,7 @@ public static ScalingPlanCollection GetScalingPlans(this ResourceGroupResource r
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -459,7 +516,7 @@ public static async Task> GetScalingPlanAsync(this
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -514,7 +571,7 @@ public static VirtualApplicationGroupCollection GetVirtualApplicationGroups(this
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -552,7 +609,7 @@ public static async Task> GetVirtualAp
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -607,7 +664,7 @@ public static HostPoolCollection GetHostPools(this ResourceGroupResource resourc
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -645,7 +702,7 @@ public static async Task> GetHostPoolAsync(this Resou
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -700,7 +757,7 @@ public static AppAttachPackageCollection GetAppAttachPackages(this ResourceGroup
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -713,7 +770,7 @@ public static AppAttachPackageCollection GetAppAttachPackages(this ResourceGroup
///
///
/// The instance the method will execute against.
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// or is null.
/// is an empty string, and was expected to be non-empty.
@@ -738,7 +795,7 @@ public static async Task> GetAppAttachPackage
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -751,7 +808,7 @@ public static async Task> GetAppAttachPackage
///
///
/// The instance the method will execute against.
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// or is null.
/// is an empty string, and was expected to be non-empty.
@@ -776,7 +833,7 @@ public static Response GetAppAttachPackage(this Resour
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -812,7 +869,7 @@ public static AsyncPageable GetVirtualWorkspacesAsync(
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -848,7 +905,7 @@ public static Pageable GetVirtualWorkspaces(this Subsc
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -887,7 +944,7 @@ public static AsyncPageable GetScalingPlansAsync(this Subsc
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -926,7 +983,7 @@ public static Pageable GetScalingPlans(this SubscriptionRes
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -963,7 +1020,7 @@ public static AsyncPageable GetVirtualApplicati
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1000,7 +1057,7 @@ public static Pageable GetVirtualApplicationGro
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1039,7 +1096,7 @@ public static AsyncPageable GetHostPoolsAsync(this Subscriptio
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1078,7 +1135,7 @@ public static Pageable GetHostPools(this SubscriptionResource
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1091,7 +1148,7 @@ public static Pageable GetHostPools(this SubscriptionResource
///
///
/// The instance the method will execute against.
- /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group.
+ /// OData filter expression. Valid properties for filtering are package name, resource group, host pool, package owner name, and custom data.
/// The cancellation token to use.
/// is null.
/// An async collection of that may take multiple service requests to iterate over.
@@ -1115,7 +1172,7 @@ public static AsyncPageable GetAppAttachPackagesAsync(
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1128,7 +1185,7 @@ public static AsyncPageable GetAppAttachPackagesAsync(
///
///
/// The instance the method will execute against.
- /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group.
+ /// OData filter expression. Valid properties for filtering are package name, resource group, host pool, package owner name, and custom data.
/// The cancellation token to use.
/// is null.
/// A collection of that may take multiple service requests to iterate over.
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationArmClient.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationArmClient.cs
index 7efa6c0ac63f..f2cf29481962 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationArmClient.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationArmClient.cs
@@ -154,6 +154,42 @@ public virtual HostPoolResource GetHostPoolResource(ResourceIdentifier id)
return new HostPoolResource(Client, id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual SessionHostManagementResource GetSessionHostManagementResource(ResourceIdentifier id)
+ {
+ SessionHostManagementResource.ValidateResourceId(id);
+ return new SessionHostManagementResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual SessionHostConfigurationResource GetSessionHostConfigurationResource(ResourceIdentifier id)
+ {
+ SessionHostConfigurationResource.ValidateResourceId(id);
+ return new SessionHostConfigurationResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual ActiveSessionHostConfigurationResource GetActiveSessionHostConfigurationResource(ResourceIdentifier id)
+ {
+ ActiveSessionHostConfigurationResource.ValidateResourceId(id);
+ return new ActiveSessionHostConfigurationResource(Client, id);
+ }
+
///
/// Gets an object representing an along with the instance operations that can be performed on it but with no data.
/// You can use to create an from its components.
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationResourceGroupResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationResourceGroupResource.cs
index 45290221f07e..dda8f86b7e97 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationResourceGroupResource.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationResourceGroupResource.cs
@@ -53,7 +53,7 @@ public virtual VirtualWorkspaceCollection GetVirtualWorkspaces()
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -84,7 +84,7 @@ public virtual async Task> GetVirtualWorkspac
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -122,7 +122,7 @@ public virtual ScalingPlanCollection GetScalingPlans()
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -153,7 +153,7 @@ public virtual async Task> GetScalingPlanAsync(str
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -191,7 +191,7 @@ public virtual VirtualApplicationGroupCollection GetVirtualApplicationGroups()
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -222,7 +222,7 @@ public virtual async Task> GetVirtualA
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -260,7 +260,7 @@ public virtual HostPoolCollection GetHostPools()
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -291,7 +291,7 @@ public virtual async Task> GetHostPoolAsync(string ho
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -329,7 +329,7 @@ public virtual AppAttachPackageCollection GetAppAttachPackages()
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -337,7 +337,7 @@ public virtual AppAttachPackageCollection GetAppAttachPackages()
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
@@ -360,7 +360,7 @@ public virtual async Task> GetAppAttachPackag
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -368,7 +368,7 @@ public virtual async Task> GetAppAttachPackag
///
///
///
- /// The name of the App Attach package.
+ /// The name of the App Attach package arm object.
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationSubscriptionResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationSubscriptionResource.cs
index b29ed49e7ebc..c709ad23a129 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationSubscriptionResource.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/MockableDesktopVirtualizationSubscriptionResource.cs
@@ -68,7 +68,7 @@ private string GetApiVersionOrNull(ResourceType resourceType)
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -98,7 +98,7 @@ public virtual AsyncPageable GetVirtualWorkspacesAsync
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -128,7 +128,7 @@ public virtual Pageable GetVirtualWorkspaces(Cancellat
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -161,7 +161,7 @@ public virtual AsyncPageable GetScalingPlansAsync(int? page
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -194,7 +194,7 @@ public virtual Pageable GetScalingPlans(int? pageSize = nul
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -225,7 +225,7 @@ public virtual AsyncPageable GetVirtualApplicat
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -256,7 +256,7 @@ public virtual Pageable GetVirtualApplicationGr
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -289,7 +289,7 @@ public virtual AsyncPageable GetHostPoolsAsync(int? pageSize =
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -322,7 +322,7 @@ public virtual Pageable GetHostPools(int? pageSize = null, boo
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -330,7 +330,7 @@ public virtual Pageable GetHostPools(int? pageSize = null, boo
///
///
///
- /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group.
+ /// OData filter expression. Valid properties for filtering are package name, resource group, host pool, package owner name, and custom data.
/// The cancellation token to use.
/// An async collection of that may take multiple service requests to iterate over.
public virtual AsyncPageable GetAppAttachPackagesAsync(string filter = null, CancellationToken cancellationToken = default)
@@ -353,7 +353,7 @@ public virtual AsyncPageable GetAppAttachPackagesAsync
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -361,7 +361,7 @@ public virtual AsyncPageable GetAppAttachPackagesAsync
///
///
///
- /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group.
+ /// OData filter expression. Valid properties for filtering are package name, resource group, host pool, package owner name, and custom data.
/// The cancellation token to use.
/// A collection of that may take multiple service requests to iterate over.
public virtual Pageable GetAppAttachPackages(string filter = null, CancellationToken cancellationToken = default)
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolCollection.cs
index 76c4a8cdf508..e3dd387c05f2 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolCollection.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string hostPoolNa
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -257,7 +257,7 @@ public virtual Response Get(string hostPoolName, CancellationT
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(int? pageSize = null,
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -323,7 +323,7 @@ public virtual Pageable GetAll(int? pageSize = null, bool? isD
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string hostPoolName, Cance
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -409,7 +409,7 @@ public virtual Response Exists(string hostPoolName, CancellationToken canc
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -454,7 +454,7 @@ public virtual async Task> GetIfExistsAsync(s
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.Serialization.cs
index c013de241bc8..ead289c37902 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.Serialization.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.Serialization.cs
@@ -57,7 +57,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
if (Optional.IsDefined(Identity))
{
writer.WritePropertyName("identity"u8);
- JsonSerializer.Serialize(writer, Identity);
+ var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } };
+ JsonSerializer.Serialize(writer, Identity, serializeOptions);
}
if (Optional.IsDefined(Sku))
{
@@ -160,6 +161,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
writer.WritePropertyName("vmTemplate"u8);
writer.WriteStringValue(VmTemplate);
}
+ if (Optional.IsDefined(ManagementType))
+ {
+ writer.WritePropertyName("managementType"u8);
+ writer.WriteStringValue(ManagementType.Value.ToString());
+ }
if (options.Format != "W" && Optional.IsCollectionDefined(ApplicationGroupReferences))
{
if (ApplicationGroupReferences != null)
@@ -266,20 +272,33 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
}
if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections))
{
- if (PrivateEndpointConnections != null)
- {
- writer.WritePropertyName("privateEndpointConnections"u8);
- writer.WriteStartArray();
- foreach (var item in PrivateEndpointConnections)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
- }
- else
+ writer.WritePropertyName("privateEndpointConnections"u8);
+ writer.WriteStartArray();
+ foreach (var item in PrivateEndpointConnections)
{
- writer.WriteNull("privateEndpointConnections");
+ writer.WriteObjectValue(item, options);
}
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(ManagedPrivateUDP))
+ {
+ writer.WritePropertyName("managedPrivateUDP"u8);
+ writer.WriteStringValue(ManagedPrivateUDP.Value.ToString());
+ }
+ if (Optional.IsDefined(DirectUDP))
+ {
+ writer.WritePropertyName("directUDP"u8);
+ writer.WriteStringValue(DirectUDP.Value.ToString());
+ }
+ if (Optional.IsDefined(PublicUDP))
+ {
+ writer.WritePropertyName("publicUDP"u8);
+ writer.WriteStringValue(PublicUDP.Value.ToString());
+ }
+ if (Optional.IsDefined(RelayUDP))
+ {
+ writer.WritePropertyName("relayUDP"u8);
+ writer.WriteStringValue(RelayUDP.Value.ToString());
}
writer.WriteEndObject();
}
@@ -328,6 +347,7 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
bool? validationEnvironment = default;
HostPoolRegistrationInfo registrationInfo = default;
string vmTemplate = default;
+ ManagementType? managementType = default;
IReadOnlyList applicationGroupReferences = default;
IReadOnlyList appAttachPackageReferences = default;
string ssoadfsAuthority = default;
@@ -340,6 +360,10 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
HostPoolPublicNetworkAccess? publicNetworkAccess = default;
SessionHostAgentUpdateProperties agentUpdate = default;
IReadOnlyList privateEndpointConnections = default;
+ ManagedPrivateUDP? managedPrivateUDP = default;
+ DirectUDP? directUDP = default;
+ PublicUDP? publicUDP = default;
+ RelayUDP? relayUDP = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -373,7 +397,8 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
{
continue;
}
- identity = JsonSerializer.Deserialize(property.Value.GetRawText());
+ var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } };
+ identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions);
continue;
}
if (property.NameEquals("sku"u8))
@@ -531,6 +556,15 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
vmTemplate = property0.Value.GetString();
continue;
}
+ if (property0.NameEquals("managementType"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ managementType = new ManagementType(property0.Value.GetString());
+ continue;
+ }
if (property0.NameEquals("applicationGroupReferences"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -634,7 +668,6 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
- privateEndpointConnections = null;
continue;
}
List array = new List();
@@ -645,6 +678,42 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
privateEndpointConnections = array;
continue;
}
+ if (property0.NameEquals("managedPrivateUDP"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ managedPrivateUDP = new ManagedPrivateUDP(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("directUDP"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ directUDP = new DirectUDP(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("publicUDP"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ publicUDP = new PublicUDP(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("relayUDP"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ relayUDP = new RelayUDP(property0.Value.GetString());
+ continue;
+ }
}
continue;
}
@@ -673,6 +742,7 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
validationEnvironment,
registrationInfo,
vmTemplate,
+ managementType,
applicationGroupReferences ?? new ChangeTrackingList(),
appAttachPackageReferences ?? new ChangeTrackingList(),
ssoadfsAuthority,
@@ -685,6 +755,10 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element, ModelR
publicNetworkAccess,
agentUpdate,
privateEndpointConnections ?? new ChangeTrackingList(),
+ managedPrivateUDP,
+ directUDP,
+ publicUDP,
+ relayUDP,
managedBy,
kind,
etag,
@@ -1122,6 +1196,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementType), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" managementType: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(ManagementType))
+ {
+ builder.Append(" managementType: ");
+ builder.AppendLine($"'{ManagementType.Value.ToString()}'");
+ }
+ }
+
hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApplicationGroupReferences), out propertyOverride);
if (hasPropertyOverride)
{
@@ -1375,6 +1464,66 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagedPrivateUDP), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" managedPrivateUDP: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(ManagedPrivateUDP))
+ {
+ builder.Append(" managedPrivateUDP: ");
+ builder.AppendLine($"'{ManagedPrivateUDP.Value.ToString()}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DirectUDP), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" directUDP: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(DirectUDP))
+ {
+ builder.Append(" directUDP: ");
+ builder.AppendLine($"'{DirectUDP.Value.ToString()}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicUDP), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" publicUDP: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(PublicUDP))
+ {
+ builder.Append(" publicUDP: ");
+ builder.AppendLine($"'{PublicUDP.Value.ToString()}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RelayUDP), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" relayUDP: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(RelayUDP))
+ {
+ builder.Append(" relayUDP: ");
+ builder.AppendLine($"'{RelayUDP.Value.ToString()}'");
+ }
+ }
+
builder.AppendLine(" }");
builder.AppendLine("}");
return BinaryData.FromString(builder.ToString());
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs
index 5a870d8b5a30..691f11754a80 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs
@@ -83,8 +83,9 @@ public HostPoolData(AzureLocation location, HostPoolType hostPoolType, HostPoolL
/// The type of the load balancer.
/// The ring number of HostPool.
/// Is validation environment.
- /// The registration info of HostPool.
+ /// The registration info of HostPool. This is not returned on GET. In order to get the registration token use the retrieveRegistrationToken or listRegistrationTokens POST calls.
/// VM template for sessionhosts configuration within hostpool.
+ /// The type of management for this hostpool, Automated or Standard. The default value is Automated.
/// List of applicationGroup links.
/// List of App Attach Package links.
/// URL to customer ADFS server for signing WVD SSO certificates.
@@ -97,14 +98,18 @@ public HostPoolData(AzureLocation location, HostPoolType hostPoolType, HostPoolL
/// Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints.
/// The session host configuration for updating agent, monitoring agent, and stack component.
/// List of private endpoint connection associated with the specified resource.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
/// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
/// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
/// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
- /// Gets or sets the identity. Current supported identity types: SystemAssigned.
+ /// Managed service identity (system assigned and/or user assigned identities).
/// The resource model definition representing SKU.
- /// Gets or sets the plan.
+ /// Plan for the resource.
/// Keeps track of any properties unknown to the library.
- internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string objectId, string friendlyName, string description, HostPoolType hostPoolType, PersonalDesktopAssignmentType? personalDesktopAssignmentType, string customRdpProperty, int? maxSessionLimit, HostPoolLoadBalancerType loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfo registrationInfo, string vmTemplate, IReadOnlyList applicationGroupReferences, IReadOnlyList appAttachPackageReferences, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType preferredAppGroupType, bool? startVmOnConnect, bool? isCloudPCResource, HostPoolPublicNetworkAccess? publicNetworkAccess, SessionHostAgentUpdateProperties agentUpdate, IReadOnlyList privateEndpointConnections, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string objectId, string friendlyName, string description, HostPoolType hostPoolType, PersonalDesktopAssignmentType? personalDesktopAssignmentType, string customRdpProperty, int? maxSessionLimit, HostPoolLoadBalancerType loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfo registrationInfo, string vmTemplate, ManagementType? managementType, IReadOnlyList applicationGroupReferences, IReadOnlyList appAttachPackageReferences, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType preferredAppGroupType, bool? startVmOnConnect, bool? isCloudPCResource, HostPoolPublicNetworkAccess? publicNetworkAccess, SessionHostAgentUpdateProperties agentUpdate, IReadOnlyList privateEndpointConnections, ManagedPrivateUDP? managedPrivateUDP, DirectUDP? directUDP, PublicUDP? publicUDP, RelayUDP? relayUDP, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
ObjectId = objectId;
FriendlyName = friendlyName;
@@ -118,6 +123,7 @@ internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceT
IsValidationEnvironment = isValidationEnvironment;
RegistrationInfo = registrationInfo;
VmTemplate = vmTemplate;
+ ManagementType = managementType;
ApplicationGroupReferences = applicationGroupReferences;
AppAttachPackageReferences = appAttachPackageReferences;
SsoAdfsAuthority = ssoAdfsAuthority;
@@ -130,6 +136,10 @@ internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceT
PublicNetworkAccess = publicNetworkAccess;
AgentUpdate = agentUpdate;
PrivateEndpointConnections = privateEndpointConnections;
+ ManagedPrivateUDP = managedPrivateUDP;
+ DirectUDP = directUDP;
+ PublicUDP = publicUDP;
+ RelayUDP = relayUDP;
ManagedBy = managedBy;
Kind = kind;
ETag = etag;
@@ -174,12 +184,15 @@ internal HostPoolData()
/// Is validation environment.
[WirePath("properties.validationEnvironment")]
public bool? IsValidationEnvironment { get; set; }
- /// The registration info of HostPool.
+ /// The registration info of HostPool. This is not returned on GET. In order to get the registration token use the retrieveRegistrationToken or listRegistrationTokens POST calls.
[WirePath("properties.registrationInfo")]
public HostPoolRegistrationInfo RegistrationInfo { get; set; }
/// VM template for sessionhosts configuration within hostpool.
[WirePath("properties.vmTemplate")]
public string VmTemplate { get; set; }
+ /// The type of management for this hostpool, Automated or Standard. The default value is Automated.
+ [WirePath("properties.managementType")]
+ public ManagementType? ManagementType { get; set; }
/// List of applicationGroup links.
[WirePath("properties.applicationGroupReferences")]
public IReadOnlyList ApplicationGroupReferences { get; }
@@ -216,6 +229,18 @@ internal HostPoolData()
/// List of private endpoint connection associated with the specified resource.
[WirePath("properties.privateEndpointConnections")]
public IReadOnlyList PrivateEndpointConnections { get; }
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ [WirePath("properties.managedPrivateUDP")]
+ public ManagedPrivateUDP? ManagedPrivateUDP { get; set; }
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ [WirePath("properties.directUDP")]
+ public DirectUDP? DirectUDP { get; set; }
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ [WirePath("properties.publicUDP")]
+ public PublicUDP? PublicUDP { get; set; }
+ /// Default: AVD-wide settings are used to determine connection availability, Enabled: UDP will attempt this connection type when making connections. This means that this connection is possible, but is not guaranteed, as there are other factors that may prevent this connection type, Disabled: UDP will not attempt this connection type when making connections.
+ [WirePath("properties.relayUDP")]
+ public RelayUDP? RelayUDP { get; set; }
/// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
[WirePath("managedBy")]
public ResourceIdentifier ManagedBy { get; set; }
@@ -225,13 +250,13 @@ internal HostPoolData()
/// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
[WirePath("etag")]
public ETag? ETag { get; }
- /// Gets or sets the identity. Current supported identity types: SystemAssigned.
+ /// Managed service identity (system assigned and/or user assigned identities).
[WirePath("identity")]
public ManagedServiceIdentity Identity { get; set; }
/// The resource model definition representing SKU.
[WirePath("sku")]
public DesktopVirtualizationSku Sku { get; set; }
- /// Gets or sets the plan.
+ /// Plan for the resource.
[WirePath("plan")]
public ArmPlan Plan { get; set; }
}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionCollection.cs
index 33ffc142b577..b037f5f309f6 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionCollection.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -116,7 +116,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrU
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -212,7 +212,7 @@ public virtual async Task> G
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -257,7 +257,7 @@ public virtual Response Get(string pr
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAs
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -323,7 +323,7 @@ public virtual Pageable GetAll(int? p
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -409,7 +409,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -454,7 +454,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.cs
index 306816ca5eaf..be01a4e3591f 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.cs
@@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -142,7 +142,7 @@ public virtual async Task> G
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -182,7 +182,7 @@ public virtual Response Get(Cancellat
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -318,7 +318,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs
index 97f440be1dc0..ab8efacf5d35 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs
@@ -133,7 +133,7 @@ public virtual HostPoolPrivateEndpointConnectionCollection GetHostPoolPrivateEnd
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -164,7 +164,7 @@ public virtual async Task> G
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -182,6 +182,27 @@ public virtual Response GetHostPoolPr
return GetHostPoolPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken);
}
+ /// Gets an object representing a SessionHostManagementResource along with the instance operations that can be performed on it in the HostPool.
+ /// Returns a object.
+ public virtual SessionHostManagementResource GetSessionHostManagement()
+ {
+ return new SessionHostManagementResource(Client, Id.AppendChildResource("sessionHostManagements", "default"));
+ }
+
+ /// Gets an object representing a SessionHostConfigurationResource along with the instance operations that can be performed on it in the HostPool.
+ /// Returns a object.
+ public virtual SessionHostConfigurationResource GetSessionHostConfiguration()
+ {
+ return new SessionHostConfigurationResource(Client, Id.AppendChildResource("sessionHostConfigurations", "default"));
+ }
+
+ /// Gets an object representing a ActiveSessionHostConfigurationResource along with the instance operations that can be performed on it in the HostPool.
+ /// Returns a object.
+ public virtual ActiveSessionHostConfigurationResource GetActiveSessionHostConfiguration()
+ {
+ return new ActiveSessionHostConfigurationResource(Client, Id.AppendChildResource("activeSessionHostConfigurations", "default"));
+ }
+
/// Gets a collection of SessionHostResources in the HostPool.
/// An object representing collection of SessionHostResources and their operations over a SessionHostResource.
public virtual SessionHostCollection GetSessionHosts()
@@ -202,7 +223,7 @@ public virtual SessionHostCollection GetSessionHosts()
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -233,7 +254,7 @@ public virtual async Task> GetSessionHostAsync(str
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -271,7 +292,7 @@ public virtual MsixPackageCollection GetMsixPackages()
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -302,7 +323,7 @@ public virtual async Task> GetMsixPackageAsync(str
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -333,7 +354,7 @@ public virtual Response GetMsixPackage(string msixPackageFu
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -373,7 +394,7 @@ public virtual async Task> GetAsync(CancellationToken
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -413,7 +434,7 @@ public virtual Response Get(CancellationToken cancellationToke
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -458,7 +479,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -503,7 +524,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -545,7 +566,7 @@ public virtual async Task> UpdateAsync(HostPoolPatch
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -587,7 +608,7 @@ public virtual Response Update(HostPoolPatch patch, Cancellati
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
///
///
@@ -616,7 +637,7 @@ public virtual AsyncPageable GetPr
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
///
///
@@ -645,7 +666,7 @@ public virtual Pageable GetPrivate
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -678,7 +699,7 @@ public virtual AsyncPageable GetScalingPlansAsync(int? page
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -711,7 +732,7 @@ public virtual Pageable GetScalingPlans(int? pageSize = nul
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -749,7 +770,7 @@ public virtual async Task> RetrieveRegistrati
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -774,6 +795,64 @@ public virtual Response RetrieveRegistrationToken(Canc
}
}
+ ///
+ /// Operation to list the RegistrationTokens associated with the HostPool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/listRegistrationTokens
+ ///
+ /// -
+ /// Operation Id
+ /// HostPools_ListRegistrationTokens
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetRegistrationTokensAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _hostPoolRestClient.CreateListRegistrationTokensRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => RegistrationTokenMinimal.DeserializeRegistrationTokenMinimal(e), _hostPoolClientDiagnostics, Pipeline, "HostPoolResource.GetRegistrationTokens", "value", null, cancellationToken);
+ }
+
+ ///
+ /// Operation to list the RegistrationTokens associated with the HostPool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/listRegistrationTokens
+ ///
+ /// -
+ /// Operation Id
+ /// HostPools_ListRegistrationTokens
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-03-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetRegistrationTokens(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _hostPoolRestClient.CreateListRegistrationTokensRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => RegistrationTokenMinimal.DeserializeRegistrationTokenMinimal(e), _hostPoolClientDiagnostics, Pipeline, "HostPoolResource.GetRegistrationTokens", "value", null, cancellationToken);
+ }
+
///
/// List userSessions.
///
@@ -787,7 +866,7 @@ public virtual Response RetrieveRegistrationToken(Canc
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -821,7 +900,7 @@ public virtual AsyncPageable GetUserSessionsAsync(string fi
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -855,7 +934,7 @@ public virtual Pageable GetUserSessions(string filter = nul
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
///
///
@@ -885,7 +964,7 @@ public virtual AsyncPageable ImportAppAttachPackageInf
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
///
///
@@ -915,7 +994,7 @@ public virtual Pageable ImportAppAttachPackageInfos(Im
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
///
///
@@ -945,7 +1024,7 @@ public virtual AsyncPageable ExpandMsixImagesAsync(MsixImageUri
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
///
///
@@ -975,7 +1054,7 @@ public virtual Pageable ExpandMsixImages(MsixImageUri msixImage
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1037,7 +1116,7 @@ public virtual async Task> AddTagAsync(string key, st
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1099,7 +1178,7 @@ public virtual Response AddTag(string key, string value, Cance
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1156,7 +1235,7 @@ public virtual async Task> SetTagsAsync(IDictionary
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1213,7 +1292,7 @@ public virtual Response SetTags(IDictionary ta
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
@@ -1273,7 +1352,7 @@ public virtual async Task> RemoveTagAsync(string key,
///
/// -
/// Default Api Version
- /// 2024-04-03
+ /// 2025-03-01-preview
///
/// -
/// Resource
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/LongRunningOperation/SessionHostConfigurationOperationSource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/LongRunningOperation/SessionHostConfigurationOperationSource.cs
new file mode 100644
index 000000000000..e477583fcc81
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/LongRunningOperation/SessionHostConfigurationOperationSource.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.ClientModel.Primitives;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization
+{
+ internal class SessionHostConfigurationOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal SessionHostConfigurationOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ SessionHostConfigurationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDesktopVirtualizationContext.Default);
+ return new SessionHostConfigurationResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDesktopVirtualizationContext.Default);
+ return await Task.FromResult(new SessionHostConfigurationResource(_client, data)).ConfigureAwait(false);
+ }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoPatchProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoPatchProperties.Serialization.cs
new file mode 100644
index 000000000000..f7b9933a1ff7
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoPatchProperties.Serialization.cs
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ internal partial class ActiveDirectoryInfoPatchProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoPatchProperties)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(DomainCredentials))
+ {
+ writer.WritePropertyName("domainCredentials"u8);
+ writer.WriteObjectValue(DomainCredentials, options);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ ActiveDirectoryInfoPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoPatchProperties)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeActiveDirectoryInfoPatchProperties(document.RootElement, options);
+ }
+
+ internal static ActiveDirectoryInfoPatchProperties DeserializeActiveDirectoryInfoPatchProperties(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ KeyVaultCredentialsPatchProperties domainCredentials = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("domainCredentials"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ domainCredentials = KeyVaultCredentialsPatchProperties.DeserializeKeyVaultCredentialsPatchProperties(property.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ActiveDirectoryInfoPatchProperties(domainCredentials, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoPatchProperties)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ActiveDirectoryInfoPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeActiveDirectoryInfoPatchProperties(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoPatchProperties)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoPatchProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoPatchProperties.cs
new file mode 100644
index 000000000000..619f0aabc0ca
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoPatchProperties.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// Active directory info. Only one should be populated based on the join type.
+ internal partial class ActiveDirectoryInfoPatchProperties
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public ActiveDirectoryInfoPatchProperties()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Credentials needed to create the virtual machine.
+ /// Keeps track of any properties unknown to the library.
+ internal ActiveDirectoryInfoPatchProperties(KeyVaultCredentialsPatchProperties domainCredentials, IDictionary serializedAdditionalRawData)
+ {
+ DomainCredentials = domainCredentials;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Credentials needed to create the virtual machine.
+ [WirePath("domainCredentials")]
+ public KeyVaultCredentialsPatchProperties DomainCredentials { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoProperties.Serialization.cs
new file mode 100644
index 000000000000..b17c3ee69e06
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoProperties.Serialization.cs
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ public partial class ActiveDirectoryInfoProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoProperties)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("domainCredentials"u8);
+ writer.WriteObjectValue(DomainCredentials, options);
+ writer.WritePropertyName("ouPath"u8);
+ writer.WriteStringValue(OuPath);
+ if (Optional.IsDefined(DomainName))
+ {
+ writer.WritePropertyName("domainName"u8);
+ writer.WriteStringValue(DomainName);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ ActiveDirectoryInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoProperties)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeActiveDirectoryInfoProperties(document.RootElement, options);
+ }
+
+ internal static ActiveDirectoryInfoProperties DeserializeActiveDirectoryInfoProperties(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ KeyVaultCredentialsProperties domainCredentials = default;
+ string ouPath = default;
+ string domainName = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("domainCredentials"u8))
+ {
+ domainCredentials = KeyVaultCredentialsProperties.DeserializeKeyVaultCredentialsProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("ouPath"u8))
+ {
+ ouPath = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("domainName"u8))
+ {
+ domainName = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ActiveDirectoryInfoProperties(domainCredentials, ouPath, domainName, serializedAdditionalRawData);
+ }
+
+ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
+ {
+ StringBuilder builder = new StringBuilder();
+ BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions;
+ IDictionary propertyOverrides = null;
+ bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides);
+ bool hasPropertyOverride = false;
+ string propertyOverride = null;
+
+ builder.AppendLine("{");
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DomainCredentials), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" domainCredentials: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(DomainCredentials))
+ {
+ builder.Append(" domainCredentials: ");
+ BicepSerializationHelpers.AppendChildObject(builder, DomainCredentials, options, 2, false, " domainCredentials: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OuPath), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" ouPath: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(OuPath))
+ {
+ builder.Append(" ouPath: ");
+ if (OuPath.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{OuPath}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{OuPath}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DomainName), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" domainName: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(DomainName))
+ {
+ builder.Append(" domainName: ");
+ if (DomainName.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{DomainName}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{DomainName}'");
+ }
+ }
+ }
+
+ builder.AppendLine("}");
+ return BinaryData.FromString(builder.ToString());
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ case "bicep":
+ return SerializeBicep(options);
+ default:
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoProperties)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ActiveDirectoryInfoProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeActiveDirectoryInfoProperties(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ActiveDirectoryInfoProperties)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoProperties.cs
new file mode 100644
index 000000000000..baf61fefeccc
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveDirectoryInfoProperties.cs
@@ -0,0 +1,89 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// Active directory info. Only one should be populated based on the join type.
+ public partial class ActiveDirectoryInfoProperties
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// Credentials needed to create the virtual machine.
+ /// The organizational unit(OU) path.
+ /// or is null.
+ public ActiveDirectoryInfoProperties(KeyVaultCredentialsProperties domainCredentials, string ouPath)
+ {
+ Argument.AssertNotNull(domainCredentials, nameof(domainCredentials));
+ Argument.AssertNotNull(ouPath, nameof(ouPath));
+
+ DomainCredentials = domainCredentials;
+ OuPath = ouPath;
+ }
+
+ /// Initializes a new instance of .
+ /// Credentials needed to create the virtual machine.
+ /// The organizational unit(OU) path.
+ /// The domain a virtual machine connected to a hostpool will join.
+ /// Keeps track of any properties unknown to the library.
+ internal ActiveDirectoryInfoProperties(KeyVaultCredentialsProperties domainCredentials, string ouPath, string domainName, IDictionary serializedAdditionalRawData)
+ {
+ DomainCredentials = domainCredentials;
+ OuPath = ouPath;
+ DomainName = domainName;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal ActiveDirectoryInfoProperties()
+ {
+ }
+
+ /// Credentials needed to create the virtual machine.
+ [WirePath("domainCredentials")]
+ public KeyVaultCredentialsProperties DomainCredentials { get; set; }
+ /// The organizational unit(OU) path.
+ [WirePath("ouPath")]
+ public string OuPath { get; set; }
+ /// The domain a virtual machine connected to a hostpool will join.
+ [WirePath("domainName")]
+ public string DomainName { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveSessionHostConfigurationList.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveSessionHostConfigurationList.Serialization.cs
new file mode 100644
index 000000000000..11b60d1e9f5a
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveSessionHostConfigurationList.Serialization.cs
@@ -0,0 +1,219 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ internal partial class ActiveSessionHostConfigurationList : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationList)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsCollectionDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (options.Format != "W" && Optional.IsDefined(NextLink))
+ {
+ writer.WritePropertyName("nextLink"u8);
+ writer.WriteStringValue(NextLink);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ ActiveSessionHostConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationList)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeActiveSessionHostConfigurationList(document.RootElement, options);
+ }
+
+ internal static ActiveSessionHostConfigurationList DeserializeActiveSessionHostConfigurationList(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList value = default;
+ string 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())
+ {
+ array.Add(ActiveSessionHostConfigurationData.DeserializeActiveSessionHostConfigurationData(item, options));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ActiveSessionHostConfigurationList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ }
+
+ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
+ {
+ StringBuilder builder = new StringBuilder();
+ BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions;
+ IDictionary propertyOverrides = null;
+ bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides);
+ bool hasPropertyOverride = false;
+ string propertyOverride = null;
+
+ builder.AppendLine("{");
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" value: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsCollectionDefined(Value))
+ {
+ if (Value.Any())
+ {
+ builder.Append(" value: ");
+ builder.AppendLine("[");
+ foreach (var item in Value)
+ {
+ BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: ");
+ }
+ builder.AppendLine(" ]");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" nextLink: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(NextLink))
+ {
+ builder.Append(" nextLink: ");
+ if (NextLink.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{NextLink}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{NextLink}'");
+ }
+ }
+ }
+
+ builder.AppendLine("}");
+ return BinaryData.FromString(builder.ToString());
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ case "bicep":
+ return SerializeBicep(options);
+ default:
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationList)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ActiveSessionHostConfigurationList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeActiveSessionHostConfigurationList(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ActiveSessionHostConfigurationList)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveSessionHostConfigurationList.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveSessionHostConfigurationList.cs
new file mode 100644
index 000000000000..64f67c5b5257
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ActiveSessionHostConfigurationList.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// List of ActiveSessionHostConfiguration definitions.
+ internal partial class ActiveSessionHostConfigurationList
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal ActiveSessionHostConfigurationList()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// List of ActiveSessionHostConfiguration definitions.
+ /// Link to the next page of results.
+ /// Keeps track of any properties unknown to the library.
+ internal ActiveSessionHostConfigurationList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ {
+ Value = value;
+ NextLink = nextLink;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// List of ActiveSessionHostConfiguration definitions.
+ public IReadOnlyList Value { get; }
+ /// Link to the next page of results.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs
index 150139b210a3..75f9f111631b 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs
@@ -54,17 +54,17 @@ public AppAttachPackageInfoProperties()
/// Initializes a new instance of .
/// Alias of App Attach Package. Assigned at import time.
- /// VHD/CIM image path on Network Share.
+ /// VHD/CIM/APP-V image path on Network Share.
/// Package Name from appxmanifest.xml.
- /// Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name.
- /// Package Full Name from appxmanifest.xml.
+ /// Identifier not including the package version, for Msix packages it is the family name from the appxmanifest.xml.
+ /// Identifier including the package version, for Msix packages it is the full name from the appxmanifest.xml.
/// User friendly Name to be displayed in the portal.
/// Relative Path to the package inside the image.
/// Specifies how to register Package in feed.
/// Make this version of the package the active one across the hostpool.
/// List of package dependencies.
- /// Package version found in the appxmanifest.xml.
- /// Date Package was last updated, found in the appxmanifest.xml.
+ /// Package Version found in the appxmanifest.xml.
+ /// Date the package source was last updated, for Msix packages this is found in the appxmanifest.xml.
/// List of package applications.
/// Certificate name found in the appxmanifest.xml.
/// Date certificate expires, found in the appxmanifest.xml.
@@ -94,16 +94,16 @@ internal AppAttachPackageInfoProperties(string packageAlias, string imagePath, s
/// Alias of App Attach Package. Assigned at import time.
[WirePath("packageAlias")]
public string PackageAlias { get; set; }
- /// VHD/CIM image path on Network Share.
+ /// VHD/CIM/APP-V image path on Network Share.
[WirePath("imagePath")]
public string ImagePath { get; set; }
/// Package Name from appxmanifest.xml.
[WirePath("packageName")]
public string PackageName { get; set; }
- /// Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name.
+ /// Identifier not including the package version, for Msix packages it is the family name from the appxmanifest.xml.
[WirePath("packageFamilyName")]
public string PackageFamilyName { get; set; }
- /// Package Full Name from appxmanifest.xml.
+ /// Identifier including the package version, for Msix packages it is the full name from the appxmanifest.xml.
[WirePath("packageFullName")]
public string PackageFullName { get; set; }
/// User friendly Name to be displayed in the portal.
@@ -121,10 +121,10 @@ internal AppAttachPackageInfoProperties(string packageAlias, string imagePath, s
/// List of package dependencies.
[WirePath("packageDependencies")]
public IList PackageDependencies { get; set; }
- /// Package version found in the appxmanifest.xml.
+ /// Package Version found in the appxmanifest.xml.
[WirePath("version")]
public string Version { get; set; }
- /// Date Package was last updated, found in the appxmanifest.xml.
+ /// Date the package source was last updated, for Msix packages this is found in the appxmanifest.xml.
[WirePath("lastUpdated")]
public DateTimeOffset? LastUpdatedOn { get; set; }
/// List of package applications.
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs
index d779bd4a93b2..1d7a1ca50f15 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs
@@ -8,6 +8,7 @@
using System;
using System.ClientModel.Primitives;
using System.Collections.Generic;
+using System.Linq;
using System.Text;
using System.Text.Json;
using Azure.Core;
@@ -37,6 +38,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
}
base.JsonModelWriteCore(writer, options);
+ if (Optional.IsCollectionDefined(Tags))
+ {
+ writer.WritePropertyName("tags"u8);
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
if (Optional.IsDefined(Properties))
{
writer.WritePropertyName("properties"u8);
@@ -64,6 +76,7 @@ internal static AppAttachPackagePatch DeserializeAppAttachPackagePatch(JsonEleme
{
return null;
}
+ IDictionary tags = default;
AppAttachPackagePatchProperties properties = default;
ResourceIdentifier id = default;
string name = default;
@@ -73,6 +86,20 @@ internal static AppAttachPackagePatch DeserializeAppAttachPackagePatch(JsonEleme
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
+ if (property.NameEquals("tags"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ tags = dictionary;
+ continue;
+ }
if (property.NameEquals("properties"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -117,6 +144,7 @@ internal static AppAttachPackagePatch DeserializeAppAttachPackagePatch(JsonEleme
name,
type,
systemData,
+ tags ?? new ChangeTrackingDictionary(),
properties,
serializedAdditionalRawData);
}
@@ -155,6 +183,43 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" tags: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsCollectionDefined(Tags))
+ {
+ if (Tags.Any())
+ {
+ builder.Append(" tags: ");
+ builder.AppendLine("{");
+ foreach (var item in Tags)
+ {
+ builder.Append($" '{item.Key}': ");
+ if (item.Value == null)
+ {
+ builder.Append("null");
+ continue;
+ }
+ if (item.Value.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{item.Value}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{item.Value}'");
+ }
+ }
+ builder.AppendLine(" }");
+ }
+ }
+ }
+
hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride);
if (hasPropertyOverride)
{
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs
index 7db935c8b41a..8a687095d165 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs
@@ -12,7 +12,7 @@
namespace Azure.ResourceManager.DesktopVirtualization.Models
{
- /// Schema for updatable App Attach Package properties.
+ /// Schema for patchable App Attach Package properties.
public partial class AppAttachPackagePatch : ResourceData
{
///
@@ -50,6 +50,7 @@ public partial class AppAttachPackagePatch : ResourceData
/// Initializes a new instance of .
public AppAttachPackagePatch()
{
+ Tags = new ChangeTrackingDictionary();
}
/// Initializes a new instance of .
@@ -57,14 +58,19 @@ public AppAttachPackagePatch()
/// The name.
/// The resourceType.
/// The systemData.
+ /// tags to be updated.
/// Detailed properties for App Attach Package.
/// Keeps track of any properties unknown to the library.
- internal AppAttachPackagePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AppAttachPackagePatchProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal AppAttachPackagePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AppAttachPackagePatchProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
+ Tags = tags;
Properties = properties;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
+ /// tags to be updated.
+ [WirePath("tags")]
+ public IDictionary Tags { get; }
/// Detailed properties for App Attach Package.
[WirePath("properties")]
public AppAttachPackagePatchProperties Properties { get; set; }
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs
index d6af88f9c7a9..df76de579a66 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs
@@ -66,6 +66,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("failHealthCheckOnStagingFailure"u8);
writer.WriteStringValue(FailHealthCheckOnStagingFailure.Value.ToString());
}
+ if (Optional.IsDefined(PackageLookbackUri))
+ {
+ writer.WritePropertyName("packageLookbackUrl"u8);
+ writer.WriteStringValue(PackageLookbackUri.AbsoluteUri);
+ }
+ if (Optional.IsDefined(CustomData))
+ {
+ writer.WritePropertyName("customData"u8);
+ writer.WriteStringValue(CustomData);
+ }
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
foreach (var item in _serializedAdditionalRawData)
@@ -107,6 +117,8 @@ internal static AppAttachPackagePatchProperties DeserializeAppAttachPackagePatch
IList hostPoolReferences = default;
Uri keyVaultURL = default;
FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure = default;
+ Uri packageLookbackUrl = default;
+ string customData = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -159,13 +171,34 @@ internal static AppAttachPackagePatchProperties DeserializeAppAttachPackagePatch
failHealthCheckOnStagingFailure = new FailHealthCheckOnStagingFailure(property.Value.GetString());
continue;
}
+ if (property.NameEquals("packageLookbackUrl"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ packageLookbackUrl = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("customData"u8))
+ {
+ customData = property.Value.GetString();
+ continue;
+ }
if (options.Format != "W")
{
rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new AppAttachPackagePatchProperties(image, hostPoolReferences ?? new ChangeTrackingList(), keyVaultURL, failHealthCheckOnStagingFailure, serializedAdditionalRawData);
+ return new AppAttachPackagePatchProperties(
+ image,
+ hostPoolReferences ?? new ChangeTrackingList(),
+ keyVaultURL,
+ failHealthCheckOnStagingFailure,
+ packageLookbackUrl,
+ customData,
+ serializedAdditionalRawData);
}
private BinaryData SerializeBicep(ModelReaderWriterOptions options)
@@ -252,6 +285,44 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PackageLookbackUri), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" packageLookbackUrl: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(PackageLookbackUri))
+ {
+ builder.Append(" packageLookbackUrl: ");
+ builder.AppendLine($"'{PackageLookbackUri.AbsoluteUri}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomData), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" customData: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(CustomData))
+ {
+ builder.Append(" customData: ");
+ if (CustomData.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{CustomData}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{CustomData}'");
+ }
+ }
+ }
+
builder.AppendLine("}");
return BinaryData.FromString(builder.ToString());
}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs
index 9cab5040c943..0d16d0957677 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs
@@ -55,15 +55,19 @@ public AppAttachPackagePatchProperties()
/// Initializes a new instance of .
/// Detailed properties for App Attach Package.
/// List of Hostpool resource Ids.
- /// URL path to certificate name located in keyVault.
+ /// URL of keyvault location to store certificate.
/// Parameter indicating how the health check should behave if this package fails staging.
+ /// Lookback url to third party control plane, should be null for first party packages.
+ /// Field that can be populated with custom data and filtered on in list GET calls.
/// Keeps track of any properties unknown to the library.
- internal AppAttachPackagePatchProperties(AppAttachPackageInfoProperties image, IList hostPoolReferences, Uri keyVaultUri, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure, IDictionary serializedAdditionalRawData)
+ internal AppAttachPackagePatchProperties(AppAttachPackageInfoProperties image, IList hostPoolReferences, Uri keyVaultUri, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure, Uri packageLookbackUri, string customData, IDictionary serializedAdditionalRawData)
{
Image = image;
HostPoolReferences = hostPoolReferences;
KeyVaultUri = keyVaultUri;
FailHealthCheckOnStagingFailure = failHealthCheckOnStagingFailure;
+ PackageLookbackUri = packageLookbackUri;
+ CustomData = customData;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -73,11 +77,17 @@ internal AppAttachPackagePatchProperties(AppAttachPackageInfoProperties image, I
/// List of Hostpool resource Ids.
[WirePath("hostPoolReferences")]
public IList HostPoolReferences { get; }
- /// URL path to certificate name located in keyVault.
+ /// URL of keyvault location to store certificate.
[WirePath("keyVaultURL")]
public Uri KeyVaultUri { get; set; }
/// Parameter indicating how the health check should behave if this package fails staging.
[WirePath("failHealthCheckOnStagingFailure")]
public FailHealthCheckOnStagingFailure? FailHealthCheckOnStagingFailure { get; set; }
+ /// Lookback url to third party control plane, should be null for first party packages.
+ [WirePath("packageLookbackUrl")]
+ public Uri PackageLookbackUri { get; set; }
+ /// Field that can be populated with custom data and filtered on in list GET calls.
+ [WirePath("customData")]
+ public string CustomData { get; set; }
}
}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs
index 02057f13c54a..0d6a3ceebcaf 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs
@@ -66,6 +66,28 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("failHealthCheckOnStagingFailure"u8);
writer.WriteStringValue(FailHealthCheckOnStagingFailure.Value.ToString());
}
+ if (Optional.IsDefined(PackageOwnerName))
+ {
+ writer.WritePropertyName("packageOwnerName"u8);
+ writer.WriteStringValue(PackageOwnerName);
+ }
+ if (Optional.IsDefined(PackageLookbackUri))
+ {
+ if (PackageLookbackUri != null)
+ {
+ writer.WritePropertyName("packageLookbackUrl"u8);
+ writer.WriteStringValue(PackageLookbackUri.AbsoluteUri);
+ }
+ else
+ {
+ writer.WriteNull("packageLookbackUrl");
+ }
+ }
+ if (Optional.IsDefined(CustomData))
+ {
+ writer.WritePropertyName("customData"u8);
+ writer.WriteStringValue(CustomData);
+ }
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
foreach (var item in _serializedAdditionalRawData)
@@ -108,6 +130,9 @@ internal static AppAttachPackageProperties DeserializeAppAttachPackageProperties
IList hostPoolReferences = default;
Uri keyVaultURL = default;
FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure = default;
+ string packageOwnerName = default;
+ Uri packageLookbackUrl = default;
+ string customData = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -162,6 +187,26 @@ internal static AppAttachPackageProperties DeserializeAppAttachPackageProperties
failHealthCheckOnStagingFailure = new FailHealthCheckOnStagingFailure(property.Value.GetString());
continue;
}
+ if (property.NameEquals("packageOwnerName"u8))
+ {
+ packageOwnerName = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("packageLookbackUrl"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ packageLookbackUrl = null;
+ continue;
+ }
+ packageLookbackUrl = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("customData"u8))
+ {
+ customData = property.Value.GetString();
+ continue;
+ }
if (options.Format != "W")
{
rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
@@ -174,6 +219,9 @@ internal static AppAttachPackageProperties DeserializeAppAttachPackageProperties
hostPoolReferences ?? new ChangeTrackingList(),
keyVaultURL,
failHealthCheckOnStagingFailure,
+ packageOwnerName,
+ packageLookbackUrl,
+ customData,
serializedAdditionalRawData);
}
@@ -284,6 +332,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PackageOwnerName), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" packageOwnerName: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(PackageOwnerName))
+ {
+ builder.Append(" packageOwnerName: ");
+ if (PackageOwnerName.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{PackageOwnerName}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{PackageOwnerName}'");
+ }
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PackageLookbackUri), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" packageLookbackUrl: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(PackageLookbackUri))
+ {
+ builder.Append(" packageLookbackUrl: ");
+ builder.AppendLine($"'{PackageLookbackUri.AbsoluteUri}'");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomData), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" customData: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(CustomData))
+ {
+ builder.Append(" customData: ");
+ if (CustomData.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{CustomData}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{CustomData}'");
+ }
+ }
+ }
+
builder.AppendLine("}");
return BinaryData.FromString(builder.ToString());
}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs
index 5ed2b98f68d7..68011a27f3ec 100644
--- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs
@@ -55,16 +55,22 @@ public AppAttachPackageProperties()
/// The provisioning state of the App Attach Package.
/// Detailed properties for App Attach Package.
/// List of Hostpool resource Ids.
- /// URL path to certificate name located in keyVault.
+ /// URL of keyvault location to store certificate.
/// Parameter indicating how the health check should behave if this package fails staging.
+ /// Specific name of package owner, is "AppAttach" for native app attach packages.
+ /// Lookback url to third party control plane, is null for native app attach packages.
+ /// Field that can be populated with custom data and filtered on in list GET calls.
/// Keeps track of any properties unknown to the library.
- internal AppAttachPackageProperties(AppAttachPackageProvisioningState? provisioningState, AppAttachPackageInfoProperties image, IList hostPoolReferences, Uri keyVaultUri, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure, IDictionary serializedAdditionalRawData)
+ internal AppAttachPackageProperties(AppAttachPackageProvisioningState? provisioningState, AppAttachPackageInfoProperties image, IList hostPoolReferences, Uri keyVaultUri, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure, string packageOwnerName, Uri packageLookbackUri, string customData, IDictionary serializedAdditionalRawData)
{
ProvisioningState = provisioningState;
Image = image;
HostPoolReferences = hostPoolReferences;
KeyVaultUri = keyVaultUri;
FailHealthCheckOnStagingFailure = failHealthCheckOnStagingFailure;
+ PackageOwnerName = packageOwnerName;
+ PackageLookbackUri = packageLookbackUri;
+ CustomData = customData;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -77,11 +83,20 @@ internal AppAttachPackageProperties(AppAttachPackageProvisioningState? provision
/// List of Hostpool resource Ids.
[WirePath("hostPoolReferences")]
public IList HostPoolReferences { get; }
- /// URL path to certificate name located in keyVault.
+ /// URL of keyvault location to store certificate.
[WirePath("keyVaultURL")]
public Uri KeyVaultUri { get; set; }
/// Parameter indicating how the health check should behave if this package fails staging.
[WirePath("failHealthCheckOnStagingFailure")]
public FailHealthCheckOnStagingFailure? FailHealthCheckOnStagingFailure { get; set; }
+ /// Specific name of package owner, is "AppAttach" for native app attach packages.
+ [WirePath("packageOwnerName")]
+ public string PackageOwnerName { get; set; }
+ /// Lookback url to third party control plane, is null for native app attach packages.
+ [WirePath("packageLookbackUrl")]
+ public Uri PackageLookbackUri { get; set; }
+ /// Field that can be populated with custom data and filtered on in list GET calls.
+ [WirePath("customData")]
+ public string CustomData { get; set; }
}
}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AzureActiveDirectoryInfoProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AzureActiveDirectoryInfoProperties.Serialization.cs
new file mode 100644
index 000000000000..1eb966c5cc87
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AzureActiveDirectoryInfoProperties.Serialization.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ internal partial class AzureActiveDirectoryInfoProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryInfoProperties)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("mdmProviderGuid"u8);
+ writer.WriteStringValue(MdmProviderGuid);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AzureActiveDirectoryInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryInfoProperties)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureActiveDirectoryInfoProperties(document.RootElement, options);
+ }
+
+ internal static AzureActiveDirectoryInfoProperties DeserializeAzureActiveDirectoryInfoProperties(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string mdmProviderGuid = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("mdmProviderGuid"u8))
+ {
+ mdmProviderGuid = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AzureActiveDirectoryInfoProperties(mdmProviderGuid, serializedAdditionalRawData);
+ }
+
+ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
+ {
+ StringBuilder builder = new StringBuilder();
+ BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions;
+ IDictionary propertyOverrides = null;
+ bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides);
+ bool hasPropertyOverride = false;
+ string propertyOverride = null;
+
+ builder.AppendLine("{");
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MdmProviderGuid), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" mdmProviderGuid: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(MdmProviderGuid))
+ {
+ builder.Append(" mdmProviderGuid: ");
+ if (MdmProviderGuid.Contains(Environment.NewLine))
+ {
+ builder.AppendLine("'''");
+ builder.AppendLine($"{MdmProviderGuid}'''");
+ }
+ else
+ {
+ builder.AppendLine($"'{MdmProviderGuid}'");
+ }
+ }
+ }
+
+ builder.AppendLine("}");
+ return BinaryData.FromString(builder.ToString());
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ case "bicep":
+ return SerializeBicep(options);
+ default:
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryInfoProperties)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureActiveDirectoryInfoProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureActiveDirectoryInfoProperties(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryInfoProperties)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AzureActiveDirectoryInfoProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AzureActiveDirectoryInfoProperties.cs
new file mode 100644
index 000000000000..53c6097fe555
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AzureActiveDirectoryInfoProperties.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// Azure Active directory info. Only one should be populated based on the join type.
+ internal partial class AzureActiveDirectoryInfoProperties
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The Mobile Device Management(MDM) guid.
+ /// is null.
+ public AzureActiveDirectoryInfoProperties(string mdmProviderGuid)
+ {
+ Argument.AssertNotNull(mdmProviderGuid, nameof(mdmProviderGuid));
+
+ MdmProviderGuid = mdmProviderGuid;
+ }
+
+ /// Initializes a new instance of .
+ /// The Mobile Device Management(MDM) guid.
+ /// Keeps track of any properties unknown to the library.
+ internal AzureActiveDirectoryInfoProperties(string mdmProviderGuid, IDictionary serializedAdditionalRawData)
+ {
+ MdmProviderGuid = mdmProviderGuid;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AzureActiveDirectoryInfoProperties()
+ {
+ }
+
+ /// The Mobile Device Management(MDM) guid.
+ [WirePath("mdmProviderGuid")]
+ public string MdmProviderGuid { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoPatchProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoPatchProperties.Serialization.cs
new file mode 100644
index 000000000000..344deab8e05f
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoPatchProperties.Serialization.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ public partial class BootDiagnosticsInfoPatchProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoPatchProperties)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(Enabled))
+ {
+ writer.WritePropertyName("enabled"u8);
+ writer.WriteBooleanValue(Enabled.Value);
+ }
+ if (Optional.IsDefined(StorageUri))
+ {
+ writer.WritePropertyName("storageUri"u8);
+ writer.WriteStringValue(StorageUri.AbsoluteUri);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ BootDiagnosticsInfoPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoPatchProperties)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBootDiagnosticsInfoPatchProperties(document.RootElement, options);
+ }
+
+ internal static BootDiagnosticsInfoPatchProperties DeserializeBootDiagnosticsInfoPatchProperties(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool? enabled = default;
+ Uri storageUri = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("enabled"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enabled = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("storageUri"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ storageUri = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new BootDiagnosticsInfoPatchProperties(enabled, storageUri, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoPatchProperties)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ BootDiagnosticsInfoPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBootDiagnosticsInfoPatchProperties(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoPatchProperties)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoPatchProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoPatchProperties.cs
new file mode 100644
index 000000000000..bfe54f4305d7
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoPatchProperties.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor.
+ public partial class BootDiagnosticsInfoPatchProperties
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public BootDiagnosticsInfoPatchProperties()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Whether boot diagnostics should be enabled on the Virtual Machine.
+ /// Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ /// Keeps track of any properties unknown to the library.
+ internal BootDiagnosticsInfoPatchProperties(bool? enabled, Uri storageUri, IDictionary serializedAdditionalRawData)
+ {
+ Enabled = enabled;
+ StorageUri = storageUri;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Whether boot diagnostics should be enabled on the Virtual Machine.
+ [WirePath("enabled")]
+ public bool? Enabled { get; set; }
+ /// Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ [WirePath("storageUri")]
+ public Uri StorageUri { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoProperties.Serialization.cs
new file mode 100644
index 000000000000..c07152048e61
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoProperties.Serialization.cs
@@ -0,0 +1,205 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ public partial class BootDiagnosticsInfoProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoProperties)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(Enabled))
+ {
+ writer.WritePropertyName("enabled"u8);
+ writer.WriteBooleanValue(Enabled.Value);
+ }
+ if (Optional.IsDefined(StorageUri))
+ {
+ if (StorageUri != null)
+ {
+ writer.WritePropertyName("storageUri"u8);
+ writer.WriteStringValue(StorageUri.AbsoluteUri);
+ }
+ else
+ {
+ writer.WriteNull("storageUri");
+ }
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ BootDiagnosticsInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoProperties)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBootDiagnosticsInfoProperties(document.RootElement, options);
+ }
+
+ internal static BootDiagnosticsInfoProperties DeserializeBootDiagnosticsInfoProperties(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool? enabled = default;
+ Uri storageUri = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("enabled"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enabled = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("storageUri"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ storageUri = null;
+ continue;
+ }
+ storageUri = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new BootDiagnosticsInfoProperties(enabled, storageUri, serializedAdditionalRawData);
+ }
+
+ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
+ {
+ StringBuilder builder = new StringBuilder();
+ BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions;
+ IDictionary propertyOverrides = null;
+ bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides);
+ bool hasPropertyOverride = false;
+ string propertyOverride = null;
+
+ builder.AppendLine("{");
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Enabled), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" enabled: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(Enabled))
+ {
+ builder.Append(" enabled: ");
+ var boolValue = Enabled.Value == true ? "true" : "false";
+ builder.AppendLine($"{boolValue}");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StorageUri), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" storageUri: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(StorageUri))
+ {
+ builder.Append(" storageUri: ");
+ builder.AppendLine($"'{StorageUri.AbsoluteUri}'");
+ }
+ }
+
+ builder.AppendLine("}");
+ return BinaryData.FromString(builder.ToString());
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ case "bicep":
+ return SerializeBicep(options);
+ default:
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoProperties)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ BootDiagnosticsInfoProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBootDiagnosticsInfoProperties(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BootDiagnosticsInfoProperties)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoProperties.cs
new file mode 100644
index 000000000000..52c5e66bdf7b
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/BootDiagnosticsInfoProperties.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor.
+ public partial class BootDiagnosticsInfoProperties
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public BootDiagnosticsInfoProperties()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Whether boot diagnostics should be enabled on the Virtual Machine.
+ /// Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ /// Keeps track of any properties unknown to the library.
+ internal BootDiagnosticsInfoProperties(bool? enabled, Uri storageUri, IDictionary serializedAdditionalRawData)
+ {
+ Enabled = enabled;
+ StorageUri = storageUri;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Whether boot diagnostics should be enabled on the Virtual Machine.
+ [WirePath("enabled")]
+ public bool? Enabled { get; set; }
+ /// Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ [WirePath("storageUri")]
+ public Uri StorageUri { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CanaryPolicy.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CanaryPolicy.cs
new file mode 100644
index 000000000000..68ebd662b13e
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CanaryPolicy.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// Policy on whether a Canary VM should be provisioned during a session host provisioning operation.
+ public readonly partial struct CanaryPolicy : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CanaryPolicy(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string AutoValue = "Auto";
+ private const string NeverValue = "Never";
+ private const string AlwaysValue = "Always";
+
+ /// Auto.
+ public static CanaryPolicy Auto { get; } = new CanaryPolicy(AutoValue);
+ /// Never.
+ public static CanaryPolicy Never { get; } = new CanaryPolicy(NeverValue);
+ /// Always.
+ public static CanaryPolicy Always { get; } = new CanaryPolicy(AlwaysValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CanaryPolicy left, CanaryPolicy right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CanaryPolicy left, CanaryPolicy right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator CanaryPolicy(string value) => new CanaryPolicy(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CanaryPolicy other && Equals(other);
+ ///
+ public bool Equals(CanaryPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CreateDeleteProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CreateDeleteProperties.Serialization.cs
new file mode 100644
index 000000000000..616eec1dc039
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CreateDeleteProperties.Serialization.cs
@@ -0,0 +1,288 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ public partial class CreateDeleteProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(CreateDeleteProperties)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(RampUpMaximumHostPoolSize))
+ {
+ if (RampUpMaximumHostPoolSize != null)
+ {
+ writer.WritePropertyName("rampUpMaximumHostPoolSize"u8);
+ writer.WriteNumberValue(RampUpMaximumHostPoolSize.Value);
+ }
+ else
+ {
+ writer.WriteNull("rampUpMaximumHostPoolSize");
+ }
+ }
+ if (Optional.IsDefined(RampUpMinimumHostPoolSize))
+ {
+ if (RampUpMinimumHostPoolSize != null)
+ {
+ writer.WritePropertyName("rampUpMinimumHostPoolSize"u8);
+ writer.WriteNumberValue(RampUpMinimumHostPoolSize.Value);
+ }
+ else
+ {
+ writer.WriteNull("rampUpMinimumHostPoolSize");
+ }
+ }
+ if (Optional.IsDefined(RampDownMaximumHostPoolSize))
+ {
+ if (RampDownMaximumHostPoolSize != null)
+ {
+ writer.WritePropertyName("rampDownMaximumHostPoolSize"u8);
+ writer.WriteNumberValue(RampDownMaximumHostPoolSize.Value);
+ }
+ else
+ {
+ writer.WriteNull("rampDownMaximumHostPoolSize");
+ }
+ }
+ if (Optional.IsDefined(RampDownMinimumHostPoolSize))
+ {
+ if (RampDownMinimumHostPoolSize != null)
+ {
+ writer.WritePropertyName("rampDownMinimumHostPoolSize"u8);
+ writer.WriteNumberValue(RampDownMinimumHostPoolSize.Value);
+ }
+ else
+ {
+ writer.WriteNull("rampDownMinimumHostPoolSize");
+ }
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ CreateDeleteProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(CreateDeleteProperties)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeCreateDeleteProperties(document.RootElement, options);
+ }
+
+ internal static CreateDeleteProperties DeserializeCreateDeleteProperties(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ int? rampUpMaximumHostPoolSize = default;
+ int? rampUpMinimumHostPoolSize = default;
+ int? rampDownMaximumHostPoolSize = default;
+ int? rampDownMinimumHostPoolSize = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("rampUpMaximumHostPoolSize"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ rampUpMaximumHostPoolSize = null;
+ continue;
+ }
+ rampUpMaximumHostPoolSize = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("rampUpMinimumHostPoolSize"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ rampUpMinimumHostPoolSize = null;
+ continue;
+ }
+ rampUpMinimumHostPoolSize = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("rampDownMaximumHostPoolSize"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ rampDownMaximumHostPoolSize = null;
+ continue;
+ }
+ rampDownMaximumHostPoolSize = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("rampDownMinimumHostPoolSize"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ rampDownMinimumHostPoolSize = null;
+ continue;
+ }
+ rampDownMinimumHostPoolSize = property.Value.GetInt32();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new CreateDeleteProperties(rampUpMaximumHostPoolSize, rampUpMinimumHostPoolSize, rampDownMaximumHostPoolSize, rampDownMinimumHostPoolSize, serializedAdditionalRawData);
+ }
+
+ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
+ {
+ StringBuilder builder = new StringBuilder();
+ BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions;
+ IDictionary propertyOverrides = null;
+ bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides);
+ bool hasPropertyOverride = false;
+ string propertyOverride = null;
+
+ builder.AppendLine("{");
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RampUpMaximumHostPoolSize), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" rampUpMaximumHostPoolSize: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(RampUpMaximumHostPoolSize))
+ {
+ builder.Append(" rampUpMaximumHostPoolSize: ");
+ builder.AppendLine($"{RampUpMaximumHostPoolSize.Value}");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RampUpMinimumHostPoolSize), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" rampUpMinimumHostPoolSize: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(RampUpMinimumHostPoolSize))
+ {
+ builder.Append(" rampUpMinimumHostPoolSize: ");
+ builder.AppendLine($"{RampUpMinimumHostPoolSize.Value}");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RampDownMaximumHostPoolSize), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" rampDownMaximumHostPoolSize: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(RampDownMaximumHostPoolSize))
+ {
+ builder.Append(" rampDownMaximumHostPoolSize: ");
+ builder.AppendLine($"{RampDownMaximumHostPoolSize.Value}");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RampDownMinimumHostPoolSize), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" rampDownMinimumHostPoolSize: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(RampDownMinimumHostPoolSize))
+ {
+ builder.Append(" rampDownMinimumHostPoolSize: ");
+ builder.AppendLine($"{RampDownMinimumHostPoolSize.Value}");
+ }
+ }
+
+ builder.AppendLine("}");
+ return BinaryData.FromString(builder.ToString());
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ case "bicep":
+ return SerializeBicep(options);
+ default:
+ throw new FormatException($"The model {nameof(CreateDeleteProperties)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ CreateDeleteProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeCreateDeleteProperties(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(CreateDeleteProperties)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CreateDeleteProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CreateDeleteProperties.cs
new file mode 100644
index 000000000000..607ed3b1ca89
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CreateDeleteProperties.cs
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// The properties that control how Scaling will manage the size of the hostpool by creating and deleting hosts.
+ public partial class CreateDeleteProperties
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public CreateDeleteProperties()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Maximum number of session hosts that may be created by the Scaling Service. This requires the assigned hostpool to have a session host config property.
+ /// Minimum number of session hosts that will be be created by the Scaling Service. Scaling will not delete any hosts when this limit is met. This requires the assigned hostpool to have a session host config property.
+ /// Maximum number of session hosts that may be created by the Scaling Service. This requires the assigned hostpool to have a session host config property.
+ /// Minimum number of session hosts that will be be created by the Scaling Service. Scaling will not delete any hosts when this limit is met. This requires the assigned hostpool to have a session host config property.
+ /// Keeps track of any properties unknown to the library.
+ internal CreateDeleteProperties(int? rampUpMaximumHostPoolSize, int? rampUpMinimumHostPoolSize, int? rampDownMaximumHostPoolSize, int? rampDownMinimumHostPoolSize, IDictionary serializedAdditionalRawData)
+ {
+ RampUpMaximumHostPoolSize = rampUpMaximumHostPoolSize;
+ RampUpMinimumHostPoolSize = rampUpMinimumHostPoolSize;
+ RampDownMaximumHostPoolSize = rampDownMaximumHostPoolSize;
+ RampDownMinimumHostPoolSize = rampDownMinimumHostPoolSize;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Maximum number of session hosts that may be created by the Scaling Service. This requires the assigned hostpool to have a session host config property.
+ [WirePath("rampUpMaximumHostPoolSize")]
+ public int? RampUpMaximumHostPoolSize { get; set; }
+ /// Minimum number of session hosts that will be be created by the Scaling Service. Scaling will not delete any hosts when this limit is met. This requires the assigned hostpool to have a session host config property.
+ [WirePath("rampUpMinimumHostPoolSize")]
+ public int? RampUpMinimumHostPoolSize { get; set; }
+ /// Maximum number of session hosts that may be created by the Scaling Service. This requires the assigned hostpool to have a session host config property.
+ [WirePath("rampDownMaximumHostPoolSize")]
+ public int? RampDownMaximumHostPoolSize { get; set; }
+ /// Minimum number of session hosts that will be be created by the Scaling Service. Scaling will not delete any hosts when this limit is met. This requires the assigned hostpool to have a session host config property.
+ [WirePath("rampDownMinimumHostPoolSize")]
+ public int? RampDownMinimumHostPoolSize { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoPatchProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoPatchProperties.Serialization.cs
new file mode 100644
index 000000000000..05333a107006
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoPatchProperties.Serialization.cs
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ internal partial class CustomInfoPatchProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(CustomInfoPatchProperties)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsDefined(ResourceId))
+ {
+ writer.WritePropertyName("resourceId"u8);
+ writer.WriteStringValue(ResourceId);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ CustomInfoPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(CustomInfoPatchProperties)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeCustomInfoPatchProperties(document.RootElement, options);
+ }
+
+ internal static CustomInfoPatchProperties DeserializeCustomInfoPatchProperties(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier resourceId = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("resourceId"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ resourceId = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new CustomInfoPatchProperties(resourceId, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDesktopVirtualizationContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(CustomInfoPatchProperties)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ CustomInfoPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeCustomInfoPatchProperties(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(CustomInfoPatchProperties)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoPatchProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoPatchProperties.cs
new file mode 100644
index 000000000000..dc841215a87f
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoPatchProperties.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ /// Custom image information.
+ internal partial class CustomInfoPatchProperties
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public CustomInfoPatchProperties()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The resource id of the custom image.
+ /// Keeps track of any properties unknown to the library.
+ internal CustomInfoPatchProperties(ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData)
+ {
+ ResourceId = resourceId;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource id of the custom image.
+ [WirePath("resourceId")]
+ public ResourceIdentifier ResourceId { get; set; }
+ }
+}
diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoProperties.Serialization.cs
new file mode 100644
index 000000000000..578fae1697d8
--- /dev/null
+++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/CustomInfoProperties.Serialization.cs
@@ -0,0 +1,159 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.DesktopVirtualization.Models
+{
+ internal partial class CustomInfoProperties : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(CustomInfoProperties)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("resourceId"u8);
+ writer.WriteStringValue(ResourceId);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ CustomInfoProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel