From 3362ea172874d65d645d929c99b4435ac128b207 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 30 Jun 2023 05:33:34 +0000 Subject: [PATCH] CodeGen from PR 24655 in Azure/azure-rest-api-specs Merge 96f22acded1a2df818f1957cf9fa0d18443976c5 into 64efc48302878a07d1d1231eaed0ca9cadfaf037 --- ....ResourceManager.Compute.netstandard2.0.cs | 19 +++++++ .../src/Generated/Models/FileFormat.cs | 51 +++++++++++++++++++ .../Models/GrantAccessData.Serialization.cs | 5 ++ .../src/Generated/Models/GrantAccessData.cs | 2 + .../DiskAccessesRestOperations.cs | 2 +- .../DiskEncryptionSetsRestOperations.cs | 2 +- .../DiskRestorePointRestOperations.cs | 2 +- .../RestOperations/DisksRestOperations.cs | 2 +- .../RestOperations/SnapshotsRestOperations.cs | 2 +- .../src/autorest.md | 2 +- 10 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/FileFormat.cs 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 84c269a5d74a..a2619a89328b 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 @@ -3705,6 +3705,24 @@ public EncryptionSettingsGroup(bool enabled) { } public static bool operator !=(Azure.ResourceManager.Compute.Models.ExpandTypesForListVm left, Azure.ResourceManager.Compute.Models.ExpandTypesForListVm right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FileFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FileFormat(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.FileFormat VHD { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.FileFormat Vhdx { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.FileFormat other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Compute.Models.FileFormat left, Azure.ResourceManager.Compute.Models.FileFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.FileFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.FileFormat left, Azure.ResourceManager.Compute.Models.FileFormat right) { throw null; } + public override string ToString() { throw null; } + } public partial class GalleryApplicationCustomAction { public GalleryApplicationCustomAction(string name, string script) { } @@ -4046,6 +4064,7 @@ public partial class GrantAccessData public GrantAccessData(Azure.ResourceManager.Compute.Models.AccessLevel access, int durationInSeconds) { } public Azure.ResourceManager.Compute.Models.AccessLevel Access { get { throw null; } } public int DurationInSeconds { get { throw null; } } + public Azure.ResourceManager.Compute.Models.FileFormat? FileFormat { get { throw null; } set { } } public bool? GetSecureVmGuestStateSas { get { throw null; } set { } } } public enum HostCaching diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/FileFormat.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/FileFormat.cs new file mode 100644 index 000000000000..ee67a61e1d52 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/FileFormat.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Used to specify the file format when making request for SAS on a VHDX file format snapshot. + public readonly partial struct FileFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FileFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string VHDValue = "VHD"; + private const string VhdxValue = "VHDX"; + + /// A VHD file is a disk image file in the Virtual Hard Disk file format. + public static FileFormat VHD { get; } = new FileFormat(VHDValue); + /// A VHDX file is a disk image file in the Virtual Hard Disk v2 file format. + public static FileFormat Vhdx { get; } = new FileFormat(VhdxValue); + /// Determines if two values are the same. + public static bool operator ==(FileFormat left, FileFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FileFormat left, FileFormat right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FileFormat(string value) => new FileFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FileFormat other && Equals(other); + /// + public bool Equals(FileFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs index c7fa0a4ac1fc..2a3c26f4d4c1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.Serialization.cs @@ -24,6 +24,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("getSecureVMGuestStateSAS"u8); writer.WriteBooleanValue(GetSecureVmGuestStateSas.Value); } + if (Optional.IsDefined(FileFormat)) + { + writer.WritePropertyName("fileFormat"u8); + writer.WriteStringValue(FileFormat.Value.ToString()); + } writer.WriteEndObject(); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.cs index c697d6101674..d78f3d8e96e0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GrantAccessData.cs @@ -25,5 +25,7 @@ public GrantAccessData(AccessLevel access, int durationInSeconds) public int DurationInSeconds { get; } /// Set this flag to true to get additional SAS for VM guest state. public bool? GetSecureVmGuestStateSas { get; set; } + /// Used to specify the file format when making request for SAS on a VHDX file format snapshot. + public FileFormat? FileFormat { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs index a299168b892e..af0bb626f2a2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs @@ -33,7 +33,7 @@ public DiskAccessesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-02"; + _apiVersion = apiVersion ?? "2023-01-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs index 4f3ad16773b0..d83814538b55 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs @@ -33,7 +33,7 @@ public DiskEncryptionSetsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-02"; + _apiVersion = apiVersion ?? "2023-01-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs index decffd82aeda..54dd1ed9b488 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs @@ -33,7 +33,7 @@ public DiskRestorePointRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-02"; + _apiVersion = apiVersion ?? "2023-01-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs index ae9c6e827bf2..7b0a78eae540 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs @@ -33,7 +33,7 @@ public DisksRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-02"; + _apiVersion = apiVersion ?? "2023-01-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs index 7fc01fd46f29..c148cf8ba591 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs @@ -33,7 +33,7 @@ public SnapshotsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-02"; + _apiVersion = apiVersion ?? "2023-01-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index a1d0ec500a60..c253d66ae17f 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/a2140e7ff0a6c28df501b16c51fe85b762a386fc/specification/compute/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/compute/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true