From 90bad93ec57991c13e6566de875d1edeaf49b05c Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Thu, 18 May 2023 11:33:20 -0400 Subject: [PATCH 1/2] change for community gallery identifier --- .../Generated/Models/CommunityGalleryImage.cs | 8 +-- .../Models/CommunityGalleryImageIdentifier.cs | 72 +++++++++++++++++++ 2 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.cs diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs index 1123b0732ead..a02cacfd39c2 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs @@ -62,7 +62,7 @@ public CommunityGalleryImage() /// current community gallery image. /// End-user license agreement for the current /// community gallery image. - public CommunityGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string name = default(string), string location = default(string), string type = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string architecture = default(string), string privacyStatementUri = default(string), string eula = default(string)) + public CommunityGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, CommunityGalleryImageIdentifier identifier, string name = default(string), string location = default(string), string type = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string architecture = default(string), string privacyStatementUri = default(string), string eula = default(string)) : base(name, location, type, uniqueId) { OsType = osType; @@ -116,7 +116,7 @@ public CommunityGalleryImage() /// /// [JsonProperty(PropertyName = "properties.identifier")] - public GalleryImageIdentifier Identifier { get; set; } + public CommunityGalleryImageIdentifier Identifier { get; set; } /// /// @@ -178,10 +178,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Identifier"); } - if (Identifier != null) - { - Identifier.Validate(); - } } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.cs new file mode 100644 index 000000000000..b828fbf38627 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageIdentifier.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// This is the community gallery image definition identifier. + /// + public partial class CommunityGalleryImageIdentifier + { + /// + /// Initializes a new instance of the CommunityGalleryImageIdentifier + /// class. + /// + public CommunityGalleryImageIdentifier() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CommunityGalleryImageIdentifier + /// class. + /// + /// The name of the gallery image definition + /// publisher. + /// The name of the gallery image definition + /// offer. + /// The name of the gallery image definition + /// SKU. + public CommunityGalleryImageIdentifier(string publisher = default(string), string offer = default(string), string sku = default(string)) + { + Publisher = publisher; + Offer = offer; + Sku = sku; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the gallery image definition publisher. + /// + [JsonProperty(PropertyName = "publisher")] + public string Publisher { get; set; } + + /// + /// Gets or sets the name of the gallery image definition offer. + /// + [JsonProperty(PropertyName = "offer")] + public string Offer { get; set; } + + /// + /// Gets or sets the name of the gallery image definition SKU. + /// + [JsonProperty(PropertyName = "sku")] + public string Sku { get; set; } + + } +} From b4f0b0753cac4488d7440d9499bc077237eefc47 Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Thu, 18 May 2023 18:31:29 -0400 Subject: [PATCH 2/2] changelog --- .../src/Microsoft.Azure.Management.Compute.csproj | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Microsoft.Azure.Management.Compute.csproj b/sdk/compute/Microsoft.Azure.Management.Compute/src/Microsoft.Azure.Management.Compute.csproj index 49e7b6efa999..0da5e6cbf3eb 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Microsoft.Azure.Management.Compute.csproj +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Microsoft.Azure.Management.Compute.csproj @@ -15,16 +15,7 @@