diff --git a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs index fac44f0490e9..1e2add11f36a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs @@ -8994,15 +8994,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class VirtualMachineImage : Azure.ResourceManager.Compute.Models.VirtualMachineImageBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineImage(string name, Azure.Core.AzureLocation location) : base (default(string), default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Compute.Models.ArchitectureType? Architecture { get { throw null; } set { } } - public bool? AutomaticOSUpgradeSupported { get { throw null; } set { } } - public System.Collections.Generic.IList DataDiskImages { get { throw null; } } - public Azure.ResourceManager.Compute.Models.VirtualMachineDiskType? DisallowedVmDiskType { get { throw null; } set { } } - public System.Collections.Generic.IList Features { get { throw null; } } - public Azure.ResourceManager.Compute.Models.HyperVGeneration? HyperVGeneration { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.ImageDeprecationStatus ImageDeprecationStatus { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSDiskImageOperatingSystem { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.PurchasePlan Plan { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineImage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -9016,6 +9007,7 @@ public VirtualMachineImageBase(string name, Azure.Core.AzureLocation location) { public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineImageProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineImageBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9036,6 +9028,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VirtualMachineImageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VirtualMachineImageProperties() { } + public Azure.ResourceManager.Compute.Models.ArchitectureType? Architecture { get { throw null; } set { } } + public bool? AutomaticOSUpgradeSupported { get { throw null; } set { } } + public System.Collections.Generic.IList DataDiskImages { get { throw null; } } + public Azure.ResourceManager.Compute.Models.VirtualMachineDiskType? DisallowedVmDiskType { get { throw null; } set { } } + public System.Collections.Generic.IList Features { get { throw null; } } + public Azure.ResourceManager.Compute.Models.HyperVGeneration? HyperVGeneration { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ImageDeprecationStatus ImageDeprecationStatus { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSDiskImageOperatingSystem { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.PurchasePlan Plan { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineImageProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineImageProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VirtualMachineInstallPatchesContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineInstallPatchesContent(Azure.ResourceManager.Compute.Models.VmGuestPatchRebootSetting rebootSetting) { } diff --git a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs index fac44f0490e9..1e2add11f36a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs @@ -8994,15 +8994,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class VirtualMachineImage : Azure.ResourceManager.Compute.Models.VirtualMachineImageBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineImage(string name, Azure.Core.AzureLocation location) : base (default(string), default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Compute.Models.ArchitectureType? Architecture { get { throw null; } set { } } - public bool? AutomaticOSUpgradeSupported { get { throw null; } set { } } - public System.Collections.Generic.IList DataDiskImages { get { throw null; } } - public Azure.ResourceManager.Compute.Models.VirtualMachineDiskType? DisallowedVmDiskType { get { throw null; } set { } } - public System.Collections.Generic.IList Features { get { throw null; } } - public Azure.ResourceManager.Compute.Models.HyperVGeneration? HyperVGeneration { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.ImageDeprecationStatus ImageDeprecationStatus { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSDiskImageOperatingSystem { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.PurchasePlan Plan { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineImage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -9016,6 +9007,7 @@ public VirtualMachineImageBase(string name, Azure.Core.AzureLocation location) { public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineImageProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Compute.Models.VirtualMachineImageBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9036,6 +9028,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VirtualMachineImageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VirtualMachineImageProperties() { } + public Azure.ResourceManager.Compute.Models.ArchitectureType? Architecture { get { throw null; } set { } } + public bool? AutomaticOSUpgradeSupported { get { throw null; } set { } } + public System.Collections.Generic.IList DataDiskImages { get { throw null; } } + public Azure.ResourceManager.Compute.Models.VirtualMachineDiskType? DisallowedVmDiskType { get { throw null; } set { } } + public System.Collections.Generic.IList Features { get { throw null; } } + public Azure.ResourceManager.Compute.Models.HyperVGeneration? HyperVGeneration { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.ImageDeprecationStatus ImageDeprecationStatus { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? OSDiskImageOperatingSystem { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.PurchasePlan Plan { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineImageProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineImageProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VirtualMachineInstallPatchesContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineInstallPatchesContent(Azure.ResourceManager.Compute.Models.VmGuestPatchRebootSetting rebootSetting) { } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs index 92418bd168b6..186c7a651c73 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.Serialization.cs @@ -36,64 +36,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Plan)) - { - writer.WritePropertyName("plan"u8); - writer.WriteObjectValue(Plan, options); - } - if (Optional.IsDefined(OSDiskImage)) - { - writer.WritePropertyName("osDiskImage"u8); - writer.WriteObjectValue(OSDiskImage, options); - } - if (Optional.IsCollectionDefined(DataDiskImages)) - { - writer.WritePropertyName("dataDiskImages"u8); - writer.WriteStartArray(); - foreach (var item in DataDiskImages) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(AutomaticOSUpgradeProperties)) - { - writer.WritePropertyName("automaticOSUpgradeProperties"u8); - writer.WriteObjectValue(AutomaticOSUpgradeProperties, options); - } - if (Optional.IsDefined(HyperVGeneration)) - { - writer.WritePropertyName("hyperVGeneration"u8); - writer.WriteStringValue(HyperVGeneration.Value.ToString()); - } - if (Optional.IsDefined(Disallowed)) - { - writer.WritePropertyName("disallowed"u8); - writer.WriteObjectValue(Disallowed, options); - } - if (Optional.IsCollectionDefined(Features)) - { - writer.WritePropertyName("features"u8); - writer.WriteStartArray(); - foreach (var item in Features) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Architecture)) - { - writer.WritePropertyName("architecture"u8); - writer.WriteStringValue(Architecture.Value.ToString()); - } - if (Optional.IsDefined(ImageDeprecationStatus)) - { - writer.WritePropertyName("imageDeprecationStatus"u8); - writer.WriteObjectValue(ImageDeprecationStatus, options); - } - writer.WriteEndObject(); } VirtualMachineImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -120,16 +62,8 @@ internal static VirtualMachineImage DeserializeVirtualMachineImage(JsonElement e AzureLocation location = default; IDictionary tags = default; ExtendedLocation extendedLocation = default; + VirtualMachineImageProperties properties = default; ResourceIdentifier id = default; - PurchasePlan plan = default; - OSDiskImage osDiskImage = default; - IList dataDiskImages = default; - AutomaticOSUpgradeProperties automaticOSUpgradeProperties = default; - HyperVGeneration? hyperVGeneration = default; - DisallowedConfiguration disallowed = default; - IList features = default; - ArchitectureType? architecture = default; - ImageDeprecationStatus imageDeprecationStatus = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -167,116 +101,22 @@ internal static VirtualMachineImage DeserializeVirtualMachineImage(JsonElement e extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("id"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - id = new ResourceIdentifier(property.Value.GetString()); + properties = VirtualMachineImageProperties.DeserializeVirtualMachineImageProperties(property.Value, options); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("id"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("plan"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - plan = PurchasePlan.DeserializePurchasePlan(property0.Value, options); - continue; - } - if (property0.NameEquals("osDiskImage"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - osDiskImage = OSDiskImage.DeserializeOSDiskImage(property0.Value, options); - continue; - } - if (property0.NameEquals("dataDiskImages"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(DataDiskImage.DeserializeDataDiskImage(item, options)); - } - dataDiskImages = array; - continue; - } - if (property0.NameEquals("automaticOSUpgradeProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - automaticOSUpgradeProperties = AutomaticOSUpgradeProperties.DeserializeAutomaticOSUpgradeProperties(property0.Value, options); - continue; - } - if (property0.NameEquals("hyperVGeneration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hyperVGeneration = new HyperVGeneration(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("disallowed"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disallowed = DisallowedConfiguration.DeserializeDisallowedConfiguration(property0.Value, options); - continue; - } - if (property0.NameEquals("features"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(VirtualMachineImageFeature.DeserializeVirtualMachineImageFeature(item, options)); - } - features = array; - continue; - } - if (property0.NameEquals("architecture"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - architecture = new ArchitectureType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("imageDeprecationStatus"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - imageDeprecationStatus = ImageDeprecationStatus.DeserializeImageDeprecationStatus(property0.Value, options); - continue; - } - } + id = new ResourceIdentifier(property.Value.GetString()); continue; } if (options.Format != "W") @@ -292,15 +132,7 @@ internal static VirtualMachineImage DeserializeVirtualMachineImage(JsonElement e location, tags ?? new ChangeTrackingDictionary(), extendedLocation, - plan, - osDiskImage, - dataDiskImages ?? new ChangeTrackingList(), - automaticOSUpgradeProperties, - hyperVGeneration, - disallowed, - features ?? new ChangeTrackingList(), - architecture, - imageDeprecationStatus); + properties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs index 2c73ddd22252..b749c1ba2b7d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImage.cs @@ -22,9 +22,6 @@ public partial class VirtualMachineImage : VirtualMachineImageBase public VirtualMachineImage(string name, AzureLocation location) : base(name, location) { Argument.AssertNotNull(name, nameof(name)); - - DataDiskImages = new ChangeTrackingList(); - Features = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -34,82 +31,14 @@ public VirtualMachineImage(string name, AzureLocation location) : base(name, loc /// The supported Azure location of the resource. /// Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). /// The extended location of the Virtual Machine. - /// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. - /// Contains the os disk image information. - /// The list of data disk images information. - /// Describes automatic OS upgrade properties on the image. - /// Specifies the HyperVGeneration Type. - /// Specifies disallowed configuration for the VirtualMachine created from the image. - /// - /// Specifies the Architecture Type. - /// Describes image deprecation status properties on the image. - internal VirtualMachineImage(ResourceIdentifier id, IDictionary serializedAdditionalRawData, string name, AzureLocation location, IDictionary tags, ExtendedLocation extendedLocation, PurchasePlan plan, OSDiskImage osDiskImage, IList dataDiskImages, AutomaticOSUpgradeProperties automaticOSUpgradeProperties, HyperVGeneration? hyperVGeneration, DisallowedConfiguration disallowed, IList features, ArchitectureType? architecture, ImageDeprecationStatus imageDeprecationStatus) : base(id, serializedAdditionalRawData, name, location, tags, extendedLocation) + /// Describes the properties of a Virtual Machine Image. + internal VirtualMachineImage(ResourceIdentifier id, IDictionary serializedAdditionalRawData, string name, AzureLocation location, IDictionary tags, ExtendedLocation extendedLocation, VirtualMachineImageProperties properties) : base(id, serializedAdditionalRawData, name, location, tags, extendedLocation, properties) { - Plan = plan; - OSDiskImage = osDiskImage; - DataDiskImages = dataDiskImages; - AutomaticOSUpgradeProperties = automaticOSUpgradeProperties; - HyperVGeneration = hyperVGeneration; - Disallowed = disallowed; - Features = features; - Architecture = architecture; - ImageDeprecationStatus = imageDeprecationStatus; } /// Initializes a new instance of for deserialization. internal VirtualMachineImage() { } - - /// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. - public PurchasePlan Plan { get; set; } - /// Contains the os disk image information. - internal OSDiskImage OSDiskImage { get; set; } - /// The operating system of the osDiskImage. - public SupportedOperatingSystemType? OSDiskImageOperatingSystem - { - get => OSDiskImage is null ? default(SupportedOperatingSystemType?) : OSDiskImage.OperatingSystem; - set - { - OSDiskImage = value.HasValue ? new OSDiskImage(value.Value) : null; - } - } - - /// The list of data disk images information. - public IList DataDiskImages { get; } - /// Describes automatic OS upgrade properties on the image. - internal AutomaticOSUpgradeProperties AutomaticOSUpgradeProperties { get; set; } - /// Specifies whether automatic OS upgrade is supported on the image. - public bool? AutomaticOSUpgradeSupported - { - get => AutomaticOSUpgradeProperties is null ? default(bool?) : AutomaticOSUpgradeProperties.AutomaticOSUpgradeSupported; - set - { - AutomaticOSUpgradeProperties = value.HasValue ? new AutomaticOSUpgradeProperties(value.Value) : null; - } - } - - /// Specifies the HyperVGeneration Type. - public HyperVGeneration? HyperVGeneration { get; set; } - /// Specifies disallowed configuration for the VirtualMachine created from the image. - internal DisallowedConfiguration Disallowed { get; set; } - /// VM disk types which are disallowed. - public VirtualMachineDiskType? DisallowedVmDiskType - { - get => Disallowed is null ? default : Disallowed.VmDiskType; - set - { - if (Disallowed is null) - Disallowed = new DisallowedConfiguration(); - Disallowed.VmDiskType = value; - } - } - - /// Gets the features. - public IList Features { get; } - /// Specifies the Architecture Type. - public ArchitectureType? Architecture { get; set; } - /// Describes image deprecation status properties on the image. - public ImageDeprecationStatus ImageDeprecationStatus { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs index 93b4fc5c8cc0..649cbba2d275 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.Serialization.cs @@ -56,6 +56,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } } VirtualMachineImageBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -82,6 +87,7 @@ internal static VirtualMachineImageBase DeserializeVirtualMachineImageBase(JsonE AzureLocation location = default; IDictionary tags = default; ExtendedLocation extendedLocation = default; + VirtualMachineImageProperties properties = default; ResourceIdentifier id = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -120,6 +126,15 @@ internal static VirtualMachineImageBase DeserializeVirtualMachineImageBase(JsonE extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = VirtualMachineImageProperties.DeserializeVirtualMachineImageProperties(property.Value, options); + continue; + } if (property.NameEquals("id"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -141,7 +156,8 @@ internal static VirtualMachineImageBase DeserializeVirtualMachineImageBase(JsonE name, location, tags ?? new ChangeTrackingDictionary(), - extendedLocation); + extendedLocation, + properties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.cs index abc32136cb98..9b585a85996f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageBase.cs @@ -35,12 +35,14 @@ public VirtualMachineImageBase(string name, AzureLocation location) /// The supported Azure location of the resource. /// Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). /// The extended location of the Virtual Machine. - internal VirtualMachineImageBase(ResourceIdentifier id, IDictionary serializedAdditionalRawData, string name, AzureLocation location, IDictionary tags, ExtendedLocation extendedLocation) : base(id, serializedAdditionalRawData) + /// Describes the properties of a Virtual Machine Image. + internal VirtualMachineImageBase(ResourceIdentifier id, IDictionary serializedAdditionalRawData, string name, AzureLocation location, IDictionary tags, ExtendedLocation extendedLocation, VirtualMachineImageProperties properties) : base(id, serializedAdditionalRawData) { Name = name; Location = location; Tags = tags; ExtendedLocation = extendedLocation; + Properties = properties; } /// Initializes a new instance of for deserialization. @@ -56,5 +58,7 @@ internal VirtualMachineImageBase() public IDictionary Tags { get; } /// The extended location of the Virtual Machine. public ExtendedLocation ExtendedLocation { get; set; } + /// Describes the properties of a Virtual Machine Image. + public VirtualMachineImageProperties Properties { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageProperties.Serialization.cs new file mode 100644 index 000000000000..2516ae33e739 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageProperties.Serialization.cs @@ -0,0 +1,283 @@ +// 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.Compute.Models +{ + public partial class VirtualMachineImageProperties : 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(VirtualMachineImageProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Plan)) + { + writer.WritePropertyName("plan"u8); + writer.WriteObjectValue(Plan, options); + } + if (Optional.IsDefined(OSDiskImage)) + { + writer.WritePropertyName("osDiskImage"u8); + writer.WriteObjectValue(OSDiskImage, options); + } + if (Optional.IsCollectionDefined(DataDiskImages)) + { + writer.WritePropertyName("dataDiskImages"u8); + writer.WriteStartArray(); + foreach (var item in DataDiskImages) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AutomaticOSUpgradeProperties)) + { + writer.WritePropertyName("automaticOSUpgradeProperties"u8); + writer.WriteObjectValue(AutomaticOSUpgradeProperties, options); + } + if (Optional.IsDefined(HyperVGeneration)) + { + writer.WritePropertyName("hyperVGeneration"u8); + writer.WriteStringValue(HyperVGeneration.Value.ToString()); + } + if (Optional.IsDefined(Disallowed)) + { + writer.WritePropertyName("disallowed"u8); + writer.WriteObjectValue(Disallowed, options); + } + if (Optional.IsCollectionDefined(Features)) + { + writer.WritePropertyName("features"u8); + writer.WriteStartArray(); + foreach (var item in Features) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Architecture)) + { + writer.WritePropertyName("architecture"u8); + writer.WriteStringValue(Architecture.Value.ToString()); + } + if (Optional.IsDefined(ImageDeprecationStatus)) + { + writer.WritePropertyName("imageDeprecationStatus"u8); + writer.WriteObjectValue(ImageDeprecationStatus, 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 + } + } + } + + VirtualMachineImageProperties 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(VirtualMachineImageProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineImageProperties(document.RootElement, options); + } + + internal static VirtualMachineImageProperties DeserializeVirtualMachineImageProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PurchasePlan plan = default; + OSDiskImage osDiskImage = default; + IList dataDiskImages = default; + AutomaticOSUpgradeProperties automaticOSUpgradeProperties = default; + HyperVGeneration? hyperVGeneration = default; + DisallowedConfiguration disallowed = default; + IList features = default; + ArchitectureType? architecture = default; + ImageDeprecationStatus imageDeprecationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("plan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + plan = PurchasePlan.DeserializePurchasePlan(property.Value, options); + continue; + } + if (property.NameEquals("osDiskImage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osDiskImage = OSDiskImage.DeserializeOSDiskImage(property.Value, options); + continue; + } + if (property.NameEquals("dataDiskImages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataDiskImage.DeserializeDataDiskImage(item, options)); + } + dataDiskImages = array; + continue; + } + if (property.NameEquals("automaticOSUpgradeProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + automaticOSUpgradeProperties = AutomaticOSUpgradeProperties.DeserializeAutomaticOSUpgradeProperties(property.Value, options); + continue; + } + if (property.NameEquals("hyperVGeneration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hyperVGeneration = new HyperVGeneration(property.Value.GetString()); + continue; + } + if (property.NameEquals("disallowed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disallowed = DisallowedConfiguration.DeserializeDisallowedConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("features"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineImageFeature.DeserializeVirtualMachineImageFeature(item, options)); + } + features = array; + continue; + } + if (property.NameEquals("architecture"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + architecture = new ArchitectureType(property.Value.GetString()); + continue; + } + if (property.NameEquals("imageDeprecationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageDeprecationStatus = ImageDeprecationStatus.DeserializeImageDeprecationStatus(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineImageProperties( + plan, + osDiskImage, + dataDiskImages ?? new ChangeTrackingList(), + automaticOSUpgradeProperties, + hyperVGeneration, + disallowed, + features ?? new ChangeTrackingList(), + architecture, + imageDeprecationStatus, + 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, AzureResourceManagerComputeContext.Default); + default: + throw new FormatException($"The model {nameof(VirtualMachineImageProperties)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineImageProperties 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 DeserializeVirtualMachineImageProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineImageProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageProperties.cs new file mode 100644 index 000000000000..af30af641b6f --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineImageProperties.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes the properties of a Virtual Machine Image. + public partial class VirtualMachineImageProperties + { + /// + /// 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 VirtualMachineImageProperties() + { + DataDiskImages = new ChangeTrackingList(); + Features = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + /// Contains the os disk image information. + /// The list of data disk images information. + /// Describes automatic OS upgrade properties on the image. + /// Specifies the HyperVGeneration Type. + /// Specifies disallowed configuration for the VirtualMachine created from the image. + /// + /// Specifies the Architecture Type. + /// Describes image deprecation status properties on the image. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineImageProperties(PurchasePlan plan, OSDiskImage osDiskImage, IList dataDiskImages, AutomaticOSUpgradeProperties automaticOSUpgradeProperties, HyperVGeneration? hyperVGeneration, DisallowedConfiguration disallowed, IList features, ArchitectureType? architecture, ImageDeprecationStatus imageDeprecationStatus, IDictionary serializedAdditionalRawData) + { + Plan = plan; + OSDiskImage = osDiskImage; + DataDiskImages = dataDiskImages; + AutomaticOSUpgradeProperties = automaticOSUpgradeProperties; + HyperVGeneration = hyperVGeneration; + Disallowed = disallowed; + Features = features; + Architecture = architecture; + ImageDeprecationStatus = imageDeprecationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + public PurchasePlan Plan { get; set; } + /// Contains the os disk image information. + internal OSDiskImage OSDiskImage { get; set; } + /// The operating system of the osDiskImage. + public SupportedOperatingSystemType? OSDiskImageOperatingSystem + { + get => OSDiskImage is null ? default(SupportedOperatingSystemType?) : OSDiskImage.OperatingSystem; + set + { + OSDiskImage = value.HasValue ? new OSDiskImage(value.Value) : null; + } + } + + /// The list of data disk images information. + public IList DataDiskImages { get; } + /// Describes automatic OS upgrade properties on the image. + internal AutomaticOSUpgradeProperties AutomaticOSUpgradeProperties { get; set; } + /// Specifies whether automatic OS upgrade is supported on the image. + public bool? AutomaticOSUpgradeSupported + { + get => AutomaticOSUpgradeProperties is null ? default(bool?) : AutomaticOSUpgradeProperties.AutomaticOSUpgradeSupported; + set + { + AutomaticOSUpgradeProperties = value.HasValue ? new AutomaticOSUpgradeProperties(value.Value) : null; + } + } + + /// Specifies the HyperVGeneration Type. + public HyperVGeneration? HyperVGeneration { get; set; } + /// Specifies disallowed configuration for the VirtualMachine created from the image. + internal DisallowedConfiguration Disallowed { get; set; } + /// VM disk types which are disallowed. + public VirtualMachineDiskType? DisallowedVmDiskType + { + get => Disallowed is null ? default : Disallowed.VmDiskType; + set + { + if (Disallowed is null) + Disallowed = new DisallowedConfiguration(); + Disallowed.VmDiskType = value; + } + } + + /// Gets the features. + public IList Features { get; } + /// Specifies the Architecture Type. + public ArchitectureType? Architecture { get; set; } + /// Describes image deprecation status properties on the image. + public ImageDeprecationStatus ImageDeprecationStatus { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index 1366fb3e33ff..54352fe6f413 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -10,7 +10,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Compute namespace: Azure.ResourceManager.Compute -require: https://github.com/Azure/azure-rest-api-specs/blob/883abbe08d313739069c0007eb820aa0a0710748/specification/compute/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/compute/resource-manager/readme.md #tag: package-2025-02-01 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/autorest.md b/sdk/monitor/Azure.ResourceManager.Monitor/src/autorest.md index a3789970402b..9039441eef19 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/autorest.md +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/autorest.md @@ -537,30 +537,30 @@ These settings apply only when `--tag=package-2024-10-01-preview` is specified o ```yaml $(tag) == 'package-2024-10-01-preview' title: MonitorManagementClient input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/autoscale_API.json -# - https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json # we do not need to support this -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRulesIncidents_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/2491b616cde43277fae339604f03f59412e016aa/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json # we should not change this commit because APIs in this file has been deprecated and removed in https://github.com/Azure/azure-rest-api-specs/pull/30787 -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/logProfiles_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/preview/2024-10-01-preview/actionGroups_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/activityLogs_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/eventCategories_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/tenantActivityLogs_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-05-01/metrics_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/metricBaselines_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-15/scheduledQueryRule_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/privateLinkScopes_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/dataCollectionEndpoints_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/dataCollectionRuleAssociations_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/dataCollectionRules_API.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Monitor/preview/2023-10-01-preview/azuremonitor.json -- https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Monitor/PipelineGroups/preview/2024-10-01-preview/pipelineGroups.json -# - https://github.com/Azure/azure-rest-api-specs/blob/a9b9241e0d2909e29aa22efb33f55491cbd160de/specification/monitor/resource-manager/Microsoft.Monitor/stable/2023-04-03/operations_API.json # we do not need to support this +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/autoscale_API.json +# - https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json # we do not need to support this +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRulesIncidents_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json # we should not change this commit because APIs in this file has been deprecated and removed in https://github.com/Azure/azure-rest-api-specs/pull/30787 +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/logProfiles_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/preview/2024-10-01-preview/actionGroups_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/activityLogs_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/eventCategories_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/tenantActivityLogs_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-05-01/metrics_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/metricBaselines_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-15/scheduledQueryRule_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/privateLinkScopes_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/dataCollectionEndpoints_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/dataCollectionRuleAssociations_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/dataCollectionRules_API.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Monitor/preview/2023-10-01-preview/azuremonitor.json +- https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Monitor/PipelineGroups/preview/2024-10-01-preview/pipelineGroups.json +# - https://github.com/Azure/azure-rest-api-specs/blob/dd41e8906f0d8502123302f836bfd6df186625d8/specification/monitor/resource-manager/Microsoft.Monitor/stable/2023-04-03/operations_API.json # we do not need to support this ``` diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/IListOperationSource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/IListOperationSource.cs index ebd813730622..26af54fac911 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/IListOperationSource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/IListOperationSource.cs @@ -14,26 +14,32 @@ namespace Azure.ResourceManager.Network { - internal class IListOperationSource : IOperationSource> + internal class IListOperationSource : IOperationSource> { - IList IOperationSource>.CreateResult(Response response, CancellationToken cancellationToken) + IList IOperationSource>.CreateResult(Response response, CancellationToken cancellationToken) { using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - List array = new List(); + List array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { - array.Add(ExpressRouteFailoverSingleTestDetails.DeserializeExpressRouteFailoverSingleTestDetails(item)); + array.Add(ExpressRouteFailoverTestDetails.DeserializeExpressRouteFailoverTestDetails(item)); } return array; } - async ValueTask> IOperationSource>.CreateResultAsync(Response response, CancellationToken cancellationToken) + async ValueTask> IOperationSource>.CreateResultAsync(Response response, CancellationToken cancellationToken) { using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - List array = new List(); + List array = new List(); foreach (var item in document.RootElement.EnumerateArray()) { - array.Add(ExpressRouteFailoverSingleTestDetails.DeserializeExpressRouteFailoverSingleTestDetails(item)); + array.Add(ExpressRouteFailoverTestDetails.DeserializeExpressRouteFailoverTestDetails(item)); + } + return array; + } + } +} +TestDetails(item)); } return array; } diff --git a/sdk/network/Azure.ResourceManager.Network/src/autorest.md b/sdk/network/Azure.ResourceManager.Network/src/autorest.md index b1d9a80ab6e6..9d16829c0d8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/autorest.md +++ b/sdk/network/Azure.ResourceManager.Network/src/autorest.md @@ -7,7 +7,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Network namespace: Azure.ResourceManager.Network -require: https://github.com/Azure/azure-rest-api-specs/blob/177b67dfa65d476ac941b157ca42eec440e98cb0/specification/network/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/network/resource-manager/readme.md tag: package-2024-06-preview output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..7cb76413b026 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -10,8 +10,14 @@ trigger: include: - sdk/storage/ - sdk/storage/Azure.Storage.DataMovement/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/