From 578dabecdcda31e090b41f0c473adce8f760359b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 26 Sep 2024 15:29:39 +0000 Subject: [PATCH] CodeGen from PR 30504 in Azure/azure-rest-api-specs Merge a1838a32bc5dfe359d45b6d8e20cbf62dc779ba1 into 0ea6f3e87651c19268983f3cc7411e21b1aed343 --- ....ResourceManager.Compute.netstandard2.0.cs | 281 +++++++ .../Sample_CommunityGalleryCollection.cs | 6 +- .../Sample_CommunityGalleryImageCollection.cs | 8 +- .../Sample_CommunityGalleryImageResource.cs | 2 +- ..._CommunityGalleryImageVersionCollection.cs | 8 +- ...le_CommunityGalleryImageVersionResource.cs | 2 +- .../Sample_CommunityGalleryResource.cs | 2 +- .../Sample_GalleryApplicationCollection.cs | 10 +- .../Sample_GalleryApplicationResource.cs | 6 +- ...ple_GalleryApplicationVersionCollection.cs | 16 +- ...ample_GalleryApplicationVersionResource.cs | 8 +- .../Samples/Sample_GalleryCollection.cs | 34 +- .../Samples/Sample_GalleryImageCollection.cs | 10 +- .../Samples/Sample_GalleryImageResource.cs | 6 +- .../Sample_GalleryImageVersionCollection.cs | 46 +- .../Sample_GalleryImageVersionResource.cs | 14 +- ...lleryInVmAccessControlProfileCollection.cs | 204 +++++ ...GalleryInVmAccessControlProfileResource.cs | 115 +++ ...VmAccessControlProfileVersionCollection.cs | 252 ++++++ ...InVmAccessControlProfileVersionResource.cs | 124 +++ .../Samples/Sample_GalleryResource.cs | 20 +- .../Samples/Sample_SharedGalleryCollection.cs | 8 +- .../Sample_SharedGalleryImageCollection.cs | 8 +- .../Sample_SharedGalleryImageResource.cs | 2 +- ...ple_SharedGalleryImageVersionCollection.cs | 8 +- ...ample_SharedGalleryImageVersionResource.cs | 2 +- .../Samples/Sample_SharedGalleryResource.cs | 2 +- .../src/Generated/ArmComputeModelFactory.cs | 151 +++- .../Generated/CommunityGalleryCollection.cs | 12 +- .../CommunityGalleryImageCollection.cs | 16 +- .../Generated/CommunityGalleryImageData.cs | 4 +- .../CommunityGalleryImageResource.cs | 8 +- .../CommunityGalleryImageVersionCollection.cs | 16 +- .../CommunityGalleryImageVersionResource.cs | 4 +- .../src/Generated/CommunityGalleryResource.cs | 8 +- .../Generated/Extensions/ComputeExtensions.cs | 54 +- .../Extensions/MockableComputeArmClient.cs | 24 + .../MockableComputeResourceGroupResource.cs | 4 +- .../MockableComputeSubscriptionResource.cs | 12 +- .../Generated/GalleryApplicationCollection.cs | 20 +- .../Generated/GalleryApplicationResource.cs | 28 +- .../GalleryApplicationVersionCollection.cs | 20 +- .../GalleryApplicationVersionResource.cs | 24 +- .../src/Generated/GalleryCollection.cs | 20 +- .../src/Generated/GalleryImageCollection.cs | 20 +- .../src/Generated/GalleryImageData.cs | 4 +- .../src/Generated/GalleryImageResource.cs | 28 +- .../GalleryImageVersionCollection.cs | 20 +- .../Generated/GalleryImageVersionResource.cs | 24 +- ...lleryInVmAccessControlProfileCollection.cs | 493 +++++++++++ ...mAccessControlProfileData.Serialization.cs | 218 +++++ .../GalleryInVmAccessControlProfileData.cs | 83 ++ ...essControlProfileResource.Serialization.cs | 26 + ...GalleryInVmAccessControlProfileResource.cs | 776 ++++++++++++++++++ ...VmAccessControlProfileVersionCollection.cs | 493 +++++++++++ ...ControlProfileVersionData.Serialization.cs | 355 ++++++++ ...leryInVmAccessControlProfileVersionData.cs | 112 +++ ...rolProfileVersionResource.Serialization.cs | 26 + ...InVmAccessControlProfileVersionResource.cs | 708 ++++++++++++++++ .../src/Generated/GalleryResource.cs | 105 ++- ...InVmAccessControlProfileOperationSource.cs | 38 + ...essControlProfileVersionOperationSource.cs | 38 + .../AccessControlRules.Serialization.cs | 211 +++++ .../Generated/Models/AccessControlRules.cs | 81 ++ ...ccessControlRulesIdentity.Serialization.cs | 169 ++++ .../Models/AccessControlRulesIdentity.cs | 91 ++ .../Models/AccessControlRulesMode.cs | 54 ++ ...cessControlRulesPrivilege.Serialization.cs | 153 ++++ .../Models/AccessControlRulesPrivilege.cs | 87 ++ .../AccessControlRulesRole.Serialization.cs | 137 ++++ .../Models/AccessControlRulesRole.cs | 83 ++ ...ontrolRulesRoleAssignment.Serialization.cs | 137 ++++ .../AccessControlRulesRoleAssignment.cs | 83 ++ .../Generated/Models/DiskDetachOptionType.cs | 2 +- .../src/Generated/Models/EndpointAccess.cs | 51 ++ .../Models/EndpointType.Serialization.cs | 28 + .../src/Generated/Models/EndpointType.cs | 18 + .../src/Generated/Models/GalleryImagePatch.cs | 4 +- ...mAccessControlProfileList.Serialization.cs | 140 ++++ .../GalleryInVmAccessControlProfileList.cs | 80 ++ ...AccessControlProfilePatch.Serialization.cs | 208 +++++ .../GalleryInVmAccessControlProfilePatch.cs | 76 ++ ...sControlProfileProperties.Serialization.cs | 153 ++++ ...lleryInVmAccessControlProfileProperties.cs | 50 ++ ...ControlProfileVersionList.Serialization.cs | 140 ++++ ...leryInVmAccessControlProfileVersionList.cs | 80 ++ ...ontrolProfileVersionPatch.Serialization.cs | 345 ++++++++ ...eryInVmAccessControlProfileVersionPatch.cs | 105 +++ ...urceProfilePropertiesBase.Serialization.cs | 126 +++ .../GalleryResourceProfilePropertiesBase.cs | 65 ++ .../Models/SupportedOperatingSystemType.cs | 2 +- .../Models/VirtualMachineDataDisk.cs | 4 +- .../CommunityGalleriesRestOperations.cs | 2 +- ...unityGalleryImageVersionsRestOperations.cs | 2 +- .../CommunityGalleryImagesRestOperations.cs | 2 +- .../RestOperations/GalleriesRestOperations.cs | 2 +- ...alleryApplicationVersionsRestOperations.cs | 2 +- .../GalleryApplicationsRestOperations.cs | 2 +- .../GalleryImageVersionsRestOperations.cs | 2 +- .../GalleryImagesRestOperations.cs | 2 +- ...essControlProfileVersionsRestOperations.cs | 655 +++++++++++++++ ...InVMAccessControlProfilesRestOperations.cs | 611 ++++++++++++++ .../GallerySharingProfileRestOperations.cs | 2 +- .../SharedGalleriesRestOperations.cs | 2 +- ...haredGalleryImageVersionsRestOperations.cs | 2 +- .../SharedGalleryImagesRestOperations.cs | 2 +- .../src/Generated/SharedGalleryCollection.cs | 16 +- .../Generated/SharedGalleryImageCollection.cs | 16 +- .../src/Generated/SharedGalleryImageData.cs | 4 +- .../Generated/SharedGalleryImageResource.cs | 8 +- .../SharedGalleryImageVersionCollection.cs | 16 +- .../SharedGalleryImageVersionResource.cs | 4 +- .../src/Generated/SharedGalleryResource.cs | 8 +- .../src/autorest.md | 2 +- 114 files changed, 9177 insertions(+), 346 deletions(-) create mode 100644 sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileCollection.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileResource.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionCollection.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionResource.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileCollection.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionCollection.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileOperationSource.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileVersionOperationSource.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesMode.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointAccess.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfileVersionsRestOperations.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfilesRestOperations.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 903d9f114b7b..e07ca3aacbbd 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 @@ -708,6 +708,8 @@ public static partial class ComputeExtensions public static System.Threading.Tasks.Task> GetGalleryAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string galleryName, Azure.ResourceManager.Compute.Models.SelectPermission? select = default(Azure.ResourceManager.Compute.Models.SelectPermission?), Azure.ResourceManager.Compute.Models.GalleryExpand? expand = default(Azure.ResourceManager.Compute.Models.GalleryExpand?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Compute.GalleryImageResource GetGalleryImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Compute.GalleryImageVersionResource GetGalleryImageVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileResource GetGalleryInVmAccessControlProfileResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionResource GetGalleryInVmAccessControlProfileVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Compute.GalleryResource GetGalleryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetManagedDisk(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string diskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetManagedDiskAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string diskName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1502,6 +1504,120 @@ protected GalleryImageVersionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GalleryImageVersionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GalleryImageVersionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class GalleryInVmAccessControlProfileCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GalleryInVmAccessControlProfileCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string inVmAccessControlProfileName, Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string inVmAccessControlProfileName, Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class GalleryInVmAccessControlProfileData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GalleryInVmAccessControlProfileData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileProperties Properties { get { throw null; } set { } } + Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileData 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.GalleryInVmAccessControlProfileData 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 GalleryInVmAccessControlProfileResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GalleryInVmAccessControlProfileResource() { } + public virtual Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetGalleryInVmAccessControlProfileVersion(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGalleryInVmAccessControlProfileVersionAsync(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionCollection GetGalleryInVmAccessControlProfileVersions() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileData 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.GalleryInVmAccessControlProfileData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfilePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfilePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class GalleryInVmAccessControlProfileVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GalleryInVmAccessControlProfileVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string inVmAccessControlProfileVersionName, Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string inVmAccessControlProfileVersionName, Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string inVmAccessControlProfileVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class GalleryInVmAccessControlProfileVersionData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GalleryInVmAccessControlProfileVersionData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Compute.Models.EndpointAccess? DefaultAccess { get { throw null; } set { } } + public bool? ExcludeFromLatest { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.AccessControlRulesMode? Mode { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.GalleryProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? PublishedOn { get { throw null; } } + public Azure.ResourceManager.Compute.Models.ReplicationStatus ReplicationStatus { get { throw null; } } + public Azure.ResourceManager.Compute.Models.AccessControlRules Rules { get { throw null; } set { } } + public System.Collections.Generic.IList TargetLocations { get { throw null; } } + Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionData 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.GalleryInVmAccessControlProfileVersionData 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 GalleryInVmAccessControlProfileVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GalleryInVmAccessControlProfileVersionResource() { } + public virtual Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionData 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.GalleryInVmAccessControlProfileVersionData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileVersionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileVersionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class GalleryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -1521,6 +1637,9 @@ protected GalleryResource() { } public virtual Azure.Response GetGalleryImage(string galleryImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetGalleryImageAsync(string galleryImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Compute.GalleryImageCollection GetGalleryImages() { throw null; } + public virtual Azure.Response GetGalleryInVmAccessControlProfile(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGalleryInVmAccessControlProfileAsync(string inVmAccessControlProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileCollection GetGalleryInVmAccessControlProfiles() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2913,6 +3032,8 @@ protected MockableComputeArmClient() { } public virtual Azure.ResourceManager.Compute.GalleryApplicationVersionResource GetGalleryApplicationVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Compute.GalleryImageResource GetGalleryImageResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Compute.GalleryImageVersionResource GetGalleryImageVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileResource GetGalleryInVmAccessControlProfileResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionResource GetGalleryInVmAccessControlProfileVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Compute.GalleryResource GetGalleryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Compute.ManagedDiskResource GetManagedDiskResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Compute.ProximityPlacementGroupResource GetProximityPlacementGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -3089,6 +3210,86 @@ protected MockableComputeSubscriptionResource() { } } namespace Azure.ResourceManager.Compute.Models { + public partial class AccessControlRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AccessControlRules() { } + public System.Collections.Generic.IList Identities { get { throw null; } } + public System.Collections.Generic.IList Privileges { get { throw null; } } + public System.Collections.Generic.IList RoleAssignments { get { throw null; } } + public System.Collections.Generic.IList Roles { get { throw null; } } + Azure.ResourceManager.Compute.Models.AccessControlRules 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.AccessControlRules 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 AccessControlRulesIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AccessControlRulesIdentity(string name) { } + public string ExePath { get { throw null; } set { } } + public string GroupName { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ProcessName { get { throw null; } set { } } + public string UserName { get { throw null; } set { } } + Azure.ResourceManager.Compute.Models.AccessControlRulesIdentity 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.AccessControlRulesIdentity 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AccessControlRulesMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AccessControlRulesMode(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.AccessControlRulesMode Audit { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.AccessControlRulesMode Disabled { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.AccessControlRulesMode Enforce { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.AccessControlRulesMode 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.AccessControlRulesMode left, Azure.ResourceManager.Compute.Models.AccessControlRulesMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.AccessControlRulesMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.AccessControlRulesMode left, Azure.ResourceManager.Compute.Models.AccessControlRulesMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AccessControlRulesPrivilege : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AccessControlRulesPrivilege(string name, string path) { } + public string Name { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + public System.Collections.Generic.IDictionary QueryParameters { get { throw null; } } + Azure.ResourceManager.Compute.Models.AccessControlRulesPrivilege 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.AccessControlRulesPrivilege 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 AccessControlRulesRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AccessControlRulesRole(string name, System.Collections.Generic.IEnumerable privileges) { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Privileges { get { throw null; } } + Azure.ResourceManager.Compute.Models.AccessControlRulesRole 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.AccessControlRulesRole 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 AccessControlRulesRoleAssignment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AccessControlRulesRoleAssignment(string role, System.Collections.Generic.IEnumerable identities) { } + public System.Collections.Generic.IList Identities { get { throw null; } } + public string Role { get { throw null; } set { } } + Azure.ResourceManager.Compute.Models.AccessControlRulesRoleAssignment 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.AccessControlRulesRoleAssignment 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AccessLevel : System.IEquatable { @@ -3282,8 +3483,14 @@ public static partial class ArmComputeModelFactory public static Azure.ResourceManager.Compute.Models.GalleryImageVersionPolicyViolation GalleryImageVersionPolicyViolation(Azure.ResourceManager.Compute.Models.GalleryImageVersionPolicyViolationCategory? category = default(Azure.ResourceManager.Compute.Models.GalleryImageVersionPolicyViolationCategory?), string details = null) { throw null; } public static Azure.ResourceManager.Compute.Models.GalleryImageVersionPublishingProfile GalleryImageVersionPublishingProfile(System.Collections.Generic.IEnumerable targetRegions = null, int? replicaCount = default(int?), bool? isExcludedFromLatest = default(bool?), System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOfLifeOn = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.ImageStorageAccountType? storageAccountType = default(Azure.ResourceManager.Compute.Models.ImageStorageAccountType?), Azure.ResourceManager.Compute.Models.GalleryReplicationMode? replicationMode = default(Azure.ResourceManager.Compute.Models.GalleryReplicationMode?), System.Collections.Generic.IEnumerable targetExtendedLocations = null) { throw null; } public static Azure.ResourceManager.Compute.Models.GalleryImageVersionSafetyProfile GalleryImageVersionSafetyProfile(bool? allowDeletionOfReplicatedLocations = default(bool?), bool? isReportedForPolicyViolation = default(bool?), System.Collections.Generic.IEnumerable policyViolations = null) { throw null; } + public static Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileData GalleryInVmAccessControlProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileProperties properties = null) { throw null; } + public static Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfilePatch GalleryInVmAccessControlProfilePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileProperties GalleryInVmAccessControlProfileProperties(Azure.ResourceManager.Compute.Models.GalleryProvisioningState? provisioningState = default(Azure.ResourceManager.Compute.Models.GalleryProvisioningState?), string description = null, Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType osType = Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType.Windows, Azure.ResourceManager.Compute.Models.EndpointType applicableHostEndpoint = Azure.ResourceManager.Compute.Models.EndpointType.WireServer) { throw null; } + public static Azure.ResourceManager.Compute.GalleryInVmAccessControlProfileVersionData GalleryInVmAccessControlProfileVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable targetLocations = null, bool? excludeFromLatest = default(bool?), System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.GalleryProvisioningState? provisioningState = default(Azure.ResourceManager.Compute.Models.GalleryProvisioningState?), Azure.ResourceManager.Compute.Models.ReplicationStatus replicationStatus = null, Azure.ResourceManager.Compute.Models.AccessControlRulesMode? mode = default(Azure.ResourceManager.Compute.Models.AccessControlRulesMode?), Azure.ResourceManager.Compute.Models.EndpointAccess? defaultAccess = default(Azure.ResourceManager.Compute.Models.EndpointAccess?), Azure.ResourceManager.Compute.Models.AccessControlRules rules = null) { throw null; } + public static Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileVersionPatch GalleryInVmAccessControlProfileVersionPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable targetLocations = null, bool? excludeFromLatest = default(bool?), System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.GalleryProvisioningState? provisioningState = default(Azure.ResourceManager.Compute.Models.GalleryProvisioningState?), Azure.ResourceManager.Compute.Models.ReplicationStatus replicationStatus = null, Azure.ResourceManager.Compute.Models.AccessControlRulesMode? mode = default(Azure.ResourceManager.Compute.Models.AccessControlRulesMode?), Azure.ResourceManager.Compute.Models.EndpointAccess? defaultAccess = default(Azure.ResourceManager.Compute.Models.EndpointAccess?), Azure.ResourceManager.Compute.Models.AccessControlRules rules = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.Compute.Models.GalleryOSDiskImage GalleryOSDiskImage(int? sizeInGB = default(int?), Azure.ResourceManager.Compute.Models.HostCaching? hostCaching = default(Azure.ResourceManager.Compute.Models.HostCaching?), Azure.ResourceManager.Compute.Models.GalleryDiskImageSource gallerySource = null) { throw null; } public static Azure.ResourceManager.Compute.Models.GalleryPatch GalleryPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string identifierUniqueName = null, Azure.ResourceManager.Compute.Models.GalleryProvisioningState? provisioningState = default(Azure.ResourceManager.Compute.Models.GalleryProvisioningState?), Azure.ResourceManager.Compute.Models.SharingProfile sharingProfile = null, bool? isSoftDeleteEnabled = default(bool?), Azure.ResourceManager.Compute.Models.SharingStatus sharingStatus = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.Compute.Models.GalleryResourceProfilePropertiesBase GalleryResourceProfilePropertiesBase(Azure.ResourceManager.Compute.Models.GalleryProvisioningState? provisioningState = default(Azure.ResourceManager.Compute.Models.GalleryProvisioningState?)) { throw null; } public static Azure.ResourceManager.Compute.Models.GrantAccessData GrantAccessData(Azure.ResourceManager.Compute.Models.AccessLevel access = default(Azure.ResourceManager.Compute.Models.AccessLevel), int durationInSeconds = 0, bool? getSecureVmGuestStateSas = default(bool?), Azure.ResourceManager.Compute.Models.DiskImageFileFormat? fileFormat = default(Azure.ResourceManager.Compute.Models.DiskImageFileFormat?)) { throw null; } public static Azure.ResourceManager.Compute.Models.ImageReference ImageReference(Azure.Core.ResourceIdentifier id = null, string publisher = null, string offer = null, string sku = null, string version = null, string exactVersion = null, string sharedGalleryImageUniqueId = null, string communityGalleryImageId = null) { throw null; } public static Azure.ResourceManager.Compute.Models.InnerError InnerError(string exceptiontype = null, string errordetail = null) { throw null; } @@ -5076,6 +5283,29 @@ public EncryptionSettingsGroup(bool enabled) { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EndpointAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EndpointAccess(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.EndpointAccess Allow { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.EndpointAccess Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.EndpointAccess 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.EndpointAccess left, Azure.ResourceManager.Compute.Models.EndpointAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.EndpointAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.EndpointAccess left, Azure.ResourceManager.Compute.Models.EndpointAccess right) { throw null; } + public override string ToString() { throw null; } + } + public enum EndpointType + { + WireServer = 0, + Imds = 1, + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ExecutionState : System.IEquatable { private readonly object _dummy; @@ -5467,6 +5697,47 @@ public GalleryImageVersionUefiSettings() { } 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 GalleryInVmAccessControlProfilePatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GalleryInVmAccessControlProfilePatch() { } + public Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfilePatch 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.GalleryInVmAccessControlProfilePatch 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 GalleryInVmAccessControlProfileProperties : Azure.ResourceManager.Compute.Models.GalleryResourceProfilePropertiesBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GalleryInVmAccessControlProfileProperties(Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType osType, Azure.ResourceManager.Compute.Models.EndpointType applicableHostEndpoint) { } + public Azure.ResourceManager.Compute.Models.EndpointType ApplicableHostEndpoint { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType OSType { get { throw null; } set { } } + Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileProperties 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.GalleryInVmAccessControlProfileProperties 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 GalleryInVmAccessControlProfileVersionPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GalleryInVmAccessControlProfileVersionPatch() { } + public Azure.ResourceManager.Compute.Models.EndpointAccess? DefaultAccess { get { throw null; } set { } } + public bool? ExcludeFromLatest { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.AccessControlRulesMode? Mode { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.GalleryProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? PublishedOn { get { throw null; } } + public Azure.ResourceManager.Compute.Models.ReplicationStatus ReplicationStatus { get { throw null; } } + public Azure.ResourceManager.Compute.Models.AccessControlRules Rules { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public System.Collections.Generic.IList TargetLocations { get { throw null; } } + Azure.ResourceManager.Compute.Models.GalleryInVmAccessControlProfileVersionPatch 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.GalleryInVmAccessControlProfileVersionPatch 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 GalleryOSDiskImage : Azure.ResourceManager.Compute.Models.GalleryDiskImage, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GalleryOSDiskImage() { } @@ -5532,6 +5803,16 @@ public GalleryPatch() { } public static bool operator !=(Azure.ResourceManager.Compute.Models.GalleryReplicationMode left, Azure.ResourceManager.Compute.Models.GalleryReplicationMode right) { throw null; } public override string ToString() { throw null; } } + public partial class GalleryResourceProfilePropertiesBase : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GalleryResourceProfilePropertiesBase() { } + public Azure.ResourceManager.Compute.Models.GalleryProvisioningState? ProvisioningState { get { throw null; } } + Azure.ResourceManager.Compute.Models.GalleryResourceProfilePropertiesBase 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.GalleryResourceProfilePropertiesBase 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; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct GallerySharingPermissionType : System.IEquatable { diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryCollection.cs index 9208ab4f9b34..877e766e87ae 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CommunityGalleryCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "CommunityGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetACommunityGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "CommunityGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetACommunityGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "CommunityGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageCollection.cs index e77cada58a37..5d9b602f1bf4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CommunityGalleryImageCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json // this example is just showing the usage of "CommunityGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetACommunityGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetACommunityGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json // this example is just showing the usage of "CommunityGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetACommunityGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetACommunityGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json // this example is just showing the usage of "CommunityGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetACommunityGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCommunityGalleryImages() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_List.json // this example is just showing the usage of "CommunityGalleryImages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageResource.cs index a6fc432436e8..f325d0ca8253 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageResource.cs @@ -19,7 +19,7 @@ public partial class Sample_CommunityGalleryImageResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImage_Get.json // this example is just showing the usage of "CommunityGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionCollection.cs index 06193b8fff11..3f9d9fc4008a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CommunityGalleryImageVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json // this example is just showing the usage of "CommunityGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetACommunityGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetACommunityGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json // this example is just showing the usage of "CommunityGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_GetACommunityGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetACommunityGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json // this example is just showing the usage of "CommunityGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetIfExists_GetACommunityGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCommunityGalleryImageVersions() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_List.json // this example is just showing the usage of "CommunityGalleryImageVersions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionResource.cs index fc485d9a8400..3386812fa088 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryImageVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_CommunityGalleryImageVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGalleryImageVersion_Get.json // this example is just showing the usage of "CommunityGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryResource.cs index 581abec10c2d..880f03ed54b4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_CommunityGalleryResource.cs @@ -19,7 +19,7 @@ public partial class Sample_CommunityGalleryResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/communityGalleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/communityGalleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "CommunityGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationCollection.cs index e2e89c8f27e6..7fe7cff8ff8a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryApplicationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryApplication() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Create.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Create.json // this example is just showing the usage of "GalleryApplications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryApplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryApplication() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json // this example is just showing the usage of "GalleryApplications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Get_GetAGalleryApplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryApplication() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json // this example is just showing the usage of "GalleryApplications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task Exists_GetAGalleryApplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryApplication() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json // this example is just showing the usage of "GalleryApplications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +190,7 @@ public async Task GetIfExists_GetAGalleryApplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGalleryApplicationsInAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_ListByGallery.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_ListByGallery.json // this example is just showing the usage of "GalleryApplications_ListByGallery" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationResource.cs index 503d3f5ec14e..611ea298c892 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryApplicationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASimpleGalleryApplication() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Update.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Update.json // this example is just showing the usage of "GalleryApplications_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Update_UpdateASimpleGalleryApplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryApplication() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Get.json // this example is just showing the usage of "GalleryApplications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_GetAGalleryApplication() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAGalleryApplication() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplication_Delete.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplication_Delete.json // this example is just showing the usage of "GalleryApplications_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionCollection.cs index 8c12b50bb902..44f77f43a0ed 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryApplicationVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryApplicationVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Create.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Create.json // this example is just showing the usage of "GalleryApplicationVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryApplicationVersion( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryApplicationVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAGalleryApplicationVersionWithReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryApplicationVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Exists_GetAGalleryApplicationVersionWithReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryApplicationVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task GetIfExists_GetAGalleryApplicationVersionWithReplicationStatus [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryApplicationVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +245,7 @@ public async Task Get_GetAGalleryApplicationVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryApplicationVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -277,7 +277,7 @@ public async Task Exists_GetAGalleryApplicationVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryApplicationVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +321,7 @@ public async Task GetIfExists_GetAGalleryApplicationVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGalleryApplicationVersionsInAGalleryApplicationDefinition() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_ListByGalleryApplication.json // this example is just showing the usage of "GalleryApplicationVersions_ListByGalleryApplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionResource.cs index 8ec0654887bb..98b73a97ada4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryApplicationVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryApplicationVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASimpleGalleryApplicationVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Update.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Update.json // this example is just showing the usage of "GalleryApplicationVersions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task Update_UpdateASimpleGalleryApplicationVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryApplicationVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task Get_GetAGalleryApplicationVersionWithReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryApplicationVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Get.json // this example is just showing the usage of "GalleryApplicationVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task Get_GetAGalleryApplicationVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAGalleryApplicationVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryApplicationVersion_Delete.json // this example is just showing the usage of "GalleryApplicationVersions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryCollection.cs index 854a1395b221..955cecea6ba4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_GalleryCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Create.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Create.json // this example is just showing the usage of "Galleries_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +71,7 @@ public async Task CreateOrUpdate_CreateACommunityGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithSharingProfile.json // this example is just showing the usage of "Galleries_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_SoftDeletionEnabled.json // this example is just showing the usage of "Galleries_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEna [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Create.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create.json // this example is just showing the usage of "Galleries_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -193,7 +193,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task Get_GetACommunityGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -257,7 +257,7 @@ public async Task Exists_GetACommunityGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -299,7 +299,7 @@ public async Task GetIfExists_GetACommunityGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryWithExpandSharingProfileGroups() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -334,7 +334,7 @@ public async Task Get_GetAGalleryWithExpandSharingProfileGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryWithExpandSharingProfileGroups() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -365,7 +365,7 @@ public async Task Exists_GetAGalleryWithExpandSharingProfileGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryWithExpandSharingProfileGroups() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -408,7 +408,7 @@ public async Task GetIfExists_GetAGalleryWithExpandSharingProfileGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryWithSelectPermissions() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -443,7 +443,7 @@ public async Task Get_GetAGalleryWithSelectPermissions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryWithSelectPermissions() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -474,7 +474,7 @@ public async Task Exists_GetAGalleryWithSelectPermissions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryWithSelectPermissions() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -517,7 +517,7 @@ public async Task GetIfExists_GetAGalleryWithSelectPermissions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -551,7 +551,7 @@ public async Task Get_GetAGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -581,7 +581,7 @@ public async Task Exists_GetAGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -623,7 +623,7 @@ public async Task GetIfExists_GetAGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGalleriesInAResourceGroup() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListByResourceGroup.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListByResourceGroup.json // this example is just showing the usage of "Galleries_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageCollection.cs index deea2fbbb1bd..bf5547520862 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryImageCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Create.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Create.json // this example is just showing the usage of "GalleryImages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json // this example is just showing the usage of "GalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_GetAGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json // this example is just showing the usage of "GalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_GetAGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json // this example is just showing the usage of "GalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task GetIfExists_GetAGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGalleryImagesInAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_ListByGallery.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_ListByGallery.json // this example is just showing the usage of "GalleryImages_ListByGallery" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageResource.cs index d98743a493f9..8c6f996ab9c3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageResource.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryImageResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASimpleGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Update.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Update.json // this example is just showing the usage of "GalleryImages_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Update_UpdateASimpleGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Get.json // this example is just showing the usage of "GalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetAGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImage_Delete.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImage_Delete.json // this example is just showing the usage of "GalleryImages_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionCollection.cs index 4851b89d4985..99aa5b959ac0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryImageVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVMAsSource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVmAsSource.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVM [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithCommunityImageVersionAsSource.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -222,7 +222,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -323,7 +323,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -433,7 +433,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithShallowReplicationMode.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -496,7 +496,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSh [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithImageVersionAsSource.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -597,7 +597,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSh [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithSnapshotsAsSource.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -707,7 +707,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSn [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASourceWithCustomUEFIKeys() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD_UefiSettings.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -848,7 +848,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVh [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithVHD.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -946,7 +946,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVh [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Create_WithTargetExtendedLocations.json // this example is just showing the usage of "GalleryImageVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1047,7 +1047,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTar [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1084,7 +1084,7 @@ public async Task Get_GetAGalleryImageVersionWithReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryImageVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1117,7 +1117,7 @@ public async Task Exists_GetAGalleryImageVersionWithReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryImageVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1162,7 +1162,7 @@ public async Task GetIfExists_GetAGalleryImageVersionWithReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersionWithSnapshotsAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1198,7 +1198,7 @@ public async Task Get_GetAGalleryImageVersionWithSnapshotsAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryImageVersionWithSnapshotsAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1230,7 +1230,7 @@ public async Task Exists_GetAGalleryImageVersionWithSnapshotsAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryImageVersionWithSnapshotsAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1274,7 +1274,7 @@ public async Task GetIfExists_GetAGalleryImageVersionWithSnapshotsAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersionWithVhdAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1310,7 +1310,7 @@ public async Task Get_GetAGalleryImageVersionWithVhdAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryImageVersionWithVhdAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1342,7 +1342,7 @@ public async Task Exists_GetAGalleryImageVersionWithVhdAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryImageVersionWithVhdAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1386,7 +1386,7 @@ public async Task GetIfExists_GetAGalleryImageVersionWithVhdAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1422,7 +1422,7 @@ public async Task Get_GetAGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1454,7 +1454,7 @@ public async Task Exists_GetAGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1498,7 +1498,7 @@ public async Task GetIfExists_GetAGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGalleryImageVersionsInAGalleryImageDefinition() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_ListByGalleryImage.json // this example is just showing the usage of "GalleryImageVersions_ListByGalleryImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionResource.cs index 14dbb53a35be..1519c37e738b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryImageVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_GalleryImageVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASimpleGalleryImageVersionManagedImageAsSource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update.json // this example is just showing the usage of "GalleryImageVersions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Update_UpdateASimpleGalleryImageVersionManagedImageAsSource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASimpleGalleryImageVersionWithoutSourceId() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Update_WithoutSourceId.json // this example is just showing the usage of "GalleryImageVersions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task Update_UpdateASimpleGalleryImageVersionWithoutSourceId() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersionWithReplicationStatus() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithReplicationStatus.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Get_GetAGalleryImageVersionWithReplicationStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersionWithSnapshotsAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithSnapshotsAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -197,7 +197,7 @@ public async Task Get_GetAGalleryImageVersionWithSnapshotsAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersionWithVhdAsASource() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get_WithVhdAsSource.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -230,7 +230,7 @@ public async Task Get_GetAGalleryImageVersionWithVhdAsASource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Get.json // this example is just showing the usage of "GalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,7 +263,7 @@ public async Task Get_GetAGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/GalleryImageVersion_Delete.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/GalleryImageVersion_Delete.json // this example is just showing the usage of "GalleryImageVersions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileCollection.cs new file mode 100644 index 000000000000..623a5ab4219f --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute.Samples +{ + public partial class Sample_GalleryInVmAccessControlProfileCollection + { + // Create or update a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Create.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryResource created on azure + // for more information of creating GalleryResource, please refer to the document of GalleryResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + ResourceIdentifier galleryResourceId = GalleryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName); + GalleryResource gallery = client.GetGalleryResource(galleryResourceId); + + // get the collection of this GalleryInVmAccessControlProfileResource + GalleryInVmAccessControlProfileCollection collection = gallery.GetGalleryInVmAccessControlProfiles(); + + // invoke the operation + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + GalleryInVmAccessControlProfileData data = new GalleryInVmAccessControlProfileData(new AzureLocation("West US")) + { + Properties = new GalleryInVmAccessControlProfileProperties(SupportedOperatingSystemType.Linux, EndpointType.WireServer), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, inVmAccessControlProfileName, data); + GalleryInVmAccessControlProfileResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryResource created on azure + // for more information of creating GalleryResource, please refer to the document of GalleryResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + ResourceIdentifier galleryResourceId = GalleryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName); + GalleryResource gallery = client.GetGalleryResource(galleryResourceId); + + // get the collection of this GalleryInVmAccessControlProfileResource + GalleryInVmAccessControlProfileCollection collection = gallery.GetGalleryInVmAccessControlProfiles(); + + // invoke the operation + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + GalleryInVmAccessControlProfileResource result = await collection.GetAsync(inVmAccessControlProfileName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryResource created on azure + // for more information of creating GalleryResource, please refer to the document of GalleryResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + ResourceIdentifier galleryResourceId = GalleryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName); + GalleryResource gallery = client.GetGalleryResource(galleryResourceId); + + // get the collection of this GalleryInVmAccessControlProfileResource + GalleryInVmAccessControlProfileCollection collection = gallery.GetGalleryInVmAccessControlProfiles(); + + // invoke the operation + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + bool result = await collection.ExistsAsync(inVmAccessControlProfileName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryResource created on azure + // for more information of creating GalleryResource, please refer to the document of GalleryResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + ResourceIdentifier galleryResourceId = GalleryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName); + GalleryResource gallery = client.GetGalleryResource(galleryResourceId); + + // get the collection of this GalleryInVmAccessControlProfileResource + GalleryInVmAccessControlProfileCollection collection = gallery.GetGalleryInVmAccessControlProfiles(); + + // invoke the operation + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + NullableResponse response = await collection.GetIfExistsAsync(inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // List gallery inVMAccessControlProfiles in a gallery. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListGalleryInVMAccessControlProfilesInAGallery() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_ListByGallery.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_ListByGallery" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryResource created on azure + // for more information of creating GalleryResource, please refer to the document of GalleryResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + ResourceIdentifier galleryResourceId = GalleryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName); + GalleryResource gallery = client.GetGalleryResource(galleryResourceId); + + // get the collection of this GalleryInVmAccessControlProfileResource + GalleryInVmAccessControlProfileCollection collection = gallery.GetGalleryInVmAccessControlProfiles(); + + // invoke the operation and iterate over the result + await foreach (GalleryInVmAccessControlProfileResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileResource.cs new file mode 100644 index 000000000000..bb52cd916860 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute.Samples +{ + public partial class Sample_GalleryInVmAccessControlProfileResource + { + // Update a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Update.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // invoke the operation + GalleryInVmAccessControlProfilePatch patch = new GalleryInVmAccessControlProfilePatch() + { + Properties = new GalleryInVmAccessControlProfileProperties(SupportedOperatingSystemType.Linux, EndpointType.WireServer), + }; + ArmOperation lro = await galleryInVmAccessControlProfile.UpdateAsync(WaitUntil.Completed, patch); + GalleryInVmAccessControlProfileResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // invoke the operation + GalleryInVmAccessControlProfileResource result = await galleryInVmAccessControlProfile.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfile_Delete.json + // this example is just showing the usage of "GalleryInVMAccessControlProfiles_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // invoke the operation + await galleryInVmAccessControlProfile.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionCollection.cs new file mode 100644 index 000000000000..ecb3782f20b3 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionCollection.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute.Samples +{ + public partial class Sample_GalleryInVmAccessControlProfileVersionCollection + { + // Create or update a Gallery InVMAccessControlProfile Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAGalleryInVMAccessControlProfileVersion() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Create.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // get the collection of this GalleryInVmAccessControlProfileVersionResource + GalleryInVmAccessControlProfileVersionCollection collection = galleryInVmAccessControlProfile.GetGalleryInVmAccessControlProfileVersions(); + + // invoke the operation + string inVmAccessControlProfileVersionName = "1.0.0"; + GalleryInVmAccessControlProfileVersionData data = new GalleryInVmAccessControlProfileVersionData(new AzureLocation("West US")) + { + TargetLocations = +{ +new TargetRegion("West US"),new TargetRegion("South Central US") +}, + ExcludeFromLatest = false, + Mode = AccessControlRulesMode.Audit, + DefaultAccess = EndpointAccess.Allow, + Rules = new AccessControlRules() + { + Privileges = +{ +new AccessControlRulesPrivilege("GoalState","/machine") +{ +QueryParameters = +{ +["comp"] = "goalstate", +}, +} +}, + Roles = +{ +new AccessControlRulesRole("Provisioning",new string[] +{ +"GoalState" +}) +}, + Identities = +{ +new AccessControlRulesIdentity("WinPA") +{ +UserName = "SYSTEM", +GroupName = "Administrators", +ExePath = "C:\\Windows\\System32\\cscript.exe", +ProcessName = "cscript", +} +}, + RoleAssignments = +{ +new AccessControlRulesRoleAssignment("Provisioning",new string[] +{ +"WinPA" +}) +}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, inVmAccessControlProfileVersionName, data); + GalleryInVmAccessControlProfileVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a gallery inVMAccessControlProfile version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAGalleryInVMAccessControlProfileVersion() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // get the collection of this GalleryInVmAccessControlProfileVersionResource + GalleryInVmAccessControlProfileVersionCollection collection = galleryInVmAccessControlProfile.GetGalleryInVmAccessControlProfileVersions(); + + // invoke the operation + string inVmAccessControlProfileVersionName = "1.0.0"; + GalleryInVmAccessControlProfileVersionResource result = await collection.GetAsync(inVmAccessControlProfileVersionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a gallery inVMAccessControlProfile version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAGalleryInVMAccessControlProfileVersion() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // get the collection of this GalleryInVmAccessControlProfileVersionResource + GalleryInVmAccessControlProfileVersionCollection collection = galleryInVmAccessControlProfile.GetGalleryInVmAccessControlProfileVersions(); + + // invoke the operation + string inVmAccessControlProfileVersionName = "1.0.0"; + bool result = await collection.ExistsAsync(inVmAccessControlProfileVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a gallery inVMAccessControlProfile version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAGalleryInVMAccessControlProfileVersion() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // get the collection of this GalleryInVmAccessControlProfileVersionResource + GalleryInVmAccessControlProfileVersionCollection collection = galleryInVmAccessControlProfile.GetGalleryInVmAccessControlProfileVersions(); + + // invoke the operation + string inVmAccessControlProfileVersionName = "1.0.0"; + NullableResponse response = await collection.GetIfExistsAsync(inVmAccessControlProfileVersionName); + GalleryInVmAccessControlProfileVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListGalleryInVMAccessControlProfileVersionsInAGalleryInVMAccessControlProfile() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_ListByGalleryInVMAccessControlProfile.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_ListByGalleryInVmAccessControlProfile" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileResource created on azure + // for more information of creating GalleryInVmAccessControlProfileResource, please refer to the document of GalleryInVmAccessControlProfileResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + ResourceIdentifier galleryInVmAccessControlProfileResourceId = GalleryInVmAccessControlProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + GalleryInVmAccessControlProfileResource galleryInVmAccessControlProfile = client.GetGalleryInVmAccessControlProfileResource(galleryInVmAccessControlProfileResourceId); + + // get the collection of this GalleryInVmAccessControlProfileVersionResource + GalleryInVmAccessControlProfileVersionCollection collection = galleryInVmAccessControlProfile.GetGalleryInVmAccessControlProfileVersions(); + + // invoke the operation and iterate over the result + await foreach (GalleryInVmAccessControlProfileVersionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionResource.cs new file mode 100644 index 000000000000..434c388d8e68 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryInVmAccessControlProfileVersionResource.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute.Samples +{ + public partial class Sample_GalleryInVmAccessControlProfileVersionResource + { + // Update a Gallery InVMAccessControlProfile Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAGalleryInVMAccessControlProfileVersion() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Update.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileVersionResource created on azure + // for more information of creating GalleryInVmAccessControlProfileVersionResource, please refer to the document of GalleryInVmAccessControlProfileVersionResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + string inVmAccessControlProfileVersionName = "1.0.0"; + ResourceIdentifier galleryInVmAccessControlProfileVersionResourceId = GalleryInVmAccessControlProfileVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName); + GalleryInVmAccessControlProfileVersionResource galleryInVmAccessControlProfileVersion = client.GetGalleryInVmAccessControlProfileVersionResource(galleryInVmAccessControlProfileVersionResourceId); + + // invoke the operation + GalleryInVmAccessControlProfileVersionPatch patch = new GalleryInVmAccessControlProfileVersionPatch() + { + TargetLocations = +{ +new TargetRegion("West US"),new TargetRegion("South Central US"),new TargetRegion("East US") +}, + ExcludeFromLatest = false, + Mode = AccessControlRulesMode.Audit, + DefaultAccess = EndpointAccess.Allow, + }; + ArmOperation lro = await galleryInVmAccessControlProfileVersion.UpdateAsync(WaitUntil.Completed, patch); + GalleryInVmAccessControlProfileVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a gallery inVMAccessControlProfile version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAGalleryInVMAccessControlProfileVersion() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Get.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileVersionResource created on azure + // for more information of creating GalleryInVmAccessControlProfileVersionResource, please refer to the document of GalleryInVmAccessControlProfileVersionResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + string inVmAccessControlProfileVersionName = "1.0.0"; + ResourceIdentifier galleryInVmAccessControlProfileVersionResourceId = GalleryInVmAccessControlProfileVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName); + GalleryInVmAccessControlProfileVersionResource galleryInVmAccessControlProfileVersion = client.GetGalleryInVmAccessControlProfileVersionResource(galleryInVmAccessControlProfileVersionResourceId); + + // invoke the operation + GalleryInVmAccessControlProfileVersionResource result = await galleryInVmAccessControlProfileVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GalleryInVmAccessControlProfileVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a gallery inVMAccessControlProfile version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAGalleryInVMAccessControlProfileVersion() + { + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryResourceProfileExamples/GalleryInVMAccessControlProfileVersion_Delete.json + // this example is just showing the usage of "GalleryInVMAccessControlProfileVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GalleryInVmAccessControlProfileVersionResource created on azure + // for more information of creating GalleryInVmAccessControlProfileVersionResource, please refer to the document of GalleryInVmAccessControlProfileVersionResource + string subscriptionId = "{subscription-id}"; + string resourceGroupName = "myResourceGroup"; + string galleryName = "myGalleryName"; + string inVmAccessControlProfileName = "myInVMAccessControlProfileName"; + string inVmAccessControlProfileVersionName = "1.0.0"; + ResourceIdentifier galleryInVmAccessControlProfileVersionResourceId = GalleryInVmAccessControlProfileVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName); + GalleryInVmAccessControlProfileVersionResource galleryInVmAccessControlProfileVersion = client.GetGalleryInVmAccessControlProfileVersionResource(galleryInVmAccessControlProfileVersionResourceId); + + // invoke the operation + await galleryInVmAccessControlProfileVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryResource.cs index dee18e525bf0..51cf9bb3eff2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_GalleryResource.cs @@ -21,7 +21,7 @@ public partial class Sample_GalleryResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASimpleGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Update.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Update.json // this example is just showing the usage of "Galleries_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Update_UpdateASimpleGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACommunityGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/CommunityGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/CommunityGallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetACommunityGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryWithExpandSharingProfileGroups() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithExpandSharingProfileGroups.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Get_GetAGalleryWithExpandSharingProfileGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGalleryWithSelectPermissions() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithSelectPermissions.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Get_GetAGalleryWithSelectPermissions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get.json // this example is just showing the usage of "Galleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task Get_GetAGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_Delete.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Delete.json // this example is just showing the usage of "Galleries_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +210,7 @@ public async Task Delete_DeleteAGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGalleries_ListGalleriesInASubscription() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ListBySubscription.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ListBySubscription.json // this example is just showing the usage of "Galleries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -242,7 +242,7 @@ public async Task GetGalleries_ListGalleriesInASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateSharingProfile_AddSharingIdToTheSharingProfileOfAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_AddToSharingProfile.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_AddToSharingProfile.json // this example is just showing the usage of "GallerySharingProfile_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +291,7 @@ public async Task UpdateSharingProfile_AddSharingIdToTheSharingProfileOfAGallery [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateSharingProfile_ResetSharingProfileOfAGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_ResetSharingProfile.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_ResetSharingProfile.json // this example is just showing the usage of "GallerySharingProfile_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -320,7 +320,7 @@ public async Task UpdateSharingProfile_ResetSharingProfileOfAGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateSharingProfile_ShareAGalleryToCommunity() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_EnableCommunityGallery.json // this example is just showing the usage of "GallerySharingProfile_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryCollection.cs index 29afba6d76ba..2923b59aab5b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SharedGalleryCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSharedGalleries() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_List.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_List.json // this example is just showing the usage of "SharedGalleries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListSharedGalleries() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASharedGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json // this example is just showing the usage of "SharedGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetASharedGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetASharedGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json // this example is just showing the usage of "SharedGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetASharedGallery() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetASharedGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json // this example is just showing the usage of "SharedGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageCollection.cs index 5c0d1f9b4da4..945a61dfef43 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SharedGalleryImageCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSharedGalleryImages() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImages_List.json // this example is just showing the usage of "SharedGalleryImages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListSharedGalleryImages() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASharedGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json // this example is just showing the usage of "SharedGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetASharedGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetASharedGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json // this example is just showing the usage of "SharedGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetASharedGalleryImage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetASharedGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json // this example is just showing the usage of "SharedGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageResource.cs index 793ea2066dd4..25f2372846f9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SharedGalleryImageResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASharedGalleryImage() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImage_Get.json // this example is just showing the usage of "SharedGalleryImages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionCollection.cs index cd4b613b0fd9..11778fd8f73c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SharedGalleryImageVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSharedGalleryImageVersions() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersions_List.json // this example is just showing the usage of "SharedGalleryImageVersions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListSharedGalleryImageVersions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASharedGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json // this example is just showing the usage of "SharedGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetASharedGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetASharedGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json // this example is just showing the usage of "SharedGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetASharedGalleryImageVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetASharedGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json // this example is just showing the usage of "SharedGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionResource.cs index f8059df96fd2..cf1b90819015 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryImageVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SharedGalleryImageVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASharedGalleryImageVersion() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGalleryImageVersion_Get.json // this example is just showing the usage of "SharedGalleryImageVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryResource.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryResource.cs index adbbcce72872..059e3857cd40 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_SharedGalleryResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SharedGalleryResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASharedGallery() { - // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2023-07-03/examples/sharedGalleryExamples/SharedGallery_Get.json + // Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/sharedGalleryExamples/SharedGallery_Get.json // this example is just showing the usage of "SharedGalleries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs index 195d2f33d442..be04993723e2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs @@ -825,7 +825,7 @@ public static BootDiagnosticsInstanceView BootDiagnosticsInstanceView(Uri consol /// Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset. /// Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. /// Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. /// Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. /// A new instance for mocking. public static VirtualMachineDataDisk VirtualMachineDataDisk(int lun = default, string name = null, Uri vhdUri = null, Uri imageUri = null, CachingType? caching = null, bool? writeAcceleratorEnabled = null, DiskCreateOptionType createOption = default, int? diskSizeGB = null, VirtualMachineManagedDisk managedDisk = null, ResourceIdentifier sourceResourceId = null, bool? toBeDetached = null, long? diskIopsReadWrite = null, long? diskMBpsReadWrite = null, DiskDetachOptionType? detachOption = null, DiskDeleteOptionType? deleteOption = null) @@ -3191,7 +3191,7 @@ public static GalleryPatch GalleryPatch(ResourceIdentifier id = null, string nam /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// The provisioning state, which only appears in the response. /// A list of gallery image features. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// A new instance for mocking. public static GalleryImageData GalleryImageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string description = null, string eula = null, Uri privacyStatementUri = null, Uri releaseNoteUri = null, SupportedOperatingSystemType? osType = null, OperatingSystemStateType? osState = null, HyperVGeneration? hyperVGeneration = null, DateTimeOffset? endOfLifeOn = null, GalleryImageIdentifier identifier = null, RecommendedMachineConfiguration recommended = null, IEnumerable disallowedDiskTypes = null, ImagePurchasePlan purchasePlan = null, GalleryProvisioningState? provisioningState = null, IEnumerable features = null, ArchitectureType? architecture = null) { @@ -3243,7 +3243,7 @@ public static GalleryImageData GalleryImageData(ResourceIdentifier id = null, st /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// The provisioning state, which only appears in the response. /// A list of gallery image features. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// Resource tags. /// A new instance for mocking. public static GalleryImagePatch GalleryImagePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string eula = null, Uri privacyStatementUri = null, Uri releaseNoteUri = null, SupportedOperatingSystemType? osType = null, OperatingSystemStateType? osState = null, HyperVGeneration? hyperVGeneration = null, DateTimeOffset? endOfLifeOn = null, GalleryImageIdentifier identifier = null, RecommendedMachineConfiguration recommended = null, IEnumerable disallowedDiskTypes = null, ImagePurchasePlan purchasePlan = null, GalleryProvisioningState? provisioningState = null, IEnumerable features = null, ArchitectureType? architecture = null, IDictionary tags = null) @@ -3641,6 +3641,147 @@ public static GalleryApplicationVersionPatch GalleryApplicationVersionPatch(Reso serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Describes the properties of a gallery inVMAccessControlProfile. + /// A new instance for mocking. + public static GalleryInVmAccessControlProfileData GalleryInVmAccessControlProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GalleryInVmAccessControlProfileProperties properties = null) + { + tags ??= new Dictionary(); + + return new GalleryInVmAccessControlProfileData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The provisioning state, which only appears in the response. + /// The description of this gallery inVMAccessControlProfile resources. This property is updatable. + /// This property allows you to specify the OS type of the VMs/VMSS for which this profile can be used against. Possible values are: 'Windows' or 'Linux'. + /// This property allows you to specify the Endpoint type for which this profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'. + /// A new instance for mocking. + public static GalleryInVmAccessControlProfileProperties GalleryInVmAccessControlProfileProperties(GalleryProvisioningState? provisioningState = null, string description = null, SupportedOperatingSystemType osType = default, EndpointType applicableHostEndpoint = default) + { + return new GalleryInVmAccessControlProfileProperties(provisioningState, serializedAdditionalRawData: null, description, osType, applicableHostEndpoint); + } + + /// Initializes a new instance of . + /// The provisioning state, which only appears in the response. + /// A new instance for mocking. + public static GalleryResourceProfilePropertiesBase GalleryResourceProfilePropertiesBase(GalleryProvisioningState? provisioningState = null) + { + return new GalleryResourceProfilePropertiesBase(provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Describes the properties of a gallery inVMAccessControlProfile. + /// Resource tags. + /// A new instance for mocking. + public static GalleryInVmAccessControlProfilePatch GalleryInVmAccessControlProfilePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GalleryInVmAccessControlProfileProperties properties = null, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new GalleryInVmAccessControlProfilePatch( + id, + name, + resourceType, + systemData, + properties, + tags, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The target regions where the Resource Profile version is going to be replicated to. This property is updatable. + /// If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. + /// The timestamp for when the Resource Profile Version is published. + /// The provisioning state, which only appears in the response. + /// This is the replication status of the gallery image version. + /// This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + /// This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. + /// This is the Access Control Rules specification for an inVMAccessControlProfile version. + /// A new instance for mocking. + public static GalleryInVmAccessControlProfileVersionData GalleryInVmAccessControlProfileVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable targetLocations = null, bool? excludeFromLatest = null, DateTimeOffset? publishedOn = null, GalleryProvisioningState? provisioningState = null, ReplicationStatus replicationStatus = null, AccessControlRulesMode? mode = null, EndpointAccess? defaultAccess = null, AccessControlRules rules = null) + { + tags ??= new Dictionary(); + targetLocations ??= new List(); + + return new GalleryInVmAccessControlProfileVersionData( + id, + name, + resourceType, + systemData, + tags, + location, + targetLocations?.ToList(), + excludeFromLatest, + publishedOn, + provisioningState, + replicationStatus, + mode, + defaultAccess, + rules, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The target regions where the Resource Profile version is going to be replicated to. This property is updatable. + /// If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. + /// The timestamp for when the Resource Profile Version is published. + /// The provisioning state, which only appears in the response. + /// This is the replication status of the gallery image version. + /// This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + /// This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. + /// This is the Access Control Rules specification for an inVMAccessControlProfile version. + /// Resource tags. + /// A new instance for mocking. + public static GalleryInVmAccessControlProfileVersionPatch GalleryInVmAccessControlProfileVersionPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable targetLocations = null, bool? excludeFromLatest = null, DateTimeOffset? publishedOn = null, GalleryProvisioningState? provisioningState = null, ReplicationStatus replicationStatus = null, AccessControlRulesMode? mode = null, EndpointAccess? defaultAccess = null, AccessControlRules rules = null, IDictionary tags = null) + { + targetLocations ??= new List(); + tags ??= new Dictionary(); + + return new GalleryInVmAccessControlProfileVersionPatch( + id, + name, + resourceType, + systemData, + targetLocations?.ToList(), + excludeFromLatest, + publishedOn, + provisioningState, + replicationStatus, + mode, + defaultAccess, + rules, + tags, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Resource name. /// Resource location. @@ -3686,7 +3827,7 @@ public static PirResourceData PirResourceData(string name = null, AzureLocation? /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. /// A list of gallery image features. /// Describes the gallery image definition purchase plan. This is used by marketplace images. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// Privacy statement uri for the current community gallery image. /// End-user license agreement for the current community gallery image. /// The artifact tags of a shared gallery resource. @@ -3851,7 +3992,7 @@ public static PirCommunityGalleryResourceData PirCommunityGalleryResourceData(st /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. /// A list of gallery image features. /// Describes the gallery image definition purchase plan. This is used by marketplace images. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// Privacy statement URI for the current community gallery image. /// The end-user license agreement for the current community gallery image. /// The disclaimer for a community gallery resource. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryCollection.cs index 8e1074b52612..cb082ffcd421 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(AzureLoca /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -156,7 +156,7 @@ public virtual Response Get(AzureLocation location, st /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -244,7 +244,7 @@ public virtual Response Exists(AzureLocation location, string publicGaller /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageCollection.cs index e77a9d9d6719..5aa84254491c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -156,7 +156,7 @@ public virtual Response Get(string galleryImageNa /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string galleryImageName, C /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string galleryImageName, CancellationToken /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.cs index 66e447d24557..c9644f67f6e8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageData.cs @@ -40,7 +40,7 @@ internal CommunityGalleryImageData() /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. /// A list of gallery image features. /// Describes the gallery image definition purchase plan. This is used by marketplace images. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// Privacy statement URI for the current community gallery image. /// The end-user license agreement for the current community gallery image. /// The disclaimer for a community gallery resource. @@ -87,7 +87,7 @@ public IList DisallowedDiskTypes public IReadOnlyList Features { get; } /// Describes the gallery image definition purchase plan. This is used by marketplace images. public ImagePurchasePlan PurchasePlan { get; } - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. public ArchitectureType? Architecture { get; } /// Privacy statement URI for the current community gallery image. public Uri PrivacyStatementUri { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.cs index 8b6b5ba3a45b..3ac20a0a33c0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.cs @@ -108,7 +108,7 @@ public virtual CommunityGalleryImageVersionCollection GetCommunityGalleryImageVe /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetCom /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetCommunityGaller /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionCollection.cs index eaa8609d5b57..99a6cfc91b1f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -156,7 +156,7 @@ public virtual Response Get(string gallery /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string galleryImageVersion /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string galleryImageVersionName, Cancellatio /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.cs index 6e0ca518ba16..300aecebd1b8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.cs index 7198bcd27cb3..75109ffee0b5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.cs @@ -108,7 +108,7 @@ public virtual CommunityGalleryImageCollection GetCommunityGalleryImages() /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetCommunityG /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetCommunityGalleryImage( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs index a33aaacea59e..3aea8dcbca37 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs @@ -622,6 +622,44 @@ public static GalleryApplicationVersionResource GetGalleryApplicationVersionReso return GetMockableComputeArmClient(client).GetGalleryApplicationVersionResource(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 GalleryInVmAccessControlProfileResource GetGalleryInVmAccessControlProfileResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeArmClient(client).GetGalleryInVmAccessControlProfileResource(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 GalleryInVmAccessControlProfileVersionResource GetGalleryInVmAccessControlProfileVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableComputeArmClient(client).GetGalleryInVmAccessControlProfileVersionResource(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. @@ -2084,7 +2122,7 @@ public static GalleryCollection GetGalleries(this ResourceGroupResource resource /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -2124,7 +2162,7 @@ public static async Task> GetGalleryAsync(this Resourc /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -2377,7 +2415,7 @@ public static SharedGalleryCollection GetSharedGalleries(this SubscriptionResour /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -2416,7 +2454,7 @@ public static async Task> GetSharedGalleryAsync( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -2472,7 +2510,7 @@ public static CommunityGalleryCollection GetCommunityGalleries(this Subscription /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -2511,7 +2549,7 @@ public static async Task> GetCommunityGallery /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -5088,7 +5126,7 @@ public static Pageable GetComputeResourceSkus(this Subscript /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -5124,7 +5162,7 @@ public static AsyncPageable GetGalleriesAsync(this Subscription /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeArmClient.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeArmClient.cs index ad048d199e50..488486eb4afb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeArmClient.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeArmClient.cs @@ -406,6 +406,30 @@ public virtual GalleryApplicationVersionResource GetGalleryApplicationVersionRes return new GalleryApplicationVersionResource(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 GalleryInVmAccessControlProfileResource GetGalleryInVmAccessControlProfileResource(ResourceIdentifier id) + { + GalleryInVmAccessControlProfileResource.ValidateResourceId(id); + return new GalleryInVmAccessControlProfileResource(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 GalleryInVmAccessControlProfileVersionResource GetGalleryInVmAccessControlProfileVersionResource(ResourceIdentifier id) + { + GalleryInVmAccessControlProfileVersionResource.ValidateResourceId(id); + return new GalleryInVmAccessControlProfileVersionResource(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. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeResourceGroupResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeResourceGroupResource.cs index 1fc8bce46684..f79d11b147cc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeResourceGroupResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeResourceGroupResource.cs @@ -965,7 +965,7 @@ public virtual GalleryCollection GetGalleries() /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -998,7 +998,7 @@ public virtual async Task> GetGalleryAsync(string gall /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeSubscriptionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeSubscriptionResource.cs index 20cc6ff00ca7..fabc7de77c7d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeSubscriptionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/MockableComputeSubscriptionResource.cs @@ -226,7 +226,7 @@ public virtual SharedGalleryCollection GetSharedGalleries(AzureLocation location /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> GetSharedGalleryAsync /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual CommunityGalleryCollection GetCommunityGalleries() /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual async Task> GetCommunityGaller /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -2629,7 +2629,7 @@ public virtual Pageable GetComputeResourceSkus(string filter /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -2659,7 +2659,7 @@ public virtual AsyncPageable GetGalleriesAsync(CancellationToke /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationCollection.cs index 6c9ef2734dc2..5d6d9339b026 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string galleryApplicatio /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string galleryApplicationN /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string galleryApplicationName, Cancellation /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.cs index cc7dbe4a4416..89e43d3fc49b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.cs @@ -110,7 +110,7 @@ public virtual GalleryApplicationVersionCollection GetGalleryApplicationVersions /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetGaller /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual Response GetGalleryApplication /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -430,7 +430,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -492,7 +492,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -554,7 +554,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -611,7 +611,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -668,7 +668,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -728,7 +728,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionCollection.cs index 7ba3fd51adfa..e1b052be1314 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string galleryApp /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string galleryApplicationV /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string galleryApplicationVersionName, Repli /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.cs index f76ff5865852..5a0907f1c2ef 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(ReplicationStatus /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> AddTagAsy /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual Response AddTag(string key, st /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -543,7 +543,7 @@ public virtual async Task> SetTagsAs /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -600,7 +600,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual async Task> RemoveTag /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryCollection.cs index 87855d40f738..0089dc2ab54a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string galleryName /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string galleryName, SelectPermissio /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string galleryName, Select /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string galleryName, SelectPermission? selec /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageCollection.cs index cb71d6f103c7..bc42a244894c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string galler /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string galleryImageName, Cance /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string galleryImageName, C /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string galleryImageName, CancellationToken /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.cs index 7131a134d030..87a7daa4e64e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageData.cs @@ -79,7 +79,7 @@ public GalleryImageData(AzureLocation location) : base(location) /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// The provisioning state, which only appears in the response. /// A list of gallery image features. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// Keeps track of any properties unknown to the library. internal GalleryImageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string description, string eula, Uri privacyStatementUri, Uri releaseNoteUri, SupportedOperatingSystemType? osType, OperatingSystemStateType? osState, HyperVGeneration? hyperVGeneration, DateTimeOffset? endOfLifeOn, GalleryImageIdentifier identifier, RecommendedMachineConfiguration recommended, Disallowed disallowed, ImagePurchasePlan purchasePlan, GalleryProvisioningState? provisioningState, IList features, ArchitectureType? architecture, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -145,7 +145,7 @@ public IList DisallowedDiskTypes public GalleryProvisioningState? ProvisioningState { get; } /// A list of gallery image features. public IList Features { get; } - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. public ArchitectureType? Architecture { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.cs index 4e7c33489d47..220abcc87344 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.cs @@ -110,7 +110,7 @@ public virtual GalleryImageVersionCollection GetGalleryImageVersions() /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetGalleryImage /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual Response GetGalleryImageVersion(stri /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -430,7 +430,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ga /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -493,7 +493,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -556,7 +556,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -614,7 +614,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -672,7 +672,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -733,7 +733,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionCollection.cs index b9965e7ea35e..4f56ebfd8cf3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string galleryImageVers /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string galleryImageVersion /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string galleryImageVersionName, Replication /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.cs index 5edeb4f7953e..ab04834e7e2e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(Replic /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(ReplicationStatusType? /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -543,7 +543,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -600,7 +600,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileCollection.cs new file mode 100644 index 000000000000..635abd422d8f --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Compute +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetGalleryInVmAccessControlProfiles method from an instance of . + /// + public partial class GalleryInVmAccessControlProfileCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics; + private readonly GalleryInVMAccessControlProfilesRestOperations _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient; + + /// Initializes a new instance of the class for mocking. + protected GalleryInVmAccessControlProfileCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal GalleryInVmAccessControlProfileCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Compute", GalleryInVmAccessControlProfileResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GalleryInVmAccessControlProfileResource.ResourceType, out string galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesApiVersion); + _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient = new GalleryInVMAccessControlProfilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != GalleryResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, GalleryResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 gallery inVMAccessControlProfile to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string inVmAccessControlProfileName, GalleryInVmAccessControlProfileData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, data, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileOperationSource(Client), _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 gallery inVMAccessControlProfile to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string inVmAccessControlProfileName, GalleryInVmAccessControlProfileData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, data, cancellationToken); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileOperationSource(Client), _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.Get"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.Get"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List gallery inVMAccessControlProfiles in a gallery. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_ListByGallery + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateListByGalleryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateListByGalleryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GalleryInVmAccessControlProfileResource(Client, GalleryInVmAccessControlProfileData.DeserializeGalleryInVmAccessControlProfileData(e)), _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, "GalleryInVmAccessControlProfileCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List gallery inVMAccessControlProfiles in a gallery. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_ListByGallery + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateListByGalleryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateListByGalleryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GalleryInVmAccessControlProfileResource(Client, GalleryInVmAccessControlProfileData.DeserializeGalleryInVmAccessControlProfileData(e)), _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, "GalleryInVmAccessControlProfileCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.Exists"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.Exists"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileCollection.GetIfExists"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, inVmAccessControlProfileName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.Serialization.cs new file mode 100644 index 000000000000..685546b88146 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.Serialization.cs @@ -0,0 +1,218 @@ +// 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; +using Azure.ResourceManager.Compute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute +{ + public partial class GalleryInVmAccessControlProfileData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryInVmAccessControlProfileData 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(GalleryInVmAccessControlProfileData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryInVmAccessControlProfileData(document.RootElement, options); + } + + internal static GalleryInVmAccessControlProfileData DeserializeGalleryInVmAccessControlProfileData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GalleryInVmAccessControlProfileProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = GalleryInVmAccessControlProfileProperties.DeserializeGalleryInVmAccessControlProfileProperties(property.Value, options); + continue; + } + 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("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GalleryInVmAccessControlProfileData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + 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); + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileData)} does not support writing '{options.Format}' format."); + } + } + + GalleryInVmAccessControlProfileData 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); + return DeserializeGalleryInVmAccessControlProfileData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.cs new file mode 100644 index 000000000000..c8d2c436bbdb --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileData.cs @@ -0,0 +1,83 @@ +// 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.Compute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute +{ + /// + /// A class representing the GalleryInVmAccessControlProfile data model. + /// Specifies information about the gallery inVMAccessControlProfile that you want to create or update. + /// + public partial class GalleryInVmAccessControlProfileData : TrackedResourceData + { + /// + /// 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 location. + public GalleryInVmAccessControlProfileData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Describes the properties of a gallery inVMAccessControlProfile. + /// Keeps track of any properties unknown to the library. + internal GalleryInVmAccessControlProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, GalleryInVmAccessControlProfileProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GalleryInVmAccessControlProfileData() + { + } + + /// Describes the properties of a gallery inVMAccessControlProfile. + public GalleryInVmAccessControlProfileProperties Properties { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.Serialization.cs new file mode 100644 index 000000000000..3a2b9a1de1bc --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.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.Compute +{ + public partial class GalleryInVmAccessControlProfileResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GalleryInVmAccessControlProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + GalleryInVmAccessControlProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.cs new file mode 100644 index 000000000000..9f27b79be94c --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.cs @@ -0,0 +1,776 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute +{ + /// + /// A Class representing a GalleryInVmAccessControlProfile along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetGalleryInVmAccessControlProfileResource method. + /// Otherwise you can get one from its parent resource using the GetGalleryInVmAccessControlProfile method. + /// + public partial class GalleryInVmAccessControlProfileResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The galleryName. + /// The inVmAccessControlProfileName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVmAccessControlProfileName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics; + private readonly GalleryInVMAccessControlProfilesRestOperations _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient; + private readonly GalleryInVmAccessControlProfileData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Compute/galleries/inVMAccessControlProfiles"; + + /// Initializes a new instance of the class for mocking. + protected GalleryInVmAccessControlProfileResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GalleryInVmAccessControlProfileResource(ArmClient client, GalleryInVmAccessControlProfileData 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 GalleryInVmAccessControlProfileResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Compute", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesApiVersion); + _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient = new GalleryInVMAccessControlProfilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesApiVersion); +#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 GalleryInVmAccessControlProfileData 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)); + } + + /// Gets a collection of GalleryInVmAccessControlProfileVersionResources in the GalleryInVmAccessControlProfile. + /// An object representing collection of GalleryInVmAccessControlProfileVersionResources and their operations over a GalleryInVmAccessControlProfileVersionResource. + public virtual GalleryInVmAccessControlProfileVersionCollection GetGalleryInVmAccessControlProfileVersions() + { + return GetCachedClient(client => new GalleryInVmAccessControlProfileVersionCollection(client, Id)); + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGalleryInVmAccessControlProfileVersionAsync(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + return await GetGalleryInVmAccessControlProfileVersions().GetAsync(inVmAccessControlProfileVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGalleryInVmAccessControlProfileVersion(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + return GetGalleryInVmAccessControlProfileVersions().Get(inVmAccessControlProfileVersionName, cancellationToken); + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.Get"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.Get"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Delete + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.Delete"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(_galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Delete + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.Delete"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ComputeArmOperation(_galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Update + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Parameters supplied to the update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GalleryInVmAccessControlProfilePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.Update"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileOperationSource(Client), _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Update + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Parameters supplied to the update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GalleryInVmAccessControlProfilePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.Update"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileOperationSource(Client), _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.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 _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GalleryInVmAccessControlProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GalleryInVmAccessControlProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + 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.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.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 _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GalleryInVmAccessControlProfilePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + 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.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GalleryInVmAccessControlProfilePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.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 _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GalleryInVmAccessControlProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileResource.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 = _galleryInVmAccessControlProfileGalleryInVmAccessControlProfilesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GalleryInVmAccessControlProfileResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GalleryInVmAccessControlProfilePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionCollection.cs new file mode 100644 index 000000000000..5fb2555615e8 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Compute +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetGalleryInVmAccessControlProfileVersions method from an instance of . + /// + public partial class GalleryInVmAccessControlProfileVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics; + private readonly GalleryInVMAccessControlProfileVersionsRestOperations _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected GalleryInVmAccessControlProfileVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal GalleryInVmAccessControlProfileVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Compute", GalleryInVmAccessControlProfileVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GalleryInVmAccessControlProfileVersionResource.ResourceType, out string galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsApiVersion); + _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient = new GalleryInVMAccessControlProfileVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != GalleryInVmAccessControlProfileResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, GalleryInVmAccessControlProfileResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 gallery inVMAccessControlProfile version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, data, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileVersionOperationSource(Client), _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 gallery inVMAccessControlProfile version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, data, cancellationToken); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileVersionOperationSource(Client), _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.Get"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.Get"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_ListByGalleryInVmAccessControlProfile + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateListByGalleryInVmAccessControlProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateListByGalleryInVmAccessControlProfileNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GalleryInVmAccessControlProfileVersionResource(Client, GalleryInVmAccessControlProfileVersionData.DeserializeGalleryInVmAccessControlProfileVersionData(e)), _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, "GalleryInVmAccessControlProfileVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_ListByGalleryInVmAccessControlProfile + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateListByGalleryInVmAccessControlProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateListByGalleryInVmAccessControlProfileNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GalleryInVmAccessControlProfileVersionResource(Client, GalleryInVmAccessControlProfileVersionData.DeserializeGalleryInVmAccessControlProfileVersionData(e)), _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, "GalleryInVmAccessControlProfileVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.Exists"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, inVmAccessControlProfileVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.Serialization.cs new file mode 100644 index 000000000000..2d33d5a48a49 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.Serialization.cs @@ -0,0 +1,355 @@ +// 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; +using Azure.ResourceManager.Compute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute +{ + public partial class GalleryInVmAccessControlProfileVersionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + 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(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(TargetLocations)) + { + writer.WritePropertyName("targetLocations"u8); + writer.WriteStartArray(); + foreach (var item in TargetLocations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ExcludeFromLatest)) + { + writer.WritePropertyName("excludeFromLatest"u8); + writer.WriteBooleanValue(ExcludeFromLatest.Value); + } + if (options.Format != "W" && Optional.IsDefined(PublishedOn)) + { + writer.WritePropertyName("publishedDate"u8); + writer.WriteStringValue(PublishedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ReplicationStatus)) + { + writer.WritePropertyName("replicationStatus"u8); + writer.WriteObjectValue(ReplicationStatus, options); + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(DefaultAccess)) + { + writer.WritePropertyName("defaultAccess"u8); + writer.WriteStringValue(DefaultAccess.Value.ToString()); + } + if (Optional.IsDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteObjectValue(Rules, options); + } + writer.WriteEndObject(); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryInVmAccessControlProfileVersionData 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(GalleryInVmAccessControlProfileVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryInVmAccessControlProfileVersionData(document.RootElement, options); + } + + internal static GalleryInVmAccessControlProfileVersionData DeserializeGalleryInVmAccessControlProfileVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IList targetLocations = default; + bool? excludeFromLatest = default; + DateTimeOffset? publishedDate = default; + GalleryProvisioningState? provisioningState = default; + ReplicationStatus replicationStatus = default; + AccessControlRulesMode? mode = default; + EndpointAccess? defaultAccess = default; + AccessControlRules rules = default; + IDictionary serializedAdditionalRawData = default; + 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("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + 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("targetLocations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(TargetRegion.DeserializeTargetRegion(item, options)); + } + targetLocations = array; + continue; + } + if (property0.NameEquals("excludeFromLatest"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + excludeFromLatest = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("publishedDate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishedDate = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new GalleryProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("replicationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicationStatus = ReplicationStatus.DeserializeReplicationStatus(property0.Value, options); + continue; + } + if (property0.NameEquals("mode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new AccessControlRulesMode(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("defaultAccess"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultAccess = new EndpointAccess(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("rules"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rules = AccessControlRules.DeserializeAccessControlRules(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GalleryInVmAccessControlProfileVersionData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + targetLocations ?? new ChangeTrackingList(), + excludeFromLatest, + publishedDate, + provisioningState, + replicationStatus, + mode, + defaultAccess, + rules, + 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); + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionData)} does not support writing '{options.Format}' format."); + } + } + + GalleryInVmAccessControlProfileVersionData 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); + return DeserializeGalleryInVmAccessControlProfileVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.cs new file mode 100644 index 000000000000..7e40cdec66ff --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionData.cs @@ -0,0 +1,112 @@ +// 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.Compute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute +{ + /// + /// A class representing the GalleryInVmAccessControlProfileVersion data model. + /// Specifies information about the gallery inVMAccessControlProfile version that you want to create or update. + /// + public partial class GalleryInVmAccessControlProfileVersionData : TrackedResourceData + { + /// + /// 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 location. + public GalleryInVmAccessControlProfileVersionData(AzureLocation location) : base(location) + { + TargetLocations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The target regions where the Resource Profile version is going to be replicated to. This property is updatable. + /// If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. + /// The timestamp for when the Resource Profile Version is published. + /// The provisioning state, which only appears in the response. + /// This is the replication status of the gallery image version. + /// This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + /// This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. + /// This is the Access Control Rules specification for an inVMAccessControlProfile version. + /// Keeps track of any properties unknown to the library. + internal GalleryInVmAccessControlProfileVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList targetLocations, bool? excludeFromLatest, DateTimeOffset? publishedOn, GalleryProvisioningState? provisioningState, ReplicationStatus replicationStatus, AccessControlRulesMode? mode, EndpointAccess? defaultAccess, AccessControlRules rules, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + TargetLocations = targetLocations; + ExcludeFromLatest = excludeFromLatest; + PublishedOn = publishedOn; + ProvisioningState = provisioningState; + ReplicationStatus = replicationStatus; + Mode = mode; + DefaultAccess = defaultAccess; + Rules = rules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GalleryInVmAccessControlProfileVersionData() + { + } + + /// The target regions where the Resource Profile version is going to be replicated to. This property is updatable. + public IList TargetLocations { get; } + /// If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. + public bool? ExcludeFromLatest { get; set; } + /// The timestamp for when the Resource Profile Version is published. + public DateTimeOffset? PublishedOn { get; } + /// The provisioning state, which only appears in the response. + public GalleryProvisioningState? ProvisioningState { get; } + /// This is the replication status of the gallery image version. + public ReplicationStatus ReplicationStatus { get; } + /// This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + public AccessControlRulesMode? Mode { get; set; } + /// This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. + public EndpointAccess? DefaultAccess { get; set; } + /// This is the Access Control Rules specification for an inVMAccessControlProfile version. + public AccessControlRules Rules { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.Serialization.cs new file mode 100644 index 000000000000..96fba74516ff --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.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.Compute +{ + public partial class GalleryInVmAccessControlProfileVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GalleryInVmAccessControlProfileVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + GalleryInVmAccessControlProfileVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.cs new file mode 100644 index 000000000000..7aa8d282cb2e --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.cs @@ -0,0 +1,708 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute +{ + /// + /// A Class representing a GalleryInVmAccessControlProfileVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetGalleryInVmAccessControlProfileVersionResource method. + /// Otherwise you can get one from its parent resource using the GetGalleryInVmAccessControlProfileVersion method. + /// + public partial class GalleryInVmAccessControlProfileVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The galleryName. + /// The inVmAccessControlProfileName. + /// The inVmAccessControlProfileVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVmAccessControlProfileName}/versions/{inVmAccessControlProfileVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics; + private readonly GalleryInVMAccessControlProfileVersionsRestOperations _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient; + private readonly GalleryInVmAccessControlProfileVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Compute/galleries/inVMAccessControlProfiles/versions"; + + /// Initializes a new instance of the class for mocking. + protected GalleryInVmAccessControlProfileVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GalleryInVmAccessControlProfileVersionResource(ArmClient client, GalleryInVmAccessControlProfileVersionData 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 GalleryInVmAccessControlProfileVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Compute", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsApiVersion); + _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient = new GalleryInVMAccessControlProfileVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsApiVersion); +#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 GalleryInVmAccessControlProfileVersionData 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)); + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.Get"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.Get"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Delete + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.Delete"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(_galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Delete + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.Delete"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ComputeArmOperation(_galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Update + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Parameters supplied to the update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GalleryInVmAccessControlProfileVersionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.Update"); + scope.Start(); + try + { + var response = await _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileVersionOperationSource(Client), _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a gallery inVMAccessControlProfile version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Update + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Parameters supplied to the update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GalleryInVmAccessControlProfileVersionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.Update"); + scope.Start(); + try + { + var response = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new ComputeArmOperation(new GalleryInVmAccessControlProfileVersionOperationSource(Client), _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics, Pipeline, _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.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 _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GalleryInVmAccessControlProfileVersionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GalleryInVmAccessControlProfileVersionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + 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.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.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 _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GalleryInVmAccessControlProfileVersionPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + 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.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GalleryInVmAccessControlProfileVersionPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.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 _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new GalleryInVmAccessControlProfileVersionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName}/versions/{inVMAccessControlProfileVersionName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfileVersions_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// 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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsClientDiagnostics.CreateScope("GalleryInVmAccessControlProfileVersionResource.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 = _galleryInVmAccessControlProfileVersionGalleryInVmAccessControlProfileVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new GalleryInVmAccessControlProfileVersionResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new GalleryInVmAccessControlProfileVersionPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.cs index 30c82380edf3..b0889ffa45aa 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.cs @@ -114,7 +114,7 @@ public virtual GalleryImageCollection GetGalleryImages() /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetGalleryImageAsync(s /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual GalleryApplicationCollection GetGalleryApplications() /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetGalleryApplic /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -232,6 +232,75 @@ public virtual Response GetGalleryApplication(string return GetGalleryApplications().Get(galleryApplicationName, cancellationToken); } + /// Gets a collection of GalleryInVmAccessControlProfileResources in the Gallery. + /// An object representing collection of GalleryInVmAccessControlProfileResources and their operations over a GalleryInVmAccessControlProfileResource. + public virtual GalleryInVmAccessControlProfileCollection GetGalleryInVmAccessControlProfiles() + { + return GetCachedClient(client => new GalleryInVmAccessControlProfileCollection(client, Id)); + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGalleryInVmAccessControlProfileAsync(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + return await GetGalleryInVmAccessControlProfiles().GetAsync(inVmAccessControlProfileName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieves information about a gallery inVMAccessControlProfile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{inVMAccessControlProfileName} + /// + /// + /// Operation Id + /// GalleryInVMAccessControlProfiles_Get + /// + /// + /// Default Api Version + /// 2024-03-03 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGalleryInVmAccessControlProfile(string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + return GetGalleryInVmAccessControlProfiles().Get(inVmAccessControlProfileName, cancellationToken); + } + /// /// Retrieves information about a Shared Image Gallery. /// @@ -245,7 +314,7 @@ public virtual Response GetGalleryApplication(string /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -287,7 +356,7 @@ public virtual async Task> GetAsync(SelectPermission? /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -329,7 +398,7 @@ public virtual Response Get(SelectPermission? select = null, Ga /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -371,7 +440,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -413,7 +482,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -459,7 +528,7 @@ public virtual async Task> UpdateAsync(WaitUntil w /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -505,7 +574,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Gallery /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// @@ -547,7 +616,7 @@ public virtual async Task> UpdateSharingProfileAsync /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// @@ -589,7 +658,7 @@ public virtual ArmOperation UpdateSharingProfile(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -651,7 +720,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -713,7 +782,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -770,7 +839,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -827,7 +896,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -887,7 +956,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileOperationSource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileOperationSource.cs new file mode 100644 index 000000000000..946495d7d415 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Compute +{ + internal class GalleryInVmAccessControlProfileOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal GalleryInVmAccessControlProfileOperationSource(ArmClient client) + { + _client = client; + } + + GalleryInVmAccessControlProfileResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = GalleryInVmAccessControlProfileData.DeserializeGalleryInVmAccessControlProfileData(document.RootElement); + return new GalleryInVmAccessControlProfileResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = GalleryInVmAccessControlProfileData.DeserializeGalleryInVmAccessControlProfileData(document.RootElement); + return new GalleryInVmAccessControlProfileResource(_client, data); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileVersionOperationSource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileVersionOperationSource.cs new file mode 100644 index 000000000000..6710b31af699 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/LongRunningOperation/GalleryInVmAccessControlProfileVersionOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Compute +{ + internal class GalleryInVmAccessControlProfileVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal GalleryInVmAccessControlProfileVersionOperationSource(ArmClient client) + { + _client = client; + } + + GalleryInVmAccessControlProfileVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = GalleryInVmAccessControlProfileVersionData.DeserializeGalleryInVmAccessControlProfileVersionData(document.RootElement); + return new GalleryInVmAccessControlProfileVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = GalleryInVmAccessControlProfileVersionData.DeserializeGalleryInVmAccessControlProfileVersionData(document.RootElement); + return new GalleryInVmAccessControlProfileVersionResource(_client, data); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.Serialization.cs new file mode 100644 index 000000000000..5684e929e1e3 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.Serialization.cs @@ -0,0 +1,211 @@ +// 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 AccessControlRules : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AccessControlRules)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Privileges)) + { + writer.WritePropertyName("privileges"u8); + writer.WriteStartArray(); + foreach (var item in Privileges) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Roles)) + { + writer.WritePropertyName("roles"u8); + writer.WriteStartArray(); + foreach (var item in Roles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Identities)) + { + writer.WritePropertyName("identities"u8); + writer.WriteStartArray(); + foreach (var item in Identities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RoleAssignments)) + { + writer.WritePropertyName("roleAssignments"u8); + writer.WriteStartArray(); + foreach (var item in RoleAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AccessControlRules 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(AccessControlRules)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccessControlRules(document.RootElement, options); + } + + internal static AccessControlRules DeserializeAccessControlRules(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList privileges = default; + IList roles = default; + IList identities = default; + IList roleAssignments = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("privileges"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AccessControlRulesPrivilege.DeserializeAccessControlRulesPrivilege(item, options)); + } + privileges = array; + continue; + } + if (property.NameEquals("roles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AccessControlRulesRole.DeserializeAccessControlRulesRole(item, options)); + } + roles = array; + continue; + } + if (property.NameEquals("identities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AccessControlRulesIdentity.DeserializeAccessControlRulesIdentity(item, options)); + } + identities = array; + continue; + } + if (property.NameEquals("roleAssignments"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AccessControlRulesRoleAssignment.DeserializeAccessControlRulesRoleAssignment(item, options)); + } + roleAssignments = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccessControlRules(privileges ?? new ChangeTrackingList(), roles ?? new ChangeTrackingList(), identities ?? new ChangeTrackingList(), roleAssignments ?? new ChangeTrackingList(), 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); + default: + throw new FormatException($"The model {nameof(AccessControlRules)} does not support writing '{options.Format}' format."); + } + } + + AccessControlRules 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); + return DeserializeAccessControlRules(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccessControlRules)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.cs new file mode 100644 index 000000000000..5cb588a456b2 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRules.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.Compute.Models +{ + /// This is the Access Control Rules specification for an inVMAccessControlProfile version. + public partial class AccessControlRules + { + /// + /// 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 AccessControlRules() + { + Privileges = new ChangeTrackingList(); + Roles = new ChangeTrackingList(); + Identities = new ChangeTrackingList(); + RoleAssignments = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of privileges. + /// A list of roles. + /// A list of identities. + /// A list of role assignments. + /// Keeps track of any properties unknown to the library. + internal AccessControlRules(IList privileges, IList roles, IList identities, IList roleAssignments, IDictionary serializedAdditionalRawData) + { + Privileges = privileges; + Roles = roles; + Identities = identities; + RoleAssignments = roleAssignments; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of privileges. + public IList Privileges { get; } + /// A list of roles. + public IList Roles { get; } + /// A list of identities. + public IList Identities { get; } + /// A list of role assignments. + public IList RoleAssignments { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.Serialization.cs new file mode 100644 index 000000000000..f01a2758015e --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.Serialization.cs @@ -0,0 +1,169 @@ +// 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 AccessControlRulesIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AccessControlRulesIdentity)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(UserName)) + { + writer.WritePropertyName("userName"u8); + writer.WriteStringValue(UserName); + } + if (Optional.IsDefined(GroupName)) + { + writer.WritePropertyName("groupName"u8); + writer.WriteStringValue(GroupName); + } + if (Optional.IsDefined(ExePath)) + { + writer.WritePropertyName("exePath"u8); + writer.WriteStringValue(ExePath); + } + if (Optional.IsDefined(ProcessName)) + { + writer.WritePropertyName("processName"u8); + writer.WriteStringValue(ProcessName); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AccessControlRulesIdentity 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(AccessControlRulesIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccessControlRulesIdentity(document.RootElement, options); + } + + internal static AccessControlRulesIdentity DeserializeAccessControlRulesIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string userName = default; + string groupName = default; + string exePath = default; + string processName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("userName"u8)) + { + userName = property.Value.GetString(); + continue; + } + if (property.NameEquals("groupName"u8)) + { + groupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("exePath"u8)) + { + exePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("processName"u8)) + { + processName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccessControlRulesIdentity( + name, + userName, + groupName, + exePath, + processName, + 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); + default: + throw new FormatException($"The model {nameof(AccessControlRulesIdentity)} does not support writing '{options.Format}' format."); + } + } + + AccessControlRulesIdentity 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); + return DeserializeAccessControlRulesIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccessControlRulesIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.cs new file mode 100644 index 000000000000..40bd43bda11e --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesIdentity.cs @@ -0,0 +1,91 @@ +// 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 +{ + /// The properties of an Access Control Rule Identity. + public partial class AccessControlRulesIdentity + { + /// + /// 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 name of the identity. + /// is null. + public AccessControlRulesIdentity(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The name of the identity. + /// The username corresponding to this identity. + /// The groupName corresponding to this identity. + /// The path to the executable. + /// The process name of the executable. + /// Keeps track of any properties unknown to the library. + internal AccessControlRulesIdentity(string name, string userName, string groupName, string exePath, string processName, IDictionary serializedAdditionalRawData) + { + Name = name; + UserName = userName; + GroupName = groupName; + ExePath = exePath; + ProcessName = processName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AccessControlRulesIdentity() + { + } + + /// The name of the identity. + public string Name { get; set; } + /// The username corresponding to this identity. + public string UserName { get; set; } + /// The groupName corresponding to this identity. + public string GroupName { get; set; } + /// The path to the executable. + public string ExePath { get; set; } + /// The process name of the executable. + public string ProcessName { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesMode.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesMode.cs new file mode 100644 index 000000000000..5475b90aac1e --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesMode.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.Compute.Models +{ + /// This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + public readonly partial struct AccessControlRulesMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AccessControlRulesMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AuditValue = "Audit"; + private const string EnforceValue = "Enforce"; + private const string DisabledValue = "Disabled"; + + /// Audit. + public static AccessControlRulesMode Audit { get; } = new AccessControlRulesMode(AuditValue); + /// Enforce. + public static AccessControlRulesMode Enforce { get; } = new AccessControlRulesMode(EnforceValue); + /// Disabled. + public static AccessControlRulesMode Disabled { get; } = new AccessControlRulesMode(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(AccessControlRulesMode left, AccessControlRulesMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AccessControlRulesMode left, AccessControlRulesMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AccessControlRulesMode(string value) => new AccessControlRulesMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AccessControlRulesMode other && Equals(other); + /// + public bool Equals(AccessControlRulesMode 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/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.Serialization.cs new file mode 100644 index 000000000000..017e87391c05 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.Serialization.cs @@ -0,0 +1,153 @@ +// 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 AccessControlRulesPrivilege : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AccessControlRulesPrivilege)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + if (Optional.IsCollectionDefined(QueryParameters)) + { + writer.WritePropertyName("queryParameters"u8); + writer.WriteStartObject(); + foreach (var item in QueryParameters) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AccessControlRulesPrivilege 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(AccessControlRulesPrivilege)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccessControlRulesPrivilege(document.RootElement, options); + } + + internal static AccessControlRulesPrivilege DeserializeAccessControlRulesPrivilege(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string path = default; + IDictionary queryParameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("queryParameters"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()); + } + queryParameters = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccessControlRulesPrivilege(name, path, queryParameters ?? new ChangeTrackingDictionary(), 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); + default: + throw new FormatException($"The model {nameof(AccessControlRulesPrivilege)} does not support writing '{options.Format}' format."); + } + } + + AccessControlRulesPrivilege 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); + return DeserializeAccessControlRulesPrivilege(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccessControlRulesPrivilege)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.cs new file mode 100644 index 000000000000..854fd4093b2b --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesPrivilege.cs @@ -0,0 +1,87 @@ +// 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 +{ + /// The properties of an Access Control Rule Privilege. + public partial class AccessControlRulesPrivilege + { + /// + /// 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 name of the privilege. + /// The HTTP path corresponding to the privilege. + /// or is null. + public AccessControlRulesPrivilege(string name, string path) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(path, nameof(path)); + + Name = name; + Path = path; + QueryParameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The name of the privilege. + /// The HTTP path corresponding to the privilege. + /// The query parameters to match in the path. + /// Keeps track of any properties unknown to the library. + internal AccessControlRulesPrivilege(string name, string path, IDictionary queryParameters, IDictionary serializedAdditionalRawData) + { + Name = name; + Path = path; + QueryParameters = queryParameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AccessControlRulesPrivilege() + { + } + + /// The name of the privilege. + public string Name { get; set; } + /// The HTTP path corresponding to the privilege. + public string Path { get; set; } + /// The query parameters to match in the path. + public IDictionary QueryParameters { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.Serialization.cs new file mode 100644 index 000000000000..993c5489c13f --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.Serialization.cs @@ -0,0 +1,137 @@ +// 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 AccessControlRulesRole : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AccessControlRulesRole)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("privileges"u8); + writer.WriteStartArray(); + foreach (var item in Privileges) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AccessControlRulesRole 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(AccessControlRulesRole)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccessControlRulesRole(document.RootElement, options); + } + + internal static AccessControlRulesRole DeserializeAccessControlRulesRole(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IList privileges = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("privileges"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + privileges = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccessControlRulesRole(name, privileges, 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); + default: + throw new FormatException($"The model {nameof(AccessControlRulesRole)} does not support writing '{options.Format}' format."); + } + } + + AccessControlRulesRole 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); + return DeserializeAccessControlRulesRole(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccessControlRulesRole)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.cs new file mode 100644 index 000000000000..ae98505d6607 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRole.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The properties of an Access Control Rule Role. + public partial class AccessControlRulesRole + { + /// + /// 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 name of the role. + /// A list of privileges needed by this role. + /// or is null. + public AccessControlRulesRole(string name, IEnumerable privileges) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(privileges, nameof(privileges)); + + Name = name; + Privileges = privileges.ToList(); + } + + /// Initializes a new instance of . + /// The name of the role. + /// A list of privileges needed by this role. + /// Keeps track of any properties unknown to the library. + internal AccessControlRulesRole(string name, IList privileges, IDictionary serializedAdditionalRawData) + { + Name = name; + Privileges = privileges; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AccessControlRulesRole() + { + } + + /// The name of the role. + public string Name { get; set; } + /// A list of privileges needed by this role. + public IList Privileges { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.Serialization.cs new file mode 100644 index 000000000000..3bb1dca7c84b --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.Serialization.cs @@ -0,0 +1,137 @@ +// 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 AccessControlRulesRoleAssignment : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AccessControlRulesRoleAssignment)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role); + writer.WritePropertyName("identities"u8); + writer.WriteStartArray(); + foreach (var item in Identities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AccessControlRulesRoleAssignment 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(AccessControlRulesRoleAssignment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccessControlRulesRoleAssignment(document.RootElement, options); + } + + internal static AccessControlRulesRoleAssignment DeserializeAccessControlRulesRoleAssignment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string role = default; + IList identities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("role"u8)) + { + role = property.Value.GetString(); + continue; + } + if (property.NameEquals("identities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + identities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccessControlRulesRoleAssignment(role, identities, 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); + default: + throw new FormatException($"The model {nameof(AccessControlRulesRoleAssignment)} does not support writing '{options.Format}' format."); + } + } + + AccessControlRulesRoleAssignment 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); + return DeserializeAccessControlRulesRoleAssignment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccessControlRulesRoleAssignment)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.cs new file mode 100644 index 000000000000..252d7658b1bf --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AccessControlRulesRoleAssignment.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The properties of an Access Control Rule RoleAssignment. + public partial class AccessControlRulesRoleAssignment + { + /// + /// 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 name of the role. + /// A list of identities that can access the privileges defined by the role. + /// or is null. + public AccessControlRulesRoleAssignment(string role, IEnumerable identities) + { + Argument.AssertNotNull(role, nameof(role)); + Argument.AssertNotNull(identities, nameof(identities)); + + Role = role; + Identities = identities.ToList(); + } + + /// Initializes a new instance of . + /// The name of the role. + /// A list of identities that can access the privileges defined by the role. + /// Keeps track of any properties unknown to the library. + internal AccessControlRulesRoleAssignment(string role, IList identities, IDictionary serializedAdditionalRawData) + { + Role = role; + Identities = identities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AccessControlRulesRoleAssignment() + { + } + + /// The name of the role. + public string Role { get; set; } + /// A list of identities that can access the privileges defined by the role. + public IList Identities { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs index 2c4acc4d1409..9bcde2d542dd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. public readonly partial struct DiskDetachOptionType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointAccess.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointAccess.cs new file mode 100644 index 000000000000..2495fdb76109 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointAccess.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 +{ + /// This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. + public readonly partial struct EndpointAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EndpointAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DenyValue = "Deny"; + + /// Allow. + public static EndpointAccess Allow { get; } = new EndpointAccess(AllowValue); + /// Deny. + public static EndpointAccess Deny { get; } = new EndpointAccess(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(EndpointAccess left, EndpointAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EndpointAccess left, EndpointAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EndpointAccess(string value) => new EndpointAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EndpointAccess other && Equals(other); + /// + public bool Equals(EndpointAccess 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/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.Serialization.cs new file mode 100644 index 000000000000..7290748c209b --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Compute.Models +{ + internal static partial class EndpointTypeExtensions + { + public static string ToSerialString(this EndpointType value) => value switch + { + EndpointType.WireServer => "WireServer", + EndpointType.Imds => "IMDS", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EndpointType value.") + }; + + public static EndpointType ToEndpointType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "WireServer")) return EndpointType.WireServer; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "IMDS")) return EndpointType.Imds; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EndpointType value."); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.cs new file mode 100644 index 000000000000..141e9cba9bf8 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/EndpointType.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Compute.Models +{ + /// This property allows you to specify the Endpoint type for which this profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'. + public enum EndpointType + { + /// WireServer. + WireServer, + /// IMDS. + Imds + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.cs index e86ce6f003e2..607ab4855c6c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryImagePatch.cs @@ -73,7 +73,7 @@ public GalleryImagePatch() /// Describes the gallery image definition purchase plan. This is used by marketplace images. /// The provisioning state, which only appears in the response. /// A list of gallery image features. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// Resource tags. /// Keeps track of any properties unknown to the library. internal GalleryImagePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string eula, Uri privacyStatementUri, Uri releaseNoteUri, SupportedOperatingSystemType? osType, OperatingSystemStateType? osState, HyperVGeneration? hyperVGeneration, DateTimeOffset? endOfLifeOn, GalleryImageIdentifier identifier, RecommendedMachineConfiguration recommended, Disallowed disallowed, ImagePurchasePlan purchasePlan, GalleryProvisioningState? provisioningState, IList features, ArchitectureType? architecture, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) @@ -136,7 +136,7 @@ public IList DisallowedDiskTypes public GalleryProvisioningState? ProvisioningState { get; } /// A list of gallery image features. public IList Features { get; } - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. public ArchitectureType? Architecture { get; set; } /// Resource tags. public IDictionary Tags { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.Serialization.cs new file mode 100644 index 000000000000..458f76085fb7 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.Serialization.cs @@ -0,0 +1,140 @@ +// 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 +{ + internal partial class GalleryInVmAccessControlProfileList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileList)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryInVmAccessControlProfileList 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(GalleryInVmAccessControlProfileList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryInVmAccessControlProfileList(document.RootElement, options); + } + + internal static GalleryInVmAccessControlProfileList DeserializeGalleryInVmAccessControlProfileList(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)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GalleryInVmAccessControlProfileData.DeserializeGalleryInVmAccessControlProfileData(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 GalleryInVmAccessControlProfileList(value, nextLink, 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); + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileList)} does not support writing '{options.Format}' format."); + } + } + + GalleryInVmAccessControlProfileList 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); + return DeserializeGalleryInVmAccessControlProfileList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.cs new file mode 100644 index 000000000000..9dc8a1349dda --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The List Gallery InVMAccessControlProfiles operation response. + internal partial class GalleryInVmAccessControlProfileList + { + /// + /// 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 . + /// A list of Gallery InVMAccessControlProfiles. + /// is null. + internal GalleryInVmAccessControlProfileList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// A list of Gallery InVMAccessControlProfiles. + /// The uri to fetch the next page of inVMAccessControlProfiles in the gallery. Call ListNext() with this to fetch the next page of gallery inVMAccessControlProfiles. + /// Keeps track of any properties unknown to the library. + internal GalleryInVmAccessControlProfileList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GalleryInVmAccessControlProfileList() + { + } + + /// A list of Gallery InVMAccessControlProfiles. + public IReadOnlyList Value { get; } + /// The uri to fetch the next page of inVMAccessControlProfiles in the gallery. Call ListNext() with this to fetch the next page of gallery inVMAccessControlProfiles. + public string NextLink { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.Serialization.cs new file mode 100644 index 000000000000..e52404dc4fb4 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.Serialization.cs @@ -0,0 +1,208 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class GalleryInVmAccessControlProfilePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfilePatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryInVmAccessControlProfilePatch 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(GalleryInVmAccessControlProfilePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryInVmAccessControlProfilePatch(document.RootElement, options); + } + + internal static GalleryInVmAccessControlProfilePatch DeserializeGalleryInVmAccessControlProfilePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GalleryInVmAccessControlProfileProperties properties = default; + IDictionary tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = GalleryInVmAccessControlProfileProperties.DeserializeGalleryInVmAccessControlProfileProperties(property.Value, options); + continue; + } + 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("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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GalleryInVmAccessControlProfilePatch( + id, + name, + type, + systemData, + properties, + tags ?? new ChangeTrackingDictionary(), + 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); + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfilePatch)} does not support writing '{options.Format}' format."); + } + } + + GalleryInVmAccessControlProfilePatch 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); + return DeserializeGalleryInVmAccessControlProfilePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfilePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.cs new file mode 100644 index 000000000000..5c3cde2a262a --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfilePatch.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; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Specifies information about the gallery inVMAccessControlProfile that you want to update. + public partial class GalleryInVmAccessControlProfilePatch : 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 . + public GalleryInVmAccessControlProfilePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Describes the properties of a gallery inVMAccessControlProfile. + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal GalleryInVmAccessControlProfilePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GalleryInVmAccessControlProfileProperties properties, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Describes the properties of a gallery inVMAccessControlProfile. + public GalleryInVmAccessControlProfileProperties Properties { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.Serialization.cs new file mode 100644 index 000000000000..4b312af62baa --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.Serialization.cs @@ -0,0 +1,153 @@ +// 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 GalleryInVmAccessControlProfileProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType.ToSerialString()); + writer.WritePropertyName("applicableHostEndpoint"u8); + writer.WriteStringValue(ApplicableHostEndpoint.ToSerialString()); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryInVmAccessControlProfileProperties 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(GalleryInVmAccessControlProfileProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryInVmAccessControlProfileProperties(document.RootElement, options); + } + + internal static GalleryInVmAccessControlProfileProperties DeserializeGalleryInVmAccessControlProfileProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + SupportedOperatingSystemType osType = default; + EndpointType applicableHostEndpoint = default; + GalleryProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = property.Value.GetString().ToSupportedOperatingSystemType(); + continue; + } + if (property.NameEquals("applicableHostEndpoint"u8)) + { + applicableHostEndpoint = property.Value.GetString().ToEndpointType(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new GalleryProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GalleryInVmAccessControlProfileProperties(provisioningState, serializedAdditionalRawData, description, osType, applicableHostEndpoint); + } + + 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); + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileProperties)} does not support writing '{options.Format}' format."); + } + } + + GalleryInVmAccessControlProfileProperties 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); + return DeserializeGalleryInVmAccessControlProfileProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.cs new file mode 100644 index 000000000000..fc1f08a90249 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileProperties.cs @@ -0,0 +1,50 @@ +// 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 gallery inVMAccessControlProfile. + public partial class GalleryInVmAccessControlProfileProperties : GalleryResourceProfilePropertiesBase + { + /// Initializes a new instance of . + /// This property allows you to specify the OS type of the VMs/VMSS for which this profile can be used against. Possible values are: 'Windows' or 'Linux'. + /// This property allows you to specify the Endpoint type for which this profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'. + public GalleryInVmAccessControlProfileProperties(SupportedOperatingSystemType osType, EndpointType applicableHostEndpoint) + { + OSType = osType; + ApplicableHostEndpoint = applicableHostEndpoint; + } + + /// Initializes a new instance of . + /// The provisioning state, which only appears in the response. + /// Keeps track of any properties unknown to the library. + /// The description of this gallery inVMAccessControlProfile resources. This property is updatable. + /// This property allows you to specify the OS type of the VMs/VMSS for which this profile can be used against. Possible values are: 'Windows' or 'Linux'. + /// This property allows you to specify the Endpoint type for which this profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'. + internal GalleryInVmAccessControlProfileProperties(GalleryProvisioningState? provisioningState, IDictionary serializedAdditionalRawData, string description, SupportedOperatingSystemType osType, EndpointType applicableHostEndpoint) : base(provisioningState, serializedAdditionalRawData) + { + Description = description; + OSType = osType; + ApplicableHostEndpoint = applicableHostEndpoint; + } + + /// Initializes a new instance of for deserialization. + internal GalleryInVmAccessControlProfileProperties() + { + } + + /// The description of this gallery inVMAccessControlProfile resources. This property is updatable. + public string Description { get; set; } + /// This property allows you to specify the OS type of the VMs/VMSS for which this profile can be used against. Possible values are: 'Windows' or 'Linux'. + public SupportedOperatingSystemType OSType { get; set; } + /// This property allows you to specify the Endpoint type for which this profile is defining the access control for. Possible values are: 'WireServer' or 'IMDS'. + public EndpointType ApplicableHostEndpoint { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.Serialization.cs new file mode 100644 index 000000000000..08fc4eeabeee --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.Serialization.cs @@ -0,0 +1,140 @@ +// 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 +{ + internal partial class GalleryInVmAccessControlProfileVersionList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionList)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryInVmAccessControlProfileVersionList 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(GalleryInVmAccessControlProfileVersionList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryInVmAccessControlProfileVersionList(document.RootElement, options); + } + + internal static GalleryInVmAccessControlProfileVersionList DeserializeGalleryInVmAccessControlProfileVersionList(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)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GalleryInVmAccessControlProfileVersionData.DeserializeGalleryInVmAccessControlProfileVersionData(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 GalleryInVmAccessControlProfileVersionList(value, nextLink, 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); + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionList)} does not support writing '{options.Format}' format."); + } + } + + GalleryInVmAccessControlProfileVersionList 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); + return DeserializeGalleryInVmAccessControlProfileVersionList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.cs new file mode 100644 index 000000000000..261421824263 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The List Gallery InVMAccessControlProfile Versions operation response. + internal partial class GalleryInVmAccessControlProfileVersionList + { + /// + /// 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 . + /// A list of Gallery InVMAccessControlProfile Versions. + /// is null. + internal GalleryInVmAccessControlProfileVersionList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// A list of Gallery InVMAccessControlProfile Versions. + /// The uri to fetch the next page of inVMAccessControlProfile versions. Call ListNext() with this to fetch the next page of gallery inVMAccessControlProfile versions. + /// Keeps track of any properties unknown to the library. + internal GalleryInVmAccessControlProfileVersionList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GalleryInVmAccessControlProfileVersionList() + { + } + + /// A list of Gallery InVMAccessControlProfile Versions. + public IReadOnlyList Value { get; } + /// The uri to fetch the next page of inVMAccessControlProfile versions. Call ListNext() with this to fetch the next page of gallery inVMAccessControlProfile versions. + public string NextLink { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.Serialization.cs new file mode 100644 index 000000000000..0745eeff1c70 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.Serialization.cs @@ -0,0 +1,345 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class GalleryInVmAccessControlProfileVersionPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionPatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + 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 (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(TargetLocations)) + { + writer.WritePropertyName("targetLocations"u8); + writer.WriteStartArray(); + foreach (var item in TargetLocations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ExcludeFromLatest)) + { + writer.WritePropertyName("excludeFromLatest"u8); + writer.WriteBooleanValue(ExcludeFromLatest.Value); + } + if (options.Format != "W" && Optional.IsDefined(PublishedOn)) + { + writer.WritePropertyName("publishedDate"u8); + writer.WriteStringValue(PublishedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ReplicationStatus)) + { + writer.WritePropertyName("replicationStatus"u8); + writer.WriteObjectValue(ReplicationStatus, options); + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(DefaultAccess)) + { + writer.WritePropertyName("defaultAccess"u8); + writer.WriteStringValue(DefaultAccess.Value.ToString()); + } + if (Optional.IsDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteObjectValue(Rules, options); + } + writer.WriteEndObject(); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryInVmAccessControlProfileVersionPatch 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(GalleryInVmAccessControlProfileVersionPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryInVmAccessControlProfileVersionPatch(document.RootElement, options); + } + + internal static GalleryInVmAccessControlProfileVersionPatch DeserializeGalleryInVmAccessControlProfileVersionPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IList targetLocations = default; + bool? excludeFromLatest = default; + DateTimeOffset? publishedDate = default; + GalleryProvisioningState? provisioningState = default; + ReplicationStatus replicationStatus = default; + AccessControlRulesMode? mode = default; + EndpointAccess? defaultAccess = default; + AccessControlRules rules = default; + IDictionary serializedAdditionalRawData = default; + 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("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("targetLocations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(TargetRegion.DeserializeTargetRegion(item, options)); + } + targetLocations = array; + continue; + } + if (property0.NameEquals("excludeFromLatest"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + excludeFromLatest = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("publishedDate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishedDate = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new GalleryProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("replicationStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicationStatus = ReplicationStatus.DeserializeReplicationStatus(property0.Value, options); + continue; + } + if (property0.NameEquals("mode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new AccessControlRulesMode(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("defaultAccess"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultAccess = new EndpointAccess(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("rules"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rules = AccessControlRules.DeserializeAccessControlRules(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GalleryInVmAccessControlProfileVersionPatch( + id, + name, + type, + systemData, + targetLocations ?? new ChangeTrackingList(), + excludeFromLatest, + publishedDate, + provisioningState, + replicationStatus, + mode, + defaultAccess, + rules, + tags ?? new ChangeTrackingDictionary(), + 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); + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionPatch)} does not support writing '{options.Format}' format."); + } + } + + GalleryInVmAccessControlProfileVersionPatch 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); + return DeserializeGalleryInVmAccessControlProfileVersionPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryInVmAccessControlProfileVersionPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.cs new file mode 100644 index 000000000000..74686907267a --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryInVmAccessControlProfileVersionPatch.cs @@ -0,0 +1,105 @@ +// 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.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Specifies information about the gallery inVMAccessControlProfile version that you want to update. + public partial class GalleryInVmAccessControlProfileVersionPatch : 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 . + public GalleryInVmAccessControlProfileVersionPatch() + { + TargetLocations = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The target regions where the Resource Profile version is going to be replicated to. This property is updatable. + /// If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. + /// The timestamp for when the Resource Profile Version is published. + /// The provisioning state, which only appears in the response. + /// This is the replication status of the gallery image version. + /// This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + /// This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. + /// This is the Access Control Rules specification for an inVMAccessControlProfile version. + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal GalleryInVmAccessControlProfileVersionPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList targetLocations, bool? excludeFromLatest, DateTimeOffset? publishedOn, GalleryProvisioningState? provisioningState, ReplicationStatus replicationStatus, AccessControlRulesMode? mode, EndpointAccess? defaultAccess, AccessControlRules rules, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + TargetLocations = targetLocations; + ExcludeFromLatest = excludeFromLatest; + PublishedOn = publishedOn; + ProvisioningState = provisioningState; + ReplicationStatus = replicationStatus; + Mode = mode; + DefaultAccess = defaultAccess; + Rules = rules; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The target regions where the Resource Profile version is going to be replicated to. This property is updatable. + public IList TargetLocations { get; } + /// If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version. + public bool? ExcludeFromLatest { get; set; } + /// The timestamp for when the Resource Profile Version is published. + public DateTimeOffset? PublishedOn { get; } + /// The provisioning state, which only appears in the response. + public GalleryProvisioningState? ProvisioningState { get; } + /// This is the replication status of the gallery image version. + public ReplicationStatus ReplicationStatus { get; } + /// This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled. Possible values are: 'Audit', 'Enforce' or 'Disabled'. + public AccessControlRulesMode? Mode { get; set; } + /// This property allows you to specify if the requests will be allowed to access the host endpoints. Possible values are: 'Allow', 'Deny'. + public EndpointAccess? DefaultAccess { get; set; } + /// This is the Access Control Rules specification for an inVMAccessControlProfile version. + public AccessControlRules Rules { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.Serialization.cs new file mode 100644 index 000000000000..4252839141df --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.Serialization.cs @@ -0,0 +1,126 @@ +// 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 GalleryResourceProfilePropertiesBase : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GalleryResourceProfilePropertiesBase)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GalleryResourceProfilePropertiesBase 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(GalleryResourceProfilePropertiesBase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGalleryResourceProfilePropertiesBase(document.RootElement, options); + } + + internal static GalleryResourceProfilePropertiesBase DeserializeGalleryResourceProfilePropertiesBase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GalleryProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new GalleryProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GalleryResourceProfilePropertiesBase(provisioningState, 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); + default: + throw new FormatException($"The model {nameof(GalleryResourceProfilePropertiesBase)} does not support writing '{options.Format}' format."); + } + } + + GalleryResourceProfilePropertiesBase 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); + return DeserializeGalleryResourceProfilePropertiesBase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GalleryResourceProfilePropertiesBase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.cs new file mode 100644 index 000000000000..9973bf3bac33 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/GalleryResourceProfilePropertiesBase.cs @@ -0,0 +1,65 @@ +// 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 +{ + /// The properties of a gallery ResourceProfile. + public partial class GalleryResourceProfilePropertiesBase + { + /// + /// 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 protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public GalleryResourceProfilePropertiesBase() + { + } + + /// Initializes a new instance of . + /// The provisioning state, which only appears in the response. + /// Keeps track of any properties unknown to the library. + internal GalleryResourceProfilePropertiesBase(GalleryProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The provisioning state, which only appears in the response. + public GalleryProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedOperatingSystemType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedOperatingSystemType.cs index d61b646253ec..ff8ffe0a8d7f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedOperatingSystemType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SupportedOperatingSystemType.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// This property allows you to specify the supported type of the OS that application is built for. Possible values are: **Windows,** **Linux.**. + /// The Operating System type. public enum SupportedOperatingSystemType { /// Windows. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs index 9be76cb9624b..9261ae73a1a7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs @@ -70,7 +70,7 @@ public VirtualMachineDataDisk(int lun, DiskCreateOptionType createOption) /// Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset. /// Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. /// Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. /// Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. /// Keeps track of any properties unknown to the library. internal VirtualMachineDataDisk(int lun, string name, VirtualHardDisk vhd, VirtualHardDisk image, CachingType? caching, bool? writeAcceleratorEnabled, DiskCreateOptionType createOption, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, WritableSubResource sourceResource, bool? toBeDetached, long? diskIopsReadWrite, long? diskMBpsReadWrite, DiskDetachOptionType? detachOption, DiskDeleteOptionType? deleteOption, IDictionary serializedAdditionalRawData) @@ -160,7 +160,7 @@ public ResourceIdentifier SourceResourceId public long? DiskIopsReadWrite { get; } /// Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. public long? DiskMBpsReadWrite { get; } - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview**. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. public DiskDetachOptionType? DetachOption { get; set; } /// Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. public DiskDeleteOptionType? DeleteOption { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleriesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleriesRestOperations.cs index 775812e39cb8..a5eb8c6dc437 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleriesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleriesRestOperations.cs @@ -31,7 +31,7 @@ public CommunityGalleriesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImageVersionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImageVersionsRestOperations.cs index c31085d33dfb..ba8a6d28bd80 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImageVersionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImageVersionsRestOperations.cs @@ -32,7 +32,7 @@ public CommunityGalleryImageVersionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImagesRestOperations.cs index 8e1dedceafed..20c784944c87 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CommunityGalleryImagesRestOperations.cs @@ -32,7 +32,7 @@ public CommunityGalleryImagesRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleriesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleriesRestOperations.cs index 532b035c9d0f..f199eacf143a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleriesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleriesRestOperations.cs @@ -32,7 +32,7 @@ public GalleriesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationVersionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationVersionsRestOperations.cs index d2905c3efe9a..51861c713bfa 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationVersionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationVersionsRestOperations.cs @@ -32,7 +32,7 @@ public GalleryApplicationVersionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationsRestOperations.cs index 1a82adbfbadd..ee2337626726 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryApplicationsRestOperations.cs @@ -32,7 +32,7 @@ public GalleryApplicationsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImageVersionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImageVersionsRestOperations.cs index 509a1f3bf8de..1de91193079f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImageVersionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImageVersionsRestOperations.cs @@ -32,7 +32,7 @@ public GalleryImageVersionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImagesRestOperations.cs index 4086f6f33df7..0ad941a56b08 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryImagesRestOperations.cs @@ -32,7 +32,7 @@ public GalleryImagesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfileVersionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfileVersionsRestOperations.cs new file mode 100644 index 000000000000..29bd79f8a9ad --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfileVersionsRestOperations.cs @@ -0,0 +1,655 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute +{ + internal partial class GalleryInVMAccessControlProfileVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GalleryInVMAccessControlProfileVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GalleryInVMAccessControlProfileVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-03"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version is to be created. + /// The name of the gallery inVMAccessControlProfile version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version is to be created. + /// The name of the gallery inVMAccessControlProfile version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version is to be updated. + /// The name of the gallery inVMAccessControlProfile version to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + /// Parameters supplied to the update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version is to be updated. + /// The name of the gallery inVMAccessControlProfile version to be updated. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>. + /// Parameters supplied to the update gallery inVMAccessControlProfile version operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, GalleryInVmAccessControlProfileVersionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version resides. + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GalleryInVmAccessControlProfileVersionData.DeserializeGalleryInVmAccessControlProfileVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GalleryInVmAccessControlProfileVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves information about a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version resides. + /// The name of the gallery inVMAccessControlProfile version to be retrieved. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GalleryInVmAccessControlProfileVersionData.DeserializeGalleryInVmAccessControlProfileVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GalleryInVmAccessControlProfileVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(inVmAccessControlProfileVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version resides. + /// The name of the gallery inVMAccessControlProfile version to be deleted. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a gallery inVMAccessControlProfile version. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile in which the inVMAccessControlProfile version resides. + /// The name of the gallery inVMAccessControlProfile version to be deleted. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, string inVmAccessControlProfileVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileVersionName, nameof(inVmAccessControlProfileVersionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, inVmAccessControlProfileVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByGalleryInVmAccessControlProfileRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByGalleryInVmAccessControlProfileRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile from which the inVMAccessControlProfile versions are to be listed. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByGalleryInVmAccessControlProfileAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateListByGalleryInVmAccessControlProfileRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileVersionList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GalleryInVmAccessControlProfileVersionList.DeserializeGalleryInVmAccessControlProfileVersionList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile from which the inVMAccessControlProfile versions are to be listed. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByGalleryInVmAccessControlProfile(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateListByGalleryInVmAccessControlProfileRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileVersionList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GalleryInVmAccessControlProfileVersionList.DeserializeGalleryInVmAccessControlProfileVersionList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByGalleryInVmAccessControlProfileNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByGalleryInVmAccessControlProfileNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + /// The URL to the next page of results. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile from which the inVMAccessControlProfile versions are to be listed. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByGalleryInVmAccessControlProfileNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateListByGalleryInVmAccessControlProfileNextPageRequest(nextLink, subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileVersionList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GalleryInVmAccessControlProfileVersionList.DeserializeGalleryInVmAccessControlProfileVersionList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List gallery inVMAccessControlProfile versions in a gallery inVMAccessControlProfile. + /// The URL to the next page of results. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the inVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile from which the inVMAccessControlProfile versions are to be listed. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByGalleryInVmAccessControlProfileNextPage(string nextLink, string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateListByGalleryInVmAccessControlProfileNextPageRequest(nextLink, subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileVersionList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GalleryInVmAccessControlProfileVersionList.DeserializeGalleryInVmAccessControlProfileVersionList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfilesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfilesRestOperations.cs new file mode 100644 index 000000000000..71479413dfd4 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GalleryInVMAccessControlProfilesRestOperations.cs @@ -0,0 +1,611 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Compute.Models; + +namespace Azure.ResourceManager.Compute +{ + internal partial class GalleryInVMAccessControlProfilesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GalleryInVMAccessControlProfilesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GalleryInVMAccessControlProfilesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-03"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfileData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfileData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + /// The name of the gallery inVMAccessControlProfile to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfileData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be created. + /// The name of the gallery inVMAccessControlProfile to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the create or update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfileData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfilePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfilePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + /// The name of the gallery inVMAccessControlProfile to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfilePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery in which the InVMAccessControlProfile is to be updated. + /// The name of the gallery inVMAccessControlProfile to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + /// Parameters supplied to the update gallery inVMAccessControlProfile operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, GalleryInVmAccessControlProfilePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieves information about a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be retrieved. + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GalleryInVmAccessControlProfileData.DeserializeGalleryInVmAccessControlProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GalleryInVmAccessControlProfileData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves information about a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be retrieved. + /// The name of the gallery inVMAccessControlProfile to be retrieved. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GalleryInVmAccessControlProfileData.DeserializeGalleryInVmAccessControlProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GalleryInVmAccessControlProfileData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles/", false); + uri.AppendPath(inVmAccessControlProfileName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile to be deleted. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a gallery inVMAccessControlProfile. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// he name of the Shared Image Gallery in which the InVMAccessControlProfile resides. + /// The name of the gallery inVMAccessControlProfile to be deleted. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string galleryName, string inVmAccessControlProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + Argument.AssertNotNullOrEmpty(inVmAccessControlProfileName, nameof(inVmAccessControlProfileName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, galleryName, inVmAccessControlProfileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByGalleryRequestUri(string subscriptionId, string resourceGroupName, string galleryName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByGalleryRequest(string subscriptionId, string resourceGroupName, string galleryName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/galleries/", false); + uri.AppendPath(galleryName, true); + uri.AppendPath("/inVMAccessControlProfiles", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List gallery inVMAccessControlProfiles in a gallery. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be listed. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByGalleryAsync(string subscriptionId, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + + using var message = CreateListByGalleryRequest(subscriptionId, resourceGroupName, galleryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GalleryInVmAccessControlProfileList.DeserializeGalleryInVmAccessControlProfileList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List gallery inVMAccessControlProfiles in a gallery. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be listed. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByGallery(string subscriptionId, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + + using var message = CreateListByGalleryRequest(subscriptionId, resourceGroupName, galleryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GalleryInVmAccessControlProfileList.DeserializeGalleryInVmAccessControlProfileList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByGalleryNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string galleryName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByGalleryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string galleryName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List gallery inVMAccessControlProfiles in a gallery. + /// The URL to the next page of results. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be listed. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByGalleryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + + using var message = CreateListByGalleryNextPageRequest(nextLink, subscriptionId, resourceGroupName, galleryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GalleryInVmAccessControlProfileList.DeserializeGalleryInVmAccessControlProfileList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List gallery inVMAccessControlProfiles in a gallery. + /// The URL to the next page of results. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Shared Image Gallery from which the InVMAccessControlProfiles are to be listed. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByGalleryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(galleryName, nameof(galleryName)); + + using var message = CreateListByGalleryNextPageRequest(nextLink, subscriptionId, resourceGroupName, galleryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GalleryInVmAccessControlProfileList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GalleryInVmAccessControlProfileList.DeserializeGalleryInVmAccessControlProfileList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GallerySharingProfileRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GallerySharingProfileRestOperations.cs index 6a4966842bf2..df45713e8223 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GallerySharingProfileRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/GallerySharingProfileRestOperations.cs @@ -31,7 +31,7 @@ public GallerySharingProfileRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleriesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleriesRestOperations.cs index 71bf16f8b885..181d948437ae 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleriesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleriesRestOperations.cs @@ -32,7 +32,7 @@ public SharedGalleriesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImageVersionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImageVersionsRestOperations.cs index 9107ca44b316..c2cc3722cd09 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImageVersionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImageVersionsRestOperations.cs @@ -32,7 +32,7 @@ public SharedGalleryImageVersionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImagesRestOperations.cs index e374e4286d23..44952eeca905 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SharedGalleryImagesRestOperations.cs @@ -32,7 +32,7 @@ public SharedGalleryImagesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-03"; + _apiVersion = apiVersion ?? "2024-03-03"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryCollection.cs index e1d2e1858302..8076a0fc8286 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> GetAsync(string galle /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -161,7 +161,7 @@ public virtual Response Get(string galleryUniqueName, Can /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -192,7 +192,7 @@ public virtual AsyncPageable GetAllAsync(SharedToValue? s /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual Pageable GetAll(SharedToValue? sharedTo = /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string galleryUniqueName, /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Response Exists(string galleryUniqueName, CancellationToken /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageCollection.cs index 3a8098109fdc..50825600431d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual Response Get(string galleryImageName, /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(SharedToVal /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(SharedToValue? shared /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string galleryImageName, C /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string galleryImageName, CancellationToken /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.cs index 14de7ac2e572..9882dd1f716b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageData.cs @@ -39,7 +39,7 @@ internal SharedGalleryImageData() /// The hypervisor generation of the Virtual Machine. Applicable to OS disks only. /// A list of gallery image features. /// Describes the gallery image definition purchase plan. This is used by marketplace images. - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. /// Privacy statement uri for the current community gallery image. /// End-user license agreement for the current community gallery image. /// The artifact tags of a shared gallery resource. @@ -84,7 +84,7 @@ public IList DisallowedDiskTypes public IReadOnlyList Features { get; } /// Describes the gallery image definition purchase plan. This is used by marketplace images. public ImagePurchasePlan PurchasePlan { get; } - /// The architecture of the image. Applicable to OS disks only. + /// CPU architecture supported by an OS disk. public ArchitectureType? Architecture { get; } /// Privacy statement uri for the current community gallery image. public Uri PrivacyStatementUri { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.cs index 002dc1472039..27f3a79062e4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.cs @@ -108,7 +108,7 @@ public virtual SharedGalleryImageVersionCollection GetSharedGalleryImageVersions /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetShared /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetSharedGalleryImage /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionCollection.cs index 37057c725bc9..d9ba86eb4f1a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual Response Get(string galleryIma /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Shar /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(SharedToValue? /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string galleryImageVersion /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string galleryImageVersionName, Cancellatio /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.cs index c2a02a259b6d..3f6f8af338d3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.cs index 5c675d3499cd..1006ee85f337 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.cs @@ -108,7 +108,7 @@ public virtual SharedGalleryImageCollection GetSharedGalleryImages() /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetSharedGallery /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetSharedGalleryImage(string /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-07-03 + /// 2024-03-03 /// /// /// Resource diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index f4a13219b07e..f9850a0dc14b 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/4f68529971f845e8757c2b2a746d78ceb91854cd/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 sample-gen: