diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md index cf4bf63fa859..faa5d96f6071 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md @@ -1,14 +1,13 @@ # Release History -## 1.3.0-beta.4 (Unreleased) +## 1.3.0 (2025-04-22) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Upgraded api-version tag from `package-2022-12` to `package-2025-04`. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/a55917cb512540bc3d0aec760d4e28712c3a4ae0/specification/containerregistry/resource-manager/readme.md. +- Added new classes and methods for the following features + - Connected Registry + - Artifact Cache ## 1.3.0-beta.3 (2025-04-10) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs index 001a15c689c1..f975b6e375ed 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs @@ -120,108 +120,6 @@ protected ContainerRegistryAgentPoolResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class ContainerRegistryArchiveCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryArchiveCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string archiveName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string archiveName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string archiveName, 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 archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string archiveName, 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 ContainerRegistryArchiveData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryArchiveData() { } - public Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceProperties PackageSource { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public string PublishedVersion { get { throw null; } set { } } - public string RepositoryEndpoint { get { throw null; } } - public string RepositoryEndpointPrefix { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData 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.ContainerRegistry.ContainerRegistryArchiveData 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 ContainerRegistryArchiveResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryArchiveResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) { 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 GetContainerRegistryArchiveVersion(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryArchiveVersionAsync(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionCollection GetContainerRegistryArchiveVersions() { throw null; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData 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.ContainerRegistry.ContainerRegistryArchiveData 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.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryArchivePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryArchivePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ContainerRegistryArchiveVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryArchiveVersionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string archiveVersionName, 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 archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string archiveVersionName, 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 ContainerRegistryArchiveVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryArchiveVersionData() { } - public string ArchiveVersionErrorMessage { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData 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.ContainerRegistry.ContainerRegistryArchiveVersionData 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 ContainerRegistryArchiveVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryArchiveVersionResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData 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.ContainerRegistry.ContainerRegistryArchiveVersionData 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, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class ContainerRegistryCacheRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerRegistryCacheRuleCollection() { } @@ -344,7 +242,6 @@ protected ContainerRegistryCredentialSetResource() { } public partial class ContainerRegistryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku) { } - public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataEndpointHostNames { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption Encryption { get { throw null; } set { } } @@ -353,14 +250,12 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } public string LoginServer { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch? MetadataSearch { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } @@ -371,57 +266,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write 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 ContainerRegistryExportPipelineCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryExportPipelineCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string exportPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string exportPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string exportPipelineName, 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 exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string exportPipelineName, 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 ContainerRegistryExportPipelineData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryExportPipelineData() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public System.Collections.Generic.IList Options { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties Target { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData 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.ContainerRegistry.ContainerRegistryExportPipelineData 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 ContainerRegistryExportPipelineResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryExportPipelineResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData 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.ContainerRegistry.ContainerRegistryExportPipelineData 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.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public static partial class ContainerRegistryExtensions { public static Azure.Response CheckContainerRegistryNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -432,14 +276,9 @@ public static partial class ContainerRegistryExtensions public static Azure.AsyncPageable GetContainerRegistriesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetContainerRegistry(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolResource GetContainerRegistryAgentPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveResource GetContainerRegistryArchiveResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionResource GetContainerRegistryArchiveVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static System.Threading.Tasks.Task> GetContainerRegistryAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineResource GetContainerRegistryExportPipelineResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineResource GetContainerRegistryImportPipelineResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunResource GetContainerRegistryPipelineRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionResource GetContainerRegistryPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationResource GetContainerRegistryReplicationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -451,108 +290,6 @@ public static partial class ContainerRegistryExtensions public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryWebhookResource GetContainerRegistryWebhookResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ScopeMapResource GetScopeMapResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } - public partial class ContainerRegistryImportPipelineCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryImportPipelineCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string importPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string importPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string importPipelineName, 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 importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string importPipelineName, 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 ContainerRegistryImportPipelineData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryImportPipelineData() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public System.Collections.Generic.IList Options { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties Source { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? SourceTriggerStatus { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData 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.ContainerRegistry.ContainerRegistryImportPipelineData 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 ContainerRegistryImportPipelineResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryImportPipelineResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData 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.ContainerRegistry.ContainerRegistryImportPipelineData 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.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ContainerRegistryPipelineRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryPipelineRunCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string pipelineRunName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string pipelineRunName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string pipelineRunName, 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 pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string pipelineRunName, 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 ContainerRegistryPipelineRunData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryPipelineRunData() { } - public string ForceUpdateTag { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent Request { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult Response { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData 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.ContainerRegistry.ContainerRegistryPipelineRunData 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 ContainerRegistryPipelineRunResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryPipelineRunResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData 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.ContainerRegistry.ContainerRegistryPipelineRunData 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.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class ContainerRegistryPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerRegistryPrivateEndpointConnectionCollection() { } @@ -724,24 +461,12 @@ protected ContainerRegistryResource() { } public virtual Azure.Response GetContainerRegistryAgentPool(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryAgentPoolAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolCollection GetContainerRegistryAgentPools() { throw null; } - public virtual Azure.Response GetContainerRegistryArchive(string packageType, string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryArchiveAsync(string packageType, string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveCollection GetContainerRegistryArchives(string packageType) { throw null; } public virtual Azure.Response GetContainerRegistryCacheRule(string cacheRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryCacheRuleAsync(string cacheRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRules() { throw null; } public virtual Azure.Response GetContainerRegistryCredentialSet(string credentialSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryCredentialSetAsync(string credentialSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetCollection GetContainerRegistryCredentialSets() { throw null; } - public virtual Azure.Response GetContainerRegistryExportPipeline(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryExportPipelineAsync(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineCollection GetContainerRegistryExportPipelines() { throw null; } - public virtual Azure.Response GetContainerRegistryImportPipeline(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryImportPipelineAsync(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineCollection GetContainerRegistryImportPipelines() { throw null; } - public virtual Azure.Response GetContainerRegistryPipelineRun(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryPipelineRunAsync(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunCollection GetContainerRegistryPipelineRuns() { throw null; } public virtual Azure.Response GetContainerRegistryPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionCollection GetContainerRegistryPrivateEndpointConnections() { throw null; } @@ -779,11 +504,7 @@ protected ContainerRegistryResource() { } public virtual System.Threading.Tasks.Task> RegenerateCredentialAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialRegenerateContent content, 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 ScheduleRun(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation ScheduleRun(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, 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; } @@ -848,12 +569,8 @@ public partial class ContainerRegistryRunResource : Azure.ResourceManager.ArmRes protected ContainerRegistryRunResource() { } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string runId) { 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; } @@ -864,11 +581,7 @@ protected ContainerRegistryRunResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData 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.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -935,11 +648,7 @@ protected ContainerRegistryTaskResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskData 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.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -1168,13 +877,8 @@ public partial class MockableContainerRegistryArmClient : Azure.ResourceManager. protected MockableContainerRegistryArmClient() { } public virtual Azure.ResourceManager.ContainerRegistry.ConnectedRegistryResource GetConnectedRegistryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolResource GetContainerRegistryAgentPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveResource GetContainerRegistryArchiveResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionResource GetContainerRegistryArchiveVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineResource GetContainerRegistryExportPipelineResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineResource GetContainerRegistryImportPipelineResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunResource GetContainerRegistryPipelineRunResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionResource GetContainerRegistryPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationResource GetContainerRegistryReplicationResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1240,35 +944,6 @@ namespace Azure.ResourceManager.ContainerRegistry.Models public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ActionsRequiredForPrivateLinkServiceConsumer left, Azure.ResourceManager.ContainerRegistry.Models.ActionsRequiredForPrivateLinkServiceConsumer right) { throw null; } public override string ToString() { throw null; } } - public partial class ArchivePackageSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ArchivePackageSourceProperties() { } - public Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType? SourceType { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceProperties 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.ContainerRegistry.Models.ArchivePackageSourceProperties 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 ArchivePackageSourceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ArchivePackageSourceType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType Remote { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType 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.ContainerRegistry.Models.ArchivePackageSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType right) { throw null; } - public override string ToString() { throw null; } - } public static partial class ArmContainerRegistryModelFactory { public static Azure.ResourceManager.ContainerRegistry.ConnectedRegistryData ConnectedRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryMode? mode = default(Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryMode?), string version = null, Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryConnectionState? connectionState = default(Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryConnectionState?), System.DateTimeOffset? lastActivityOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryActivationStatus? activationStatus = default(Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryActivationStatus?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryParent parent = null, System.Collections.Generic.IEnumerable clientTokenIds = null, Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryLoginServer loginServer = null, Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryLogging logging = null, System.Collections.Generic.IEnumerable statusDetails = null, System.Collections.Generic.IEnumerable notificationsList = null, Azure.ResourceManager.ContainerRegistry.Models.GarbageCollectionProperties garbageCollection = null) { throw null; } @@ -1277,8 +952,6 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistrySyncProperties ConnectedRegistrySyncProperties(Azure.Core.ResourceIdentifier tokenId = null, string schedule = null, System.TimeSpan? syncWindow = default(System.TimeSpan?), System.TimeSpan messageTtl = default(System.TimeSpan), System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?), string gatewayEndpoint = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolData ContainerRegistryAgentPoolData(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), int? count = default(int?), string tier = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS? os = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS?), Azure.Core.ResourceIdentifier virtualNetworkSubnetResourceId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolQueueStatus ContainerRegistryAgentPoolQueueStatus(int? count = default(int?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData ContainerRegistryArchiveData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceProperties packageSource = null, string publishedVersion = null, string repositoryEndpointPrefix = null, string repositoryEndpoint = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData ContainerRegistryArchiveVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), string archiveVersionErrorMessage = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAuthCredential ContainerRegistryAuthCredential(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialName?), string usernameSecretIdentifier = null, string passwordSecretIdentifier = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialHealth credentialHealth = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageDependency ContainerRegistryBaseImageDependency(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageDependencyType? dependencyType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageDependencyType?), string registry = null, string repository = null, string tag = null, string digest = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerUpdateContent ContainerRegistryBaseImageTriggerUpdateContent(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerType? baseImageTriggerType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerType?), string updateTriggerEndpoint = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUpdateTriggerPayloadType? updateTriggerPayloadType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUpdateTriggerPayloadType?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus?), string name = null) { throw null; } @@ -1287,26 +960,19 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetData ContainerRegistryCredentialSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.Collections.Generic.IEnumerable authCredentials = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(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.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch? metadataSearch = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch?), Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode?)) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(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.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStep ContainerRegistryDockerBuildStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, System.Collections.Generic.IEnumerable imageNames = null, bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string dockerFilePath = null, string target = null, System.Collections.Generic.IEnumerable arguments = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, System.Collections.Generic.IEnumerable values = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData ContainerRegistryExportPipelineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties target = null, System.Collections.Generic.IEnumerable options = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, System.Collections.Generic.IEnumerable values = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryGenerateCredentialsResult ContainerRegistryGenerateCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportImageContent ContainerRegistryImportImageContent(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSource source = null, System.Collections.Generic.IEnumerable targetTags = null, System.Collections.Generic.IEnumerable untaggedTargetRepositories = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportMode? mode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportMode?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData ContainerRegistryImportPipelineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties source = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? sourceTriggerStatus = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus?), System.Collections.Generic.IEnumerable options = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSource ContainerRegistryImportSource(Azure.Core.ResourceIdentifier resourceId = null, string registryAddress = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials credentials = null, string sourceImage = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials ContainerRegistryImportSourceCredentials(string username = null, string password = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = default(bool?), System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType), string resourceGroupName = null, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType)) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPassword ContainerRegistryPassword(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName?), string value = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData ContainerRegistryPipelineRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent request = null, Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult response = null, string forceUpdateTag = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationData ContainerRegistryReplicationData(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.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isRegionEndpointEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?)) { throw null; } @@ -1315,7 +981,6 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData ContainerRegistryRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string runId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunStatus?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunType? runType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunType?), string agentPoolName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? finishOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable outputImages = null, string task = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImageUpdateTrigger imageUpdateTrigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySourceTriggerDescriptor sourceTrigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTimerTriggerDescriptor timerTrigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPlatformProperties platform = null, int? agentCpu = default(int?), string sourceRegistryAuth = null, System.Collections.Generic.IEnumerable customRegistries = null, string runErrorMessage = null, string updateTriggerToken = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImageDescriptor logArtifact = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), bool? isArchiveEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunGetLogResult ContainerRegistryRunGetLogResult(string logLink = null, string logArtifactLink = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku ContainerRegistrySku(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuName name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuName), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier? tier = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy ContainerRegistrySoftDeletePolicy(int? retentionDays = default(int?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySourceTriggerUpdateContent ContainerRegistrySourceTriggerUpdateContent(Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoUpdateContent sourceRepository = null, System.Collections.Generic.IEnumerable sourceTriggerEvents = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus?), string name = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskData ContainerRegistryTaskData(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStatus?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPlatformProperties platform = null, int? agentCpu = default(int?), string agentPoolName = null, int? timeoutInSeconds = default(int?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStepProperties step = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerProperties trigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentials credentials = null, string logTemplate = null, bool? isSystemTask = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskRunData ContainerRegistryTaskRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent runRequest = null, Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData runResult = null, string forceUpdateTag = null) { throw null; } @@ -1337,32 +1002,10 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventResponseMessage ContainerRegistryWebhookEventResponseMessage(string content = null, System.Collections.Generic.IReadOnlyDictionary headers = null, string reasonPhrase = null, string statusCode = null, string version = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventSource ContainerRegistryWebhookEventSource(string addr = null, string instanceId = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventTarget ContainerRegistryWebhookEventTarget(string mediaType = null, long? size = default(long?), string digest = null, long? length = default(long?), string repository = null, System.Uri uri = null, string tag = null, string name = null, string version = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult PipelineRunResult(string status = null, System.Collections.Generic.IEnumerable importedArtifacts = null, string progressPercentage = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? finishOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties source = null, Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties target = null, string catalogDigest = null, System.DateTimeOffset? sourceTriggerTimestamp = default(System.DateTimeOffset?), string pipelineRunErrorMessage = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ScopeMapData ScopeMapData(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 scopeMapType = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), System.Collections.Generic.IEnumerable actions = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.SourceUploadDefinition SourceUploadDefinition(System.Uri uploadUri = null, string relativePath = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AutoGeneratedDomainNameLabelScope(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope Unsecure { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope 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.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectedRegistryActivationStatus : System.IEquatable { private readonly object _dummy; @@ -1510,21 +1153,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectedRegistryPipelineRunContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ConnectedRegistryPipelineRunContent() { } - public System.Collections.Generic.IList Artifacts { get { throw null; } } - public string CatalogDigest { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier PipelineResourceId { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceProperties Source { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetProperties Target { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent 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.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent 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 ConnectedRegistryStatusDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConnectedRegistryStatusDetail() { } @@ -1592,17 +1220,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ContainerRegistryArchivePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryArchivePatch() { } - public string PublishedVersion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryArchivePatch 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.ContainerRegistry.Models.ContainerRegistryArchivePatch 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 ContainerRegistryAuthCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryAuthCredential() { } @@ -1808,8 +1425,6 @@ public partial class ContainerRegistryCredentials : System.ClientModel.Primitive { public ContainerRegistryCredentials() { } public System.Collections.Generic.IDictionary CustomRegistries { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials SourceRegistry { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? SourceRegistryLoginMode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2188,30 +1803,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryMetadataSearch : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryMetadataSearch(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch Disabled { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch 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.ContainerRegistry.Models.ContainerRegistryMetadataSearch left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch right) { throw null; } - public override string ToString() { throw null; } - } public partial class ContainerRegistryNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryNameAvailabilityContent(string name) { } - public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public string Name { get { throw null; } } - public string ResourceGroupName { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType ResourceType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2223,7 +1818,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailableResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryNameAvailableResult() { } - public string AvailableLoginServerName { get { throw null; } } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } @@ -2362,12 +1956,10 @@ public ContainerRegistryPatch() { } public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch? MetadataSearch { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2377,101 +1969,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryPipelineOption : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineOption(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption ContinueOnErrors { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption DeleteSourceBlobOnSuccess { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption OverwriteBlobs { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption OverwriteTags { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption 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.ContainerRegistry.Models.ContainerRegistryPipelineOption left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ContainerRegistryPipelineRunSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryPipelineRunSourceProperties() { } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType? SourceType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceProperties 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.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceProperties 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 ContainerRegistryPipelineRunSourceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineRunSourceType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType AzureStorageBlob { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType 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.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ContainerRegistryPipelineRunTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryPipelineRunTargetProperties() { } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType? TargetType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetProperties 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.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetProperties 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 ContainerRegistryPipelineRunTargetType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineRunTargetType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType AzureStorageBlob { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType 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.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryPipelineSourceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineSourceType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType AzureStorageBlobContainer { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType 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.ContainerRegistry.Models.ContainerRegistryPipelineSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType right) { throw null; } - public override string ToString() { throw null; } - } public partial class ContainerRegistryPlatformProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryPlatformProperties(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS os) { } @@ -2505,7 +2002,6 @@ public ContainerRegistryPolicies() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryExportPolicyStatus? ExportStatus { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? QuarantineStatus { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRetentionPolicy RetentionPolicy { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy SoftDeletePolicy { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTrustPolicy TrustPolicy { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2660,24 +2156,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryRoleAssignmentMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryRoleAssignmentMode(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode 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.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class ContainerRegistryRunArgument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryRunArgument(string name, string value) { } @@ -2853,19 +2331,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier right) { throw null; } public override string ToString() { throw null; } } - public partial class ContainerRegistrySoftDeletePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistrySoftDeletePolicy() { } - public System.DateTimeOffset? LastUpdatedOn { get { throw null; } } - public int? RetentionDays { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? Status { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy 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.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy 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 ContainerRegistrySourceTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistrySourceTrigger(Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoProperties sourceRepository, System.Collections.Generic.IEnumerable sourceTriggerEvents, string name) { } @@ -3574,19 +3039,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ExportPipelineTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ExportPipelineTargetProperties(System.Uri keyVaultUri) { } - public System.Uri KeyVaultUri { get { throw null; } set { } } - public string PipelineTargetType { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties 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.ContainerRegistry.Models.ExportPipelineTargetProperties 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 GarbageCollectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GarbageCollectionProperties() { } @@ -3599,39 +3051,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ImportPipelineSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ImportPipelineSourceProperties(System.Uri keyVaultUri) { } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType? ContainerRegistryPipelineSourceType { get { throw null; } set { } } - public System.Uri KeyVaultUri { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties 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.ContainerRegistry.Models.ImportPipelineSourceProperties 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 PipelineRunResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PipelineRunResult() { } - public string CatalogDigest { get { throw null; } } - public System.DateTimeOffset? FinishOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ImportedArtifacts { get { throw null; } } - public string PipelineRunErrorMessage { get { throw null; } } - public string ProgressPercentage { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties Source { get { throw null; } } - public System.DateTimeOffset? SourceTriggerTimestamp { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public string Status { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties Target { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult 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.ContainerRegistry.Models.PipelineRunResult 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 ScopeMapPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ScopeMapPatch() { } @@ -3738,18 +3157,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.SourceControlType left, Azure.ResourceManager.ContainerRegistry.Models.SourceControlType right) { throw null; } public override string ToString() { throw null; } } - public partial class SourceRegistryCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SourceRegistryCredentials() { } - public string Identity { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? LoginMode { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials 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.ContainerRegistry.Models.SourceRegistryCredentials 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 SourceRegistryLoginMode : System.IEquatable { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs index 001a15c689c1..f975b6e375ed 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs @@ -120,108 +120,6 @@ protected ContainerRegistryAgentPoolResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class ContainerRegistryArchiveCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryArchiveCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string archiveName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string archiveName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string archiveName, 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 archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string archiveName, 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 ContainerRegistryArchiveData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryArchiveData() { } - public Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceProperties PackageSource { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public string PublishedVersion { get { throw null; } set { } } - public string RepositoryEndpoint { get { throw null; } } - public string RepositoryEndpointPrefix { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData 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.ContainerRegistry.ContainerRegistryArchiveData 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 ContainerRegistryArchiveResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryArchiveResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) { 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 GetContainerRegistryArchiveVersion(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryArchiveVersionAsync(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionCollection GetContainerRegistryArchiveVersions() { throw null; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData 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.ContainerRegistry.ContainerRegistryArchiveData 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.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryArchivePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryArchivePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ContainerRegistryArchiveVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryArchiveVersionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string archiveVersionName, 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 archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string archiveVersionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string archiveVersionName, 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 ContainerRegistryArchiveVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryArchiveVersionData() { } - public string ArchiveVersionErrorMessage { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData 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.ContainerRegistry.ContainerRegistryArchiveVersionData 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 ContainerRegistryArchiveVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryArchiveVersionResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData 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.ContainerRegistry.ContainerRegistryArchiveVersionData 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, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class ContainerRegistryCacheRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerRegistryCacheRuleCollection() { } @@ -344,7 +242,6 @@ protected ContainerRegistryCredentialSetResource() { } public partial class ContainerRegistryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku) { } - public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataEndpointHostNames { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption Encryption { get { throw null; } set { } } @@ -353,14 +250,12 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } public string LoginServer { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch? MetadataSearch { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } @@ -371,57 +266,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write 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 ContainerRegistryExportPipelineCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryExportPipelineCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string exportPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string exportPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string exportPipelineName, 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 exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string exportPipelineName, 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 ContainerRegistryExportPipelineData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryExportPipelineData() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public System.Collections.Generic.IList Options { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties Target { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData 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.ContainerRegistry.ContainerRegistryExportPipelineData 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 ContainerRegistryExportPipelineResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryExportPipelineResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData 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.ContainerRegistry.ContainerRegistryExportPipelineData 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.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public static partial class ContainerRegistryExtensions { public static Azure.Response CheckContainerRegistryNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -432,14 +276,9 @@ public static partial class ContainerRegistryExtensions public static Azure.AsyncPageable GetContainerRegistriesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetContainerRegistry(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolResource GetContainerRegistryAgentPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveResource GetContainerRegistryArchiveResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionResource GetContainerRegistryArchiveVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static System.Threading.Tasks.Task> GetContainerRegistryAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineResource GetContainerRegistryExportPipelineResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineResource GetContainerRegistryImportPipelineResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunResource GetContainerRegistryPipelineRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionResource GetContainerRegistryPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationResource GetContainerRegistryReplicationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -451,108 +290,6 @@ public static partial class ContainerRegistryExtensions public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryWebhookResource GetContainerRegistryWebhookResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ScopeMapResource GetScopeMapResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } - public partial class ContainerRegistryImportPipelineCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryImportPipelineCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string importPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string importPipelineName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string importPipelineName, 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 importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string importPipelineName, 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 ContainerRegistryImportPipelineData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryImportPipelineData() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public System.Collections.Generic.IList Options { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties Source { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? SourceTriggerStatus { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData 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.ContainerRegistry.ContainerRegistryImportPipelineData 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 ContainerRegistryImportPipelineResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryImportPipelineResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData 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.ContainerRegistry.ContainerRegistryImportPipelineData 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.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ContainerRegistryPipelineRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ContainerRegistryPipelineRunCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string pipelineRunName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string pipelineRunName, Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string pipelineRunName, 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 pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string pipelineRunName, 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 ContainerRegistryPipelineRunData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryPipelineRunData() { } - public string ForceUpdateTag { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent Request { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult Response { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData 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.ContainerRegistry.ContainerRegistryPipelineRunData 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 ContainerRegistryPipelineRunResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ContainerRegistryPipelineRunResource() { } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName) { 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; } - Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData 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.ContainerRegistry.ContainerRegistryPipelineRunData 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.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class ContainerRegistryPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerRegistryPrivateEndpointConnectionCollection() { } @@ -724,24 +461,12 @@ protected ContainerRegistryResource() { } public virtual Azure.Response GetContainerRegistryAgentPool(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryAgentPoolAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolCollection GetContainerRegistryAgentPools() { throw null; } - public virtual Azure.Response GetContainerRegistryArchive(string packageType, string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryArchiveAsync(string packageType, string archiveName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveCollection GetContainerRegistryArchives(string packageType) { throw null; } public virtual Azure.Response GetContainerRegistryCacheRule(string cacheRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryCacheRuleAsync(string cacheRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRules() { throw null; } public virtual Azure.Response GetContainerRegistryCredentialSet(string credentialSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryCredentialSetAsync(string credentialSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetCollection GetContainerRegistryCredentialSets() { throw null; } - public virtual Azure.Response GetContainerRegistryExportPipeline(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryExportPipelineAsync(string exportPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineCollection GetContainerRegistryExportPipelines() { throw null; } - public virtual Azure.Response GetContainerRegistryImportPipeline(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryImportPipelineAsync(string importPipelineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineCollection GetContainerRegistryImportPipelines() { throw null; } - public virtual Azure.Response GetContainerRegistryPipelineRun(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetContainerRegistryPipelineRunAsync(string pipelineRunName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunCollection GetContainerRegistryPipelineRuns() { throw null; } public virtual Azure.Response GetContainerRegistryPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerRegistryPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionCollection GetContainerRegistryPrivateEndpointConnections() { throw null; } @@ -779,11 +504,7 @@ protected ContainerRegistryResource() { } public virtual System.Threading.Tasks.Task> RegenerateCredentialAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialRegenerateContent content, 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 ScheduleRun(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation ScheduleRun(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, 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; } @@ -848,12 +569,8 @@ public partial class ContainerRegistryRunResource : Azure.ResourceManager.ArmRes protected ContainerRegistryRunResource() { } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string runId) { 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; } @@ -864,11 +581,7 @@ protected ContainerRegistryRunResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData 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.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -935,11 +648,7 @@ protected ContainerRegistryTaskResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskData 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.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -1168,13 +877,8 @@ public partial class MockableContainerRegistryArmClient : Azure.ResourceManager. protected MockableContainerRegistryArmClient() { } public virtual Azure.ResourceManager.ContainerRegistry.ConnectedRegistryResource GetConnectedRegistryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolResource GetContainerRegistryAgentPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveResource GetContainerRegistryArchiveResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionResource GetContainerRegistryArchiveVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineResource GetContainerRegistryExportPipelineResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineResource GetContainerRegistryImportPipelineResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunResource GetContainerRegistryPipelineRunResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionResource GetContainerRegistryPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationResource GetContainerRegistryReplicationResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1240,35 +944,6 @@ namespace Azure.ResourceManager.ContainerRegistry.Models public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ActionsRequiredForPrivateLinkServiceConsumer left, Azure.ResourceManager.ContainerRegistry.Models.ActionsRequiredForPrivateLinkServiceConsumer right) { throw null; } public override string ToString() { throw null; } } - public partial class ArchivePackageSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ArchivePackageSourceProperties() { } - public Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType? SourceType { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceProperties 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.ContainerRegistry.Models.ArchivePackageSourceProperties 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 ArchivePackageSourceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ArchivePackageSourceType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType Remote { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType 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.ContainerRegistry.Models.ArchivePackageSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceType right) { throw null; } - public override string ToString() { throw null; } - } public static partial class ArmContainerRegistryModelFactory { public static Azure.ResourceManager.ContainerRegistry.ConnectedRegistryData ConnectedRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryMode? mode = default(Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryMode?), string version = null, Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryConnectionState? connectionState = default(Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryConnectionState?), System.DateTimeOffset? lastActivityOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryActivationStatus? activationStatus = default(Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryActivationStatus?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryParent parent = null, System.Collections.Generic.IEnumerable clientTokenIds = null, Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryLoginServer loginServer = null, Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryLogging logging = null, System.Collections.Generic.IEnumerable statusDetails = null, System.Collections.Generic.IEnumerable notificationsList = null, Azure.ResourceManager.ContainerRegistry.Models.GarbageCollectionProperties garbageCollection = null) { throw null; } @@ -1277,8 +952,6 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistrySyncProperties ConnectedRegistrySyncProperties(Azure.Core.ResourceIdentifier tokenId = null, string schedule = null, System.TimeSpan? syncWindow = default(System.TimeSpan?), System.TimeSpan messageTtl = default(System.TimeSpan), System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?), string gatewayEndpoint = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryAgentPoolData ContainerRegistryAgentPoolData(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), int? count = default(int?), string tier = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS? os = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS?), Azure.Core.ResourceIdentifier virtualNetworkSubnetResourceId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAgentPoolQueueStatus ContainerRegistryAgentPoolQueueStatus(int? count = default(int?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveData ContainerRegistryArchiveData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ArchivePackageSourceProperties packageSource = null, string publishedVersion = null, string repositoryEndpointPrefix = null, string repositoryEndpoint = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryArchiveVersionData ContainerRegistryArchiveVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), string archiveVersionErrorMessage = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryAuthCredential ContainerRegistryAuthCredential(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialName?), string usernameSecretIdentifier = null, string passwordSecretIdentifier = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialHealth credentialHealth = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageDependency ContainerRegistryBaseImageDependency(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageDependencyType? dependencyType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageDependencyType?), string registry = null, string repository = null, string tag = null, string digest = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerUpdateContent ContainerRegistryBaseImageTriggerUpdateContent(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerType? baseImageTriggerType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryBaseImageTriggerType?), string updateTriggerEndpoint = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUpdateTriggerPayloadType? updateTriggerPayloadType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryUpdateTriggerPayloadType?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus?), string name = null) { throw null; } @@ -1287,26 +960,19 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetData ContainerRegistryCredentialSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.Collections.Generic.IEnumerable authCredentials = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(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.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch? metadataSearch = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch?), Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode?)) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(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.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStep ContainerRegistryDockerBuildStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, System.Collections.Generic.IEnumerable imageNames = null, bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string dockerFilePath = null, string target = null, System.Collections.Generic.IEnumerable arguments = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, System.Collections.Generic.IEnumerable values = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryExportPipelineData ContainerRegistryExportPipelineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties target = null, System.Collections.Generic.IEnumerable options = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, System.Collections.Generic.IEnumerable values = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryGenerateCredentialsResult ContainerRegistryGenerateCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportImageContent ContainerRegistryImportImageContent(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSource source = null, System.Collections.Generic.IEnumerable targetTags = null, System.Collections.Generic.IEnumerable untaggedTargetRepositories = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportMode? mode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportMode?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryImportPipelineData ContainerRegistryImportPipelineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties source = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? sourceTriggerStatus = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus?), System.Collections.Generic.IEnumerable options = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSource ContainerRegistryImportSource(Azure.Core.ResourceIdentifier resourceId = null, string registryAddress = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials credentials = null, string sourceImage = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials ContainerRegistryImportSourceCredentials(string username = null, string password = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = default(bool?), System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType), string resourceGroupName = null, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType)) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPassword ContainerRegistryPassword(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName?), string value = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPipelineRunData ContainerRegistryPipelineRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent request = null, Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult response = null, string forceUpdateTag = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationData ContainerRegistryReplicationData(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.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isRegionEndpointEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?)) { throw null; } @@ -1315,7 +981,6 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData ContainerRegistryRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string runId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunStatus?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunType? runType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunType?), string agentPoolName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? finishOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable outputImages = null, string task = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImageUpdateTrigger imageUpdateTrigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySourceTriggerDescriptor sourceTrigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTimerTriggerDescriptor timerTrigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPlatformProperties platform = null, int? agentCpu = default(int?), string sourceRegistryAuth = null, System.Collections.Generic.IEnumerable customRegistries = null, string runErrorMessage = null, string updateTriggerToken = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImageDescriptor logArtifact = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), bool? isArchiveEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunGetLogResult ContainerRegistryRunGetLogResult(string logLink = null, string logArtifactLink = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku ContainerRegistrySku(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuName name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuName), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier? tier = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy ContainerRegistrySoftDeletePolicy(int? retentionDays = default(int?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySourceTriggerUpdateContent ContainerRegistrySourceTriggerUpdateContent(Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoUpdateContent sourceRepository = null, System.Collections.Generic.IEnumerable sourceTriggerEvents = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerStatus?), string name = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskData ContainerRegistryTaskData(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStatus?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPlatformProperties platform = null, int? agentCpu = default(int?), string agentPoolName = null, int? timeoutInSeconds = default(int?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskStepProperties step = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTriggerProperties trigger = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentials credentials = null, string logTemplate = null, bool? isSystemTask = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskRunData ContainerRegistryTaskRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent runRequest = null, Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData runResult = null, string forceUpdateTag = null) { throw null; } @@ -1337,32 +1002,10 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventResponseMessage ContainerRegistryWebhookEventResponseMessage(string content = null, System.Collections.Generic.IReadOnlyDictionary headers = null, string reasonPhrase = null, string statusCode = null, string version = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventSource ContainerRegistryWebhookEventSource(string addr = null, string instanceId = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryWebhookEventTarget ContainerRegistryWebhookEventTarget(string mediaType = null, long? size = default(long?), string digest = null, long? length = default(long?), string repository = null, System.Uri uri = null, string tag = null, string name = null, string version = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult PipelineRunResult(string status = null, System.Collections.Generic.IEnumerable importedArtifacts = null, string progressPercentage = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? finishOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties source = null, Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties target = null, string catalogDigest = null, System.DateTimeOffset? sourceTriggerTimestamp = default(System.DateTimeOffset?), string pipelineRunErrorMessage = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ScopeMapData ScopeMapData(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 scopeMapType = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), System.Collections.Generic.IEnumerable actions = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.SourceUploadDefinition SourceUploadDefinition(System.Uri uploadUri = null, string relativePath = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AutoGeneratedDomainNameLabelScope(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope Unsecure { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope 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.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectedRegistryActivationStatus : System.IEquatable { private readonly object _dummy; @@ -1510,21 +1153,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectedRegistryPipelineRunContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ConnectedRegistryPipelineRunContent() { } - public System.Collections.Generic.IList Artifacts { get { throw null; } } - public string CatalogDigest { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier PipelineResourceId { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceProperties Source { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetProperties Target { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent 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.ContainerRegistry.Models.ConnectedRegistryPipelineRunContent 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 ConnectedRegistryStatusDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConnectedRegistryStatusDetail() { } @@ -1592,17 +1220,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ContainerRegistryArchivePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryArchivePatch() { } - public string PublishedVersion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryArchivePatch 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.ContainerRegistry.Models.ContainerRegistryArchivePatch 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 ContainerRegistryAuthCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryAuthCredential() { } @@ -1808,8 +1425,6 @@ public partial class ContainerRegistryCredentials : System.ClientModel.Primitive { public ContainerRegistryCredentials() { } public System.Collections.Generic.IDictionary CustomRegistries { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials SourceRegistry { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? SourceRegistryLoginMode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2188,30 +1803,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryMetadataSearch : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryMetadataSearch(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch Disabled { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch 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.ContainerRegistry.Models.ContainerRegistryMetadataSearch left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch right) { throw null; } - public override string ToString() { throw null; } - } public partial class ContainerRegistryNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryNameAvailabilityContent(string name) { } - public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public string Name { get { throw null; } } - public string ResourceGroupName { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType ResourceType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2223,7 +1818,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailableResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryNameAvailableResult() { } - public string AvailableLoginServerName { get { throw null; } } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } @@ -2362,12 +1956,10 @@ public ContainerRegistryPatch() { } public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryMetadataSearch? MetadataSearch { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2377,101 +1969,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryPipelineOption : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineOption(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption ContinueOnErrors { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption DeleteSourceBlobOnSuccess { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption OverwriteBlobs { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption OverwriteTags { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption 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.ContainerRegistry.Models.ContainerRegistryPipelineOption left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineOption right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ContainerRegistryPipelineRunSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryPipelineRunSourceProperties() { } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType? SourceType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceProperties 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.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceProperties 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 ContainerRegistryPipelineRunSourceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineRunSourceType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType AzureStorageBlob { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType 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.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunSourceType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ContainerRegistryPipelineRunTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistryPipelineRunTargetProperties() { } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType? TargetType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetProperties 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.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetProperties 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 ContainerRegistryPipelineRunTargetType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineRunTargetType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType AzureStorageBlob { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType 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.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineRunTargetType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryPipelineSourceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryPipelineSourceType(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType AzureStorageBlobContainer { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType 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.ContainerRegistry.Models.ContainerRegistryPipelineSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType right) { throw null; } - public override string ToString() { throw null; } - } public partial class ContainerRegistryPlatformProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryPlatformProperties(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryOS os) { } @@ -2505,7 +2002,6 @@ public ContainerRegistryPolicies() { } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryExportPolicyStatus? ExportStatus { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? QuarantineStatus { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRetentionPolicy RetentionPolicy { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy SoftDeletePolicy { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTrustPolicy TrustPolicy { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2660,24 +2156,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerRegistryRoleAssignmentMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ContainerRegistryRoleAssignmentMode(string value) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get { throw null; } } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode 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.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class ContainerRegistryRunArgument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryRunArgument(string name, string value) { } @@ -2853,19 +2331,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySkuTier right) { throw null; } public override string ToString() { throw null; } } - public partial class ContainerRegistrySoftDeletePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContainerRegistrySoftDeletePolicy() { } - public System.DateTimeOffset? LastUpdatedOn { get { throw null; } } - public int? RetentionDays { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? Status { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy 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.ContainerRegistry.Models.ContainerRegistrySoftDeletePolicy 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 ContainerRegistrySourceTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistrySourceTrigger(Azure.ResourceManager.ContainerRegistry.Models.SourceCodeRepoProperties sourceRepository, System.Collections.Generic.IEnumerable sourceTriggerEvents, string name) { } @@ -3574,19 +3039,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ExportPipelineTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ExportPipelineTargetProperties(System.Uri keyVaultUri) { } - public System.Uri KeyVaultUri { get { throw null; } set { } } - public string PipelineTargetType { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties 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.ContainerRegistry.Models.ExportPipelineTargetProperties 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 GarbageCollectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GarbageCollectionProperties() { } @@ -3599,39 +3051,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ImportPipelineSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ImportPipelineSourceProperties(System.Uri keyVaultUri) { } - public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPipelineSourceType? ContainerRegistryPipelineSourceType { get { throw null; } set { } } - public System.Uri KeyVaultUri { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties 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.ContainerRegistry.Models.ImportPipelineSourceProperties 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 PipelineRunResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PipelineRunResult() { } - public string CatalogDigest { get { throw null; } } - public System.DateTimeOffset? FinishOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ImportedArtifacts { get { throw null; } } - public string PipelineRunErrorMessage { get { throw null; } } - public string ProgressPercentage { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ImportPipelineSourceProperties Source { get { throw null; } } - public System.DateTimeOffset? SourceTriggerTimestamp { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public string Status { get { throw null; } } - public Azure.ResourceManager.ContainerRegistry.Models.ExportPipelineTargetProperties Target { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.PipelineRunResult 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.ContainerRegistry.Models.PipelineRunResult 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 ScopeMapPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ScopeMapPatch() { } @@ -3738,18 +3157,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.SourceControlType left, Azure.ResourceManager.ContainerRegistry.Models.SourceControlType right) { throw null; } public override string ToString() { throw null; } } - public partial class SourceRegistryCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SourceRegistryCredentials() { } - public string Identity { get { throw null; } set { } } - public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? LoginMode { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials 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.ContainerRegistry.Models.SourceRegistryCredentials 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 SourceRegistryLoginMode : System.IEquatable { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryCollection.cs index c464df9b1ce8..3675d11bf38e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ConnectedRegistryCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConnectedRegistryCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryCreate.json // this example is just showing the usage of "ConnectedRegistries_Create" 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 @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_ConnectedRegistryCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_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 @@ -106,7 +106,7 @@ public async Task Get_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ConnectedRegistryList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryList.json // this example is just showing the usage of "ConnectedRegistries_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 @@ -142,7 +142,7 @@ public async Task GetAll_ConnectedRegistryList() [Ignore("Only validating compilation of examples")] public async Task Exists_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_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 Exists_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryResource.cs index 65ce1558483b..c1d32285195b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ConnectedRegistryResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ConnectedRegistryResource [Ignore("Only validating compilation of examples")] public async Task Get_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_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 @@ -52,7 +52,7 @@ public async Task Get_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ConnectedRegistryDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryDelete.json // this example is just showing the usage of "ConnectedRegistries_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 @@ -79,7 +79,7 @@ public async Task Delete_ConnectedRegistryDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ConnectedRegistryUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryUpdate.json // this example is just showing the usage of "ConnectedRegistries_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 @@ -132,7 +132,7 @@ public async Task Update_ConnectedRegistryUpdate() [Ignore("Only validating compilation of examples")] public async Task Deactivate_ConnectedRegistryDeactivate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ConnectedRegistryDeactivate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryDeactivate.json // this example is just showing the usage of "ConnectedRegistries_Deactivate" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs index 14682ceffbd7..ad75e750ca85 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryAgentPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AgentPoolsCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsCreate.json // this example is just showing the usage of "AgentPools_Create" 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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_AgentPoolsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_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 @@ -99,7 +99,7 @@ public async Task Get_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AgentPoolsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsList.json // this example is just showing the usage of "AgentPools_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 @@ -135,7 +135,7 @@ public async Task GetAll_AgentPoolsList() [Ignore("Only validating compilation of examples")] public async Task Exists_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_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 @@ -165,7 +165,7 @@ public async Task Exists_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs index a9271e392046..5ffb01eff778 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryAgentPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_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 @@ -51,7 +51,7 @@ public async Task Get_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AgentPoolsDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsDelete.json // this example is just showing the usage of "AgentPools_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 @@ -78,7 +78,7 @@ public async Task Delete_AgentPoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AgentPoolsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsUpdate.json // this example is just showing the usage of "AgentPools_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 @@ -114,7 +114,7 @@ public async Task Update_AgentPoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetQueueStatus_AgentPoolsGetQueueStatus() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/AgentPoolsGetQueueStatus.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGetQueueStatus.json // this example is just showing the usage of "AgentPools_GetQueueStatus" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveCollection.cs deleted file mode 100644 index e63f76d09e1f..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveCollection.cs +++ /dev/null @@ -1,211 +0,0 @@ -// 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.ContainerRegistry.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryArchiveCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_ArchiveCreate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveCreate.json - // this example is just showing the usage of "Archives_Create" 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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryArchiveResource - string packageType = "rpm"; - ContainerRegistryArchiveCollection collection = containerRegistry.GetContainerRegistryArchives(packageType); - - // invoke the operation - string archiveName = "myArchiveName"; - ContainerRegistryArchiveData data = new ContainerRegistryArchiveData - { - PackageSource = new ArchivePackageSourceProperties - { - SourceType = ArchivePackageSourceType.Remote, - Uri = new Uri("string"), - }, - PublishedVersion = "string", - RepositoryEndpointPrefix = "string", - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, archiveName, data); - ContainerRegistryArchiveResource 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 - ContainerRegistryArchiveData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ArchiveGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveGet.json - // this example is just showing the usage of "Archives_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryArchiveResource - string packageType = "myPackageType"; - ContainerRegistryArchiveCollection collection = containerRegistry.GetContainerRegistryArchives(packageType); - - // invoke the operation - string archiveName = "myArchiveName"; - ContainerRegistryArchiveResource result = await collection.GetAsync(archiveName); - - // 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 - ContainerRegistryArchiveData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ArchiveList() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveList.json - // this example is just showing the usage of "Archives_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryArchiveResource - string packageType = "myPackageType"; - ContainerRegistryArchiveCollection collection = containerRegistry.GetContainerRegistryArchives(packageType); - - // invoke the operation and iterate over the result - await foreach (ContainerRegistryArchiveResource 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 - ContainerRegistryArchiveData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_ArchiveGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveGet.json - // this example is just showing the usage of "Archives_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryArchiveResource - string packageType = "myPackageType"; - ContainerRegistryArchiveCollection collection = containerRegistry.GetContainerRegistryArchives(packageType); - - // invoke the operation - string archiveName = "myArchiveName"; - bool result = await collection.ExistsAsync(archiveName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_ArchiveGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveGet.json - // this example is just showing the usage of "Archives_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryArchiveResource - string packageType = "myPackageType"; - ContainerRegistryArchiveCollection collection = containerRegistry.GetContainerRegistryArchives(packageType); - - // invoke the operation - string archiveName = "myArchiveName"; - NullableResponse response = await collection.GetIfExistsAsync(archiveName); - ContainerRegistryArchiveResource 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 - ContainerRegistryArchiveData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveResource.cs deleted file mode 100644 index 809048a05b6e..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveResource.cs +++ /dev/null @@ -1,115 +0,0 @@ -// 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.ContainerRegistry.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryArchiveResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ArchiveGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveGet.json - // this example is just showing the usage of "Archives_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 ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "myPackageType"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // invoke the operation - ContainerRegistryArchiveResource result = await containerRegistryArchive.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 - ContainerRegistryArchiveData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_ArchiveDelete() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveDelete.json - // this example is just showing the usage of "Archives_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 ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "myPackageType"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // invoke the operation - await containerRegistryArchive.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_ArchiveUpdate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveUpdate.json - // this example is just showing the usage of "Archives_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 ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "myPackageType"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // invoke the operation - ContainerRegistryArchivePatch patch = new ContainerRegistryArchivePatch - { - PublishedVersion = "string", - }; - ContainerRegistryArchiveResource result = await containerRegistryArchive.UpdateAsync(patch); - - // 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 - ContainerRegistryArchiveData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveVersionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveVersionCollection.cs deleted file mode 100644 index cb33d95e0e75..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveVersionCollection.cs +++ /dev/null @@ -1,205 +0,0 @@ -// 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 NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryArchiveVersionCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_ArchiveVersionCreate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionCreate.json - // this example is just showing the usage of "ArchiveVersions_Create" 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 ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "rpm"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // get the collection of this ContainerRegistryArchiveVersionResource - ContainerRegistryArchiveVersionCollection collection = containerRegistryArchive.GetContainerRegistryArchiveVersions(); - - // invoke the operation - string archiveVersionName = "myArchiveVersionName"; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, archiveVersionName); - ContainerRegistryArchiveVersionResource 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 - ContainerRegistryArchiveVersionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ArchiveVersionGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionGet.json - // this example is just showing the usage of "ArchiveVersions_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 ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "rpm"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // get the collection of this ContainerRegistryArchiveVersionResource - ContainerRegistryArchiveVersionCollection collection = containerRegistryArchive.GetContainerRegistryArchiveVersions(); - - // invoke the operation - string archiveVersionName = "myArchiveVersionName"; - ContainerRegistryArchiveVersionResource result = await collection.GetAsync(archiveVersionName); - - // 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 - ContainerRegistryArchiveVersionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ArchiveVersionList() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionList.json - // this example is just showing the usage of "ArchiveVersions_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "myPackageType"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // get the collection of this ContainerRegistryArchiveVersionResource - ContainerRegistryArchiveVersionCollection collection = containerRegistryArchive.GetContainerRegistryArchiveVersions(); - - // invoke the operation and iterate over the result - await foreach (ContainerRegistryArchiveVersionResource 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 - ContainerRegistryArchiveVersionData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_ArchiveVersionGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionGet.json - // this example is just showing the usage of "ArchiveVersions_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 ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "rpm"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // get the collection of this ContainerRegistryArchiveVersionResource - ContainerRegistryArchiveVersionCollection collection = containerRegistryArchive.GetContainerRegistryArchiveVersions(); - - // invoke the operation - string archiveVersionName = "myArchiveVersionName"; - bool result = await collection.ExistsAsync(archiveVersionName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_ArchiveVersionGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionGet.json - // this example is just showing the usage of "ArchiveVersions_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 ContainerRegistryArchiveResource created on azure - // for more information of creating ContainerRegistryArchiveResource, please refer to the document of ContainerRegistryArchiveResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "rpm"; - string archiveName = "myArchiveName"; - ResourceIdentifier containerRegistryArchiveResourceId = ContainerRegistryArchiveResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - ContainerRegistryArchiveResource containerRegistryArchive = client.GetContainerRegistryArchiveResource(containerRegistryArchiveResourceId); - - // get the collection of this ContainerRegistryArchiveVersionResource - ContainerRegistryArchiveVersionCollection collection = containerRegistryArchive.GetContainerRegistryArchiveVersions(); - - // invoke the operation - string archiveVersionName = "myArchiveVersionName"; - NullableResponse response = await collection.GetIfExistsAsync(archiveVersionName); - ContainerRegistryArchiveVersionResource 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 - ContainerRegistryArchiveVersionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveVersionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveVersionResource.cs deleted file mode 100644 index d643141701f5..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryArchiveVersionResource.cs +++ /dev/null @@ -1,114 +0,0 @@ -// 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 NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryArchiveVersionResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ArchiveVersionGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionGet.json - // this example is just showing the usage of "ArchiveVersions_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 ContainerRegistryArchiveVersionResource created on azure - // for more information of creating ContainerRegistryArchiveVersionResource, please refer to the document of ContainerRegistryArchiveVersionResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "rpm"; - string archiveName = "myArchiveName"; - string archiveVersionName = "myArchiveVersionName"; - ResourceIdentifier containerRegistryArchiveVersionResourceId = ContainerRegistryArchiveVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - ContainerRegistryArchiveVersionResource containerRegistryArchiveVersion = client.GetContainerRegistryArchiveVersionResource(containerRegistryArchiveVersionResourceId); - - // invoke the operation - ContainerRegistryArchiveVersionResource result = await containerRegistryArchiveVersion.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 - ContainerRegistryArchiveVersionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_ArchiveVersionDelete() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionDelete.json - // this example is just showing the usage of "ArchiveVersions_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 ContainerRegistryArchiveVersionResource created on azure - // for more information of creating ContainerRegistryArchiveVersionResource, please refer to the document of ContainerRegistryArchiveVersionResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "myPackageType"; - string archiveName = "myArchiveName"; - string archiveVersionName = "myArchiveVersionName"; - ResourceIdentifier containerRegistryArchiveVersionResourceId = ContainerRegistryArchiveVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - ContainerRegistryArchiveVersionResource containerRegistryArchiveVersion = client.GetContainerRegistryArchiveVersionResource(containerRegistryArchiveVersionResourceId); - - // invoke the operation - await containerRegistryArchiveVersion.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_ArchiveVersionCreate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ArchiveVersionCreate.json - // this example is just showing the usage of "ArchiveVersions_Create" 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 ContainerRegistryArchiveVersionResource created on azure - // for more information of creating ContainerRegistryArchiveVersionResource, please refer to the document of ContainerRegistryArchiveVersionResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string packageType = "rpm"; - string archiveName = "myArchiveName"; - string archiveVersionName = "myArchiveVersionName"; - ResourceIdentifier containerRegistryArchiveVersionResourceId = ContainerRegistryArchiveVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - ContainerRegistryArchiveVersionResource containerRegistryArchiveVersion = client.GetContainerRegistryArchiveVersionResource(containerRegistryArchiveVersionResourceId); - - // invoke the operation - ArmOperation lro = await containerRegistryArchiveVersion.UpdateAsync(WaitUntil.Completed); - ContainerRegistryArchiveVersionResource 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 - ContainerRegistryArchiveVersionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs index db9de2c7f2de..e9e064a461f5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryCacheRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CacheRuleCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleCreate.json // this example is just showing the usage of "CacheRules_Create" 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 CreateOrUpdate_CacheRuleCreate() [Ignore("Only validating compilation of examples")] public async Task Get_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_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 @@ -94,7 +94,7 @@ public async Task Get_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CacheRuleList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleList.json // this example is just showing the usage of "CacheRules_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 @@ -130,7 +130,7 @@ public async Task GetAll_CacheRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_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 @@ -160,7 +160,7 @@ public async Task Exists_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs index 45f72350754a..a6831a1cc2bc 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryCacheRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_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 @@ -51,7 +51,7 @@ public async Task Get_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CacheRuleDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleDelete.json // this example is just showing the usage of "CacheRules_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 @@ -78,7 +78,7 @@ public async Task Delete_CacheRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CacheRuleUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CacheRuleUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleUpdate.json // this example is just showing the usage of "CacheRules_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCollection.cs index d5ab8da74a73..ce02908cbf4a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RegistryCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCreate.json // this example is just showing the usage of "Registries_Create" 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 @@ -59,95 +59,11 @@ public async Task CreateOrUpdate_RegistryCreate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_RegistryCreateAbac() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryCreateAbac.json - // this example is just showing the usage of "Registries_Create" 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 ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ContainerRegistryResource - ContainerRegistryCollection collection = resourceGroupResource.GetContainerRegistries(); - - // invoke the operation - string registryName = "myRegistry"; - ContainerRegistryData data = new ContainerRegistryData(new AzureLocation("westus"), new ContainerRegistrySku(ContainerRegistrySkuName.Standard)) - { - RoleAssignmentMode = ContainerRegistryRoleAssignmentMode.AbacRepositoryPermissions, - Tags = -{ -["key"] = "value" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, registryName, data); - ContainerRegistryResource 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 - ContainerRegistryData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_RegistryCreateDomainNameLabelScope() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryCreateDomainNameLabelScope.json - // this example is just showing the usage of "Registries_Create" 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 ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ContainerRegistryResource - ContainerRegistryCollection collection = resourceGroupResource.GetContainerRegistries(); - - // invoke the operation - string registryName = "myRegistry"; - ContainerRegistryData data = new ContainerRegistryData(new AzureLocation("westus"), new ContainerRegistrySku(ContainerRegistrySkuName.Standard)) - { - AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.TenantReuse, - Tags = -{ -["key"] = "value" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, registryName, data); - ContainerRegistryResource 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 - ContainerRegistryData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RegistryCreateZoneRedundant() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryCreateZoneRedundant.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCreateZoneRedundant.json // this example is just showing the usage of "Registries_Create" 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 @@ -189,7 +105,7 @@ public async Task CreateOrUpdate_RegistryCreateZoneRedundant() [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_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 @@ -222,7 +138,7 @@ public async Task Get_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RegistryListByResourceGroup() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryListByResourceGroup.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListByResourceGroup.json // this example is just showing the usage of "Registries_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 @@ -257,7 +173,7 @@ public async Task GetAll_RegistryListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_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 @@ -286,7 +202,7 @@ public async Task Exists_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs index f566020d7e22..1ae1de6aa41a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryCredentialSetCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CredentialSetCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetCreate.json // this example is just showing the usage of "CredentialSets_Create" 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 @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_CredentialSetCreate() [Ignore("Only validating compilation of examples")] public async Task Get_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_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 @@ -101,7 +101,7 @@ public async Task Get_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CredentialSetList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetList.json // this example is just showing the usage of "CredentialSets_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 @@ -137,7 +137,7 @@ public async Task GetAll_CredentialSetList() [Ignore("Only validating compilation of examples")] public async Task Exists_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_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 @@ -167,7 +167,7 @@ public async Task Exists_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs index ac7dc39f6c61..86ab0f3a2022 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryCredentialSetResource [Ignore("Only validating compilation of examples")] public async Task Get_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_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 @@ -51,7 +51,7 @@ public async Task Get_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CredentialSetDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetDelete.json // this example is just showing the usage of "CredentialSets_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 @@ -78,7 +78,7 @@ public async Task Delete_CredentialSetDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CredentialSetUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/CredentialSetUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetUpdate.json // this example is just showing the usage of "CredentialSets_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryExportPipelineCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryExportPipelineCollection.cs deleted file mode 100644 index e7e3eba9671d..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryExportPipelineCollection.cs +++ /dev/null @@ -1,208 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryExportPipelineCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_ExportPipelineCreate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineCreate.json - // this example is just showing the usage of "ExportPipelines_Create" 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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryExportPipelineResource - ContainerRegistryExportPipelineCollection collection = containerRegistry.GetContainerRegistryExportPipelines(); - - // invoke the operation - string exportPipelineName = "myExportPipeline"; - ContainerRegistryExportPipelineData data = new ContainerRegistryExportPipelineData - { - Location = new AzureLocation("westus"), - Identity = new ManagedServiceIdentity("SystemAssigned"), - Target = new ExportPipelineTargetProperties(new Uri("https://myvault.vault.azure.net/secrets/acrexportsas")) - { - PipelineTargetType = "AzureStorageBlobContainer", - Uri = new Uri("https://accountname.blob.core.windows.net/containername"), - }, - Options = { ContainerRegistryPipelineOption.OverwriteBlobs }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, exportPipelineName, data); - ContainerRegistryExportPipelineResource 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 - ContainerRegistryExportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ExportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineGet.json - // this example is just showing the usage of "ExportPipelines_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryExportPipelineResource - ContainerRegistryExportPipelineCollection collection = containerRegistry.GetContainerRegistryExportPipelines(); - - // invoke the operation - string exportPipelineName = "myExportPipeline"; - ContainerRegistryExportPipelineResource result = await collection.GetAsync(exportPipelineName); - - // 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 - ContainerRegistryExportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ExportPipelineList() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineList.json - // this example is just showing the usage of "ExportPipelines_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryExportPipelineResource - ContainerRegistryExportPipelineCollection collection = containerRegistry.GetContainerRegistryExportPipelines(); - - // invoke the operation and iterate over the result - await foreach (ContainerRegistryExportPipelineResource 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 - ContainerRegistryExportPipelineData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_ExportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineGet.json - // this example is just showing the usage of "ExportPipelines_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryExportPipelineResource - ContainerRegistryExportPipelineCollection collection = containerRegistry.GetContainerRegistryExportPipelines(); - - // invoke the operation - string exportPipelineName = "myExportPipeline"; - bool result = await collection.ExistsAsync(exportPipelineName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_ExportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineGet.json - // this example is just showing the usage of "ExportPipelines_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryExportPipelineResource - ContainerRegistryExportPipelineCollection collection = containerRegistry.GetContainerRegistryExportPipelines(); - - // invoke the operation - string exportPipelineName = "myExportPipeline"; - NullableResponse response = await collection.GetIfExistsAsync(exportPipelineName); - ContainerRegistryExportPipelineResource 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 - ContainerRegistryExportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryExportPipelineResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryExportPipelineResource.cs deleted file mode 100644 index 222669b75638..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryExportPipelineResource.cs +++ /dev/null @@ -1,121 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryExportPipelineResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ExportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineGet.json - // this example is just showing the usage of "ExportPipelines_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 ContainerRegistryExportPipelineResource created on azure - // for more information of creating ContainerRegistryExportPipelineResource, please refer to the document of ContainerRegistryExportPipelineResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string exportPipelineName = "myExportPipeline"; - ResourceIdentifier containerRegistryExportPipelineResourceId = ContainerRegistryExportPipelineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, exportPipelineName); - ContainerRegistryExportPipelineResource containerRegistryExportPipeline = client.GetContainerRegistryExportPipelineResource(containerRegistryExportPipelineResourceId); - - // invoke the operation - ContainerRegistryExportPipelineResource result = await containerRegistryExportPipeline.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 - ContainerRegistryExportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_ExportPipelineDelete() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineDelete.json - // this example is just showing the usage of "ExportPipelines_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 ContainerRegistryExportPipelineResource created on azure - // for more information of creating ContainerRegistryExportPipelineResource, please refer to the document of ContainerRegistryExportPipelineResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string exportPipelineName = "myExportPipeline"; - ResourceIdentifier containerRegistryExportPipelineResourceId = ContainerRegistryExportPipelineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, exportPipelineName); - ContainerRegistryExportPipelineResource containerRegistryExportPipeline = client.GetContainerRegistryExportPipelineResource(containerRegistryExportPipelineResourceId); - - // invoke the operation - await containerRegistryExportPipeline.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_ExportPipelineCreate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ExportPipelineCreate.json - // this example is just showing the usage of "ExportPipelines_Create" 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 ContainerRegistryExportPipelineResource created on azure - // for more information of creating ContainerRegistryExportPipelineResource, please refer to the document of ContainerRegistryExportPipelineResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string exportPipelineName = "myExportPipeline"; - ResourceIdentifier containerRegistryExportPipelineResourceId = ContainerRegistryExportPipelineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, exportPipelineName); - ContainerRegistryExportPipelineResource containerRegistryExportPipeline = client.GetContainerRegistryExportPipelineResource(containerRegistryExportPipelineResourceId); - - // invoke the operation - ContainerRegistryExportPipelineData data = new ContainerRegistryExportPipelineData - { - Location = new AzureLocation("westus"), - Identity = new ManagedServiceIdentity("SystemAssigned"), - Target = new ExportPipelineTargetProperties(new Uri("https://myvault.vault.azure.net/secrets/acrexportsas")) - { - PipelineTargetType = "AzureStorageBlobContainer", - Uri = new Uri("https://accountname.blob.core.windows.net/containername"), - }, - Options = { ContainerRegistryPipelineOption.OverwriteBlobs }, - }; - ArmOperation lro = await containerRegistryExportPipeline.UpdateAsync(WaitUntil.Completed, data); - ContainerRegistryExportPipelineResource 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 - ContainerRegistryExportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryImportPipelineCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryImportPipelineCollection.cs deleted file mode 100644 index ddf6299f31b5..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryImportPipelineCollection.cs +++ /dev/null @@ -1,214 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryImportPipelineCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_ImportPipelineCreate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineCreate.json - // this example is just showing the usage of "ImportPipelines_Create" 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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryImportPipelineResource - ContainerRegistryImportPipelineCollection collection = containerRegistry.GetContainerRegistryImportPipelines(); - - // invoke the operation - string importPipelineName = "myImportPipeline"; - ContainerRegistryImportPipelineData data = new ContainerRegistryImportPipelineData - { - Location = new AzureLocation("westus"), - Identity = new ManagedServiceIdentity("UserAssigned") - { - UserAssignedIdentities = -{ -[new ResourceIdentifier("/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2")] = new UserAssignedIdentity() -}, - }, - Source = new ImportPipelineSourceProperties(new Uri("https://myvault.vault.azure.net/secrets/acrimportsas")) - { - ContainerRegistryPipelineSourceType = ContainerRegistryPipelineSourceType.AzureStorageBlobContainer, - Uri = new Uri("https://accountname.blob.core.windows.net/containername"), - }, - Options = { ContainerRegistryPipelineOption.OverwriteTags, ContainerRegistryPipelineOption.DeleteSourceBlobOnSuccess, ContainerRegistryPipelineOption.ContinueOnErrors }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, importPipelineName, data); - ContainerRegistryImportPipelineResource 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 - ContainerRegistryImportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ImportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineGet.json - // this example is just showing the usage of "ImportPipelines_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryImportPipelineResource - ContainerRegistryImportPipelineCollection collection = containerRegistry.GetContainerRegistryImportPipelines(); - - // invoke the operation - string importPipelineName = "myImportPipeline"; - ContainerRegistryImportPipelineResource result = await collection.GetAsync(importPipelineName); - - // 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 - ContainerRegistryImportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ImportPipelineList() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineList.json - // this example is just showing the usage of "ImportPipelines_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryImportPipelineResource - ContainerRegistryImportPipelineCollection collection = containerRegistry.GetContainerRegistryImportPipelines(); - - // invoke the operation and iterate over the result - await foreach (ContainerRegistryImportPipelineResource 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 - ContainerRegistryImportPipelineData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_ImportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineGet.json - // this example is just showing the usage of "ImportPipelines_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryImportPipelineResource - ContainerRegistryImportPipelineCollection collection = containerRegistry.GetContainerRegistryImportPipelines(); - - // invoke the operation - string importPipelineName = "myImportPipeline"; - bool result = await collection.ExistsAsync(importPipelineName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_ImportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineGet.json - // this example is just showing the usage of "ImportPipelines_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryImportPipelineResource - ContainerRegistryImportPipelineCollection collection = containerRegistry.GetContainerRegistryImportPipelines(); - - // invoke the operation - string importPipelineName = "myImportPipeline"; - NullableResponse response = await collection.GetIfExistsAsync(importPipelineName); - ContainerRegistryImportPipelineResource 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 - ContainerRegistryImportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryImportPipelineResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryImportPipelineResource.cs deleted file mode 100644 index ec47592ba1fa..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryImportPipelineResource.cs +++ /dev/null @@ -1,127 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryImportPipelineResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_ImportPipelineGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineGet.json - // this example is just showing the usage of "ImportPipelines_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 ContainerRegistryImportPipelineResource created on azure - // for more information of creating ContainerRegistryImportPipelineResource, please refer to the document of ContainerRegistryImportPipelineResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string importPipelineName = "myImportPipeline"; - ResourceIdentifier containerRegistryImportPipelineResourceId = ContainerRegistryImportPipelineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, importPipelineName); - ContainerRegistryImportPipelineResource containerRegistryImportPipeline = client.GetContainerRegistryImportPipelineResource(containerRegistryImportPipelineResourceId); - - // invoke the operation - ContainerRegistryImportPipelineResource result = await containerRegistryImportPipeline.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 - ContainerRegistryImportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_ImportPipelineDelete() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineDelete.json - // this example is just showing the usage of "ImportPipelines_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 ContainerRegistryImportPipelineResource created on azure - // for more information of creating ContainerRegistryImportPipelineResource, please refer to the document of ContainerRegistryImportPipelineResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string importPipelineName = "myImportPipeline"; - ResourceIdentifier containerRegistryImportPipelineResourceId = ContainerRegistryImportPipelineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, importPipelineName); - ContainerRegistryImportPipelineResource containerRegistryImportPipeline = client.GetContainerRegistryImportPipelineResource(containerRegistryImportPipelineResourceId); - - // invoke the operation - await containerRegistryImportPipeline.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_ImportPipelineCreate() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportPipelineCreate.json - // this example is just showing the usage of "ImportPipelines_Create" 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 ContainerRegistryImportPipelineResource created on azure - // for more information of creating ContainerRegistryImportPipelineResource, please refer to the document of ContainerRegistryImportPipelineResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string importPipelineName = "myImportPipeline"; - ResourceIdentifier containerRegistryImportPipelineResourceId = ContainerRegistryImportPipelineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, importPipelineName); - ContainerRegistryImportPipelineResource containerRegistryImportPipeline = client.GetContainerRegistryImportPipelineResource(containerRegistryImportPipelineResourceId); - - // invoke the operation - ContainerRegistryImportPipelineData data = new ContainerRegistryImportPipelineData - { - Location = new AzureLocation("westus"), - Identity = new ManagedServiceIdentity("UserAssigned") - { - UserAssignedIdentities = -{ -[new ResourceIdentifier("/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2")] = new UserAssignedIdentity() -}, - }, - Source = new ImportPipelineSourceProperties(new Uri("https://myvault.vault.azure.net/secrets/acrimportsas")) - { - ContainerRegistryPipelineSourceType = ContainerRegistryPipelineSourceType.AzureStorageBlobContainer, - Uri = new Uri("https://accountname.blob.core.windows.net/containername"), - }, - Options = { ContainerRegistryPipelineOption.OverwriteTags, ContainerRegistryPipelineOption.DeleteSourceBlobOnSuccess, ContainerRegistryPipelineOption.ContinueOnErrors }, - }; - ArmOperation lro = await containerRegistryImportPipeline.UpdateAsync(WaitUntil.Completed, data); - ContainerRegistryImportPipelineResource 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 - ContainerRegistryImportPipelineData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPipelineRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPipelineRunCollection.cs deleted file mode 100644 index d2aeac6e433b..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPipelineRunCollection.cs +++ /dev/null @@ -1,258 +0,0 @@ -// 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.ContainerRegistry.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryPipelineRunCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PipelineRunCreateExport() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunCreate_Export.json - // this example is just showing the usage of "PipelineRuns_Create" 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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryPipelineRunResource - ContainerRegistryPipelineRunCollection collection = containerRegistry.GetContainerRegistryPipelineRuns(); - - // invoke the operation - string pipelineRunName = "myPipelineRun"; - ContainerRegistryPipelineRunData data = new ContainerRegistryPipelineRunData - { - Request = new ConnectedRegistryPipelineRunContent - { - PipelineResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline"), - Artifacts = { "sourceRepository/hello-world", "sourceRepository2@sha256:00000000000000000000000000000000000" }, - Target = new ContainerRegistryPipelineRunTargetProperties - { - TargetType = ContainerRegistryPipelineRunTargetType.AzureStorageBlob, - Name = "myblob.tar.gz", - }, - }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, pipelineRunName, data); - ContainerRegistryPipelineRunResource 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 - ContainerRegistryPipelineRunData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PipelineRunCreateImport() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunCreate_Import.json - // this example is just showing the usage of "PipelineRuns_Create" 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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryPipelineRunResource - ContainerRegistryPipelineRunCollection collection = containerRegistry.GetContainerRegistryPipelineRuns(); - - // invoke the operation - string pipelineRunName = "myPipelineRun"; - ContainerRegistryPipelineRunData data = new ContainerRegistryPipelineRunData - { - Request = new ConnectedRegistryPipelineRunContent - { - PipelineResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline"), - Source = new ContainerRegistryPipelineRunSourceProperties - { - SourceType = ContainerRegistryPipelineRunSourceType.AzureStorageBlob, - Name = "myblob.tar.gz", - }, - CatalogDigest = "sha256@", - }, - ForceUpdateTag = "2020-03-04T17:23:21.9261521+00:00", - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, pipelineRunName, data); - ContainerRegistryPipelineRunResource 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 - ContainerRegistryPipelineRunData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_PipelineRunGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunGet.json - // this example is just showing the usage of "PipelineRuns_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryPipelineRunResource - ContainerRegistryPipelineRunCollection collection = containerRegistry.GetContainerRegistryPipelineRuns(); - - // invoke the operation - string pipelineRunName = "myPipelineRun"; - ContainerRegistryPipelineRunResource result = await collection.GetAsync(pipelineRunName); - - // 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 - ContainerRegistryPipelineRunData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_PipelineRunList() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunList.json - // this example is just showing the usage of "PipelineRuns_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryPipelineRunResource - ContainerRegistryPipelineRunCollection collection = containerRegistry.GetContainerRegistryPipelineRuns(); - - // invoke the operation and iterate over the result - await foreach (ContainerRegistryPipelineRunResource 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 - ContainerRegistryPipelineRunData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_PipelineRunGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunGet.json - // this example is just showing the usage of "PipelineRuns_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryPipelineRunResource - ContainerRegistryPipelineRunCollection collection = containerRegistry.GetContainerRegistryPipelineRuns(); - - // invoke the operation - string pipelineRunName = "myPipelineRun"; - bool result = await collection.ExistsAsync(pipelineRunName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_PipelineRunGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunGet.json - // this example is just showing the usage of "PipelineRuns_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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryPipelineRunResource - ContainerRegistryPipelineRunCollection collection = containerRegistry.GetContainerRegistryPipelineRuns(); - - // invoke the operation - string pipelineRunName = "myPipelineRun"; - NullableResponse response = await collection.GetIfExistsAsync(pipelineRunName); - ContainerRegistryPipelineRunResource 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 - ContainerRegistryPipelineRunData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPipelineRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPipelineRunResource.cs deleted file mode 100644 index dbed79ecfdf0..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPipelineRunResource.cs +++ /dev/null @@ -1,168 +0,0 @@ -// 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.ContainerRegistry.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.ContainerRegistry.Samples -{ - public partial class Sample_ContainerRegistryPipelineRunResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_PipelineRunGet() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunGet.json - // this example is just showing the usage of "PipelineRuns_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 ContainerRegistryPipelineRunResource created on azure - // for more information of creating ContainerRegistryPipelineRunResource, please refer to the document of ContainerRegistryPipelineRunResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string pipelineRunName = "myPipelineRun"; - ResourceIdentifier containerRegistryPipelineRunResourceId = ContainerRegistryPipelineRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, pipelineRunName); - ContainerRegistryPipelineRunResource containerRegistryPipelineRun = client.GetContainerRegistryPipelineRunResource(containerRegistryPipelineRunResourceId); - - // invoke the operation - ContainerRegistryPipelineRunResource result = await containerRegistryPipelineRun.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 - ContainerRegistryPipelineRunData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_PipelineRunDelete() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunDelete.json - // this example is just showing the usage of "PipelineRuns_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 ContainerRegistryPipelineRunResource created on azure - // for more information of creating ContainerRegistryPipelineRunResource, please refer to the document of ContainerRegistryPipelineRunResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string pipelineRunName = "myPipelineRun"; - ResourceIdentifier containerRegistryPipelineRunResourceId = ContainerRegistryPipelineRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, pipelineRunName); - ContainerRegistryPipelineRunResource containerRegistryPipelineRun = client.GetContainerRegistryPipelineRunResource(containerRegistryPipelineRunResourceId); - - // invoke the operation - await containerRegistryPipelineRun.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_PipelineRunCreateExport() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunCreate_Export.json - // this example is just showing the usage of "PipelineRuns_Create" 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 ContainerRegistryPipelineRunResource created on azure - // for more information of creating ContainerRegistryPipelineRunResource, please refer to the document of ContainerRegistryPipelineRunResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string pipelineRunName = "myPipelineRun"; - ResourceIdentifier containerRegistryPipelineRunResourceId = ContainerRegistryPipelineRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, pipelineRunName); - ContainerRegistryPipelineRunResource containerRegistryPipelineRun = client.GetContainerRegistryPipelineRunResource(containerRegistryPipelineRunResourceId); - - // invoke the operation - ContainerRegistryPipelineRunData data = new ContainerRegistryPipelineRunData - { - Request = new ConnectedRegistryPipelineRunContent - { - PipelineResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline"), - Artifacts = { "sourceRepository/hello-world", "sourceRepository2@sha256:00000000000000000000000000000000000" }, - Target = new ContainerRegistryPipelineRunTargetProperties - { - TargetType = ContainerRegistryPipelineRunTargetType.AzureStorageBlob, - Name = "myblob.tar.gz", - }, - }, - }; - ArmOperation lro = await containerRegistryPipelineRun.UpdateAsync(WaitUntil.Completed, data); - ContainerRegistryPipelineRunResource 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 - ContainerRegistryPipelineRunData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_PipelineRunCreateImport() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PipelineRunCreate_Import.json - // this example is just showing the usage of "PipelineRuns_Create" 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 ContainerRegistryPipelineRunResource created on azure - // for more information of creating ContainerRegistryPipelineRunResource, please refer to the document of ContainerRegistryPipelineRunResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string pipelineRunName = "myPipelineRun"; - ResourceIdentifier containerRegistryPipelineRunResourceId = ContainerRegistryPipelineRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, pipelineRunName); - ContainerRegistryPipelineRunResource containerRegistryPipelineRun = client.GetContainerRegistryPipelineRunResource(containerRegistryPipelineRunResourceId); - - // invoke the operation - ContainerRegistryPipelineRunData data = new ContainerRegistryPipelineRunData - { - Request = new ConnectedRegistryPipelineRunContent - { - PipelineResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline"), - Source = new ContainerRegistryPipelineRunSourceProperties - { - SourceType = ContainerRegistryPipelineRunSourceType.AzureStorageBlob, - Name = "myblob.tar.gz", - }, - CatalogDigest = "sha256@", - }, - ForceUpdateTag = "2020-03-04T17:23:21.9261521+00:00", - }; - ArmOperation lro = await containerRegistryPipelineRun.UpdateAsync(WaitUntil.Completed, data); - ContainerRegistryPipelineRunResource 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 - ContainerRegistryPipelineRunData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs index 890ab3089413..a633bde35f15 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionCreateOrUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionCreateOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_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_PrivateEndpointConnectionCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -97,7 +97,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionList.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -133,7 +133,7 @@ public async Task GetAll_PrivateEndpointConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -163,7 +163,7 @@ public async Task Exists_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs index e1fd79952a67..de65b4e120d2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionDelete.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -78,7 +78,7 @@ public async Task Delete_PrivateEndpointConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionCreateOrUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionCreateOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_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 diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs index bc65075f94b5..c906bc8b96d2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs index 05d576ce7ad8..a74a5378fb89 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" 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 @@ -53,7 +53,7 @@ public async Task Get_RegistryGetPrivateLinkResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_RegistryListPrivateLinkResources() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryListPrivateLinkResources.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListPrivateLinkResources.json // this example is just showing the usage of "Registries_ListPrivateLinkResources" 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 @@ -89,7 +89,7 @@ public async Task GetAll_RegistryListPrivateLinkResources() [Ignore("Only validating compilation of examples")] public async Task Exists_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" 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 @@ -119,7 +119,7 @@ public async Task Exists_RegistryGetPrivateLinkResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs index 65158b0058a5..5da404b83029 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryReplicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReplicationCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationCreate.json // this example is just showing the usage of "Replications_Create" 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 @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_ReplicationCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReplicationCreateZoneRedundant() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationCreateZoneRedundant.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationCreateZoneRedundant.json // this example is just showing the usage of "Replications_Create" 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 @@ -106,7 +106,7 @@ public async Task CreateOrUpdate_ReplicationCreateZoneRedundant() [Ignore("Only validating compilation of examples")] public async Task Get_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_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 @@ -140,7 +140,7 @@ public async Task Get_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ReplicationList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationList.json // this example is just showing the usage of "Replications_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 @@ -176,7 +176,7 @@ public async Task GetAll_ReplicationList() [Ignore("Only validating compilation of examples")] public async Task Exists_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_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 @@ -206,7 +206,7 @@ public async Task Exists_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs index 28195fd4d629..9a01b6745dbd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryReplicationResource [Ignore("Only validating compilation of examples")] public async Task Get_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_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 @@ -51,7 +51,7 @@ public async Task Get_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ReplicationDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationDelete.json // this example is just showing the usage of "Replications_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 @@ -78,7 +78,7 @@ public async Task Delete_ReplicationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ReplicationUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ReplicationUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationUpdate.json // this example is just showing the usage of "Replications_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryResource.cs index 5623694c7112..098d0c266f70 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryResource [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_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 @@ -50,7 +50,7 @@ public async Task Get_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RegistryDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryDelete.json // this example is just showing the usage of "Registries_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 @@ -76,7 +76,7 @@ public async Task Delete_RegistryDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RegistryUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryUpdate.json // this example is just showing the usage of "Registries_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 @@ -101,7 +101,6 @@ public async Task Update_RegistryUpdate() }, Sku = new ContainerRegistrySku(ContainerRegistrySkuName.Standard), IsAdminUserEnabled = true, - RoleAssignmentMode = ContainerRegistryRoleAssignmentMode.AbacRepositoryPermissions, }; ArmOperation lro = await containerRegistry.UpdateAsync(WaitUntil.Completed, patch); ContainerRegistryResource result = lro.Value; @@ -117,7 +116,7 @@ public async Task Update_RegistryUpdate() [Ignore("Only validating compilation of examples")] public async Task ImportImage_ImportImageByManifestDigest() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportImageByManifestDigest.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageByManifestDigest.json // this example is just showing the usage of "Registries_ImportImage" 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 +151,7 @@ public async Task ImportImage_ImportImageByManifestDigest() [Ignore("Only validating compilation of examples")] public async Task ImportImage_ImportImageByTag() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportImageByTag.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageByTag.json // this example is just showing the usage of "Registries_ImportImage" 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 @@ -187,7 +186,7 @@ public async Task ImportImage_ImportImageByTag() [Ignore("Only validating compilation of examples")] public async Task ImportImage_ImportImageFromPublicRegistry() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ImportImageFromPublicRegistry.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageFromPublicRegistry.json // this example is just showing the usage of "Registries_ImportImage" 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 +221,7 @@ public async Task ImportImage_ImportImageFromPublicRegistry() [Ignore("Only validating compilation of examples")] public async Task GetUsages_RegistryListUsages() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryListUsages.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListUsages.json // this example is just showing the usage of "Registries_ListUsages" 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 @@ -251,7 +250,7 @@ public async Task GetUsages_RegistryListUsages() [Ignore("Only validating compilation of examples")] public async Task GetCredentials_RegistryListCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryListCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListCredentials.json // this example is just showing the usage of "Registries_ListCredentials" 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 +276,7 @@ public async Task GetCredentials_RegistryListCredentials() [Ignore("Only validating compilation of examples")] public async Task RegenerateCredential_RegistryRegenerateCredential() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryRegenerateCredential.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryRegenerateCredential.json // this example is just showing the usage of "Registries_RegenerateCredential" 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 @@ -304,7 +303,7 @@ public async Task RegenerateCredential_RegistryRegenerateCredential() [Ignore("Only validating compilation of examples")] public async Task GenerateCredentials_RegistryGenerateCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryGenerateCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGenerateCredentials.json // this example is just showing the usage of "Registries_GenerateCredentials" 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 @@ -336,7 +335,7 @@ public async Task GenerateCredentials_RegistryGenerateCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesScheduleRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun.json // this example is just showing the usage of "Schedules_ScheduleRun" 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 @@ -372,7 +371,8 @@ public async Task ScheduleRun_RegistriesScheduleRun() SourceLocation = "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D", IsArchiveEnabled = true, }; - ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); + ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); + ContainerRegistryRunResource 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 @@ -385,7 +385,7 @@ public async Task ScheduleRun_RegistriesScheduleRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json // this example is just showing the usage of "Schedules_ScheduleRun" 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 @@ -414,7 +414,8 @@ public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() }}, AgentCpu = 2, }; - ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); + ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); + ContainerRegistryRunResource 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 @@ -427,7 +428,7 @@ public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json // this example is just showing the usage of "Schedules_ScheduleRun" 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 @@ -457,7 +458,8 @@ public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() AgentCpu = 2, SourceLocation = "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D", }; - ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); + ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); + ContainerRegistryRunResource 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 @@ -470,7 +472,7 @@ public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesScheduleRun_Task.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_Task.json // this example is just showing the usage of "Schedules_ScheduleRun" 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 @@ -510,7 +512,8 @@ public async Task ScheduleRun_RegistriesScheduleRunTask() UpdateTriggerToken = "aGVsbG8gd29ybGQ=", }, }; - ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); + ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); + ContainerRegistryRunResource 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 @@ -523,7 +526,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTask() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json // this example is just showing the usage of "Schedules_ScheduleRun" 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,10 +554,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() }}, Credentials = new ContainerRegistryCredentials { - SourceRegistry = new SourceRegistryCredentials - { - LoginMode = SourceRegistryLoginMode.Default, - }, + SourceRegistryLoginMode = SourceRegistryLoginMode.Default, CustomRegistries = { ["myregistry.azurecr.io"] = new CustomRegistryCredentials @@ -573,7 +573,8 @@ public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() }, }, }; - ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); + ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); + ContainerRegistryRunResource 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 @@ -586,7 +587,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json // this example is just showing the usage of "Schedules_ScheduleRun" 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,10 +624,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() SourceLocation = "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D", Credentials = new ContainerRegistryCredentials { - SourceRegistry = new SourceRegistryCredentials - { - LoginMode = SourceRegistryLoginMode.Default, - }, + SourceRegistryLoginMode = SourceRegistryLoginMode.Default, CustomRegistries = { ["myregistry.azurecr.io"] = new CustomRegistryCredentials @@ -659,7 +657,8 @@ public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() }, IsArchiveEnabled = true, }; - ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); + ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); + ContainerRegistryRunResource 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 @@ -672,7 +671,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json // this example is just showing the usage of "Schedules_ScheduleRun" 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 @@ -709,7 +708,8 @@ public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() IsArchiveEnabled = true, LogTemplate = "acr/tasks:{{.Run.OS}}", }; - ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); + ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); + ContainerRegistryRunResource 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 @@ -722,7 +722,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() [Ignore("Only validating compilation of examples")] public async Task GetBuildSourceUploadUrl_RegistriesGetBuildSourceUploadUrl() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json // this example is just showing the usage of "Builds_GetBuildSourceUploadUrl" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunCollection.cs index cfc30bf8ed1e..e356684afd7d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryRunCollection [Ignore("Only validating compilation of examples")] public async Task Get_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_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 @@ -53,7 +53,7 @@ public async Task Get_RunsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RunsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsList.json // this example is just showing the usage of "Runs_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 @@ -91,7 +91,7 @@ public async Task GetAll_RunsList() [Ignore("Only validating compilation of examples")] public async Task Exists_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_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 @@ -121,7 +121,7 @@ public async Task Exists_RunsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunResource.cs index f69d1cf07209..a17617db5d2b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryRunResource [Ignore("Only validating compilation of examples")] public async Task Get_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_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 @@ -51,7 +51,7 @@ public async Task Get_RunsGet() [Ignore("Only validating compilation of examples")] public async Task Update_RunsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsUpdate.json // this example is just showing the usage of "Runs_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 @@ -73,7 +73,8 @@ public async Task Update_RunsUpdate() { IsArchiveEnabled = true, }; - ContainerRegistryRunResource result = await containerRegistryRun.UpdateAsync(patch); + ArmOperation lro = await containerRegistryRun.UpdateAsync(WaitUntil.Completed, patch); + ContainerRegistryRunResource 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 @@ -86,7 +87,7 @@ public async Task Update_RunsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetLogSasUrl_RunsGetLogSasUrl() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsGetLogSasUrl.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGetLogSasUrl.json // this example is just showing the usage of "Runs_GetLogSasUrl" 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 @@ -113,7 +114,7 @@ public async Task GetLogSasUrl_RunsGetLogSasUrl() [Ignore("Only validating compilation of examples")] public async Task Cancel_RunsCancel() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RunsCancel.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsCancel.json // this example is just showing the usage of "Runs_Cancel" 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 +132,7 @@ public async Task Cancel_RunsCancel() ContainerRegistryRunResource containerRegistryRun = client.GetContainerRegistryRunResource(containerRegistryRunResourceId); // invoke the operation - await containerRegistryRun.CancelAsync(); + await containerRegistryRun.CancelAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs index 966265a43674..66b716680736 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryTaskCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate.json // this example is just showing the usage of "Tasks_Create" 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 @@ -100,7 +100,7 @@ public async Task CreateOrUpdate_TasksCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateQuickTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksCreate_QuickTask.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate_QuickTask.json // this example is just showing the usage of "Tasks_Create" 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 @@ -142,93 +142,11 @@ public async Task CreateOrUpdate_TasksCreateQuickTask() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_TasksCreateWithLoginIdentity() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithLoginIdentity.json - // this example is just showing the usage of "Tasks_Create" 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 ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "4385cf00-2d3a-425a-832f-f4285b1c9dce"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // get the collection of this ContainerRegistryTaskResource - ContainerRegistryTaskCollection collection = containerRegistry.GetContainerRegistryTasks(); - - // invoke the operation - string taskName = "mytTask"; - ContainerRegistryTaskData data = new ContainerRegistryTaskData(new AzureLocation("eastus")) - { - Identity = new ManagedServiceIdentity("SystemAssigned"), - Status = ContainerRegistryTaskStatus.Enabled, - Platform = new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) - { - Architecture = ContainerRegistryOSArchitecture.Amd64, - }, - AgentCpu = 2, - Step = new ContainerRegistryDockerBuildStep("src/DockerFile") - { - ImageNames = { "azurerest:testtag" }, - IsPushEnabled = true, - NoCache = false, - Arguments = {new ContainerRegistryRunArgument("mytestargument", "mytestvalue") -{ -IsSecret = false, -}, new ContainerRegistryRunArgument("mysecrettestargument", "mysecrettestvalue") -{ -IsSecret = true, -}}, - ContextPath = "src", - }, - Trigger = new ContainerRegistryTriggerProperties - { - TimerTriggers = { new ContainerRegistryTimerTrigger("30 9 * * 1-5", "myTimerTrigger") }, - SourceTriggers = {new ContainerRegistrySourceTrigger(new SourceCodeRepoProperties(SourceControlType.Github, new Uri("https://github.com/Azure/azure-rest-api-specs")) -{ -Branch = "master", -SourceControlAuthProperties = new SourceCodeRepoAuthInfo(SourceCodeRepoAuthTokenType.Pat, "xxxxx"), -}, new ContainerRegistrySourceTriggerEvent[]{ContainerRegistrySourceTriggerEvent.Commit}, "mySourceTrigger")}, - BaseImageTrigger = new ContainerRegistryBaseImageTrigger(ContainerRegistryBaseImageTriggerType.Runtime, "myBaseImageTrigger"), - }, - Credentials = new ContainerRegistryCredentials - { - SourceRegistry = new SourceRegistryCredentials - { - Identity = "[system]", - }, - }, - LogTemplate = null, - IsSystemTask = false, - Tags = -{ -["testkey"] = "value" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskName, data); - ContainerRegistryTaskResource 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 - ContainerRegistryTaskData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithSystemAndUserIdentities() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json // this example is just showing the usage of "Tasks_Create" 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 @@ -313,7 +231,7 @@ public async Task CreateOrUpdate_TasksCreateWithSystemAndUserIdentities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithUserIdentities() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json // this example is just showing the usage of "Tasks_Create" 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 @@ -399,7 +317,7 @@ public async Task CreateOrUpdate_TasksCreateWithUserIdentities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithUserIdentitiesWithSystemIdentity() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json // this example is just showing the usage of "Tasks_Create" 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 +392,7 @@ public async Task CreateOrUpdate_TasksCreateWithUserIdentitiesWithSystemIdentity [Ignore("Only validating compilation of examples")] public async Task Get_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_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 @@ -508,7 +426,7 @@ public async Task Get_TasksGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TasksList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksList.json // this example is just showing the usage of "Tasks_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 @@ -544,7 +462,7 @@ public async Task GetAll_TasksList() [Ignore("Only validating compilation of examples")] public async Task Exists_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_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 @@ -574,7 +492,7 @@ public async Task Exists_TasksGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskResource.cs index 70c63fbdd02b..f9127b8a0587 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskResource [Ignore("Only validating compilation of examples")] public async Task Get_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_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 @@ -51,7 +51,7 @@ public async Task Get_TasksGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TasksDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksDelete.json // this example is just showing the usage of "Tasks_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 @@ -78,7 +78,7 @@ public async Task Delete_TasksDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate.json // this example is just showing the usage of "Tasks_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 @@ -146,7 +146,8 @@ public async Task Update_TasksUpdate() }, LogTemplate = "acr/tasks:{{.Run.OS}}", }; - ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); + ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); + ContainerRegistryTaskResource 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 @@ -159,7 +160,7 @@ public async Task Update_TasksUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateQuickTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksUpdate_QuickTask.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_QuickTask.json // this example is just showing the usage of "Tasks_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 @@ -186,7 +187,8 @@ public async Task Update_TasksUpdateQuickTask() Status = ContainerRegistryTaskStatus.Enabled, LogTemplate = "acr/tasks:{{.Run.OS}}", }; - ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); + ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); + ContainerRegistryTaskResource 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 @@ -199,7 +201,7 @@ public async Task Update_TasksUpdateQuickTask() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithKeyVaultCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json // this example is just showing the usage of "Tasks_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 @@ -267,75 +269,8 @@ public async Task Update_TasksUpdateWithKeyVaultCustomCredentials() }, LogTemplate = null, }; - ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); - - // 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 - ContainerRegistryTaskData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_TasksUpdateWithLoginIdentity() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ManagedIdentity/TasksUpdate_WithLoginIdentity.json - // this example is just showing the usage of "Tasks_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 ContainerRegistryTaskResource created on azure - // for more information of creating ContainerRegistryTaskResource, please refer to the document of ContainerRegistryTaskResource - string subscriptionId = "4385cf00-2d3a-425a-832f-f4285b1c9dce"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - string taskName = "myTask"; - ResourceIdentifier containerRegistryTaskResourceId = ContainerRegistryTaskResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, taskName); - ContainerRegistryTaskResource containerRegistryTask = client.GetContainerRegistryTaskResource(containerRegistryTaskResourceId); - - // invoke the operation - ContainerRegistryTaskPatch patch = new ContainerRegistryTaskPatch - { - Tags = -{ -["testkey"] = "value" -}, - Status = ContainerRegistryTaskStatus.Enabled, - AgentCpu = 3, - Step = new ContainerRegistryDockerBuildStepUpdateContent - { - ImageNames = { "azurerest:testtag1" }, - DockerFilePath = "src/DockerFile", - }, - Trigger = new ContainerRegistryTriggerUpdateContent - { - SourceTriggers = {new ContainerRegistrySourceTriggerUpdateContent("mySourceTrigger") -{ -SourceRepository = new SourceCodeRepoUpdateContent -{ -SourceControlAuthProperties = new SourceCodeRepoAuthInfoUpdateContent -{ -TokenType = SourceCodeRepoAuthTokenType.Pat, -Token = "xxxxx", -}, -}, -SourceTriggerEvents = {ContainerRegistrySourceTriggerEvent.Commit}, -}}, - }, - Credentials = new ContainerRegistryCredentials - { - SourceRegistry = new SourceRegistryCredentials - { - Identity = "[system]", - }, - }, - LogTemplate = null, - }; - ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); + ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); + ContainerRegistryTaskResource 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 @@ -348,7 +283,7 @@ public async Task Update_TasksUpdateWithLoginIdentity() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithMSICustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json // this example is just showing the usage of "Tasks_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 @@ -406,7 +341,8 @@ public async Task Update_TasksUpdateWithMSICustomCredentials() }, LogTemplate = null, }; - ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); + ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); + ContainerRegistryTaskResource 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 @@ -419,7 +355,7 @@ public async Task Update_TasksUpdateWithMSICustomCredentials() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithOpaqueCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json // this example is just showing the usage of "Tasks_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 @@ -486,7 +422,8 @@ public async Task Update_TasksUpdateWithOpaqueCustomCredentials() }, LogTemplate = null, }; - ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); + ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); + ContainerRegistryTaskResource 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 @@ -499,7 +436,7 @@ public async Task Update_TasksUpdateWithOpaqueCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task GetDetails_TasksGetDetails() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TasksGetDetails.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGetDetails.json // this example is just showing the usage of "Tasks_GetDetails" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs index c0ca8765e5bf..48ec6347c2c4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskRunCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TaskRunsCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsCreate.json // this example is just showing the usage of "TaskRuns_Create" 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 @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_TaskRunsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_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 @@ -102,7 +102,7 @@ public async Task Get_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TaskRunsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsList.json // this example is just showing the usage of "TaskRuns_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 @@ -138,7 +138,7 @@ public async Task GetAll_TaskRunsList() [Ignore("Only validating compilation of examples")] public async Task Exists_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_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 @@ -168,7 +168,7 @@ public async Task Exists_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs index c54f778020db..8e460c768aaa 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskRunResource [Ignore("Only validating compilation of examples")] public async Task Get_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_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 @@ -51,7 +51,7 @@ public async Task Get_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TaskRunsDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsDelete.json // this example is just showing the usage of "TaskRuns_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 @@ -78,7 +78,7 @@ public async Task Delete_TaskRunsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TaskRunsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsUpdate.json // this example is just showing the usage of "TaskRuns_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 @@ -124,7 +124,7 @@ public async Task Update_TaskRunsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetDetails_TaskRunsGetDetails() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TaskRunsGetDetails.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGetDetails.json // this example is just showing the usage of "TaskRuns_GetDetails" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs index 90e42e8d9224..cf1eac36fb10 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTokenCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TokenCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenCreate.json // this example is just showing the usage of "Tokens_Create" 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 @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_TokenCreate() [Ignore("Only validating compilation of examples")] public async Task Get_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_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 @@ -102,7 +102,7 @@ public async Task Get_TokenGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TokenList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenList.json // this example is just showing the usage of "Tokens_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 @@ -138,7 +138,7 @@ public async Task GetAll_TokenList() [Ignore("Only validating compilation of examples")] public async Task Exists_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_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 @@ -168,7 +168,7 @@ public async Task Exists_TokenGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenResource.cs index c1e9a5477799..69720c6629fb 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryTokenResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTokenResource [Ignore("Only validating compilation of examples")] public async Task Get_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_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 @@ -51,7 +51,7 @@ public async Task Get_TokenGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TokenDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenDelete.json // this example is just showing the usage of "Tokens_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 @@ -78,7 +78,7 @@ public async Task Delete_TokenDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TokenUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/TokenUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenUpdate.json // this example is just showing the usage of "Tokens_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs index ae0a29c111f6..accba0ea9b21 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryWebhookCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_WebhookCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookCreate.json // this example is just showing the usage of "Webhooks_Create" 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 @@ -70,7 +70,7 @@ public async Task CreateOrUpdate_WebhookCreate() [Ignore("Only validating compilation of examples")] public async Task Get_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_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 @@ -104,7 +104,7 @@ public async Task Get_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_WebhookList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookList.json // this example is just showing the usage of "Webhooks_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 @@ -140,7 +140,7 @@ public async Task GetAll_WebhookList() [Ignore("Only validating compilation of examples")] public async Task Exists_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_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 @@ -170,7 +170,7 @@ public async Task Exists_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs index 6313f07666a1..2ab59c7ff1e4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryWebhookResource [Ignore("Only validating compilation of examples")] public async Task Get_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_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 @@ -51,7 +51,7 @@ public async Task Get_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task Delete_WebhookDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookDelete.json // this example is just showing the usage of "Webhooks_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 @@ -78,7 +78,7 @@ public async Task Delete_WebhookDelete() [Ignore("Only validating compilation of examples")] public async Task Update_WebhookUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookUpdate.json // this example is just showing the usage of "Webhooks_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 @@ -125,7 +125,7 @@ public async Task Update_WebhookUpdate() [Ignore("Only validating compilation of examples")] public async Task Ping_WebhookPing() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookPing.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookPing.json // this example is just showing the usage of "Webhooks_Ping" 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 Ping_WebhookPing() [Ignore("Only validating compilation of examples")] public async Task GetEvents_WebhookListEvents() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookListEvents.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookListEvents.json // this example is just showing the usage of "Webhooks_ListEvents" 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 @@ -182,7 +182,7 @@ public async Task GetEvents_WebhookListEvents() [Ignore("Only validating compilation of examples")] public async Task GetCallbackConfig_WebhookGetCallbackConfig() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/WebhookGetCallbackConfig.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGetCallbackConfig.json // this example is just showing the usage of "Webhooks_GetCallbackConfig" 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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapCollection.cs index 26b58b6bc1bb..3d8e42b903aa 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ScopeMapCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ScopeMapCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapCreate.json // this example is just showing the usage of "ScopeMaps_Create" 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 @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_ScopeMapCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_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_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ScopeMapList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapList.json // this example is just showing the usage of "ScopeMaps_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 @@ -129,7 +129,7 @@ public async Task GetAll_ScopeMapList() [Ignore("Only validating compilation of examples")] public async Task Exists_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_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 @@ -159,7 +159,7 @@ public async Task Exists_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapResource.cs index 04c667acab25..e39d51f6bd24 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_ScopeMapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ScopeMapResource [Ignore("Only validating compilation of examples")] public async Task Get_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_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 @@ -51,7 +51,7 @@ public async Task Get_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ScopeMapDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapDelete.json // this example is just showing the usage of "ScopeMaps_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 @@ -78,7 +78,7 @@ public async Task Delete_ScopeMapDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ScopeMapUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/ScopeMapUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapUpdate.json // this example is just showing the usage of "ScopeMaps_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/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 31dd91348eae..b7b460769375 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameAvailable() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryCheckNameAvailable.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCheckNameAvailable.json // this example is just showing the usage of "Registries_CheckNameAvailability" 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 @@ -36,11 +36,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameAvaila SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - ContainerRegistryNameAvailabilityContent content = new ContainerRegistryNameAvailabilityContent("myRegistry") - { - ResourceGroupName = "myResourceGroup", - AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.ResourceGroupReuse, - }; + ContainerRegistryNameAvailabilityContent content = new ContainerRegistryNameAvailabilityContent("myRegistry"); ContainerRegistryNameAvailableResult result = await subscriptionResource.CheckContainerRegistryNameAvailabilityAsync(content); Console.WriteLine($"Succeeded: {result}"); @@ -50,7 +46,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameAvaila [Ignore("Only validating compilation of examples")] public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameNotAvailable() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryCheckNameNotAvailable.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCheckNameNotAvailable.json // this example is just showing the usage of "Registries_CheckNameAvailability" 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 @@ -65,11 +61,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameNotAva SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - ContainerRegistryNameAvailabilityContent content = new ContainerRegistryNameAvailabilityContent("myRegistry") - { - ResourceGroupName = "myResourceGroup", - AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.ResourceGroupReuse, - }; + ContainerRegistryNameAvailabilityContent content = new ContainerRegistryNameAvailabilityContent("myRegistry"); ContainerRegistryNameAvailableResult result = await subscriptionResource.CheckContainerRegistryNameAvailabilityAsync(content); Console.WriteLine($"Succeeded: {result}"); @@ -79,7 +71,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameNotAva [Ignore("Only validating compilation of examples")] public async Task GetContainerRegistries_RegistryList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2025-03-01-preview/examples/RegistryList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryList.json // this example is just showing the usage of "Registries_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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj index 973398e4d42a..2563dab72bb1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.4 + 1.3.0 1.2.1 Azure.ResourceManager.ContainerRegistry diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryCredentials.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryCredentials.cs deleted file mode 100644 index b6446aba9f60..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryCredentials.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The parameters that describes a set of credentials that will be used when a run is invoked. - public partial class ContainerRegistryCredentials - { - /// - /// The authentication mode which determines the source registry login scope. The credentials for the source registry - /// will be generated using the given scope. These credentials will be used to login to - /// the source registry during the run. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - [WirePath("sourceRegistry.loginMode")] - public SourceRegistryLoginMode? SourceRegistryLoginMode - { - get => SourceRegistry is null ? default : SourceRegistry.LoginMode; - set - { - if (SourceRegistry is null) - SourceRegistry = new SourceRegistryCredentials(); - SourceRegistry.LoginMode = value; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryResource.cs deleted file mode 100644 index 15f2c61643e7..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryResource.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ComponentModel; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryResource : ArmResource - { - /// - /// Schedules a new run based on the request parameters and add it to the run queue. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun - /// - /// - /// Operation Id - /// Schedules_ScheduleRun - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// - /// 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 parameters of a run that needs to scheduled. - /// The cancellation token to use. - /// is null. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task> ScheduleRunAsync(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun"); - scope.Start(); - try - { - var response = await _schedulesRestClient.ScheduleRunAsync_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation( - new ContainerRegistryRunOperationSource(Client), - _schedulesClientDiagnostics, - Pipeline, - _schedulesRestClient.CreateScheduleRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, - response, - OperationFinalStateVia.Location); - - if (waitUntil == WaitUntil.Completed) - { - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - } - - return operation; - //return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Schedules a new run based on the request parameters and add it to the run queue. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun - /// - /// - /// Operation Id - /// Schedules_ScheduleRun - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// - /// 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 parameters of a run that needs to scheduled. - /// The cancellation token to use. - /// is null. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation ScheduleRun(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun"); - scope.Start(); - try - { - var response = _schedulesRestClient.ScheduleRun_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _schedulesClientDiagnostics, Pipeline, _schedulesRestClient.CreateScheduleRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryRunResource.cs deleted file mode 100644 index 62070254eb6e..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryRunResource.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ComponentModel; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryRunResource : ArmResource - { - /// - /// Patch the run properties. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId} - /// - /// - /// Operation Id - /// Runs_Update - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// 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 run update properties. - /// The cancellation token to use. - /// is null. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Update"); - scope.Start(); - try - { - var response = await _containerRegistryRunRunsRestClient.UpdateAsync_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.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; - } - } - - /// - /// Patch the run properties. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId} - /// - /// - /// Operation Id - /// Runs_Update - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// 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 run update properties. - /// The cancellation token to use. - /// is null. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Update"); - scope.Start(); - try - { - var response = _containerRegistryRunRunsRestClient.Update_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.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; - } - } - - /// - /// Cancel an existing run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel - /// - /// - /// Operation Id - /// Runs_Cancel - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// 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. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task CancelAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); - scope.Start(); - try - { - var response = await _containerRegistryRunRunsRestClient.CancelAsync_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateCancelRequest(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; - } - } - - /// - /// Cancel an existing run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel - /// - /// - /// Operation Id - /// Runs_Cancel - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// 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. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Cancel(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); - scope.Start(); - try - { - var response = _containerRegistryRunRunsRestClient.Cancel_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateCancelRequest(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; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryTaskResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryTaskResource.cs deleted file mode 100644 index 2c48e741719b..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryTaskResource.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ComponentModel; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryTaskResource : ArmResource - { - /// - /// Updates a task with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName} - /// - /// - /// Operation Id - /// Tasks_Update - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// 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 parameters for updating a task. - /// The cancellation token to use. - /// is null. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _containerRegistryTaskTasksClientDiagnostics.CreateScope("ContainerRegistryTaskResource.Update"); - scope.Start(); - try - { - var response = await _containerRegistryTaskTasksRestClient.UpdateAsync_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.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; - } - } - - /// - /// Updates a task with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName} - /// - /// - /// Operation Id - /// Tasks_Update - /// - /// - /// Default Api Version - /// 2019-06-01-preview - /// - /// - /// 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 parameters for updating a task. - /// The cancellation token to use. - /// is null. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _containerRegistryTaskTasksClientDiagnostics.CreateScope("ContainerRegistryTaskResource.Update"); - scope.Start(); - try - { - var response = _containerRegistryTaskTasksRestClient.Update_v2019_06(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.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; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/RunsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/RunsRestOperations.cs deleted file mode 100644 index dfaee72733bc..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/RunsRestOperations.cs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.ResourceManager.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class RunsRestOperations - { - /// Patch the run properties. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The run ID. - /// The run update properties. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync_v2019_06(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, runId, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Patch the run properties. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The run ID. - /// The run update properties. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update_v2019_06(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, runId, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Cancel an existing run. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The run ID. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CancelAsync_v2019_06(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, registryName, runId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Cancel an existing run. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The run ID. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Cancel_v2019_06(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, registryName, runId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/SchedulesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/SchedulesRestOperations.cs deleted file mode 100644 index ede2327f16bb..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/SchedulesRestOperations.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.ResourceManager.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class SchedulesRestOperations - { - /// Schedules a new run based on the request parameters and add it to the run queue. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The parameters of a run that needs to scheduled. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ScheduleRunAsync_v2019_06(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateScheduleRunRequest(subscriptionId, resourceGroupName, registryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Schedules a new run based on the request parameters and add it to the run queue. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The parameters of a run that needs to scheduled. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ScheduleRun_v2019_06(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateScheduleRunRequest(subscriptionId, resourceGroupName, registryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/TasksRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/TasksRestOperations.cs deleted file mode 100644 index bb57fe10c1fd..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/RestOperations/TasksRestOperations.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.ResourceManager.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class TasksRestOperations - { - /// Updates a task with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The name of the container registry task. - /// The parameters for updating a task. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync_v2019_06(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, taskName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates a task with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The name of the container registry task. - /// The parameters for updating a task. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update_v2019_06(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, taskName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs index eddfd457eabb..22250a1b72f1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs @@ -17,52 +17,6 @@ namespace Azure.ResourceManager.ContainerRegistry.Models /// Model factory for models. public static partial class ArmContainerRegistryModelFactory { - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The package source of the archive. - /// The published version of the archive. - /// - /// - /// The provisioning state of the archive at the time the operation was called. - /// A new instance for mocking. - public static ContainerRegistryArchiveData ContainerRegistryArchiveData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ArchivePackageSourceProperties packageSource = null, string publishedVersion = null, string repositoryEndpointPrefix = null, string repositoryEndpoint = null, ContainerRegistryProvisioningState? provisioningState = null) - { - return new ContainerRegistryArchiveData( - id, - name, - resourceType, - systemData, - packageSource, - publishedVersion, - repositoryEndpointPrefix, - repositoryEndpoint, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of the archive at the time the operation was called. - /// The detailed error message for the archive version in the case of failure. - /// A new instance for mocking. - public static ContainerRegistryArchiveVersionData ContainerRegistryArchiveVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerRegistryProvisioningState? provisioningState = null, string archiveVersionErrorMessage = null) - { - return new ContainerRegistryArchiveVersionData( - id, - name, - resourceType, - systemData, - provisioningState, - archiveVersionErrorMessage, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -102,8 +56,8 @@ public static ContainerRegistryCacheRuleData ContainerRegistryCacheRuleData(Reso /// The current version of ACR runtime on the connected registry. /// The current connection state of the connected registry. /// The last activity time of the connected registry. - /// The activation properties of the connected registry. - /// The parent of the connected registry. + /// + /// The properties of the connected registry parent. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The login server properties of the connected registry. /// The logging properties of the connected registry. @@ -127,7 +81,7 @@ public static ConnectedRegistryData ConnectedRegistryData(ResourceIdentifier id version, connectionState, lastActivityOn, - activationStatus != null ? new ConnectedRegistryActivation(activationStatus, serializedAdditionalRawData: null) : null, + activationStatus != null ? new ConnectedRegistryPropertiesActivation(activationStatus, serializedAdditionalRawData: null) : null, parent, clientTokenIds?.ToList(), loginServer, @@ -255,34 +209,6 @@ public static ContainerRegistryCredentialHealth ContainerRegistryCredentialHealt return new ContainerRegistryCredentialHealth(status, errorCode, errorMessage, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The location of the export pipeline. - /// The identity of the export pipeline. - /// The target properties of the export pipeline. - /// The list of all options configured for the pipeline. - /// The provisioning state of the pipeline at the time the operation was called. - /// A new instance for mocking. - public static ContainerRegistryExportPipelineData ContainerRegistryExportPipelineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, ManagedServiceIdentity identity = null, ExportPipelineTargetProperties target = null, IEnumerable options = null, ContainerRegistryProvisioningState? provisioningState = null) - { - options ??= new List(); - - return new ContainerRegistryExportPipelineData( - id, - name, - resourceType, - systemData, - location, - identity, - target, - options?.ToList(), - provisioningState, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The source of the image. /// List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted). @@ -322,110 +248,23 @@ public static ContainerRegistryImportSourceCredentials ContainerRegistryImportSo return new ContainerRegistryImportSourceCredentials(username, password, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The location of the import pipeline. - /// The identity of the import pipeline. - /// The source properties of the import pipeline. - /// The properties that describe the trigger of the import pipeline. - /// The list of all options configured for the pipeline. - /// The provisioning state of the pipeline at the time the operation was called. - /// A new instance for mocking. - public static ContainerRegistryImportPipelineData ContainerRegistryImportPipelineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, ManagedServiceIdentity identity = null, ImportPipelineSourceProperties source = null, ContainerRegistryTriggerStatus? sourceTriggerStatus = null, IEnumerable options = null, ContainerRegistryProvisioningState? provisioningState = null) - { - options ??= new List(); - - return new ContainerRegistryImportPipelineData( - id, - name, - resourceType, - systemData, - location, - identity, - source, - sourceTriggerStatus.HasValue ? new PipelineTriggerProperties(new PipelineSourceTriggerProperties(sourceTriggerStatus.Value, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, - options?.ToList(), - provisioningState, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The name of the container registry. /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. - /// The resource group name of the container registry. - /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". /// A new instance for mocking. - public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, ContainerRegistryResourceType resourceType = default, string resourceGroupName = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null) + public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, ContainerRegistryResourceType resourceType = default) { - return new ContainerRegistryNameAvailabilityContent(name, resourceType, resourceGroupName, autoGeneratedDomainNameLabelScope, serializedAdditionalRawData: null); + return new ContainerRegistryNameAvailabilityContent(name, resourceType, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// The complete login server name with domain name label (DNL) hash, if available. /// The value that indicates whether the name is available. /// If any, the reason that the name is not available. /// If any, the error message that provides more detail for the reason that the name is not available. /// A new instance for mocking. - public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = null, string reason = null, string message = null) - { - return new ContainerRegistryNameAvailableResult(availableLoginServerName, isNameAvailable, reason, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of a pipeline run. - /// The request parameters for a pipeline run. - /// The response of a pipeline run. - /// How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed. - /// A new instance for mocking. - public static ContainerRegistryPipelineRunData ContainerRegistryPipelineRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerRegistryProvisioningState? provisioningState = null, ConnectedRegistryPipelineRunContent request = null, PipelineRunResult response = null, string forceUpdateTag = null) + public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = null, string reason = null, string message = null) { - return new ContainerRegistryPipelineRunData( - id, - name, - resourceType, - systemData, - provisioningState, - request, - response, - forceUpdateTag, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The current status of the pipeline run. - /// The artifacts imported in the pipeline run. - /// The current progress of the copy operation. - /// The time the pipeline run started. - /// The time the pipeline run finished. - /// The source of the pipeline run. - /// The target of the pipeline run. - /// The digest of the tar used to transfer the artifacts. - /// The trigger that caused the pipeline run. - /// The detailed error message for the pipeline run in the case of failure. - /// A new instance for mocking. - public static PipelineRunResult PipelineRunResult(string status = null, IEnumerable importedArtifacts = null, string progressPercentage = null, DateTimeOffset? startOn = null, DateTimeOffset? finishOn = null, ImportPipelineSourceProperties source = null, ExportPipelineTargetProperties target = null, string catalogDigest = null, DateTimeOffset? sourceTriggerTimestamp = null, string pipelineRunErrorMessage = null) - { - importedArtifacts ??= new List(); - - return new PipelineRunResult( - status, - importedArtifacts?.ToList(), - progressPercentage != null ? new PipelineProgress(progressPercentage, serializedAdditionalRawData: null) : null, - startOn, - finishOn, - source, - target, - catalogDigest, - sourceTriggerTimestamp != null ? new PipelineTriggerDescriptor(new PipelineSourceTriggerDescriptor(sourceTriggerTimestamp, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, - pipelineRunErrorMessage, - serializedAdditionalRawData: null); + return new ContainerRegistryNameAvailableResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -474,11 +313,8 @@ public static ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPr /// Whether to allow trusted Azure services to access a network restricted registry. /// Whether or not zone redundancy is enabled for this container registry. /// Enables registry-wide pull from unauthenticated clients. - /// Determines whether registry artifacts are indexed for metadata search. - /// Determines the domain name label reuse scope. - /// Determines registry role assignment mode. /// A new instance for mocking. - public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerRegistrySku sku = null, ManagedServiceIdentity identity = null, string loginServer = null, DateTimeOffset? createdOn = null, ContainerRegistryProvisioningState? provisioningState = null, ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = null, ContainerRegistryNetworkRuleSet networkRuleSet = null, ContainerRegistryPolicies policies = null, ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = null, IEnumerable dataEndpointHostNames = null, IEnumerable privateEndpointConnections = null, ContainerRegistryPublicNetworkAccess? publicNetworkAccess = null, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = null, ContainerRegistryZoneRedundancy? zoneRedundancy = null, bool? isAnonymousPullEnabled = null, ContainerRegistryMetadataSearch? metadataSearch = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, ContainerRegistryRoleAssignmentMode? roleAssignmentMode = null) + public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerRegistrySku sku = null, ManagedServiceIdentity identity = null, string loginServer = null, DateTimeOffset? createdOn = null, ContainerRegistryProvisioningState? provisioningState = null, ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = null, ContainerRegistryNetworkRuleSet networkRuleSet = null, ContainerRegistryPolicies policies = null, ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = null, IEnumerable dataEndpointHostNames = null, IEnumerable privateEndpointConnections = null, ContainerRegistryPublicNetworkAccess? publicNetworkAccess = null, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = null, ContainerRegistryZoneRedundancy? zoneRedundancy = null, bool? isAnonymousPullEnabled = null) { tags ??= new Dictionary(); dataEndpointHostNames ??= new List(); @@ -508,9 +344,6 @@ public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id networkRuleBypassOptions, zoneRedundancy, isAnonymousPullEnabled, - metadataSearch, - autoGeneratedDomainNameLabelScope, - roleAssignmentMode, serializedAdditionalRawData: null); } @@ -543,16 +376,6 @@ public static ContainerRegistryRetentionPolicy ContainerRegistryRetentionPolicy( return new ContainerRegistryRetentionPolicy(days, lastUpdatedOn, status, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The number of days after which a soft-deleted item is permanently deleted. - /// The timestamp when the policy was last updated. - /// The value that indicates whether the policy is enabled or not. - /// A new instance for mocking. - public static ContainerRegistrySoftDeletePolicy ContainerRegistrySoftDeletePolicy(int? retentionDays = null, DateTimeOffset? lastUpdatedOn = null, ContainerRegistryPolicyStatus? status = null) - { - return new ContainerRegistrySoftDeletePolicy(retentionDays, lastUpdatedOn, status, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Key vault uri to access the encryption key. /// The fully qualified key identifier that includes the version of the key that is actually used for encryption. @@ -1294,27 +1117,6 @@ public static ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep( values?.ToList()); } - /// Initializes a new instance of . - /// The name of the container registry. - /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType) - { - return ContainerRegistryNameAvailabilityContent(name: name, resourceType: resourceType, resourceGroupName: default, autoGeneratedDomainNameLabelScope: default); - } - - /// Initializes a new instance of . - /// The value that indicates whether the name is available. - /// If any, the reason that the name is not available. - /// If any, the error message that provides more detail for the reason that the name is not available. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) - { - return ContainerRegistryNameAvailableResult(availableLoginServerName: default, isNameAvailable: isNameAvailable, reason: reason, message: message); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -1342,7 +1144,7 @@ public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailabl [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IEnumerable dataEndpointHostNames, IEnumerable privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy) { - return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: default, metadataSearch: default, autoGeneratedDomainNameLabelScope: default, roleAssignmentMode: default); + return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: default); } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs index be181f1cf86a..80c59dc5486f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string c /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connectedRegistryN /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string connectedRegistryNa /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string connectedRegistryName, CancellationT /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs index 1b2fff2736b1..a1c67db14052 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs @@ -158,7 +158,7 @@ internal static ConnectedRegistryData DeserializeConnectedRegistryData(JsonEleme string version = default; ConnectedRegistryConnectionState? connectionState = default; DateTimeOffset? lastActivityTime = default; - ConnectedRegistryActivation activation = default; + ConnectedRegistryPropertiesActivation activation = default; ConnectedRegistryParent parent = default; IList clientTokenIds = default; ConnectedRegistryLoginServer loginServer = default; @@ -250,7 +250,7 @@ internal static ConnectedRegistryData DeserializeConnectedRegistryData(JsonEleme { continue; } - activation = ConnectedRegistryActivation.DeserializeConnectedRegistryActivation(property0.Value, options); + activation = ConnectedRegistryPropertiesActivation.DeserializeConnectedRegistryPropertiesActivation(property0.Value, options); continue; } if (property0.NameEquals("parent"u8)) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs index d45939008e2b..30fc1097128c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs @@ -69,8 +69,8 @@ public ConnectedRegistryData() /// The current version of ACR runtime on the connected registry. /// The current connection state of the connected registry. /// The last activity time of the connected registry. - /// The activation properties of the connected registry. - /// The parent of the connected registry. + /// + /// The properties of the connected registry parent. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The login server properties of the connected registry. /// The logging properties of the connected registry. @@ -78,7 +78,7 @@ public ConnectedRegistryData() /// The list of notifications subscription information for the connected registry. /// The garbage collection properties of the connected registry. /// Keeps track of any properties unknown to the library. - internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, ConnectedRegistryMode? mode, string version, ConnectedRegistryConnectionState? connectionState, DateTimeOffset? lastActivityOn, ConnectedRegistryActivation activation, ConnectedRegistryParent parent, IList clientTokenIds, ConnectedRegistryLoginServer loginServer, ConnectedRegistryLogging logging, IReadOnlyList statusDetails, IList notificationsList, GarbageCollectionProperties garbageCollection, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, ConnectedRegistryMode? mode, string version, ConnectedRegistryConnectionState? connectionState, DateTimeOffset? lastActivityOn, ConnectedRegistryPropertiesActivation activation, ConnectedRegistryParent parent, IList clientTokenIds, ConnectedRegistryLoginServer loginServer, ConnectedRegistryLogging logging, IReadOnlyList statusDetails, IList notificationsList, GarbageCollectionProperties garbageCollection, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; Mode = mode; @@ -111,8 +111,8 @@ internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType /// The last activity time of the connected registry. [WirePath("properties.lastActivityTime")] public DateTimeOffset? LastActivityOn { get; } - /// The activation properties of the connected registry. - internal ConnectedRegistryActivation Activation { get; } + /// Gets the activation. + internal ConnectedRegistryPropertiesActivation Activation { get; } /// The activation status of the connected registry. [WirePath("properties.activation.status")] public ConnectedRegistryActivationStatus? ActivationStatus @@ -120,7 +120,7 @@ public ConnectedRegistryActivationStatus? ActivationStatus get => Activation?.Status; } - /// The parent of the connected registry. + /// The properties of the connected registry parent. [WirePath("properties.parent")] public ConnectedRegistryParent Parent { get; set; } /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs index e59033ab0f8f..c8be909c06cf 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task DeactivateAsync(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs index cb53723cc4d1..b6d53bd95218 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -88,7 +88,7 @@ public virtual async Task> Crea try { var response = await _containerRegistryAgentPoolAgentPoolsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(W try { var response = _containerRegistryAgentPoolAgentPoolsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string agentPool /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string agentPoolName, Canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string agentPoolName, CancellationToken can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs index 7ba0c254944e..81c919c9628e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> Upda try { var response = await _containerRegistryAgentPoolAgentPoolsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.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; @@ -313,7 +313,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Update(WaitUntil try { var response = _containerRegistryAgentPoolAgentPoolsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetQu /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -435,7 +435,7 @@ public virtual Response GetQueueStatus(Ca /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -497,7 +497,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -559,7 +559,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -616,7 +616,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -673,7 +673,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -733,7 +733,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveCollection.cs deleted file mode 100644 index 94048e6f51ef..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveCollection.cs +++ /dev/null @@ -1,498 +0,0 @@ -// 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.ContainerRegistry -{ - /// - /// 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 GetContainerRegistryArchives method from an instance of . - /// - public partial class ContainerRegistryArchiveCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _containerRegistryArchiveArchivesClientDiagnostics; - private readonly ArchivesRestOperations _containerRegistryArchiveArchivesRestClient; - private readonly string _packageType; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryArchiveCollection() - { - } - - /// 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. - /// The type of the package resource. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal ContainerRegistryArchiveCollection(ArmClient client, ResourceIdentifier id, string packageType) : base(client, id) - { - _packageType = packageType; - _containerRegistryArchiveArchivesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ContainerRegistryArchiveResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ContainerRegistryArchiveResource.ResourceType, out string containerRegistryArchiveArchivesApiVersion); - _containerRegistryArchiveArchivesRestClient = new ArchivesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryArchiveArchivesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ContainerRegistryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerRegistryResource.ResourceType), nameof(id)); - } - - /// - /// Creates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 archive resource. - /// The parameters for creating a archive. - /// 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 archiveName, ContainerRegistryArchiveData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveArchivesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryArchiveOperationSource(Client), _containerRegistryArchiveArchivesClientDiagnostics, Pipeline, _containerRegistryArchiveArchivesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 archive resource. - /// The parameters for creating a archive. - /// 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 archiveName, ContainerRegistryArchiveData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _containerRegistryArchiveArchivesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryArchiveOperationSource(Client), _containerRegistryArchiveArchivesClientDiagnostics, Pipeline, _containerRegistryArchiveArchivesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the archive. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.Get"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveArchivesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the archive. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.Get"); - scope.Start(); - try - { - var response = _containerRegistryArchiveArchivesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all archives for the specified container registry and package type. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives - /// - /// - /// Operation Id - /// Archives_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryArchiveArchivesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryArchiveArchivesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryArchiveResource(Client, ContainerRegistryArchiveData.DeserializeContainerRegistryArchiveData(e)), _containerRegistryArchiveArchivesClientDiagnostics, Pipeline, "ContainerRegistryArchiveCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all archives for the specified container registry and package type. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives - /// - /// - /// Operation Id - /// Archives_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryArchiveArchivesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryArchiveArchivesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryArchiveResource(Client, ContainerRegistryArchiveData.DeserializeContainerRegistryArchiveData(e)), _containerRegistryArchiveArchivesClientDiagnostics, Pipeline, "ContainerRegistryArchiveCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.Exists"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveArchivesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, 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.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.Exists"); - scope.Start(); - try - { - var response = _containerRegistryArchiveArchivesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, 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.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveArchivesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveResource(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.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveCollection.GetIfExists"); - scope.Start(); - try - { - var response = _containerRegistryArchiveArchivesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _packageType, archiveName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveResource(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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveData.Serialization.cs deleted file mode 100644 index adbc5d75acf2..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveData.Serialization.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryArchiveData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryArchiveData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(PackageSource)) - { - writer.WritePropertyName("packageSource"u8); - writer.WriteObjectValue(PackageSource, options); - } - if (Optional.IsDefined(PublishedVersion)) - { - writer.WritePropertyName("publishedVersion"u8); - writer.WriteStringValue(PublishedVersion); - } - if (Optional.IsDefined(RepositoryEndpointPrefix)) - { - writer.WritePropertyName("repositoryEndpointPrefix"u8); - writer.WriteStringValue(RepositoryEndpointPrefix); - } - if (options.Format != "W" && Optional.IsDefined(RepositoryEndpoint)) - { - writer.WritePropertyName("repositoryEndpoint"u8); - writer.WriteStringValue(RepositoryEndpoint); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WriteEndObject(); - } - - ContainerRegistryArchiveData 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(ContainerRegistryArchiveData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryArchiveData(document.RootElement, options); - } - - internal static ContainerRegistryArchiveData DeserializeContainerRegistryArchiveData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - ArchivePackageSourceProperties packageSource = default; - string publishedVersion = default; - string repositoryEndpointPrefix = default; - string repositoryEndpoint = default; - ContainerRegistryProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("packageSource"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - packageSource = ArchivePackageSourceProperties.DeserializeArchivePackageSourceProperties(property0.Value, options); - continue; - } - if (property0.NameEquals("publishedVersion"u8)) - { - publishedVersion = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("repositoryEndpointPrefix"u8)) - { - repositoryEndpointPrefix = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("repositoryEndpoint"u8)) - { - repositoryEndpoint = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ContainerRegistryProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryArchiveData( - id, - name, - type, - systemData, - packageSource, - publishedVersion, - repositoryEndpointPrefix, - repositoryEndpoint, - provisioningState, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PackageSource), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" packageSource: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PackageSource)) - { - builder.Append(" packageSource: "); - BicepSerializationHelpers.AppendChildObject(builder, PackageSource, options, 4, false, " packageSource: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublishedVersion), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" publishedVersion: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PublishedVersion)) - { - builder.Append(" publishedVersion: "); - if (PublishedVersion.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{PublishedVersion}'''"); - } - else - { - builder.AppendLine($"'{PublishedVersion}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RepositoryEndpointPrefix), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" repositoryEndpointPrefix: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(RepositoryEndpointPrefix)) - { - builder.Append(" repositoryEndpointPrefix: "); - if (RepositoryEndpointPrefix.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{RepositoryEndpointPrefix}'''"); - } - else - { - builder.AppendLine($"'{RepositoryEndpointPrefix}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RepositoryEndpoint), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" repositoryEndpoint: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(RepositoryEndpoint)) - { - builder.Append(" repositoryEndpoint: "); - if (RepositoryEndpoint.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{RepositoryEndpoint}'''"); - } - else - { - builder.AppendLine($"'{RepositoryEndpoint}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistryArchiveData)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryArchiveData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryArchiveData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryArchiveData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveData.cs deleted file mode 100644 index d7c015df2738..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveData.cs +++ /dev/null @@ -1,96 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A class representing the ContainerRegistryArchive data model. - /// An object that represents a archive for a container registry. - /// - public partial class ContainerRegistryArchiveData : 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 ContainerRegistryArchiveData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The package source of the archive. - /// The published version of the archive. - /// - /// - /// The provisioning state of the archive at the time the operation was called. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryArchiveData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ArchivePackageSourceProperties packageSource, string publishedVersion, string repositoryEndpointPrefix, string repositoryEndpoint, ContainerRegistryProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - PackageSource = packageSource; - PublishedVersion = publishedVersion; - RepositoryEndpointPrefix = repositoryEndpointPrefix; - RepositoryEndpoint = repositoryEndpoint; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The package source of the archive. - [WirePath("properties.packageSource")] - public ArchivePackageSourceProperties PackageSource { get; set; } - /// The published version of the archive. - [WirePath("properties.publishedVersion")] - public string PublishedVersion { get; set; } - /// Gets or sets the repository endpoint prefix. - [WirePath("properties.repositoryEndpointPrefix")] - public string RepositoryEndpointPrefix { get; set; } - /// Gets the repository endpoint. - [WirePath("properties.repositoryEndpoint")] - public string RepositoryEndpoint { get; } - /// The provisioning state of the archive at the time the operation was called. - [WirePath("properties.provisioningState")] - public ContainerRegistryProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveResource.Serialization.cs deleted file mode 100644 index 1cd37cd40cc2..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.ContainerRegistry -{ - public partial class ContainerRegistryArchiveResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - ContainerRegistryArchiveData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - ContainerRegistryArchiveData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveResource.cs deleted file mode 100644 index f0faa97ed9c9..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveResource.cs +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A Class representing a ContainerRegistryArchive 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 GetContainerRegistryArchiveResource method. - /// Otherwise you can get one from its parent resource using the GetContainerRegistryArchive method. - /// - public partial class ContainerRegistryArchiveResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The registryName. - /// The packageType. - /// The archiveName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _containerRegistryArchiveArchivesClientDiagnostics; - private readonly ArchivesRestOperations _containerRegistryArchiveArchivesRestClient; - private readonly ContainerRegistryArchiveData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ContainerRegistry/registries/packages/archives"; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryArchiveResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ContainerRegistryArchiveResource(ArmClient client, ContainerRegistryArchiveData 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 ContainerRegistryArchiveResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryArchiveArchivesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string containerRegistryArchiveArchivesApiVersion); - _containerRegistryArchiveArchivesRestClient = new ArchivesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryArchiveArchivesApiVersion); -#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 ContainerRegistryArchiveData 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 ContainerRegistryArchiveVersionResources in the ContainerRegistryArchive. - /// An object representing collection of ContainerRegistryArchiveVersionResources and their operations over a ContainerRegistryArchiveVersionResource. - public virtual ContainerRegistryArchiveVersionCollection GetContainerRegistryArchiveVersions() - { - return GetCachedClient(client => new ContainerRegistryArchiveVersionCollection(client, Id)); - } - - /// - /// Gets the properties of the archive version. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetContainerRegistryArchiveVersionAsync(string archiveVersionName, CancellationToken cancellationToken = default) - { - return await GetContainerRegistryArchiveVersions().GetAsync(archiveVersionName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the properties of the archive version. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetContainerRegistryArchiveVersion(string archiveVersionName, CancellationToken cancellationToken = default) - { - return GetContainerRegistryArchiveVersions().Get(archiveVersionName, cancellationToken); - } - - /// - /// Gets the properties of the archive. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveResource.Get"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveArchivesRestClient.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 ContainerRegistryArchiveResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the archive. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveResource.Get"); - scope.Start(); - try - { - var response = _containerRegistryArchiveArchivesRestClient.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 ContainerRegistryArchiveResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a archive from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveResource.Delete"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveArchivesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryArchiveArchivesClientDiagnostics, Pipeline, _containerRegistryArchiveArchivesRestClient.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; - } - } - - /// - /// Deletes a archive from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveResource.Delete"); - scope.Start(); - try - { - var response = _containerRegistryArchiveArchivesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryArchiveArchivesClientDiagnostics, Pipeline, _containerRegistryArchiveArchivesRestClient.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; - } - } - - /// - /// Updates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Update - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The parameters for updating a archive. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(ContainerRegistryArchivePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveResource.Update"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveArchivesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ContainerRegistryArchiveResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Update - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The parameters for updating a archive. - /// The cancellation token to use. - /// is null. - public virtual Response Update(ContainerRegistryArchivePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _containerRegistryArchiveArchivesClientDiagnostics.CreateScope("ContainerRegistryArchiveResource.Update"); - scope.Start(); - try - { - var response = _containerRegistryArchiveArchivesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); - return Response.FromValue(new ContainerRegistryArchiveResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionCollection.cs deleted file mode 100644 index c58ecc6b980e..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionCollection.cs +++ /dev/null @@ -1,489 +0,0 @@ -// 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.ContainerRegistry -{ - /// - /// 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 GetContainerRegistryArchiveVersions method from an instance of . - /// - public partial class ContainerRegistryArchiveVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics; - private readonly ArchiveVersionsRestOperations _containerRegistryArchiveVersionArchiveVersionsRestClient; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryArchiveVersionCollection() - { - } - - /// 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 ContainerRegistryArchiveVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ContainerRegistryArchiveVersionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ContainerRegistryArchiveVersionResource.ResourceType, out string containerRegistryArchiveVersionArchiveVersionsApiVersion); - _containerRegistryArchiveVersionArchiveVersionsRestClient = new ArchiveVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryArchiveVersionArchiveVersionsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ContainerRegistryArchiveResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerRegistryArchiveResource.ResourceType), nameof(id)); - } - - /// - /// Creates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryArchiveVersionOperationSource(Client), _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _containerRegistryArchiveVersionArchiveVersionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryArchiveVersionOperationSource(Client), _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the archive version. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.Get"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveVersionArchiveVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the archive version. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.Get"); - scope.Start(); - try - { - var response = _containerRegistryArchiveVersionArchiveVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all archive versions for the specified container registry, repository type and archive name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions - /// - /// - /// Operation Id - /// ArchiveVersions_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryArchiveVersionResource(Client, ContainerRegistryArchiveVersionData.DeserializeContainerRegistryArchiveVersionData(e)), _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, "ContainerRegistryArchiveVersionCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all archive versions for the specified container registry, repository type and archive name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions - /// - /// - /// Operation Id - /// ArchiveVersions_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryArchiveVersionResource(Client, ContainerRegistryArchiveVersionData.DeserializeContainerRegistryArchiveVersionData(e)), _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, "ContainerRegistryArchiveVersionCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.Exists"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveVersionArchiveVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, 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.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.Exists"); - scope.Start(); - try - { - var response = _containerRegistryArchiveVersionArchiveVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, 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.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveVersionArchiveVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveVersionResource(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.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the archive version resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionCollection.GetIfExists"); - scope.Start(); - try - { - var response = _containerRegistryArchiveVersionArchiveVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, archiveVersionName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveVersionResource(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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionData.Serialization.cs deleted file mode 100644 index 985b6c5f8e63..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionData.Serialization.cs +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryArchiveVersionData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryArchiveVersionData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ArchiveVersionErrorMessage)) - { - writer.WritePropertyName("archiveVersionErrorMessage"u8); - writer.WriteStringValue(ArchiveVersionErrorMessage); - } - writer.WriteEndObject(); - } - - ContainerRegistryArchiveVersionData 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(ContainerRegistryArchiveVersionData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryArchiveVersionData(document.RootElement, options); - } - - internal static ContainerRegistryArchiveVersionData DeserializeContainerRegistryArchiveVersionData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - ContainerRegistryProvisioningState? provisioningState = default; - string archiveVersionErrorMessage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ContainerRegistryProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("archiveVersionErrorMessage"u8)) - { - archiveVersionErrorMessage = property0.Value.GetString(); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryArchiveVersionData( - id, - name, - type, - systemData, - provisioningState, - archiveVersionErrorMessage, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ArchiveVersionErrorMessage), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" archiveVersionErrorMessage: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ArchiveVersionErrorMessage)) - { - builder.Append(" archiveVersionErrorMessage: "); - if (ArchiveVersionErrorMessage.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{ArchiveVersionErrorMessage}'''"); - } - else - { - builder.AppendLine($"'{ArchiveVersionErrorMessage}'"); - } - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistryArchiveVersionData)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryArchiveVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryArchiveVersionData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryArchiveVersionData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionData.cs deleted file mode 100644 index 7d4cb16a8cf6..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionData.cs +++ /dev/null @@ -1,81 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A class representing the ContainerRegistryArchiveVersion data model. - /// An object that represents an export pipeline for a container registry. - /// - public partial class ContainerRegistryArchiveVersionData : 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 ContainerRegistryArchiveVersionData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of the archive at the time the operation was called. - /// The detailed error message for the archive version in the case of failure. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryArchiveVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, string archiveVersionErrorMessage, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - ProvisioningState = provisioningState; - ArchiveVersionErrorMessage = archiveVersionErrorMessage; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The provisioning state of the archive at the time the operation was called. - [WirePath("properties.provisioningState")] - public ContainerRegistryProvisioningState? ProvisioningState { get; } - /// The detailed error message for the archive version in the case of failure. - [WirePath("properties.archiveVersionErrorMessage")] - public string ArchiveVersionErrorMessage { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionResource.Serialization.cs deleted file mode 100644 index 80b70a4039eb..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.ContainerRegistry -{ - public partial class ContainerRegistryArchiveVersionResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - ContainerRegistryArchiveVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - ContainerRegistryArchiveVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionResource.cs deleted file mode 100644 index de8f5dd44974..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryArchiveVersionResource.cs +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A Class representing a ContainerRegistryArchiveVersion 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 GetContainerRegistryArchiveVersionResource method. - /// Otherwise you can get one from its parent resource using the GetContainerRegistryArchiveVersion method. - /// - public partial class ContainerRegistryArchiveVersionResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The registryName. - /// The packageType. - /// The archiveName. - /// The archiveVersionName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics; - private readonly ArchiveVersionsRestOperations _containerRegistryArchiveVersionArchiveVersionsRestClient; - private readonly ContainerRegistryArchiveVersionData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ContainerRegistry/registries/packages/archives/versions"; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryArchiveVersionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ContainerRegistryArchiveVersionResource(ArmClient client, ContainerRegistryArchiveVersionData 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 ContainerRegistryArchiveVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string containerRegistryArchiveVersionArchiveVersionsApiVersion); - _containerRegistryArchiveVersionArchiveVersionsRestClient = new ArchiveVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryArchiveVersionArchiveVersionsApiVersion); -#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 ContainerRegistryArchiveVersionData 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 the properties of the archive version. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionResource.Get"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveVersionArchiveVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, 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 ContainerRegistryArchiveVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the archive version. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionResource.Get"); - scope.Start(); - try - { - var response = _containerRegistryArchiveVersionArchiveVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryArchiveVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a archive version from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionResource.Delete"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveVersionArchiveVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, 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; - } - } - - /// - /// Deletes a archive version from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionResource.Delete"); - scope.Start(); - try - { - var response = _containerRegistryArchiveVersionArchiveVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, 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; - } - } - - /// - /// Creates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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> UpdateAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionResource.Update"); - scope.Start(); - try - { - var response = await _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryArchiveVersionOperationSource(Client), _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a archive for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName} - /// - /// - /// Operation Id - /// ArchiveVersions_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 Update(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics.CreateScope("ContainerRegistryArchiveVersionResource.Update"); - scope.Start(); - try - { - var response = _containerRegistryArchiveVersionArchiveVersionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryArchiveVersionOperationSource(Client), _containerRegistryArchiveVersionArchiveVersionsClientDiagnostics, Pipeline, _containerRegistryArchiveVersionArchiveVersionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs index 7b647101c20a..edee44a67e74 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string cacheRule /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string cacheRuleName, Canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string cacheRuleName, CancellationToken can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs index 26e19bbafa92..c678eee7fb9b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs index 876a206a3099..61a650d420a9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string registryName, Canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string registryName, Cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string registryName, CancellationToken canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs index 7f4934568e08..9557fe1e0d76 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string crede /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string credentialSetName, /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string credentialSetName, CancellationToken /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs index de8cb0f757b1..f0cfd4a45b2c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs index f70f199f7d6f..01e5193da52a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs @@ -133,21 +133,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("anonymousPullEnabled"u8); writer.WriteBooleanValue(IsAnonymousPullEnabled.Value); } - if (Optional.IsDefined(MetadataSearch)) - { - writer.WritePropertyName("metadataSearch"u8); - writer.WriteStringValue(MetadataSearch.Value.ToString()); - } - if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) - { - writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); - writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.Value.ToString()); - } - if (Optional.IsDefined(RoleAssignmentMode)) - { - writer.WritePropertyName("roleAssignmentMode"u8); - writer.WriteStringValue(RoleAssignmentMode.Value.ToString()); - } writer.WriteEndObject(); } @@ -194,9 +179,6 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default; ContainerRegistryZoneRedundancy? zoneRedundancy = default; bool? anonymousPullEnabled = default; - ContainerRegistryMetadataSearch? metadataSearch = default; - AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; - ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -408,33 +390,6 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme anonymousPullEnabled = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("metadataSearch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - metadataSearch = new ContainerRegistryMetadataSearch(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("autoGeneratedDomainNameLabelScope"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("roleAssignmentMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - roleAssignmentMode = new ContainerRegistryRoleAssignmentMode(property0.Value.GetString()); - continue; - } } continue; } @@ -468,9 +423,6 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme networkRuleBypassOptions, zoneRedundancy, anonymousPullEnabled, - metadataSearch, - autoGeneratedDomainNameLabelScope, - roleAssignmentMode, serializedAdditionalRawData); } @@ -885,51 +837,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MetadataSearch), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" metadataSearch: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(MetadataSearch)) - { - builder.Append(" metadataSearch: "); - builder.AppendLine($"'{MetadataSearch.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AutoGeneratedDomainNameLabelScope), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" autoGeneratedDomainNameLabelScope: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) - { - builder.Append(" autoGeneratedDomainNameLabelScope: "); - builder.AppendLine($"'{AutoGeneratedDomainNameLabelScope.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RoleAssignmentMode), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" roleAssignmentMode: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(RoleAssignmentMode)) - { - builder.Append(" roleAssignmentMode: "); - builder.AppendLine($"'{RoleAssignmentMode.Value.ToString()}'"); - } - } - builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs index bef46a7aabb0..5a71a85d65f4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs @@ -88,11 +88,8 @@ public ContainerRegistryData(AzureLocation location, ContainerRegistrySku sku) : /// Whether to allow trusted Azure services to access a network restricted registry. /// Whether or not zone redundancy is enabled for this container registry. /// Enables registry-wide pull from unauthenticated clients. - /// Determines whether registry artifacts are indexed for metadata search. - /// Determines the domain name label reuse scope. - /// Determines registry role assignment mode. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IReadOnlyList dataEndpointHostNames, IReadOnlyList privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled, ContainerRegistryMetadataSearch? metadataSearch, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, ContainerRegistryRoleAssignmentMode? roleAssignmentMode, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IReadOnlyList dataEndpointHostNames, IReadOnlyList privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -111,9 +108,6 @@ internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType NetworkRuleBypassOptions = networkRuleBypassOptions; ZoneRedundancy = zoneRedundancy; IsAnonymousPullEnabled = isAnonymousPullEnabled; - MetadataSearch = metadataSearch; - AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; - RoleAssignmentMode = roleAssignmentMode; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -173,14 +167,5 @@ internal ContainerRegistryData() /// Enables registry-wide pull from unauthenticated clients. [WirePath("properties.anonymousPullEnabled")] public bool? IsAnonymousPullEnabled { get; set; } - /// Determines whether registry artifacts are indexed for metadata search. - [WirePath("properties.metadataSearch")] - public ContainerRegistryMetadataSearch? MetadataSearch { get; set; } - /// Determines the domain name label reuse scope. - [WirePath("properties.autoGeneratedDomainNameLabelScope")] - public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } - /// Determines registry role assignment mode. - [WirePath("properties.roleAssignmentMode")] - public ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineCollection.cs deleted file mode 100644 index 062d083dcc4e..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineCollection.cs +++ /dev/null @@ -1,493 +0,0 @@ -// 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.ContainerRegistry -{ - /// - /// 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 GetContainerRegistryExportPipelines method from an instance of . - /// - public partial class ContainerRegistryExportPipelineCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _containerRegistryExportPipelineExportPipelinesClientDiagnostics; - private readonly ExportPipelinesRestOperations _containerRegistryExportPipelineExportPipelinesRestClient; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryExportPipelineCollection() - { - } - - /// 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 ContainerRegistryExportPipelineCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryExportPipelineExportPipelinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ContainerRegistryExportPipelineResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ContainerRegistryExportPipelineResource.ResourceType, out string containerRegistryExportPipelineExportPipelinesApiVersion); - _containerRegistryExportPipelineExportPipelinesRestClient = new ExportPipelinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryExportPipelineExportPipelinesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ContainerRegistryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerRegistryResource.ResourceType), nameof(id)); - } - - /// - /// Creates an export pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 export pipeline. - /// The parameters for creating an export pipeline. - /// 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 exportPipelineName, ContainerRegistryExportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _containerRegistryExportPipelineExportPipelinesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryExportPipelineOperationSource(Client), _containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, _containerRegistryExportPipelineExportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates an export pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 export pipeline. - /// The parameters for creating an export pipeline. - /// 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 exportPipelineName, ContainerRegistryExportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _containerRegistryExportPipelineExportPipelinesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryExportPipelineOperationSource(Client), _containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, _containerRegistryExportPipelineExportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the export pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.Get"); - scope.Start(); - try - { - var response = await _containerRegistryExportPipelineExportPipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryExportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the export pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.Get"); - scope.Start(); - try - { - var response = _containerRegistryExportPipelineExportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryExportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all export pipelines for the specified container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines - /// - /// - /// Operation Id - /// ExportPipelines_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryExportPipelineExportPipelinesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryExportPipelineExportPipelinesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryExportPipelineResource(Client, ContainerRegistryExportPipelineData.DeserializeContainerRegistryExportPipelineData(e)), _containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, "ContainerRegistryExportPipelineCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all export pipelines for the specified container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines - /// - /// - /// Operation Id - /// ExportPipelines_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryExportPipelineExportPipelinesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryExportPipelineExportPipelinesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryExportPipelineResource(Client, ContainerRegistryExportPipelineData.DeserializeContainerRegistryExportPipelineData(e)), _containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, "ContainerRegistryExportPipelineCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.Exists"); - scope.Start(); - try - { - var response = await _containerRegistryExportPipelineExportPipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, 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.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.Exists"); - scope.Start(); - try - { - var response = _containerRegistryExportPipelineExportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, 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.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _containerRegistryExportPipelineExportPipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryExportPipelineResource(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.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineCollection.GetIfExists"); - scope.Start(); - try - { - var response = _containerRegistryExportPipelineExportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exportPipelineName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryExportPipelineResource(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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineData.Serialization.cs deleted file mode 100644 index eb786044c91d..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineData.Serialization.cs +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryExportPipelineData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryExportPipelineData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - JsonSerializer.Serialize(writer, Identity); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"u8); - writer.WriteObjectValue(Target, options); - } - if (Optional.IsCollectionDefined(Options)) - { - writer.WritePropertyName("options"u8); - writer.WriteStartArray(); - foreach (var item in Options) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WriteEndObject(); - } - - ContainerRegistryExportPipelineData 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(ContainerRegistryExportPipelineData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryExportPipelineData(document.RootElement, options); - } - - internal static ContainerRegistryExportPipelineData DeserializeContainerRegistryExportPipelineData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AzureLocation? location = default; - ManagedServiceIdentity identity = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - ExportPipelineTargetProperties target = default; - IList options0 = default; - ContainerRegistryProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); - 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("target"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - target = ExportPipelineTargetProperties.DeserializeExportPipelineTargetProperties(property0.Value, options); - continue; - } - if (property0.NameEquals("options"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(new ContainerRegistryPipelineOption(item.GetString())); - } - options0 = array; - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ContainerRegistryProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryExportPipelineData( - id, - name, - type, - systemData, - location, - identity, - target, - options0 ?? new ChangeTrackingList(), - provisioningState, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" location: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Location)) - { - builder.Append(" location: "); - builder.AppendLine($"'{Location.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" identity: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Identity)) - { - builder.Append(" identity: "); - BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Target), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" target: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Target)) - { - builder.Append(" target: "); - BicepSerializationHelpers.AppendChildObject(builder, Target, options, 4, false, " target: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Options), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" options: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Options)) - { - if (Options.Any()) - { - builder.Append(" options: "); - builder.AppendLine("["); - foreach (var item in Options) - { - builder.AppendLine($" '{item.ToString()}'"); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistryExportPipelineData)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryExportPipelineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryExportPipelineData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryExportPipelineData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineData.cs deleted file mode 100644 index 4c094a6d3552..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineData.cs +++ /dev/null @@ -1,97 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A class representing the ContainerRegistryExportPipeline data model. - /// An object that represents an export pipeline for a container registry. - /// - public partial class ContainerRegistryExportPipelineData : 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 ContainerRegistryExportPipelineData() - { - Options = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The location of the export pipeline. - /// The identity of the export pipeline. - /// The target properties of the export pipeline. - /// The list of all options configured for the pipeline. - /// The provisioning state of the pipeline at the time the operation was called. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryExportPipelineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, ManagedServiceIdentity identity, ExportPipelineTargetProperties target, IList options, ContainerRegistryProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Location = location; - Identity = identity; - Target = target; - Options = options; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The location of the export pipeline. - [WirePath("location")] - public AzureLocation? Location { get; set; } - /// The identity of the export pipeline. - [WirePath("identity")] - public ManagedServiceIdentity Identity { get; set; } - /// The target properties of the export pipeline. - [WirePath("properties.target")] - public ExportPipelineTargetProperties Target { get; set; } - /// The list of all options configured for the pipeline. - [WirePath("properties.options")] - public IList Options { get; } - /// The provisioning state of the pipeline at the time the operation was called. - [WirePath("properties.provisioningState")] - public ContainerRegistryProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineResource.Serialization.cs deleted file mode 100644 index 64c460364168..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.ContainerRegistry -{ - public partial class ContainerRegistryExportPipelineResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - ContainerRegistryExportPipelineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - ContainerRegistryExportPipelineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineResource.cs deleted file mode 100644 index 4a27ae9df8da..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryExportPipelineResource.cs +++ /dev/null @@ -1,347 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A Class representing a ContainerRegistryExportPipeline 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 GetContainerRegistryExportPipelineResource method. - /// Otherwise you can get one from its parent resource using the GetContainerRegistryExportPipeline method. - /// - public partial class ContainerRegistryExportPipelineResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The registryName. - /// The exportPipelineName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _containerRegistryExportPipelineExportPipelinesClientDiagnostics; - private readonly ExportPipelinesRestOperations _containerRegistryExportPipelineExportPipelinesRestClient; - private readonly ContainerRegistryExportPipelineData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ContainerRegistry/registries/exportPipelines"; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryExportPipelineResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ContainerRegistryExportPipelineResource(ArmClient client, ContainerRegistryExportPipelineData 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 ContainerRegistryExportPipelineResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryExportPipelineExportPipelinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string containerRegistryExportPipelineExportPipelinesApiVersion); - _containerRegistryExportPipelineExportPipelinesRestClient = new ExportPipelinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryExportPipelineExportPipelinesApiVersion); -#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 ContainerRegistryExportPipelineData 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 the properties of the export pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineResource.Get"); - scope.Start(); - try - { - var response = await _containerRegistryExportPipelineExportPipelinesRestClient.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 ContainerRegistryExportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the export pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineResource.Get"); - scope.Start(); - try - { - var response = _containerRegistryExportPipelineExportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryExportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an export pipeline from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineResource.Delete"); - scope.Start(); - try - { - var response = await _containerRegistryExportPipelineExportPipelinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, _containerRegistryExportPipelineExportPipelinesRestClient.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; - } - } - - /// - /// Deletes an export pipeline from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineResource.Delete"); - scope.Start(); - try - { - var response = _containerRegistryExportPipelineExportPipelinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, _containerRegistryExportPipelineExportPipelinesRestClient.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; - } - } - - /// - /// Creates an export pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 parameters for creating an export pipeline. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryExportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineResource.Update"); - scope.Start(); - try - { - var response = await _containerRegistryExportPipelineExportPipelinesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryExportPipelineOperationSource(Client), _containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, _containerRegistryExportPipelineExportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates an export pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 parameters for creating an export pipeline. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryExportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryExportPipelineExportPipelinesClientDiagnostics.CreateScope("ContainerRegistryExportPipelineResource.Update"); - scope.Start(); - try - { - var response = _containerRegistryExportPipelineExportPipelinesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryExportPipelineOperationSource(Client), _containerRegistryExportPipelineExportPipelinesClientDiagnostics, Pipeline, _containerRegistryExportPipelineExportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineCollection.cs deleted file mode 100644 index 8bbfa696dec1..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineCollection.cs +++ /dev/null @@ -1,493 +0,0 @@ -// 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.ContainerRegistry -{ - /// - /// 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 GetContainerRegistryImportPipelines method from an instance of . - /// - public partial class ContainerRegistryImportPipelineCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _containerRegistryImportPipelineImportPipelinesClientDiagnostics; - private readonly ImportPipelinesRestOperations _containerRegistryImportPipelineImportPipelinesRestClient; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryImportPipelineCollection() - { - } - - /// 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 ContainerRegistryImportPipelineCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryImportPipelineImportPipelinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ContainerRegistryImportPipelineResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ContainerRegistryImportPipelineResource.ResourceType, out string containerRegistryImportPipelineImportPipelinesApiVersion); - _containerRegistryImportPipelineImportPipelinesRestClient = new ImportPipelinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryImportPipelineImportPipelinesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ContainerRegistryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerRegistryResource.ResourceType), nameof(id)); - } - - /// - /// Creates an import pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 import pipeline. - /// The parameters for creating an import pipeline. - /// 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 importPipelineName, ContainerRegistryImportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _containerRegistryImportPipelineImportPipelinesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryImportPipelineOperationSource(Client), _containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, _containerRegistryImportPipelineImportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates an import pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 import pipeline. - /// The parameters for creating an import pipeline. - /// 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 importPipelineName, ContainerRegistryImportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _containerRegistryImportPipelineImportPipelinesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryImportPipelineOperationSource(Client), _containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, _containerRegistryImportPipelineImportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the import pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.Get"); - scope.Start(); - try - { - var response = await _containerRegistryImportPipelineImportPipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryImportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the import pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.Get"); - scope.Start(); - try - { - var response = _containerRegistryImportPipelineImportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryImportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all import pipelines for the specified container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines - /// - /// - /// Operation Id - /// ImportPipelines_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryImportPipelineImportPipelinesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryImportPipelineImportPipelinesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryImportPipelineResource(Client, ContainerRegistryImportPipelineData.DeserializeContainerRegistryImportPipelineData(e)), _containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, "ContainerRegistryImportPipelineCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all import pipelines for the specified container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines - /// - /// - /// Operation Id - /// ImportPipelines_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryImportPipelineImportPipelinesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryImportPipelineImportPipelinesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryImportPipelineResource(Client, ContainerRegistryImportPipelineData.DeserializeContainerRegistryImportPipelineData(e)), _containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, "ContainerRegistryImportPipelineCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.Exists"); - scope.Start(); - try - { - var response = await _containerRegistryImportPipelineImportPipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, 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.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.Exists"); - scope.Start(); - try - { - var response = _containerRegistryImportPipelineImportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, 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.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _containerRegistryImportPipelineImportPipelinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryImportPipelineResource(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.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineCollection.GetIfExists"); - scope.Start(); - try - { - var response = _containerRegistryImportPipelineImportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, importPipelineName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryImportPipelineResource(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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineData.Serialization.cs deleted file mode 100644 index 1878e73eded9..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineData.Serialization.cs +++ /dev/null @@ -1,440 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryImportPipelineData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryImportPipelineData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - JsonSerializer.Serialize(writer, Identity); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Source)) - { - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source, options); - } - if (Optional.IsDefined(Trigger)) - { - writer.WritePropertyName("trigger"u8); - writer.WriteObjectValue(Trigger, options); - } - if (Optional.IsCollectionDefined(Options)) - { - writer.WritePropertyName("options"u8); - writer.WriteStartArray(); - foreach (var item in Options) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WriteEndObject(); - } - - ContainerRegistryImportPipelineData 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(ContainerRegistryImportPipelineData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryImportPipelineData(document.RootElement, options); - } - - internal static ContainerRegistryImportPipelineData DeserializeContainerRegistryImportPipelineData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AzureLocation? location = default; - ManagedServiceIdentity identity = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - ImportPipelineSourceProperties source = default; - PipelineTriggerProperties trigger = default; - IList options0 = default; - ContainerRegistryProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); - 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("source"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - source = ImportPipelineSourceProperties.DeserializeImportPipelineSourceProperties(property0.Value, options); - continue; - } - if (property0.NameEquals("trigger"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trigger = PipelineTriggerProperties.DeserializePipelineTriggerProperties(property0.Value, options); - continue; - } - if (property0.NameEquals("options"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(new ContainerRegistryPipelineOption(item.GetString())); - } - options0 = array; - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ContainerRegistryProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryImportPipelineData( - id, - name, - type, - systemData, - location, - identity, - source, - trigger, - options0 ?? new ChangeTrackingList(), - provisioningState, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" location: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Location)) - { - builder.Append(" location: "); - builder.AppendLine($"'{Location.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" identity: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Identity)) - { - builder.Append(" identity: "); - BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Source), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" source: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Source)) - { - builder.Append(" source: "); - BicepSerializationHelpers.AppendChildObject(builder, Source, options, 4, false, " source: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SourceTriggerStatus", out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" trigger: "); - builder.AppendLine("{"); - builder.AppendLine(" trigger: {"); - builder.AppendLine(" sourceTrigger: {"); - builder.Append(" status: "); - builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); - builder.AppendLine(" }"); - builder.AppendLine(" }"); - } - else - { - if (Optional.IsDefined(Trigger)) - { - builder.Append(" trigger: "); - BicepSerializationHelpers.AppendChildObject(builder, Trigger, options, 4, false, " trigger: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Options), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" options: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Options)) - { - if (Options.Any()) - { - builder.Append(" options: "); - builder.AppendLine("["); - foreach (var item in Options) - { - builder.AppendLine($" '{item.ToString()}'"); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistryImportPipelineData)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryImportPipelineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryImportPipelineData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryImportPipelineData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineData.cs deleted file mode 100644 index db2239a31c7a..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineData.cs +++ /dev/null @@ -1,121 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A class representing the ContainerRegistryImportPipeline data model. - /// An object that represents an import pipeline for a container registry. - /// - public partial class ContainerRegistryImportPipelineData : 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 ContainerRegistryImportPipelineData() - { - Options = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The location of the import pipeline. - /// The identity of the import pipeline. - /// The source properties of the import pipeline. - /// The properties that describe the trigger of the import pipeline. - /// The list of all options configured for the pipeline. - /// The provisioning state of the pipeline at the time the operation was called. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryImportPipelineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, ManagedServiceIdentity identity, ImportPipelineSourceProperties source, PipelineTriggerProperties trigger, IList options, ContainerRegistryProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Location = location; - Identity = identity; - Source = source; - Trigger = trigger; - Options = options; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The location of the import pipeline. - [WirePath("location")] - public AzureLocation? Location { get; set; } - /// The identity of the import pipeline. - [WirePath("identity")] - public ManagedServiceIdentity Identity { get; set; } - /// The source properties of the import pipeline. - [WirePath("properties.source")] - public ImportPipelineSourceProperties Source { get; set; } - /// The properties that describe the trigger of the import pipeline. - internal PipelineTriggerProperties Trigger { get; set; } - /// The current status of the source trigger. - [WirePath("properties.trigger.sourceTrigger.status")] - public ContainerRegistryTriggerStatus? SourceTriggerStatus - { - get => Trigger is null ? default : Trigger.SourceTriggerStatus; - set - { - if (value.HasValue) - { - if (Trigger is null) - Trigger = new PipelineTriggerProperties(); - Trigger.SourceTriggerStatus = value.Value; - } - else - { - Trigger = null; - } - } - } - - /// The list of all options configured for the pipeline. - [WirePath("properties.options")] - public IList Options { get; } - /// The provisioning state of the pipeline at the time the operation was called. - [WirePath("properties.provisioningState")] - public ContainerRegistryProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineResource.Serialization.cs deleted file mode 100644 index b3585138d256..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.ContainerRegistry -{ - public partial class ContainerRegistryImportPipelineResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - ContainerRegistryImportPipelineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - ContainerRegistryImportPipelineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineResource.cs deleted file mode 100644 index 971afcc587b7..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryImportPipelineResource.cs +++ /dev/null @@ -1,347 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A Class representing a ContainerRegistryImportPipeline 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 GetContainerRegistryImportPipelineResource method. - /// Otherwise you can get one from its parent resource using the GetContainerRegistryImportPipeline method. - /// - public partial class ContainerRegistryImportPipelineResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The registryName. - /// The importPipelineName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _containerRegistryImportPipelineImportPipelinesClientDiagnostics; - private readonly ImportPipelinesRestOperations _containerRegistryImportPipelineImportPipelinesRestClient; - private readonly ContainerRegistryImportPipelineData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ContainerRegistry/registries/importPipelines"; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryImportPipelineResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ContainerRegistryImportPipelineResource(ArmClient client, ContainerRegistryImportPipelineData 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 ContainerRegistryImportPipelineResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryImportPipelineImportPipelinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string containerRegistryImportPipelineImportPipelinesApiVersion); - _containerRegistryImportPipelineImportPipelinesRestClient = new ImportPipelinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryImportPipelineImportPipelinesApiVersion); -#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 ContainerRegistryImportPipelineData 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 the properties of the import pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineResource.Get"); - scope.Start(); - try - { - var response = await _containerRegistryImportPipelineImportPipelinesRestClient.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 ContainerRegistryImportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the import pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineResource.Get"); - scope.Start(); - try - { - var response = _containerRegistryImportPipelineImportPipelinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryImportPipelineResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes an import pipeline from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineResource.Delete"); - scope.Start(); - try - { - var response = await _containerRegistryImportPipelineImportPipelinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, _containerRegistryImportPipelineImportPipelinesRestClient.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; - } - } - - /// - /// Deletes an import pipeline from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineResource.Delete"); - scope.Start(); - try - { - var response = _containerRegistryImportPipelineImportPipelinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, _containerRegistryImportPipelineImportPipelinesRestClient.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; - } - } - - /// - /// Creates an import pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 parameters for creating an import pipeline. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryImportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineResource.Update"); - scope.Start(); - try - { - var response = await _containerRegistryImportPipelineImportPipelinesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryImportPipelineOperationSource(Client), _containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, _containerRegistryImportPipelineImportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates an import pipeline for a container registry with the specified parameters. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 parameters for creating an import pipeline. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryImportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryImportPipelineImportPipelinesClientDiagnostics.CreateScope("ContainerRegistryImportPipelineResource.Update"); - scope.Start(); - try - { - var response = _containerRegistryImportPipelineImportPipelinesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryImportPipelineOperationSource(Client), _containerRegistryImportPipelineImportPipelinesClientDiagnostics, Pipeline, _containerRegistryImportPipelineImportPipelinesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunCollection.cs deleted file mode 100644 index 59543e92ffe7..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunCollection.cs +++ /dev/null @@ -1,493 +0,0 @@ -// 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.ContainerRegistry -{ - /// - /// 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 GetContainerRegistryPipelineRuns method from an instance of . - /// - public partial class ContainerRegistryPipelineRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _containerRegistryPipelineRunPipelineRunsClientDiagnostics; - private readonly PipelineRunsRestOperations _containerRegistryPipelineRunPipelineRunsRestClient; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryPipelineRunCollection() - { - } - - /// 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 ContainerRegistryPipelineRunCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryPipelineRunPipelineRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ContainerRegistryPipelineRunResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ContainerRegistryPipelineRunResource.ResourceType, out string containerRegistryPipelineRunPipelineRunsApiVersion); - _containerRegistryPipelineRunPipelineRunsRestClient = new PipelineRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryPipelineRunPipelineRunsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ContainerRegistryResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerRegistryResource.ResourceType), nameof(id)); - } - - /// - /// Creates a pipeline run for a container registry with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 pipeline run. - /// The parameters for creating a pipeline run. - /// 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 pipelineRunName, ContainerRegistryPipelineRunData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _containerRegistryPipelineRunPipelineRunsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryPipelineRunOperationSource(Client), _containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, _containerRegistryPipelineRunPipelineRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a pipeline run for a container registry with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 pipeline run. - /// The parameters for creating a pipeline run. - /// 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 pipelineRunName, ContainerRegistryPipelineRunData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _containerRegistryPipelineRunPipelineRunsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryPipelineRunOperationSource(Client), _containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, _containerRegistryPipelineRunPipelineRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the detailed information for a given pipeline run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.Get"); - scope.Start(); - try - { - var response = await _containerRegistryPipelineRunPipelineRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryPipelineRunResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the detailed information for a given pipeline run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.Get"); - scope.Start(); - try - { - var response = _containerRegistryPipelineRunPipelineRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryPipelineRunResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all the pipeline runs for the specified container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns - /// - /// - /// Operation Id - /// PipelineRuns_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryPipelineRunPipelineRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryPipelineRunPipelineRunsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryPipelineRunResource(Client, ContainerRegistryPipelineRunData.DeserializeContainerRegistryPipelineRunData(e)), _containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, "ContainerRegistryPipelineRunCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all the pipeline runs for the specified container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns - /// - /// - /// Operation Id - /// PipelineRuns_List - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryPipelineRunPipelineRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryPipelineRunPipelineRunsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryPipelineRunResource(Client, ContainerRegistryPipelineRunData.DeserializeContainerRegistryPipelineRunData(e)), _containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, "ContainerRegistryPipelineRunCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.Exists"); - scope.Start(); - try - { - var response = await _containerRegistryPipelineRunPipelineRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, 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.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.Exists"); - scope.Start(); - try - { - var response = _containerRegistryPipelineRunPipelineRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, 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.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _containerRegistryPipelineRunPipelineRunsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryPipelineRunResource(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.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunCollection.GetIfExists"); - scope.Start(); - try - { - var response = _containerRegistryPipelineRunPipelineRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pipelineRunName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryPipelineRunResource(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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunData.Serialization.cs deleted file mode 100644 index db1ea5290107..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunData.Serialization.cs +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - public partial class ContainerRegistryPipelineRunData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(Request)) - { - writer.WritePropertyName("request"u8); - writer.WriteObjectValue(Request, options); - } - if (options.Format != "W" && Optional.IsDefined(Response)) - { - writer.WritePropertyName("response"u8); - writer.WriteObjectValue(Response, options); - } - if (Optional.IsDefined(ForceUpdateTag)) - { - writer.WritePropertyName("forceUpdateTag"u8); - writer.WriteStringValue(ForceUpdateTag); - } - writer.WriteEndObject(); - } - - ContainerRegistryPipelineRunData 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(ContainerRegistryPipelineRunData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryPipelineRunData(document.RootElement, options); - } - - internal static ContainerRegistryPipelineRunData DeserializeContainerRegistryPipelineRunData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - ContainerRegistryProvisioningState? provisioningState = default; - ConnectedRegistryPipelineRunContent request = default; - PipelineRunResult response = default; - string forceUpdateTag = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ContainerRegistryProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("request"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - request = ConnectedRegistryPipelineRunContent.DeserializeConnectedRegistryPipelineRunContent(property0.Value, options); - continue; - } - if (property0.NameEquals("response"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - response = PipelineRunResult.DeserializePipelineRunResult(property0.Value, options); - continue; - } - if (property0.NameEquals("forceUpdateTag"u8)) - { - forceUpdateTag = property0.Value.GetString(); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryPipelineRunData( - id, - name, - type, - systemData, - provisioningState, - request, - response, - forceUpdateTag, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Request), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" request: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Request)) - { - builder.Append(" request: "); - BicepSerializationHelpers.AppendChildObject(builder, Request, options, 4, false, " request: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Response), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" response: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Response)) - { - builder.Append(" response: "); - BicepSerializationHelpers.AppendChildObject(builder, Response, options, 4, false, " response: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ForceUpdateTag), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" forceUpdateTag: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ForceUpdateTag)) - { - builder.Append(" forceUpdateTag: "); - if (ForceUpdateTag.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{ForceUpdateTag}'''"); - } - else - { - builder.AppendLine($"'{ForceUpdateTag}'"); - } - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunData)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryPipelineRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryPipelineRunData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunData.cs deleted file mode 100644 index 54c3f395a8d9..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunData.cs +++ /dev/null @@ -1,91 +0,0 @@ -// 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.ContainerRegistry.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A class representing the ContainerRegistryPipelineRun data model. - /// An object that represents a pipeline run for a container registry. - /// - public partial class ContainerRegistryPipelineRunData : 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 ContainerRegistryPipelineRunData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The provisioning state of a pipeline run. - /// The request parameters for a pipeline run. - /// The response of a pipeline run. - /// How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPipelineRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, ConnectedRegistryPipelineRunContent request, PipelineRunResult response, string forceUpdateTag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - ProvisioningState = provisioningState; - Request = request; - Response = response; - ForceUpdateTag = forceUpdateTag; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The provisioning state of a pipeline run. - [WirePath("properties.provisioningState")] - public ContainerRegistryProvisioningState? ProvisioningState { get; } - /// The request parameters for a pipeline run. - [WirePath("properties.request")] - public ConnectedRegistryPipelineRunContent Request { get; set; } - /// The response of a pipeline run. - [WirePath("properties.response")] - public PipelineRunResult Response { get; } - /// How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed. - [WirePath("properties.forceUpdateTag")] - public string ForceUpdateTag { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunResource.Serialization.cs deleted file mode 100644 index f7a7140d7ce4..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.ContainerRegistry -{ - public partial class ContainerRegistryPipelineRunResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - ContainerRegistryPipelineRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - ContainerRegistryPipelineRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunResource.cs deleted file mode 100644 index 0b974d7e0ed1..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPipelineRunResource.cs +++ /dev/null @@ -1,347 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.ContainerRegistry -{ - /// - /// A Class representing a ContainerRegistryPipelineRun 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 GetContainerRegistryPipelineRunResource method. - /// Otherwise you can get one from its parent resource using the GetContainerRegistryPipelineRun method. - /// - public partial class ContainerRegistryPipelineRunResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The registryName. - /// The pipelineRunName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _containerRegistryPipelineRunPipelineRunsClientDiagnostics; - private readonly PipelineRunsRestOperations _containerRegistryPipelineRunPipelineRunsRestClient; - private readonly ContainerRegistryPipelineRunData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ContainerRegistry/registries/pipelineRuns"; - - /// Initializes a new instance of the class for mocking. - protected ContainerRegistryPipelineRunResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ContainerRegistryPipelineRunResource(ArmClient client, ContainerRegistryPipelineRunData 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 ContainerRegistryPipelineRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _containerRegistryPipelineRunPipelineRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string containerRegistryPipelineRunPipelineRunsApiVersion); - _containerRegistryPipelineRunPipelineRunsRestClient = new PipelineRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryPipelineRunPipelineRunsApiVersion); -#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 ContainerRegistryPipelineRunData 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 the detailed information for a given pipeline run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunResource.Get"); - scope.Start(); - try - { - var response = await _containerRegistryPipelineRunPipelineRunsRestClient.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 ContainerRegistryPipelineRunResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the detailed information for a given pipeline run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunResource.Get"); - scope.Start(); - try - { - var response = _containerRegistryPipelineRunPipelineRunsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ContainerRegistryPipelineRunResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a pipeline run from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunResource.Delete"); - scope.Start(); - try - { - var response = await _containerRegistryPipelineRunPipelineRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, _containerRegistryPipelineRunPipelineRunsRestClient.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; - } - } - - /// - /// Deletes a pipeline run from a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Delete - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunResource.Delete"); - scope.Start(); - try - { - var response = _containerRegistryPipelineRunPipelineRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, _containerRegistryPipelineRunPipelineRunsRestClient.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; - } - } - - /// - /// Creates a pipeline run for a container registry with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 parameters for creating a pipeline run. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryPipelineRunData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunResource.Update"); - scope.Start(); - try - { - var response = await _containerRegistryPipelineRunPipelineRunsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryPipelineRunOperationSource(Client), _containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, _containerRegistryPipelineRunPipelineRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates a pipeline run for a container registry with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Create - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// 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 parameters for creating a pipeline run. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryPipelineRunData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _containerRegistryPipelineRunPipelineRunsClientDiagnostics.CreateScope("ContainerRegistryPipelineRunResource.Update"); - scope.Start(); - try - { - var response = _containerRegistryPipelineRunPipelineRunsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryPipelineRunOperationSource(Client), _containerRegistryPipelineRunPipelineRunsClientDiagnostics, Pipeline, _containerRegistryPipelineRunPipelineRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs index d6c4ff09ad57..7f63a61eb6f9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetA /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs index f7af6a253f45..75bcbac5f805 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs index 512c77a63441..a3f1751b60b2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs index cde523d4c89c..9028c36e88df 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string groupNa /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs index f3bdd0d80f10..09d6834f91ae 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string replica /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string replicationName, Ca /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string replicationName, CancellationToken c /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs index add4792fb8eb..73a0703a0904 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs index a95909f3585d..a6cfcf1c5130 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs @@ -99,80 +99,6 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of ContainerRegistryArchiveResources in the ContainerRegistry. - /// The type of the package resource. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// An object representing collection of ContainerRegistryArchiveResources and their operations over a ContainerRegistryArchiveResource. - public virtual ContainerRegistryArchiveCollection GetContainerRegistryArchives(string packageType) - { - return new ContainerRegistryArchiveCollection(Client, Id, packageType); - } - - /// - /// Gets the properties of the archive. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The type of the package resource. - /// The name of the archive resource. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetContainerRegistryArchiveAsync(string packageType, string archiveName, CancellationToken cancellationToken = default) - { - return await GetContainerRegistryArchives(packageType).GetAsync(archiveName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the properties of the archive. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName} - /// - /// - /// Operation Id - /// Archives_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The type of the package resource. - /// The name of the archive resource. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetContainerRegistryArchive(string packageType, string archiveName, CancellationToken cancellationToken = default) - { - return GetContainerRegistryArchives(packageType).Get(archiveName, cancellationToken); - } - /// Gets a collection of ContainerRegistryCacheRuleResources in the ContainerRegistry. /// An object representing collection of ContainerRegistryCacheRuleResources and their operations over a ContainerRegistryCacheRuleResource. public virtual ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRules() @@ -193,7 +119,7 @@ public virtual ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRul /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -224,7 +150,7 @@ public virtual async Task> GetConta /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -262,7 +188,7 @@ public virtual ConnectedRegistryCollection GetConnectedRegistries() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -293,7 +219,7 @@ public virtual async Task> GetConnectedRegis /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -331,7 +257,7 @@ public virtual ContainerRegistryCredentialSetCollection GetContainerRegistryCred /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -362,7 +288,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -380,75 +306,6 @@ public virtual Response GetContainerRegi return GetContainerRegistryCredentialSets().Get(credentialSetName, cancellationToken); } - /// Gets a collection of ContainerRegistryExportPipelineResources in the ContainerRegistry. - /// An object representing collection of ContainerRegistryExportPipelineResources and their operations over a ContainerRegistryExportPipelineResource. - public virtual ContainerRegistryExportPipelineCollection GetContainerRegistryExportPipelines() - { - return GetCachedClient(client => new ContainerRegistryExportPipelineCollection(client, Id)); - } - - /// - /// Gets the properties of the export pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetContainerRegistryExportPipelineAsync(string exportPipelineName, CancellationToken cancellationToken = default) - { - return await GetContainerRegistryExportPipelines().GetAsync(exportPipelineName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the properties of the export pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName} - /// - /// - /// Operation Id - /// ExportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the export pipeline. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetContainerRegistryExportPipeline(string exportPipelineName, CancellationToken cancellationToken = default) - { - return GetContainerRegistryExportPipelines().Get(exportPipelineName, cancellationToken); - } - /// Gets a collection of ContainerRegistryPrivateLinkResources in the ContainerRegistry. /// An object representing collection of ContainerRegistryPrivateLinkResources and their operations over a ContainerRegistryPrivateLinkResource. public virtual ContainerRegistryPrivateLinkResourceCollection GetContainerRegistryPrivateLinkResources() @@ -469,7 +326,7 @@ public virtual ContainerRegistryPrivateLinkResourceCollection GetContainerRegist /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -500,7 +357,7 @@ public virtual async Task> GetCon /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -518,144 +375,6 @@ public virtual Response GetContainerRegist return GetContainerRegistryPrivateLinkResources().Get(groupName, cancellationToken); } - /// Gets a collection of ContainerRegistryImportPipelineResources in the ContainerRegistry. - /// An object representing collection of ContainerRegistryImportPipelineResources and their operations over a ContainerRegistryImportPipelineResource. - public virtual ContainerRegistryImportPipelineCollection GetContainerRegistryImportPipelines() - { - return GetCachedClient(client => new ContainerRegistryImportPipelineCollection(client, Id)); - } - - /// - /// Gets the properties of the import pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetContainerRegistryImportPipelineAsync(string importPipelineName, CancellationToken cancellationToken = default) - { - return await GetContainerRegistryImportPipelines().GetAsync(importPipelineName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the properties of the import pipeline. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName} - /// - /// - /// Operation Id - /// ImportPipelines_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the import pipeline. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetContainerRegistryImportPipeline(string importPipelineName, CancellationToken cancellationToken = default) - { - return GetContainerRegistryImportPipelines().Get(importPipelineName, cancellationToken); - } - - /// Gets a collection of ContainerRegistryPipelineRunResources in the ContainerRegistry. - /// An object representing collection of ContainerRegistryPipelineRunResources and their operations over a ContainerRegistryPipelineRunResource. - public virtual ContainerRegistryPipelineRunCollection GetContainerRegistryPipelineRuns() - { - return GetCachedClient(client => new ContainerRegistryPipelineRunCollection(client, Id)); - } - - /// - /// Gets the detailed information for a given pipeline run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetContainerRegistryPipelineRunAsync(string pipelineRunName, CancellationToken cancellationToken = default) - { - return await GetContainerRegistryPipelineRuns().GetAsync(pipelineRunName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the detailed information for a given pipeline run. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName} - /// - /// - /// Operation Id - /// PipelineRuns_Get - /// - /// - /// Default Api Version - /// 2025-03-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the pipeline run. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetContainerRegistryPipelineRun(string pipelineRunName, CancellationToken cancellationToken = default) - { - return GetContainerRegistryPipelineRuns().Get(pipelineRunName, cancellationToken); - } - /// Gets a collection of ContainerRegistryPrivateEndpointConnectionResources in the ContainerRegistry. /// An object representing collection of ContainerRegistryPrivateEndpointConnectionResources and their operations over a ContainerRegistryPrivateEndpointConnectionResource. public virtual ContainerRegistryPrivateEndpointConnectionCollection GetContainerRegistryPrivateEndpointConnections() @@ -676,7 +395,7 @@ public virtual ContainerRegistryPrivateEndpointConnectionCollection GetContainer /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -707,7 +426,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -745,7 +464,7 @@ public virtual ContainerRegistryReplicationCollection GetContainerRegistryReplic /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -776,7 +495,7 @@ public virtual async Task> GetCon /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -814,7 +533,7 @@ public virtual ScopeMapCollection GetScopeMaps() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -845,7 +564,7 @@ public virtual async Task> GetScopeMapAsync(string sc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -883,7 +602,7 @@ public virtual ContainerRegistryTokenCollection GetContainerRegistryTokens() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -914,7 +633,7 @@ public virtual async Task> GetContainer /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -952,7 +671,7 @@ public virtual ContainerRegistryWebhookCollection GetContainerRegistryWebhooks() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -983,7 +702,7 @@ public virtual async Task> GetContain /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1021,7 +740,7 @@ public virtual ContainerRegistryAgentPoolCollection GetContainerRegistryAgentPoo /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1052,7 +771,7 @@ public virtual async Task> GetConta /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1090,7 +809,7 @@ public virtual ContainerRegistryRunCollection GetContainerRegistryRuns() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1121,7 +840,7 @@ public virtual async Task> GetContainerRe /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1159,7 +878,7 @@ public virtual ContainerRegistryTaskRunCollection GetContainerRegistryTaskRuns() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1190,7 +909,7 @@ public virtual async Task> GetContain /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1228,7 +947,7 @@ public virtual ContainerRegistryTaskCollection GetContainerRegistryTasks() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1259,7 +978,7 @@ public virtual async Task> GetContainerR /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -1290,7 +1009,7 @@ public virtual Response GetContainerRegistryTask( /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1330,7 +1049,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1370,7 +1089,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1412,7 +1131,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1454,7 +1173,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1500,7 +1219,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1546,7 +1265,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1592,7 +1311,7 @@ public virtual async Task ImportImageAsync(WaitUntil waitUntil, Co /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1638,7 +1357,7 @@ public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryIm /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1667,7 +1386,7 @@ public virtual AsyncPageable GetUsagesAsync(Cancellation /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1696,7 +1415,7 @@ public virtual Pageable GetUsages(CancellationToken canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1734,7 +1453,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1772,7 +1491,7 @@ public virtual Response GetCredentials(C /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1814,7 +1533,7 @@ public virtual async Task> Rege /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1856,7 +1575,7 @@ public virtual Response RegenerateCreden /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1902,7 +1621,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -1948,14 +1667,15 @@ public virtual ArmOperation Generate /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// + /// 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 parameters of a run that needs to scheduled. /// The cancellation token to use. /// is null. - public virtual async Task> ScheduleRunAsync(ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public virtual async Task> ScheduleRunAsync(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -1964,7 +1684,10 @@ public virtual async Task> ScheduleRunAsy try { var response = await _schedulesRestClient.ScheduleRunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _schedulesClientDiagnostics, Pipeline, _schedulesRestClient.CreateScheduleRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1986,14 +1709,15 @@ public virtual async Task> ScheduleRunAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// + /// 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 parameters of a run that needs to scheduled. /// The cancellation token to use. /// is null. - public virtual Response ScheduleRun(ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation ScheduleRun(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -2002,7 +1726,10 @@ public virtual Response ScheduleRun(ContainerRegis try { var response = _schedulesRestClient.ScheduleRun(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _schedulesClientDiagnostics, Pipeline, _schedulesRestClient.CreateScheduleRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -2024,7 +1751,7 @@ public virtual Response ScheduleRun(ContainerRegis /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// @@ -2058,7 +1785,7 @@ public virtual async Task> GetBuildSourceUpload /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// @@ -2092,7 +1819,7 @@ public virtual Response GetBuildSourceUploadUrl(Cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -2154,7 +1881,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -2216,7 +1943,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -2273,7 +2000,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -2330,7 +2057,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -2390,7 +2117,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs index 8a4f36eea6e3..b517765dba19 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string runId, Cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string runId, Cancellation /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string runId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs index d10fae1450ce..5317e7ba7596 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -190,10 +190,11 @@ public virtual Response Get(CancellationToken canc /// /// /// + /// 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 run update properties. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -202,7 +203,10 @@ public virtual async Task> UpdateAsync(Co try { var response = await _containerRegistryRunRunsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.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) { @@ -224,7 +228,7 @@ public virtual async Task> UpdateAsync(Co /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -232,10 +236,11 @@ public virtual async Task> UpdateAsync(Co /// /// /// + /// 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 run update properties. /// The cancellation token to use. /// is null. - public virtual Response Update(ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -244,7 +249,10 @@ public virtual Response Update(ContainerRegistryRu try { var response = _containerRegistryRunRunsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.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) { @@ -266,7 +274,7 @@ public virtual Response Update(ContainerRegistryRu /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -304,7 +312,7 @@ public virtual async Task> GetLogSasU /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -342,7 +350,7 @@ public virtual Response GetLogSasUrl(Cancellat /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -350,15 +358,19 @@ public virtual Response GetLogSasUrl(Cancellat /// /// /// + /// 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 CancelAsync(CancellationToken cancellationToken = default) + public virtual async Task CancelAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); scope.Start(); try { var response = await _containerRegistryRunRunsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var operation = new ContainerRegistryArmOperation(_containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateCancelRequest(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) { @@ -380,7 +392,7 @@ public virtual async Task CancelAsync(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -388,15 +400,19 @@ public virtual async Task CancelAsync(CancellationToken cancellationTo /// /// /// + /// 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 Response Cancel(CancellationToken cancellationToken = default) + public virtual ArmOperation Cancel(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); scope.Start(); try { var response = _containerRegistryRunRunsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; + var operation = new ContainerRegistryArmOperation(_containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateCancelRequest(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) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs index 34c8814cca77..82f52bd3f6cd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -88,9 +88,7 @@ public virtual async Task> CreateOrU try { var response = await _containerRegistryTaskTasksRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data, cancellationToken).ConfigureAwait(false); - var uri = _containerRegistryTaskTasksRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ContainerRegistryArmOperation(Response.FromValue(new ContainerRegistryTaskResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -115,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -139,9 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn try { var response = _containerRegistryTaskTasksRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data, cancellationToken); - var uri = _containerRegistryTaskTasksRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ContainerRegistryArmOperation(Response.FromValue(new ContainerRegistryTaskResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -166,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -211,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -256,7 +252,7 @@ public virtual Response Get(string taskName, Canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -286,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -316,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -359,7 +355,7 @@ public virtual async Task> ExistsAsync(string taskName, Cancellat /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -402,7 +398,7 @@ public virtual Response Exists(string taskName, CancellationToken cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -447,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs index 7cabea9733aa..2d506292885e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -200,9 +200,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _containerRegistryTaskTasksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _containerRegistryTaskTasksRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ContainerRegistryArmOperation(response, rehydrationToken); + var operation = new ContainerRegistryArmOperation(_containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.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; @@ -227,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -244,9 +242,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _containerRegistryTaskTasksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var uri = _containerRegistryTaskTasksRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ContainerRegistryArmOperation(response, rehydrationToken); + var operation = new ContainerRegistryArmOperation(_containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -271,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -279,10 +275,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// + /// 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 parameters for updating a task. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -291,7 +288,10 @@ public virtual async Task> UpdateAsync(C try { var response = await _containerRegistryTaskTasksRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ContainerRegistryTaskResource(Client, response.Value), response.GetRawResponse()); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.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) { @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(C /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -321,10 +321,11 @@ public virtual async Task> UpdateAsync(C /// /// /// + /// 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 parameters for updating a task. /// The cancellation token to use. /// is null. - public virtual Response Update(ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -333,7 +334,10 @@ public virtual Response Update(ContainerRegistryT try { var response = _containerRegistryTaskTasksRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - return Response.FromValue(new ContainerRegistryTaskResource(Client, response.Value), response.GetRawResponse()); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.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) { @@ -355,7 +359,7 @@ public virtual Response Update(ContainerRegistryT /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -393,7 +397,7 @@ public virtual async Task> GetDetailsAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -431,7 +435,7 @@ public virtual Response GetDetails(CancellationTo /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -469,8 +473,8 @@ public virtual async Task> AddTagAsync(s patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -493,7 +497,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -531,8 +535,8 @@ public virtual Response AddTag(string key, string patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -555,7 +559,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -588,8 +592,8 @@ public virtual async Task> SetTagsAsync( var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; var patch = new ContainerRegistryTaskPatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -612,7 +616,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -645,8 +649,8 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -705,8 +709,8 @@ public virtual async Task> RemoveTagAsyn patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -729,7 +733,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -765,8 +769,8 @@ public virtual Response RemoveTag(string key, Can patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs index fe6922c7fac3..ea6cddc68421 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -88,7 +88,7 @@ public virtual async Task> Create try { var response = await _containerRegistryTaskRunTaskRunsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(Wai try { var response = _containerRegistryTaskRunTaskRunsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string taskRunName /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string taskRunName, Cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string taskRunName, CancellationToken cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs index 96c0d6dc5f23..b27b49f463a5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -199,9 +199,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _containerRegistryTaskRunTaskRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _containerRegistryTaskRunTaskRunsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ContainerRegistryArmOperation(response, rehydrationToken); + var operation = new ContainerRegistryArmOperation(_containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.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; @@ -226,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -243,9 +241,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _containerRegistryTaskRunTaskRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var uri = _containerRegistryTaskRunTaskRunsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ContainerRegistryArmOperation(response, rehydrationToken); + var operation = new ContainerRegistryArmOperation(_containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -270,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -291,7 +287,7 @@ public virtual async Task> Update try { var response = await _containerRegistryTaskRunTaskRunsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.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; @@ -316,7 +312,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -337,7 +333,7 @@ public virtual ArmOperation Update(WaitUntil w try { var response = _containerRegistryTaskRunTaskRunsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -362,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource @@ -400,7 +396,7 @@ public virtual async Task> GetDetails /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2019-06-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs index d44a45326e59..1d4488d63c10 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tokenName, Ca /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string tokenName, Cancella /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string tokenName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs index d5a85ac37bc1..b74b1f10b7b1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs index 09a4f5657afb..3e3d00a77815 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string webhookName /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string webhookName, Cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string webhookName, CancellationToken cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs index bf697e7bb922..65063da4a9e8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task> PingAsync /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual Response Ping(CancellationToke /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -466,7 +466,7 @@ public virtual AsyncPageable GetEventsAsync(Cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -496,7 +496,7 @@ public virtual Pageable GetEvents(CancellationTok /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -572,7 +572,7 @@ public virtual Response GetCallbackConfi /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -696,7 +696,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -753,7 +753,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -810,7 +810,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -870,7 +870,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs index f15833fdaf8e..719ccf0d88b1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs @@ -33,44 +33,6 @@ private static MockableContainerRegistrySubscriptionResource GetMockableContaine return resource.GetCachedClient(client => new MockableContainerRegistrySubscriptionResource(client, resource.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 ContainerRegistryArchiveResource GetContainerRegistryArchiveResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryArchiveResource(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 ContainerRegistryArchiveVersionResource GetContainerRegistryArchiveVersionResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryArchiveVersionResource(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. @@ -128,25 +90,6 @@ public static ContainerRegistryCredentialSetResource GetContainerRegistryCredent return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCredentialSetResource(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 ContainerRegistryExportPipelineResource GetContainerRegistryExportPipelineResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryExportPipelineResource(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. @@ -185,44 +128,6 @@ public static ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLi return GetMockableContainerRegistryArmClient(client).GetContainerRegistryPrivateLinkResource(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 ContainerRegistryImportPipelineResource GetContainerRegistryImportPipelineResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryImportPipelineResource(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 ContainerRegistryPipelineRunResource GetContainerRegistryPipelineRunResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryPipelineRunResource(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. @@ -424,7 +329,7 @@ public static ContainerRegistryCollection GetContainerRegistries(this ResourceGr /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -462,7 +367,7 @@ public static async Task> GetContainerRegist /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -500,7 +405,7 @@ public static Response GetContainerRegistry(this Reso /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -536,7 +441,7 @@ public static async Task> CheckCo /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -572,7 +477,7 @@ public static Response CheckContainerRegis /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -608,7 +513,7 @@ public static AsyncPageable GetContainerRegistriesAsy /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs index fdad1f69cc73..37abbc0770c9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs @@ -34,30 +34,6 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// - /// 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 ContainerRegistryArchiveResource GetContainerRegistryArchiveResource(ResourceIdentifier id) - { - ContainerRegistryArchiveResource.ValidateResourceId(id); - return new ContainerRegistryArchiveResource(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 ContainerRegistryArchiveVersionResource GetContainerRegistryArchiveVersionResource(ResourceIdentifier id) - { - ContainerRegistryArchiveVersionResource.ValidateResourceId(id); - return new ContainerRegistryArchiveVersionResource(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. @@ -94,18 +70,6 @@ public virtual ContainerRegistryCredentialSetResource GetContainerRegistryCreden return new ContainerRegistryCredentialSetResource(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 ContainerRegistryExportPipelineResource GetContainerRegistryExportPipelineResource(ResourceIdentifier id) - { - ContainerRegistryExportPipelineResource.ValidateResourceId(id); - return new ContainerRegistryExportPipelineResource(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. @@ -130,30 +94,6 @@ public virtual ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateL return new ContainerRegistryPrivateLinkResource(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 ContainerRegistryImportPipelineResource GetContainerRegistryImportPipelineResource(ResourceIdentifier id) - { - ContainerRegistryImportPipelineResource.ValidateResourceId(id); - return new ContainerRegistryImportPipelineResource(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 ContainerRegistryPipelineRunResource GetContainerRegistryPipelineRunResource(ResourceIdentifier id) - { - ContainerRegistryPipelineRunResource.ValidateResourceId(id); - return new ContainerRegistryPipelineRunResource(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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs index 3d84c411da74..a14a12a821af 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ContainerRegistryCollection GetContainerRegistries() /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetContainerRegis /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs index 0e78995708df..6e23a83e85a0 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -97,7 +97,7 @@ public virtual async Task> CheckC /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual Response CheckContainerRegi /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual AsyncPageable GetContainerRegistriesAs /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryArchiveOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryArchiveOperationSource.cs deleted file mode 100644 index 39455009146d..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryArchiveOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal class ContainerRegistryArchiveOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ContainerRegistryArchiveOperationSource(ArmClient client) - { - _client = client; - } - - ContainerRegistryArchiveResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return new ContainerRegistryArchiveResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return await Task.FromResult(new ContainerRegistryArchiveResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryArchiveVersionOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryArchiveVersionOperationSource.cs deleted file mode 100644 index 5d8cc3dc3310..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryArchiveVersionOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal class ContainerRegistryArchiveVersionOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ContainerRegistryArchiveVersionOperationSource(ArmClient client) - { - _client = client; - } - - ContainerRegistryArchiveVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return new ContainerRegistryArchiveVersionResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return await Task.FromResult(new ContainerRegistryArchiveVersionResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryExportPipelineOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryExportPipelineOperationSource.cs deleted file mode 100644 index 0a1f6f0b362e..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryExportPipelineOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal class ContainerRegistryExportPipelineOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ContainerRegistryExportPipelineOperationSource(ArmClient client) - { - _client = client; - } - - ContainerRegistryExportPipelineResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return new ContainerRegistryExportPipelineResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return await Task.FromResult(new ContainerRegistryExportPipelineResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryImportPipelineOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryImportPipelineOperationSource.cs deleted file mode 100644 index f2faa1e33d9a..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryImportPipelineOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal class ContainerRegistryImportPipelineOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ContainerRegistryImportPipelineOperationSource(ArmClient client) - { - _client = client; - } - - ContainerRegistryImportPipelineResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return new ContainerRegistryImportPipelineResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return await Task.FromResult(new ContainerRegistryImportPipelineResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryPipelineRunOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryPipelineRunOperationSource.cs deleted file mode 100644 index a11c4708c7b1..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryPipelineRunOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal class ContainerRegistryPipelineRunOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ContainerRegistryPipelineRunOperationSource(ArmClient client) - { - _client = client; - } - - ContainerRegistryPipelineRunResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return new ContainerRegistryPipelineRunResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content); - return await Task.FromResult(new ContainerRegistryPipelineRunResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryRunOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryRunOperationSource.cs similarity index 92% rename from sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryRunOperationSource.cs rename to sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryRunOperationSource.cs index cf7e372f16d9..9e02641d7dcd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryRunOperationSource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryRunOperationSource.cs @@ -1,6 +1,10 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +// + +#nullable disable + using System.ClientModel.Primitives; using System.Threading; using System.Threading.Tasks; diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryTaskOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryTaskOperationSource.cs similarity index 92% rename from sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryTaskOperationSource.cs rename to sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryTaskOperationSource.cs index 91250a2674d7..cb9ff4bd73d9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryTaskOperationSource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryTaskOperationSource.cs @@ -1,6 +1,10 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +// + +#nullable disable + using System.ClientModel.Primitives; using System.Threading; using System.Threading.Tasks; diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveListResult.Serialization.cs deleted file mode 100644 index 32ade9d4c230..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class ArchiveListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ArchiveListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ArchiveListResult 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(ArchiveListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeArchiveListResult(document.RootElement, options); - } - - internal static ArchiveListResult DeserializeArchiveListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ContainerRegistryArchiveData.DeserializeContainerRegistryArchiveData(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 ArchiveListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ArchiveListResult)} does not support writing '{options.Format}' format."); - } - } - - ArchiveListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeArchiveListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ArchiveListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveListResult.cs deleted file mode 100644 index d55ed7fa5618..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The result of a request to list archives for a container registry. - internal partial class ArchiveListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal ArchiveListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The list of archives. Since this list may be incomplete, the nextLink field should be used to request the next list of distributions. - /// The URI that can be used to request the next list of archives. - /// Keeps track of any properties unknown to the library. - internal ArchiveListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The list of archives. Since this list may be incomplete, the nextLink field should be used to request the next list of distributions. - public IReadOnlyList Value { get; } - /// The URI that can be used to request the next list of archives. - public string NextLink { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceProperties.Serialization.cs deleted file mode 100644 index b9f49a3f25c3..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceProperties.Serialization.cs +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class ArchivePackageSourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ArchivePackageSourceProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(SourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(SourceType.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ArchivePackageSourceProperties 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(ArchivePackageSourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeArchivePackageSourceProperties(document.RootElement, options); - } - - internal static ArchivePackageSourceProperties DeserializeArchivePackageSourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ArchivePackageSourceType? type = default; - Uri url = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ArchivePackageSourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("url"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - url = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ArchivePackageSourceProperties(type, url, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" type: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SourceType)) - { - builder.Append(" type: "); - builder.AppendLine($"'{SourceType.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" url: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Uri)) - { - builder.Append(" url: "); - builder.AppendLine($"'{Uri.AbsoluteUri}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ArchivePackageSourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ArchivePackageSourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeArchivePackageSourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ArchivePackageSourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceProperties.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceProperties.cs deleted file mode 100644 index 6231b9e44a8f..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceProperties.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The properties of the archive package source. - public partial class ArchivePackageSourceProperties - { - /// - /// 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 ArchivePackageSourceProperties() - { - } - - /// Initializes a new instance of . - /// The type of package source for a archive. - /// The external repository url. - /// Keeps track of any properties unknown to the library. - internal ArchivePackageSourceProperties(ArchivePackageSourceType? sourceType, Uri uri, IDictionary serializedAdditionalRawData) - { - SourceType = sourceType; - Uri = uri; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The type of package source for a archive. - [WirePath("type")] - public ArchivePackageSourceType? SourceType { get; set; } - /// The external repository url. - [WirePath("url")] - public Uri Uri { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceType.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceType.cs deleted file mode 100644 index 84c2208d063a..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchivePackageSourceType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The type of package source for a archive. - public readonly partial struct ArchivePackageSourceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ArchivePackageSourceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RemoteValue = "remote"; - - /// remote. - public static ArchivePackageSourceType Remote { get; } = new ArchivePackageSourceType(RemoteValue); - /// Determines if two values are the same. - public static bool operator ==(ArchivePackageSourceType left, ArchivePackageSourceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ArchivePackageSourceType left, ArchivePackageSourceType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ArchivePackageSourceType(string value) => new ArchivePackageSourceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ArchivePackageSourceType other && Equals(other); - /// - public bool Equals(ArchivePackageSourceType 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveVersionListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveVersionListResult.Serialization.cs deleted file mode 100644 index 266d70b435cc..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveVersionListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class ArchiveVersionListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ArchiveVersionListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ArchiveVersionListResult 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(ArchiveVersionListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeArchiveVersionListResult(document.RootElement, options); - } - - internal static ArchiveVersionListResult DeserializeArchiveVersionListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ContainerRegistryArchiveVersionData.DeserializeContainerRegistryArchiveVersionData(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 ArchiveVersionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ArchiveVersionListResult)} does not support writing '{options.Format}' format."); - } - } - - ArchiveVersionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeArchiveVersionListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ArchiveVersionListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveVersionListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveVersionListResult.cs deleted file mode 100644 index 6c6387c5265e..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ArchiveVersionListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The result of a request to list export pipelines for a container registry. - internal partial class ArchiveVersionListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal ArchiveVersionListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines. - /// The URI that can be used to request the next list of pipeline runs. - /// Keeps track of any properties unknown to the library. - internal ArchiveVersionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines. - public IReadOnlyList Value { get; } - /// The URI that can be used to request the next list of pipeline runs. - public string NextLink { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs deleted file mode 100644 index 4f6f0c364d12..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". - public readonly partial struct AutoGeneratedDomainNameLabelScope : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AutoGeneratedDomainNameLabelScope(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UnsecureValue = "Unsecure"; - private const string TenantReuseValue = "TenantReuse"; - private const string SubscriptionReuseValue = "SubscriptionReuse"; - private const string ResourceGroupReuseValue = "ResourceGroupReuse"; - private const string NoReuseValue = "NoReuse"; - - /// Unsecure. - public static AutoGeneratedDomainNameLabelScope Unsecure { get; } = new AutoGeneratedDomainNameLabelScope(UnsecureValue); - /// TenantReuse. - public static AutoGeneratedDomainNameLabelScope TenantReuse { get; } = new AutoGeneratedDomainNameLabelScope(TenantReuseValue); - /// SubscriptionReuse. - public static AutoGeneratedDomainNameLabelScope SubscriptionReuse { get; } = new AutoGeneratedDomainNameLabelScope(SubscriptionReuseValue); - /// ResourceGroupReuse. - public static AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get; } = new AutoGeneratedDomainNameLabelScope(ResourceGroupReuseValue); - /// NoReuse. - public static AutoGeneratedDomainNameLabelScope NoReuse { get; } = new AutoGeneratedDomainNameLabelScope(NoReuseValue); - /// Determines if two values are the same. - public static bool operator ==(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AutoGeneratedDomainNameLabelScope(string value) => new AutoGeneratedDomainNameLabelScope(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AutoGeneratedDomainNameLabelScope other && Equals(other); - /// - public bool Equals(AutoGeneratedDomainNameLabelScope 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs index 10a0dcc15443..b4146f220dcb 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs @@ -43,7 +43,7 @@ internal partial class ConnectedRegistryActivation /// /// /// - private IDictionary _serializedAdditionalRawData; + private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . internal ConnectedRegistryActivation() diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs index d243f0fe0f42..30d117394bc5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs @@ -54,7 +54,7 @@ public ConnectedRegistryPatch() } /// Initializes a new instance of . - /// The sync properties of the connected registry with its parent. + /// The parameters for updating the sync properties of the connected registry with its parent. /// The logging properties of the connected registry. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The list of notifications subscription information for the connected registry. @@ -70,7 +70,7 @@ internal ConnectedRegistryPatch(ConnectedRegistrySyncUpdateProperties syncProper _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The sync properties of the connected registry with its parent. + /// The parameters for updating the sync properties of the connected registry with its parent. [WirePath("properties.syncProperties")] public ConnectedRegistrySyncUpdateProperties SyncProperties { get; set; } /// The logging properties of the connected registry. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPipelineRunContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPipelineRunContent.Serialization.cs deleted file mode 100644 index 261f7d107bea..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPipelineRunContent.Serialization.cs +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class ConnectedRegistryPipelineRunContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConnectedRegistryPipelineRunContent)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(PipelineResourceId)) - { - writer.WritePropertyName("pipelineResourceId"u8); - writer.WriteStringValue(PipelineResourceId); - } - if (Optional.IsCollectionDefined(Artifacts)) - { - writer.WritePropertyName("artifacts"u8); - writer.WriteStartArray(); - foreach (var item in Artifacts) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Source)) - { - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source, options); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"u8); - writer.WriteObjectValue(Target, options); - } - if (Optional.IsDefined(CatalogDigest)) - { - writer.WritePropertyName("catalogDigest"u8); - writer.WriteStringValue(CatalogDigest); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ConnectedRegistryPipelineRunContent 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(ConnectedRegistryPipelineRunContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectedRegistryPipelineRunContent(document.RootElement, options); - } - - internal static ConnectedRegistryPipelineRunContent DeserializeConnectedRegistryPipelineRunContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier pipelineResourceId = default; - IList artifacts = default; - ContainerRegistryPipelineRunSourceProperties source = default; - ContainerRegistryPipelineRunTargetProperties target = default; - string catalogDigest = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("pipelineResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - pipelineResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("artifacts"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - artifacts = array; - continue; - } - if (property.NameEquals("source"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - source = ContainerRegistryPipelineRunSourceProperties.DeserializeContainerRegistryPipelineRunSourceProperties(property.Value, options); - continue; - } - if (property.NameEquals("target"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - target = ContainerRegistryPipelineRunTargetProperties.DeserializeContainerRegistryPipelineRunTargetProperties(property.Value, options); - continue; - } - if (property.NameEquals("catalogDigest"u8)) - { - catalogDigest = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConnectedRegistryPipelineRunContent( - pipelineResourceId, - artifacts ?? new ChangeTrackingList(), - source, - target, - catalogDigest, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PipelineResourceId), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" pipelineResourceId: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PipelineResourceId)) - { - builder.Append(" pipelineResourceId: "); - builder.AppendLine($"'{PipelineResourceId.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Artifacts), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" artifacts: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Artifacts)) - { - if (Artifacts.Any()) - { - builder.Append(" artifacts: "); - builder.AppendLine("["); - foreach (var item in Artifacts) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Source), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" source: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Source)) - { - builder.Append(" source: "); - BicepSerializationHelpers.AppendChildObject(builder, Source, options, 2, false, " source: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Target), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" target: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Target)) - { - builder.Append(" target: "); - BicepSerializationHelpers.AppendChildObject(builder, Target, options, 2, false, " target: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CatalogDigest), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" catalogDigest: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(CatalogDigest)) - { - builder.Append(" catalogDigest: "); - if (CatalogDigest.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{CatalogDigest}'''"); - } - else - { - builder.AppendLine($"'{CatalogDigest}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ConnectedRegistryPipelineRunContent)} does not support writing '{options.Format}' format."); - } - } - - ConnectedRegistryPipelineRunContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectedRegistryPipelineRunContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectedRegistryPipelineRunContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPipelineRunContent.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPipelineRunContent.cs deleted file mode 100644 index 4161ebbfeff4..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPipelineRunContent.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The request properties provided for a pipeline run. - public partial class ConnectedRegistryPipelineRunContent - { - /// - /// 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 ConnectedRegistryPipelineRunContent() - { - Artifacts = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The resource ID of the pipeline to run. - /// - /// List of source artifacts to be transferred by the pipeline. - /// Specify an image by repository ('hello-world'). This will use the 'latest' tag. - /// Specify an image by tag ('hello-world:latest'). - /// Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). - /// - /// The source properties of the pipeline run. - /// The target properties of the pipeline run. - /// The digest of the tar used to transfer the artifacts. - /// Keeps track of any properties unknown to the library. - internal ConnectedRegistryPipelineRunContent(ResourceIdentifier pipelineResourceId, IList artifacts, ContainerRegistryPipelineRunSourceProperties source, ContainerRegistryPipelineRunTargetProperties target, string catalogDigest, IDictionary serializedAdditionalRawData) - { - PipelineResourceId = pipelineResourceId; - Artifacts = artifacts; - Source = source; - Target = target; - CatalogDigest = catalogDigest; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource ID of the pipeline to run. - [WirePath("pipelineResourceId")] - public ResourceIdentifier PipelineResourceId { get; set; } - /// - /// List of source artifacts to be transferred by the pipeline. - /// Specify an image by repository ('hello-world'). This will use the 'latest' tag. - /// Specify an image by tag ('hello-world:latest'). - /// Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). - /// - [WirePath("artifacts")] - public IList Artifacts { get; } - /// The source properties of the pipeline run. - [WirePath("source")] - public ContainerRegistryPipelineRunSourceProperties Source { get; set; } - /// The target properties of the pipeline run. - [WirePath("target")] - public ContainerRegistryPipelineRunTargetProperties Target { get; set; } - /// The digest of the tar used to transfer the artifacts. - [WirePath("catalogDigest")] - public string CatalogDigest { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs similarity index 54% rename from sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerProperties.Serialization.cs rename to sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs index 21b6d3555603..6f43a1144050 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerProperties.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - internal partial class PipelineSourceTriggerProperties : IUtf8JsonSerializable, IJsonModel + internal partial class ConnectedRegistryPropertiesActivation : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -27,46 +27,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(PipelineSourceTriggerProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support writing '{format}' format."); } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } + base.JsonModelWriteCore(writer, options); } - PipelineSourceTriggerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConnectedRegistryPropertiesActivation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(PipelineSourceTriggerProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePipelineSourceTriggerProperties(document.RootElement, options); + return DeserializeConnectedRegistryPropertiesActivation(document.RootElement, options); } - internal static PipelineSourceTriggerProperties DeserializePipelineSourceTriggerProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConnectedRegistryPropertiesActivation DeserializeConnectedRegistryPropertiesActivation(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -74,14 +58,18 @@ internal static PipelineSourceTriggerProperties DeserializePipelineSourceTrigger { return null; } - ContainerRegistryTriggerStatus status = default; + ConnectedRegistryActivationStatus? status = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("status"u8)) { - status = new ContainerRegistryTriggerStatus(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ConnectedRegistryActivationStatus(property.Value.GetString()); continue; } if (options.Format != "W") @@ -90,7 +78,7 @@ internal static PipelineSourceTriggerProperties DeserializePipelineSourceTrigger } } serializedAdditionalRawData = rawDataDictionary; - return new PipelineSourceTriggerProperties(status, serializedAdditionalRawData); + return new ConnectedRegistryPropertiesActivation(status, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -112,17 +100,20 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - builder.Append(" status: "); - builder.AppendLine($"'{Status.ToString()}'"); + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } } builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { @@ -131,26 +122,26 @@ BinaryData IPersistableModel.Write(ModelReaderW case "bicep": return SerializeBicep(options); default: - throw new FormatException($"The model {nameof(PipelineSourceTriggerProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support writing '{options.Format}' format."); } } - PipelineSourceTriggerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ConnectedRegistryPropertiesActivation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializePipelineSourceTriggerProperties(document.RootElement, options); + return DeserializeConnectedRegistryPropertiesActivation(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(PipelineSourceTriggerProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs new file mode 100644 index 000000000000..124a7f7eba9c --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ContainerRegistry.Models +{ + /// The ConnectedRegistryPropertiesActivation. + internal partial class ConnectedRegistryPropertiesActivation : ConnectedRegistryActivation + { + /// Initializes a new instance of . + internal ConnectedRegistryPropertiesActivation() + { + } + + /// Initializes a new instance of . + /// The activation status of the connected registry. + /// Keeps track of any properties unknown to the library. + internal ConnectedRegistryPropertiesActivation(ConnectedRegistryActivationStatus? status, IDictionary serializedAdditionalRawData) : base(status, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryArchivePatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryArchivePatch.Serialization.cs deleted file mode 100644 index 2a9ace054fa1..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryArchivePatch.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// 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.ContainerRegistry.Models -{ - public partial class ContainerRegistryArchivePatch : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryArchivePatch)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(PublishedVersion)) - { - writer.WritePropertyName("publishedVersion"u8); - writer.WriteStringValue(PublishedVersion); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ContainerRegistryArchivePatch 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(ContainerRegistryArchivePatch)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryArchivePatch(document.RootElement, options); - } - - internal static ContainerRegistryArchivePatch DeserializeContainerRegistryArchivePatch(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string publishedVersion = 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) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("publishedVersion"u8)) - { - publishedVersion = property0.Value.GetString(); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryArchivePatch(publishedVersion, 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(ContainerRegistryArchivePatch)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryArchivePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryArchivePatch(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryArchivePatch)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryArchivePatch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryArchivePatch.cs deleted file mode 100644 index df33a7aeb055..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryArchivePatch.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The parameters for updating a archive. - public partial class ContainerRegistryArchivePatch - { - /// - /// 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 ContainerRegistryArchivePatch() - { - } - - /// Initializes a new instance of . - /// The published version of the archive. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryArchivePatch(string publishedVersion, IDictionary serializedAdditionalRawData) - { - PublishedVersion = publishedVersion; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The published version of the archive. - [WirePath("properties.publishedVersion")] - public string PublishedVersion { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs index f1092b7f6e1a..328ca16d3ba5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs @@ -138,11 +138,14 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceRegistry), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SourceRegistryLoginMode", out propertyOverride); if (hasPropertyOverride) { builder.Append(" sourceRegistry: "); + builder.AppendLine("{"); + builder.Append(" loginMode: "); builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); } else { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs index f46b7ea57557..9009c6d670ae 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs @@ -67,8 +67,24 @@ internal ContainerRegistryCredentials(SourceRegistryCredentials sourceRegistry, } /// Describes the credential parameters for accessing the source registry. - [WirePath("sourceRegistry")] - public SourceRegistryCredentials SourceRegistry { get; set; } + internal SourceRegistryCredentials SourceRegistry { get; set; } + /// + /// The authentication mode which determines the source registry login scope. The credentials for the source registry + /// will be generated using the given scope. These credentials will be used to login to + /// the source registry during the run. + /// + [WirePath("sourceRegistry.loginMode")] + public SourceRegistryLoginMode? SourceRegistryLoginMode + { + get => SourceRegistry is null ? default : SourceRegistry.LoginMode; + set + { + if (SourceRegistry is null) + SourceRegistry = new SourceRegistryCredentials(); + SourceRegistry.LoginMode = value; + } + } + /// /// Describes the credential parameters for accessing other custom registries. The key /// for the dictionary item will be the registry login server (myregistry.azurecr.io) and diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryMetadataSearch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryMetadataSearch.cs deleted file mode 100644 index 6ce891fd0388..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryMetadataSearch.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// Determines whether registry artifacts are indexed for metadata search. - public readonly partial struct ContainerRegistryMetadataSearch : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerRegistryMetadataSearch(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static ContainerRegistryMetadataSearch Enabled { get; } = new ContainerRegistryMetadataSearch(EnabledValue); - /// Disabled. - public static ContainerRegistryMetadataSearch Disabled { get; } = new ContainerRegistryMetadataSearch(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(ContainerRegistryMetadataSearch left, ContainerRegistryMetadataSearch right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerRegistryMetadataSearch left, ContainerRegistryMetadataSearch right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerRegistryMetadataSearch(string value) => new ContainerRegistryMetadataSearch(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerRegistryMetadataSearch other && Equals(other); - /// - public bool Equals(ContainerRegistryMetadataSearch 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs index 6e07475c910a..b1be778ee8aa 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs @@ -38,16 +38,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); writer.WriteStringValue(ResourceType.ToString()); - if (Optional.IsDefined(ResourceGroupName)) - { - writer.WritePropertyName("resourceGroupName"u8); - writer.WriteStringValue(ResourceGroupName); - } - if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) - { - writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); - writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -87,8 +77,6 @@ internal static ContainerRegistryNameAvailabilityContent DeserializeContainerReg } string name = default; ContainerRegistryResourceType type = default; - string resourceGroupName = default; - AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -103,27 +91,13 @@ internal static ContainerRegistryNameAvailabilityContent DeserializeContainerReg type = new ContainerRegistryResourceType(property.Value.GetString()); continue; } - if (property.NameEquals("resourceGroupName"u8)) - { - resourceGroupName = property.Value.GetString(); - continue; - } - if (property.NameEquals("autoGeneratedDomainNameLabelScope"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryNameAvailabilityContent(name, type, resourceGroupName, autoGeneratedDomainNameLabelScope, serializedAdditionalRawData); + return new ContainerRegistryNameAvailabilityContent(name, type, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs index bde516a1947a..467ee56cc19c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs @@ -59,15 +59,11 @@ public ContainerRegistryNameAvailabilityContent(string name) /// Initializes a new instance of . /// The name of the container registry. /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. - /// The resource group name of the container registry. - /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". /// Keeps track of any properties unknown to the library. - internal ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType, string resourceGroupName, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, IDictionary serializedAdditionalRawData) + internal ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType, IDictionary serializedAdditionalRawData) { Name = name; ResourceType = resourceType; - ResourceGroupName = resourceGroupName; - AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -82,11 +78,5 @@ internal ContainerRegistryNameAvailabilityContent() /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. [WirePath("type")] public ContainerRegistryResourceType ResourceType { get; } - /// The resource group name of the container registry. - [WirePath("resourceGroupName")] - public string ResourceGroupName { get; set; } - /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". - [WirePath("autoGeneratedDomainNameLabelScope")] - public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs index 03a6dcdf69f6..e091535f03ee 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs @@ -35,11 +35,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryNameAvailableResult)} does not support writing '{format}' format."); } - if (Optional.IsDefined(AvailableLoginServerName)) - { - writer.WritePropertyName("availableLoginServerName"u8); - writer.WriteStringValue(AvailableLoginServerName); - } if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -92,7 +87,6 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr { return null; } - string availableLoginServerName = default; bool? nameAvailable = default; string reason = default; string message = default; @@ -100,11 +94,6 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("availableLoginServerName"u8)) - { - availableLoginServerName = property.Value.GetString(); - continue; - } if (property.NameEquals("nameAvailable"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -130,7 +119,7 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryNameAvailableResult(availableLoginServerName, nameAvailable, reason, message, serializedAdditionalRawData); + return new ContainerRegistryNameAvailableResult(nameAvailable, reason, message, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -144,29 +133,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailableLoginServerName), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" availableLoginServerName: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(AvailableLoginServerName)) - { - builder.Append(" availableLoginServerName: "); - if (AvailableLoginServerName.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{AvailableLoginServerName}'''"); - } - else - { - builder.AppendLine($"'{AvailableLoginServerName}'"); - } - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsNameAvailable), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs index 58cc7b79002e..f283691e35d6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs @@ -51,23 +51,18 @@ internal ContainerRegistryNameAvailableResult() } /// Initializes a new instance of . - /// The complete login server name with domain name label (DNL) hash, if available. /// The value that indicates whether the name is available. /// If any, the reason that the name is not available. /// If any, the error message that provides more detail for the reason that the name is not available. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryNameAvailableResult(string availableLoginServerName, bool? isNameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) + internal ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) { - AvailableLoginServerName = availableLoginServerName; IsNameAvailable = isNameAvailable; Reason = reason; Message = message; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The complete login server name with domain name label (DNL) hash, if available. - [WirePath("availableLoginServerName")] - public string AvailableLoginServerName { get; } /// The value that indicates whether the name is available. [WirePath("nameAvailable")] public bool? IsNameAvailable { get; } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs index 477050a64557..fa28c9bd83af 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs @@ -98,16 +98,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("anonymousPullEnabled"u8); writer.WriteBooleanValue(IsAnonymousPullEnabled.Value); } - if (Optional.IsDefined(MetadataSearch)) - { - writer.WritePropertyName("metadataSearch"u8); - writer.WriteStringValue(MetadataSearch.Value.ToString()); - } - if (Optional.IsDefined(RoleAssignmentMode)) - { - writer.WritePropertyName("roleAssignmentMode"u8); - writer.WriteStringValue(RoleAssignmentMode.Value.ToString()); - } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -157,8 +147,6 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default; ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default; bool? anonymousPullEnabled = default; - ContainerRegistryMetadataSearch? metadataSearch = default; - ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -276,24 +264,6 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle anonymousPullEnabled = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("metadataSearch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - metadataSearch = new ContainerRegistryMetadataSearch(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("roleAssignmentMode"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - roleAssignmentMode = new ContainerRegistryRoleAssignmentMode(property0.Value.GetString()); - continue; - } } continue; } @@ -315,8 +285,6 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle publicNetworkAccess, networkRuleBypassOptions, anonymousPullEnabled, - metadataSearch, - roleAssignmentMode, serializedAdditionalRawData); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs index 670b664233c1..fbef70e6a45a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs @@ -64,10 +64,8 @@ public ContainerRegistryPatch() /// Whether or not public network access is allowed for the container registry. /// Whether to allow trusted Azure services to access a network restricted registry. /// Enables registry-wide pull from unauthenticated clients. - /// Determines whether registry artifacts are indexed for metadata search. - /// Determines registry role assignment mode. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary tags, ContainerRegistrySku sku, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? isAnonymousPullEnabled, ContainerRegistryMetadataSearch? metadataSearch, ContainerRegistryRoleAssignmentMode? roleAssignmentMode, IDictionary serializedAdditionalRawData) + internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary tags, ContainerRegistrySku sku, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? isAnonymousPullEnabled, IDictionary serializedAdditionalRawData) { Identity = identity; Tags = tags; @@ -80,8 +78,6 @@ internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary Enables registry-wide pull from unauthenticated clients. [WirePath("properties.anonymousPullEnabled")] public bool? IsAnonymousPullEnabled { get; set; } - /// Determines whether registry artifacts are indexed for metadata search. - [WirePath("properties.metadataSearch")] - public ContainerRegistryMetadataSearch? MetadataSearch { get; set; } - /// Determines registry role assignment mode. - [WirePath("properties.roleAssignmentMode")] - public ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineOption.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineOption.cs deleted file mode 100644 index 2e9963653f2d..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineOption.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The ContainerRegistryPipelineOption. - public readonly partial struct ContainerRegistryPipelineOption : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerRegistryPipelineOption(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OverwriteTagsValue = "OverwriteTags"; - private const string OverwriteBlobsValue = "OverwriteBlobs"; - private const string DeleteSourceBlobOnSuccessValue = "DeleteSourceBlobOnSuccess"; - private const string ContinueOnErrorsValue = "ContinueOnErrors"; - - /// OverwriteTags. - public static ContainerRegistryPipelineOption OverwriteTags { get; } = new ContainerRegistryPipelineOption(OverwriteTagsValue); - /// OverwriteBlobs. - public static ContainerRegistryPipelineOption OverwriteBlobs { get; } = new ContainerRegistryPipelineOption(OverwriteBlobsValue); - /// DeleteSourceBlobOnSuccess. - public static ContainerRegistryPipelineOption DeleteSourceBlobOnSuccess { get; } = new ContainerRegistryPipelineOption(DeleteSourceBlobOnSuccessValue); - /// ContinueOnErrors. - public static ContainerRegistryPipelineOption ContinueOnErrors { get; } = new ContainerRegistryPipelineOption(ContinueOnErrorsValue); - /// Determines if two values are the same. - public static bool operator ==(ContainerRegistryPipelineOption left, ContainerRegistryPipelineOption right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerRegistryPipelineOption left, ContainerRegistryPipelineOption right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerRegistryPipelineOption(string value) => new ContainerRegistryPipelineOption(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerRegistryPipelineOption other && Equals(other); - /// - public bool Equals(ContainerRegistryPipelineOption 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceProperties.Serialization.cs deleted file mode 100644 index 9dc089d4abf8..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceProperties.Serialization.cs +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class ContainerRegistryPipelineRunSourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunSourceProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(SourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(SourceType.Value.ToString()); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ContainerRegistryPipelineRunSourceProperties 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(ContainerRegistryPipelineRunSourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryPipelineRunSourceProperties(document.RootElement, options); - } - - internal static ContainerRegistryPipelineRunSourceProperties DeserializeContainerRegistryPipelineRunSourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ContainerRegistryPipelineRunSourceType? type = default; - string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ContainerRegistryPipelineRunSourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryPipelineRunSourceProperties(type, name, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" type: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SourceType)) - { - builder.Append(" type: "); - builder.AppendLine($"'{SourceType.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunSourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryPipelineRunSourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryPipelineRunSourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunSourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceProperties.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceProperties.cs deleted file mode 100644 index 1e5037453e64..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceProperties.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The ContainerRegistryPipelineRunSourceProperties. - public partial class ContainerRegistryPipelineRunSourceProperties - { - /// - /// 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 ContainerRegistryPipelineRunSourceProperties() - { - } - - /// Initializes a new instance of . - /// The type of the source. - /// The name of the source. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPipelineRunSourceProperties(ContainerRegistryPipelineRunSourceType? sourceType, string name, IDictionary serializedAdditionalRawData) - { - SourceType = sourceType; - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The type of the source. - [WirePath("type")] - public ContainerRegistryPipelineRunSourceType? SourceType { get; set; } - /// The name of the source. - [WirePath("name")] - public string Name { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceType.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceType.cs deleted file mode 100644 index f3f9a8153f3d..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunSourceType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The type of the source. - public readonly partial struct ContainerRegistryPipelineRunSourceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerRegistryPipelineRunSourceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AzureStorageBlobValue = "AzureStorageBlob"; - - /// AzureStorageBlob. - public static ContainerRegistryPipelineRunSourceType AzureStorageBlob { get; } = new ContainerRegistryPipelineRunSourceType(AzureStorageBlobValue); - /// Determines if two values are the same. - public static bool operator ==(ContainerRegistryPipelineRunSourceType left, ContainerRegistryPipelineRunSourceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerRegistryPipelineRunSourceType left, ContainerRegistryPipelineRunSourceType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerRegistryPipelineRunSourceType(string value) => new ContainerRegistryPipelineRunSourceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerRegistryPipelineRunSourceType other && Equals(other); - /// - public bool Equals(ContainerRegistryPipelineRunSourceType 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetProperties.Serialization.cs deleted file mode 100644 index b90164a90a72..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetProperties.Serialization.cs +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class ContainerRegistryPipelineRunTargetProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunTargetProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(TargetType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(TargetType.Value.ToString()); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ContainerRegistryPipelineRunTargetProperties 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(ContainerRegistryPipelineRunTargetProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistryPipelineRunTargetProperties(document.RootElement, options); - } - - internal static ContainerRegistryPipelineRunTargetProperties DeserializeContainerRegistryPipelineRunTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ContainerRegistryPipelineRunTargetType? type = default; - string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ContainerRegistryPipelineRunTargetType(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryPipelineRunTargetProperties(type, name, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" type: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(TargetType)) - { - builder.Append(" type: "); - builder.AppendLine($"'{TargetType.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunTargetProperties)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistryPipelineRunTargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistryPipelineRunTargetProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistryPipelineRunTargetProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetProperties.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetProperties.cs deleted file mode 100644 index 0119f371a627..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetProperties.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The ContainerRegistryPipelineRunTargetProperties. - public partial class ContainerRegistryPipelineRunTargetProperties - { - /// - /// 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 ContainerRegistryPipelineRunTargetProperties() - { - } - - /// Initializes a new instance of . - /// The type of the target. - /// The name of the target. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPipelineRunTargetProperties(ContainerRegistryPipelineRunTargetType? targetType, string name, IDictionary serializedAdditionalRawData) - { - TargetType = targetType; - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The type of the target. - [WirePath("type")] - public ContainerRegistryPipelineRunTargetType? TargetType { get; set; } - /// The name of the target. - [WirePath("name")] - public string Name { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetType.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetType.cs deleted file mode 100644 index 3d6e3b5b8604..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineRunTargetType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The type of the target. - public readonly partial struct ContainerRegistryPipelineRunTargetType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerRegistryPipelineRunTargetType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AzureStorageBlobValue = "AzureStorageBlob"; - - /// AzureStorageBlob. - public static ContainerRegistryPipelineRunTargetType AzureStorageBlob { get; } = new ContainerRegistryPipelineRunTargetType(AzureStorageBlobValue); - /// Determines if two values are the same. - public static bool operator ==(ContainerRegistryPipelineRunTargetType left, ContainerRegistryPipelineRunTargetType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerRegistryPipelineRunTargetType left, ContainerRegistryPipelineRunTargetType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerRegistryPipelineRunTargetType(string value) => new ContainerRegistryPipelineRunTargetType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerRegistryPipelineRunTargetType other && Equals(other); - /// - public bool Equals(ContainerRegistryPipelineRunTargetType 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineSourceType.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineSourceType.cs deleted file mode 100644 index a60f2cdd8bfa..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPipelineSourceType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The type of source for the import pipeline. - public readonly partial struct ContainerRegistryPipelineSourceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerRegistryPipelineSourceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AzureStorageBlobContainerValue = "AzureStorageBlobContainer"; - - /// AzureStorageBlobContainer. - public static ContainerRegistryPipelineSourceType AzureStorageBlobContainer { get; } = new ContainerRegistryPipelineSourceType(AzureStorageBlobContainerValue); - /// Determines if two values are the same. - public static bool operator ==(ContainerRegistryPipelineSourceType left, ContainerRegistryPipelineSourceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerRegistryPipelineSourceType left, ContainerRegistryPipelineSourceType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerRegistryPipelineSourceType(string value) => new ContainerRegistryPipelineSourceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerRegistryPipelineSourceType other && Equals(other); - /// - public bool Equals(ContainerRegistryPipelineSourceType 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs index 0c96e8c26d99..9efd26e7a5ac 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.Serialization.cs @@ -60,11 +60,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("azureADAuthenticationAsArmPolicy"u8); writer.WriteObjectValue(AzureADAuthenticationAsArmPolicy, options); } - if (Optional.IsDefined(SoftDeletePolicy)) - { - writer.WritePropertyName("softDeletePolicy"u8); - writer.WriteObjectValue(SoftDeletePolicy, options); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -107,7 +102,6 @@ internal static ContainerRegistryPolicies DeserializeContainerRegistryPolicies(J ContainerRegistryRetentionPolicy retentionPolicy = default; ContainerRegistryExportPolicy exportPolicy = default; AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy = default; - ContainerRegistrySoftDeletePolicy softDeletePolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -157,15 +151,6 @@ internal static ContainerRegistryPolicies DeserializeContainerRegistryPolicies(J azureADAuthenticationAsArmPolicy = AzureADAuthenticationAsArmPolicy.DeserializeAzureADAuthenticationAsArmPolicy(property.Value, options); continue; } - if (property.NameEquals("softDeletePolicy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - softDeletePolicy = ContainerRegistrySoftDeletePolicy.DeserializeContainerRegistrySoftDeletePolicy(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -178,7 +163,6 @@ internal static ContainerRegistryPolicies DeserializeContainerRegistryPolicies(J retentionPolicy, exportPolicy, azureADAuthenticationAsArmPolicy, - softDeletePolicy, serializedAdditionalRawData); } @@ -277,21 +261,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SoftDeletePolicy), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" softDeletePolicy: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SoftDeletePolicy)) - { - builder.Append(" softDeletePolicy: "); - BicepSerializationHelpers.AppendChildObject(builder, SoftDeletePolicy, options, 2, false, " softDeletePolicy: "); - } - } - builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs index 254dfd394aee..206355707397 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs @@ -56,16 +56,14 @@ public ContainerRegistryPolicies() /// The retention policy for a container registry. /// The export policy for a container registry. /// The policy for using ARM audience token for a container registry. - /// The soft delete policy for a container registry. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPolicies(ContainerRegistryQuarantinePolicy quarantinePolicy, ContainerRegistryTrustPolicy trustPolicy, ContainerRegistryRetentionPolicy retentionPolicy, ContainerRegistryExportPolicy exportPolicy, AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy, ContainerRegistrySoftDeletePolicy softDeletePolicy, IDictionary serializedAdditionalRawData) + internal ContainerRegistryPolicies(ContainerRegistryQuarantinePolicy quarantinePolicy, ContainerRegistryTrustPolicy trustPolicy, ContainerRegistryRetentionPolicy retentionPolicy, ContainerRegistryExportPolicy exportPolicy, AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy, IDictionary serializedAdditionalRawData) { QuarantinePolicy = quarantinePolicy; TrustPolicy = trustPolicy; RetentionPolicy = retentionPolicy; ExportPolicy = exportPolicy; AzureADAuthenticationAsArmPolicy = azureADAuthenticationAsArmPolicy; - SoftDeletePolicy = softDeletePolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -119,9 +117,5 @@ public AadAuthenticationAsArmPolicyStatus? AzureADAuthenticationAsArmStatus AzureADAuthenticationAsArmPolicy.Status = value; } } - - /// The soft delete policy for a container registry. - [WirePath("softDeletePolicy")] - public ContainerRegistrySoftDeletePolicy SoftDeletePolicy { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryProvisioningState.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryProvisioningState.cs index 494d9ce78f5c..bbb6fc247938 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryProvisioningState.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - /// The provisioning state of the archive at the time the operation was called. + /// The provisioning state of this agent pool. public readonly partial struct ContainerRegistryProvisioningState : IEquatable { private readonly string _value; diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs deleted file mode 100644 index d827654379a1..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// Determines registry role assignment mode. - public readonly partial struct ContainerRegistryRoleAssignmentMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerRegistryRoleAssignmentMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AbacRepositoryPermissionsValue = "AbacRepositoryPermissions"; - private const string LegacyRegistryPermissionsValue = "LegacyRegistryPermissions"; - - /// AbacRepositoryPermissions. - public static ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get; } = new ContainerRegistryRoleAssignmentMode(AbacRepositoryPermissionsValue); - /// LegacyRegistryPermissions. - public static ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get; } = new ContainerRegistryRoleAssignmentMode(LegacyRegistryPermissionsValue); - /// Determines if two values are the same. - public static bool operator ==(ContainerRegistryRoleAssignmentMode left, ContainerRegistryRoleAssignmentMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerRegistryRoleAssignmentMode left, ContainerRegistryRoleAssignmentMode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerRegistryRoleAssignmentMode(string value) => new ContainerRegistryRoleAssignmentMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerRegistryRoleAssignmentMode other && Equals(other); - /// - public bool Equals(ContainerRegistryRoleAssignmentMode 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/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySoftDeletePolicy.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySoftDeletePolicy.Serialization.cs deleted file mode 100644 index ddb3a3c2c922..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySoftDeletePolicy.Serialization.cs +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class ContainerRegistrySoftDeletePolicy : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContainerRegistrySoftDeletePolicy)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(RetentionDays)) - { - writer.WritePropertyName("retentionDays"u8); - writer.WriteNumberValue(RetentionDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(LastUpdatedOn)) - { - writer.WritePropertyName("lastUpdatedTime"u8); - writer.WriteStringValue(LastUpdatedOn.Value, "O"); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ContainerRegistrySoftDeletePolicy 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(ContainerRegistrySoftDeletePolicy)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContainerRegistrySoftDeletePolicy(document.RootElement, options); - } - - internal static ContainerRegistrySoftDeletePolicy DeserializeContainerRegistrySoftDeletePolicy(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? retentionDays = default; - DateTimeOffset? lastUpdatedTime = default; - ContainerRegistryPolicyStatus? status = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("retentionDays"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - retentionDays = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("lastUpdatedTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastUpdatedTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ContainerRegistryPolicyStatus(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistrySoftDeletePolicy(retentionDays, lastUpdatedTime, status, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RetentionDays), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" retentionDays: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(RetentionDays)) - { - builder.Append(" retentionDays: "); - builder.AppendLine($"{RetentionDays.Value}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastUpdatedOn), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" lastUpdatedTime: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(LastUpdatedOn)) - { - builder.Append(" lastUpdatedTime: "); - var formattedDateTimeString = TypeFormatters.ToString(LastUpdatedOn.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" status: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Status)) - { - builder.Append(" status: "); - builder.AppendLine($"'{Status.Value.ToString()}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ContainerRegistrySoftDeletePolicy)} does not support writing '{options.Format}' format."); - } - } - - ContainerRegistrySoftDeletePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeContainerRegistrySoftDeletePolicy(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContainerRegistrySoftDeletePolicy)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySoftDeletePolicy.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySoftDeletePolicy.cs deleted file mode 100644 index 36898949580d..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistrySoftDeletePolicy.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The soft delete policy for a container registry. - public partial class ContainerRegistrySoftDeletePolicy - { - /// - /// 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 ContainerRegistrySoftDeletePolicy() - { - } - - /// Initializes a new instance of . - /// The number of days after which a soft-deleted item is permanently deleted. - /// The timestamp when the policy was last updated. - /// The value that indicates whether the policy is enabled or not. - /// Keeps track of any properties unknown to the library. - internal ContainerRegistrySoftDeletePolicy(int? retentionDays, DateTimeOffset? lastUpdatedOn, ContainerRegistryPolicyStatus? status, IDictionary serializedAdditionalRawData) - { - RetentionDays = retentionDays; - LastUpdatedOn = lastUpdatedOn; - Status = status; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The number of days after which a soft-deleted item is permanently deleted. - [WirePath("retentionDays")] - public int? RetentionDays { get; set; } - /// The timestamp when the policy was last updated. - [WirePath("lastUpdatedTime")] - public DateTimeOffset? LastUpdatedOn { get; } - /// The value that indicates whether the policy is enabled or not. - [WirePath("status")] - public ContainerRegistryPolicyStatus? Status { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerStatus.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerStatus.cs index 9e47207b7898..3c29f8ab4c6b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerStatus.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryTriggerStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - /// The current status of the source trigger. + /// The current status of trigger. public readonly partial struct ContainerRegistryTriggerStatus : IEquatable { private readonly string _value; @@ -22,13 +22,13 @@ public ContainerRegistryTriggerStatus(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; - /// Enabled. - public static ContainerRegistryTriggerStatus Enabled { get; } = new ContainerRegistryTriggerStatus(EnabledValue); /// Disabled. public static ContainerRegistryTriggerStatus Disabled { get; } = new ContainerRegistryTriggerStatus(DisabledValue); + /// Enabled. + public static ContainerRegistryTriggerStatus Enabled { get; } = new ContainerRegistryTriggerStatus(EnabledValue); /// Determines if two values are the same. public static bool operator ==(ContainerRegistryTriggerStatus left, ContainerRegistryTriggerStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineListResult.Serialization.cs deleted file mode 100644 index e44f00a86892..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class ExportPipelineListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ExportPipelineListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ExportPipelineListResult 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(ExportPipelineListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeExportPipelineListResult(document.RootElement, options); - } - - internal static ExportPipelineListResult DeserializeExportPipelineListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ContainerRegistryExportPipelineData.DeserializeContainerRegistryExportPipelineData(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 ExportPipelineListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ExportPipelineListResult)} does not support writing '{options.Format}' format."); - } - } - - ExportPipelineListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeExportPipelineListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ExportPipelineListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineListResult.cs deleted file mode 100644 index 52e7335391f7..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The result of a request to list export pipelines for a container registry. - internal partial class ExportPipelineListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal ExportPipelineListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines. - /// The URI that can be used to request the next list of pipeline runs. - /// Keeps track of any properties unknown to the library. - internal ExportPipelineListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines. - public IReadOnlyList Value { get; } - /// The URI that can be used to request the next list of pipeline runs. - public string NextLink { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineTargetProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineTargetProperties.Serialization.cs deleted file mode 100644 index 2d7e7a56ab88..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineTargetProperties.Serialization.cs +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class ExportPipelineTargetProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ExportPipelineTargetProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(PipelineTargetType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(PipelineTargetType); - } - if (Optional.IsDefined(Uri)) - { - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - } - writer.WritePropertyName("keyVaultUri"u8); - writer.WriteStringValue(KeyVaultUri.AbsoluteUri); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ExportPipelineTargetProperties 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(ExportPipelineTargetProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeExportPipelineTargetProperties(document.RootElement, options); - } - - internal static ExportPipelineTargetProperties DeserializeExportPipelineTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - Uri uri = default; - Uri keyVaultUri = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("uri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("keyVaultUri"u8)) - { - keyVaultUri = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ExportPipelineTargetProperties(type, uri, keyVaultUri, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PipelineTargetType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" type: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PipelineTargetType)) - { - builder.Append(" type: "); - if (PipelineTargetType.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{PipelineTargetType}'''"); - } - else - { - builder.AppendLine($"'{PipelineTargetType}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" uri: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Uri)) - { - builder.Append(" uri: "); - builder.AppendLine($"'{Uri.AbsoluteUri}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultUri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" keyVaultUri: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(KeyVaultUri)) - { - builder.Append(" keyVaultUri: "); - builder.AppendLine($"'{KeyVaultUri.AbsoluteUri}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ExportPipelineTargetProperties)} does not support writing '{options.Format}' format."); - } - } - - ExportPipelineTargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeExportPipelineTargetProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ExportPipelineTargetProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineTargetProperties.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineTargetProperties.cs deleted file mode 100644 index bd680e56624a..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ExportPipelineTargetProperties.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The properties of the export pipeline target. - public partial class ExportPipelineTargetProperties - { - /// - /// 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 . - /// They key vault secret uri to obtain the target storage SAS token. - /// is null. - public ExportPipelineTargetProperties(Uri keyVaultUri) - { - Argument.AssertNotNull(keyVaultUri, nameof(keyVaultUri)); - - KeyVaultUri = keyVaultUri; - } - - /// Initializes a new instance of . - /// The type of target for the export pipeline. - /// - /// The target uri of the export pipeline. - /// When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" - /// When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" - /// - /// They key vault secret uri to obtain the target storage SAS token. - /// Keeps track of any properties unknown to the library. - internal ExportPipelineTargetProperties(string pipelineTargetType, Uri uri, Uri keyVaultUri, IDictionary serializedAdditionalRawData) - { - PipelineTargetType = pipelineTargetType; - Uri = uri; - KeyVaultUri = keyVaultUri; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ExportPipelineTargetProperties() - { - } - - /// The type of target for the export pipeline. - [WirePath("type")] - public string PipelineTargetType { get; set; } - /// - /// The target uri of the export pipeline. - /// When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" - /// When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" - /// - [WirePath("uri")] - public Uri Uri { get; set; } - /// They key vault secret uri to obtain the target storage SAS token. - [WirePath("keyVaultUri")] - public Uri KeyVaultUri { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineListResult.Serialization.cs deleted file mode 100644 index 3d74b1e76578..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class ImportPipelineListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ImportPipelineListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ImportPipelineListResult 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(ImportPipelineListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeImportPipelineListResult(document.RootElement, options); - } - - internal static ImportPipelineListResult DeserializeImportPipelineListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ContainerRegistryImportPipelineData.DeserializeContainerRegistryImportPipelineData(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 ImportPipelineListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ImportPipelineListResult)} does not support writing '{options.Format}' format."); - } - } - - ImportPipelineListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeImportPipelineListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ImportPipelineListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineListResult.cs deleted file mode 100644 index 99757c2ac8e4..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The result of a request to list import pipelines for a container registry. - internal partial class ImportPipelineListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal ImportPipelineListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The list of import pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of import pipelines. - /// The URI that can be used to request the next list of pipeline runs. - /// Keeps track of any properties unknown to the library. - internal ImportPipelineListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The list of import pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of import pipelines. - public IReadOnlyList Value { get; } - /// The URI that can be used to request the next list of pipeline runs. - public string NextLink { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineSourceProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineSourceProperties.Serialization.cs deleted file mode 100644 index 9bd119b0602a..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineSourceProperties.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class ImportPipelineSourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ImportPipelineSourceProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ContainerRegistryPipelineSourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ContainerRegistryPipelineSourceType.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - } - writer.WritePropertyName("keyVaultUri"u8); - writer.WriteStringValue(KeyVaultUri.AbsoluteUri); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ImportPipelineSourceProperties 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(ImportPipelineSourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeImportPipelineSourceProperties(document.RootElement, options); - } - - internal static ImportPipelineSourceProperties DeserializeImportPipelineSourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ContainerRegistryPipelineSourceType? type = default; - Uri uri = default; - Uri keyVaultUri = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ContainerRegistryPipelineSourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("keyVaultUri"u8)) - { - keyVaultUri = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ImportPipelineSourceProperties(type, uri, keyVaultUri, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerRegistryPipelineSourceType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" type: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ContainerRegistryPipelineSourceType)) - { - builder.Append(" type: "); - builder.AppendLine($"'{ContainerRegistryPipelineSourceType.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" uri: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Uri)) - { - builder.Append(" uri: "); - builder.AppendLine($"'{Uri.AbsoluteUri}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultUri), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" keyVaultUri: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(KeyVaultUri)) - { - builder.Append(" keyVaultUri: "); - builder.AppendLine($"'{KeyVaultUri.AbsoluteUri}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ImportPipelineSourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ImportPipelineSourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeImportPipelineSourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ImportPipelineSourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineSourceProperties.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineSourceProperties.cs deleted file mode 100644 index 367a2daac168..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ImportPipelineSourceProperties.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The properties of the import pipeline source. - public partial class ImportPipelineSourceProperties - { - /// - /// 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 . - /// They key vault secret uri to obtain the source storage SAS token. - /// is null. - public ImportPipelineSourceProperties(Uri keyVaultUri) - { - Argument.AssertNotNull(keyVaultUri, nameof(keyVaultUri)); - - KeyVaultUri = keyVaultUri; - } - - /// Initializes a new instance of . - /// The type of source for the import pipeline. - /// - /// The source uri of the import pipeline. - /// When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" - /// When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" - /// - /// They key vault secret uri to obtain the source storage SAS token. - /// Keeps track of any properties unknown to the library. - internal ImportPipelineSourceProperties(ContainerRegistryPipelineSourceType? containerRegistryPipelineSourceType, Uri uri, Uri keyVaultUri, IDictionary serializedAdditionalRawData) - { - ContainerRegistryPipelineSourceType = containerRegistryPipelineSourceType; - Uri = uri; - KeyVaultUri = keyVaultUri; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ImportPipelineSourceProperties() - { - } - - /// The type of source for the import pipeline. - [WirePath("type")] - public ContainerRegistryPipelineSourceType? ContainerRegistryPipelineSourceType { get; set; } - /// - /// The source uri of the import pipeline. - /// When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" - /// When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" - /// - [WirePath("uri")] - public Uri Uri { get; set; } - /// They key vault secret uri to obtain the source storage SAS token. - [WirePath("keyVaultUri")] - public Uri KeyVaultUri { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineProgress.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineProgress.Serialization.cs deleted file mode 100644 index f4bbd12a73b5..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineProgress.Serialization.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class PipelineProgress : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PipelineProgress)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Percentage)) - { - writer.WritePropertyName("percentage"u8); - writer.WriteStringValue(Percentage); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PipelineProgress 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(PipelineProgress)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePipelineProgress(document.RootElement, options); - } - - internal static PipelineProgress DeserializePipelineProgress(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string percentage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("percentage"u8)) - { - percentage = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PipelineProgress(percentage, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Percentage), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" percentage: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Percentage)) - { - builder.Append(" percentage: "); - if (Percentage.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Percentage}'''"); - } - else - { - builder.AppendLine($"'{Percentage}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(PipelineProgress)} does not support writing '{options.Format}' format."); - } - } - - PipelineProgress IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializePipelineProgress(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PipelineProgress)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineProgress.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineProgress.cs deleted file mode 100644 index 07374fac021a..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineProgress.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The PipelineProgress. - internal partial class PipelineProgress - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal PipelineProgress() - { - } - - /// Initializes a new instance of . - /// The percentage complete of the copy operation. - /// Keeps track of any properties unknown to the library. - internal PipelineProgress(string percentage, IDictionary serializedAdditionalRawData) - { - Percentage = percentage; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The percentage complete of the copy operation. - [WirePath("percentage")] - public string Percentage { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunListResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunListResult.Serialization.cs deleted file mode 100644 index 2c9c354c3d9d..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class PipelineRunListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PipelineRunListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PipelineRunListResult 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(PipelineRunListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePipelineRunListResult(document.RootElement, options); - } - - internal static PipelineRunListResult DeserializePipelineRunListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ContainerRegistryPipelineRunData.DeserializeContainerRegistryPipelineRunData(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 PipelineRunListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(PipelineRunListResult)} does not support writing '{options.Format}' format."); - } - } - - PipelineRunListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializePipelineRunListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PipelineRunListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunListResult.cs deleted file mode 100644 index 5e7444729a6b..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The result of a request to list pipeline runs for a container registry. - internal partial class PipelineRunListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal PipelineRunListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The list of pipeline runs. Since this list may be incomplete, the nextLink field should be used to request the next list of pipeline runs. - /// The URI that can be used to request the next list of pipeline runs. - /// Keeps track of any properties unknown to the library. - internal PipelineRunListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The list of pipeline runs. Since this list may be incomplete, the nextLink field should be used to request the next list of pipeline runs. - public IReadOnlyList Value { get; } - /// The URI that can be used to request the next list of pipeline runs. - public string NextLink { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunResult.Serialization.cs deleted file mode 100644 index 37af5a7ef445..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunResult.Serialization.cs +++ /dev/null @@ -1,501 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - public partial class PipelineRunResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PipelineRunResult)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsCollectionDefined(ImportedArtifacts)) - { - writer.WritePropertyName("importedArtifacts"u8); - writer.WriteStartArray(); - foreach (var item in ImportedArtifacts) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Progress)) - { - writer.WritePropertyName("progress"u8); - writer.WriteObjectValue(Progress, options); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(FinishOn)) - { - writer.WritePropertyName("finishTime"u8); - writer.WriteStringValue(FinishOn.Value, "O"); - } - if (Optional.IsDefined(Source)) - { - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source, options); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"u8); - writer.WriteObjectValue(Target, options); - } - if (Optional.IsDefined(CatalogDigest)) - { - writer.WritePropertyName("catalogDigest"u8); - writer.WriteStringValue(CatalogDigest); - } - if (Optional.IsDefined(Trigger)) - { - writer.WritePropertyName("trigger"u8); - writer.WriteObjectValue(Trigger, options); - } - if (Optional.IsDefined(PipelineRunErrorMessage)) - { - writer.WritePropertyName("pipelineRunErrorMessage"u8); - writer.WriteStringValue(PipelineRunErrorMessage); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PipelineRunResult 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(PipelineRunResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePipelineRunResult(document.RootElement, options); - } - - internal static PipelineRunResult DeserializePipelineRunResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string status = default; - IReadOnlyList importedArtifacts = default; - PipelineProgress progress = default; - DateTimeOffset? startTime = default; - DateTimeOffset? finishTime = default; - ImportPipelineSourceProperties source = default; - ExportPipelineTargetProperties target = default; - string catalogDigest = default; - PipelineTriggerDescriptor trigger = default; - string pipelineRunErrorMessage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("importedArtifacts"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - importedArtifacts = array; - continue; - } - if (property.NameEquals("progress"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - progress = PipelineProgress.DeserializePipelineProgress(property.Value, options); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("finishTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - finishTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("source"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - source = ImportPipelineSourceProperties.DeserializeImportPipelineSourceProperties(property.Value, options); - continue; - } - if (property.NameEquals("target"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - target = ExportPipelineTargetProperties.DeserializeExportPipelineTargetProperties(property.Value, options); - continue; - } - if (property.NameEquals("catalogDigest"u8)) - { - catalogDigest = property.Value.GetString(); - continue; - } - if (property.NameEquals("trigger"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - trigger = PipelineTriggerDescriptor.DeserializePipelineTriggerDescriptor(property.Value, options); - continue; - } - if (property.NameEquals("pipelineRunErrorMessage"u8)) - { - pipelineRunErrorMessage = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PipelineRunResult( - status, - importedArtifacts ?? new ChangeTrackingList(), - progress, - startTime, - finishTime, - source, - target, - catalogDigest, - trigger, - pipelineRunErrorMessage, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" status: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Status)) - { - builder.Append(" status: "); - if (Status.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Status}'''"); - } - else - { - builder.AppendLine($"'{Status}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ImportedArtifacts), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" importedArtifacts: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(ImportedArtifacts)) - { - if (ImportedArtifacts.Any()) - { - builder.Append(" importedArtifacts: "); - builder.AppendLine("["); - foreach (var item in ImportedArtifacts) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("ProgressPercentage", out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" progress: "); - builder.AppendLine("{"); - builder.Append(" percentage: "); - builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); - } - else - { - if (Optional.IsDefined(Progress)) - { - builder.Append(" progress: "); - BicepSerializationHelpers.AppendChildObject(builder, Progress, options, 2, false, " progress: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" startTime: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(StartOn)) - { - builder.Append(" startTime: "); - var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FinishOn), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" finishTime: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(FinishOn)) - { - builder.Append(" finishTime: "); - var formattedDateTimeString = TypeFormatters.ToString(FinishOn.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Source), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" source: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Source)) - { - builder.Append(" source: "); - BicepSerializationHelpers.AppendChildObject(builder, Source, options, 2, false, " source: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Target), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" target: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Target)) - { - builder.Append(" target: "); - BicepSerializationHelpers.AppendChildObject(builder, Target, options, 2, false, " target: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CatalogDigest), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" catalogDigest: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(CatalogDigest)) - { - builder.Append(" catalogDigest: "); - if (CatalogDigest.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{CatalogDigest}'''"); - } - else - { - builder.AppendLine($"'{CatalogDigest}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SourceTriggerTimestamp", out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" trigger: "); - builder.AppendLine("{"); - builder.AppendLine(" sourceTrigger: {"); - builder.Append(" timestamp: "); - builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); - builder.AppendLine(" }"); - } - else - { - if (Optional.IsDefined(Trigger)) - { - builder.Append(" trigger: "); - BicepSerializationHelpers.AppendChildObject(builder, Trigger, options, 2, false, " trigger: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PipelineRunErrorMessage), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" pipelineRunErrorMessage: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PipelineRunErrorMessage)) - { - builder.Append(" pipelineRunErrorMessage: "); - if (PipelineRunErrorMessage.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{PipelineRunErrorMessage}'''"); - } - else - { - builder.AppendLine($"'{PipelineRunErrorMessage}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(PipelineRunResult)} does not support writing '{options.Format}' format."); - } - } - - PipelineRunResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializePipelineRunResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PipelineRunResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunResult.cs deleted file mode 100644 index ce39d76d06c9..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineRunResult.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The response properties returned for a pipeline run. - public partial class PipelineRunResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal PipelineRunResult() - { - ImportedArtifacts = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The current status of the pipeline run. - /// The artifacts imported in the pipeline run. - /// The current progress of the copy operation. - /// The time the pipeline run started. - /// The time the pipeline run finished. - /// The source of the pipeline run. - /// The target of the pipeline run. - /// The digest of the tar used to transfer the artifacts. - /// The trigger that caused the pipeline run. - /// The detailed error message for the pipeline run in the case of failure. - /// Keeps track of any properties unknown to the library. - internal PipelineRunResult(string status, IReadOnlyList importedArtifacts, PipelineProgress progress, DateTimeOffset? startOn, DateTimeOffset? finishOn, ImportPipelineSourceProperties source, ExportPipelineTargetProperties target, string catalogDigest, PipelineTriggerDescriptor trigger, string pipelineRunErrorMessage, IDictionary serializedAdditionalRawData) - { - Status = status; - ImportedArtifacts = importedArtifacts; - Progress = progress; - StartOn = startOn; - FinishOn = finishOn; - Source = source; - Target = target; - CatalogDigest = catalogDigest; - Trigger = trigger; - PipelineRunErrorMessage = pipelineRunErrorMessage; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The current status of the pipeline run. - [WirePath("status")] - public string Status { get; } - /// The artifacts imported in the pipeline run. - [WirePath("importedArtifacts")] - public IReadOnlyList ImportedArtifacts { get; } - /// The current progress of the copy operation. - internal PipelineProgress Progress { get; } - /// The percentage complete of the copy operation. - [WirePath("progress.percentage")] - public string ProgressPercentage - { - get => Progress?.Percentage; - } - - /// The time the pipeline run started. - [WirePath("startTime")] - public DateTimeOffset? StartOn { get; } - /// The time the pipeline run finished. - [WirePath("finishTime")] - public DateTimeOffset? FinishOn { get; } - /// The source of the pipeline run. - [WirePath("source")] - public ImportPipelineSourceProperties Source { get; } - /// The target of the pipeline run. - [WirePath("target")] - public ExportPipelineTargetProperties Target { get; } - /// The digest of the tar used to transfer the artifacts. - [WirePath("catalogDigest")] - public string CatalogDigest { get; } - /// The trigger that caused the pipeline run. - internal PipelineTriggerDescriptor Trigger { get; } - /// The timestamp when the source update happened. - [WirePath("trigger.sourceTrigger.timestamp")] - public DateTimeOffset? SourceTriggerTimestamp - { - get => Trigger?.SourceTriggerTimestamp; - } - - /// The detailed error message for the pipeline run in the case of failure. - [WirePath("pipelineRunErrorMessage")] - public string PipelineRunErrorMessage { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerDescriptor.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerDescriptor.Serialization.cs deleted file mode 100644 index 96a23fef3e56..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerDescriptor.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class PipelineSourceTriggerDescriptor : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PipelineSourceTriggerDescriptor)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PipelineSourceTriggerDescriptor 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(PipelineSourceTriggerDescriptor)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePipelineSourceTriggerDescriptor(document.RootElement, options); - } - - internal static PipelineSourceTriggerDescriptor DeserializePipelineSourceTriggerDescriptor(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DateTimeOffset? timestamp = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("timestamp"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timestamp = property.Value.GetDateTimeOffset("O"); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PipelineSourceTriggerDescriptor(timestamp, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Timestamp), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" timestamp: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Timestamp)) - { - builder.Append(" timestamp: "); - var formattedDateTimeString = TypeFormatters.ToString(Timestamp.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(PipelineSourceTriggerDescriptor)} does not support writing '{options.Format}' format."); - } - } - - PipelineSourceTriggerDescriptor IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializePipelineSourceTriggerDescriptor(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PipelineSourceTriggerDescriptor)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerDescriptor.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerDescriptor.cs deleted file mode 100644 index a427b05b4b11..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerDescriptor.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The PipelineSourceTriggerDescriptor. - internal partial class PipelineSourceTriggerDescriptor - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal PipelineSourceTriggerDescriptor() - { - } - - /// Initializes a new instance of . - /// The timestamp when the source update happened. - /// Keeps track of any properties unknown to the library. - internal PipelineSourceTriggerDescriptor(DateTimeOffset? timestamp, IDictionary serializedAdditionalRawData) - { - Timestamp = timestamp; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The timestamp when the source update happened. - [WirePath("timestamp")] - public DateTimeOffset? Timestamp { get; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerProperties.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerProperties.cs deleted file mode 100644 index 4dd88b85bdeb..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineSourceTriggerProperties.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The PipelineSourceTriggerProperties. - internal partial class PipelineSourceTriggerProperties - { - /// - /// 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 current status of the source trigger. - public PipelineSourceTriggerProperties(ContainerRegistryTriggerStatus status) - { - Status = status; - } - - /// Initializes a new instance of . - /// The current status of the source trigger. - /// Keeps track of any properties unknown to the library. - internal PipelineSourceTriggerProperties(ContainerRegistryTriggerStatus status, IDictionary serializedAdditionalRawData) - { - Status = status; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal PipelineSourceTriggerProperties() - { - } - - /// The current status of the source trigger. - [WirePath("status")] - public ContainerRegistryTriggerStatus Status { get; set; } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerDescriptor.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerDescriptor.Serialization.cs deleted file mode 100644 index bb5be9213940..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerDescriptor.Serialization.cs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class PipelineTriggerDescriptor : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PipelineTriggerDescriptor)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(SourceTrigger)) - { - writer.WritePropertyName("sourceTrigger"u8); - writer.WriteObjectValue(SourceTrigger, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PipelineTriggerDescriptor 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(PipelineTriggerDescriptor)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePipelineTriggerDescriptor(document.RootElement, options); - } - - internal static PipelineTriggerDescriptor DeserializePipelineTriggerDescriptor(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PipelineSourceTriggerDescriptor sourceTrigger = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sourceTrigger"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceTrigger = PipelineSourceTriggerDescriptor.DeserializePipelineSourceTriggerDescriptor(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PipelineTriggerDescriptor(sourceTrigger, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SourceTriggerTimestamp", out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" sourceTrigger: "); - builder.AppendLine("{"); - builder.Append(" timestamp: "); - builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); - } - else - { - if (Optional.IsDefined(SourceTrigger)) - { - builder.Append(" sourceTrigger: "); - BicepSerializationHelpers.AppendChildObject(builder, SourceTrigger, options, 2, false, " sourceTrigger: "); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(PipelineTriggerDescriptor)} does not support writing '{options.Format}' format."); - } - } - - PipelineTriggerDescriptor IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializePipelineTriggerDescriptor(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PipelineTriggerDescriptor)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerDescriptor.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerDescriptor.cs deleted file mode 100644 index 84361730efdd..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerDescriptor.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The PipelineTriggerDescriptor. - internal partial class PipelineTriggerDescriptor - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal PipelineTriggerDescriptor() - { - } - - /// Initializes a new instance of . - /// The source trigger that caused the pipeline run. - /// Keeps track of any properties unknown to the library. - internal PipelineTriggerDescriptor(PipelineSourceTriggerDescriptor sourceTrigger, IDictionary serializedAdditionalRawData) - { - SourceTrigger = sourceTrigger; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The source trigger that caused the pipeline run. - internal PipelineSourceTriggerDescriptor SourceTrigger { get; } - /// The timestamp when the source update happened. - [WirePath("sourceTrigger.timestamp")] - public DateTimeOffset? SourceTriggerTimestamp - { - get => SourceTrigger?.Timestamp; - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerProperties.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerProperties.Serialization.cs deleted file mode 100644 index 1b556f778e8c..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerProperties.Serialization.cs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class PipelineTriggerProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(PipelineTriggerProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(SourceTrigger)) - { - writer.WritePropertyName("sourceTrigger"u8); - writer.WriteObjectValue(SourceTrigger, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PipelineTriggerProperties 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(PipelineTriggerProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePipelineTriggerProperties(document.RootElement, options); - } - - internal static PipelineTriggerProperties DeserializePipelineTriggerProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PipelineSourceTriggerProperties sourceTrigger = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sourceTrigger"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sourceTrigger = PipelineSourceTriggerProperties.DeserializePipelineSourceTriggerProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PipelineTriggerProperties(sourceTrigger, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SourceTriggerStatus", out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" sourceTrigger: "); - builder.AppendLine("{"); - builder.Append(" status: "); - builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); - } - else - { - if (Optional.IsDefined(SourceTrigger)) - { - builder.Append(" sourceTrigger: "); - BicepSerializationHelpers.AppendChildObject(builder, SourceTrigger, options, 2, false, " sourceTrigger: "); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(PipelineTriggerProperties)} does not support writing '{options.Format}' format."); - } - } - - PipelineTriggerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializePipelineTriggerProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PipelineTriggerProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerProperties.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerProperties.cs deleted file mode 100644 index 7082f7ca60ea..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/PipelineTriggerProperties.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The PipelineTriggerProperties. - internal partial class PipelineTriggerProperties - { - /// - /// 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 PipelineTriggerProperties() - { - } - - /// Initializes a new instance of . - /// The source trigger properties of the pipeline. - /// Keeps track of any properties unknown to the library. - internal PipelineTriggerProperties(PipelineSourceTriggerProperties sourceTrigger, IDictionary serializedAdditionalRawData) - { - SourceTrigger = sourceTrigger; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The source trigger properties of the pipeline. - internal PipelineSourceTriggerProperties SourceTrigger { get; set; } - /// The current status of the source trigger. - [WirePath("sourceTrigger.status")] - public ContainerRegistryTriggerStatus? SourceTriggerStatus - { - get => SourceTrigger is null ? default(ContainerRegistryTriggerStatus?) : SourceTrigger.Status; - set - { - SourceTrigger = value.HasValue ? new PipelineSourceTriggerProperties(value.Value) : null; - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs index 4c10a8aa9d3f..bc742dff0df1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - public partial class SourceRegistryCredentials : IUtf8JsonSerializable, IJsonModel + internal partial class SourceRegistryCredentials : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -35,11 +35,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SourceRegistryCredentials)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - writer.WriteStringValue(Identity); - } if (Optional.IsDefined(LoginMode)) { writer.WritePropertyName("loginMode"u8); @@ -82,17 +77,11 @@ internal static SourceRegistryCredentials DeserializeSourceRegistryCredentials(J { return null; } - string identity = default; SourceRegistryLoginMode? loginMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) - { - identity = property.Value.GetString(); - continue; - } if (property.NameEquals("loginMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -108,7 +97,7 @@ internal static SourceRegistryCredentials DeserializeSourceRegistryCredentials(J } } serializedAdditionalRawData = rawDataDictionary; - return new SourceRegistryCredentials(identity, loginMode, serializedAdditionalRawData); + return new SourceRegistryCredentials(loginMode, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -122,29 +111,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" identity: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Identity)) - { - builder.Append(" identity: "); - if (Identity.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Identity}'''"); - } - else - { - builder.AppendLine($"'{Identity}'"); - } - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoginMode), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs index d6110bb4ac72..d89f8a5c03fc 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { /// Describes the credential parameters for accessing the source registry. - public partial class SourceRegistryCredentials + internal partial class SourceRegistryCredentials { /// /// Keeps track of any properties unknown to the library. @@ -51,31 +51,18 @@ public SourceRegistryCredentials() } /// Initializes a new instance of . - /// - /// The Entra identity used for source registry login. - /// The value is `[system]` for system-assigned managed identity, `[caller]` for caller identity, - /// and client ID for user-assigned managed identity. - /// /// /// The authentication mode which determines the source registry login scope. The credentials for the source registry /// will be generated using the given scope. These credentials will be used to login to /// the source registry during the run. /// /// Keeps track of any properties unknown to the library. - internal SourceRegistryCredentials(string identity, SourceRegistryLoginMode? loginMode, IDictionary serializedAdditionalRawData) + internal SourceRegistryCredentials(SourceRegistryLoginMode? loginMode, IDictionary serializedAdditionalRawData) { - Identity = identity; LoginMode = loginMode; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// The Entra identity used for source registry login. - /// The value is `[system]` for system-assigned managed identity, `[caller]` for caller identity, - /// and client ID for user-assigned managed identity. - /// - [WirePath("identity")] - public string Identity { get; set; } /// /// The authentication mode which determines the source registry login scope. The credentials for the source registry /// will be generated using the given scope. These credentials will be used to login to diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs index 4924a25cd5f6..8d02a25e302f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs @@ -32,7 +32,7 @@ public AgentPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2019-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -297,6 +297,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -324,6 +325,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ArchiveVersionsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ArchiveVersionsRestOperations.cs deleted file mode 100644 index a5cb9d469981..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ArchiveVersionsRestOperations.cs +++ /dev/null @@ -1,577 +0,0 @@ -// 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.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class ArchiveVersionsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ArchiveVersionsRestOperations. - /// 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 ArchiveVersionsRestOperations(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 ?? "2025-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendPath("/versions", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, 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; - } - - /// Lists all archive versions for the specified container registry, repository type and archive name. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ArchiveVersionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ArchiveVersionListResult.DeserializeArchiveVersionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all archive versions for the specified container registry, repository type and archive name. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ArchiveVersionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ArchiveVersionListResult.DeserializeArchiveVersionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(archiveVersionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(archiveVersionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the properties of the archive version. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The name of the archive version resource. - /// 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 registryName, string packageType, string archiveName, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryArchiveVersionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryArchiveVersionData.DeserializeContainerRegistryArchiveVersionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryArchiveVersionData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the properties of the archive version. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The name of the archive version resource. - /// 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 registryName, string packageType, string archiveName, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryArchiveVersionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryArchiveVersionData.DeserializeContainerRegistryArchiveVersionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryArchiveVersionData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(archiveVersionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(archiveVersionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Creates a archive for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The name of the archive version resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a archive for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The name of the archive version resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(archiveVersionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, string archiveVersionName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(archiveVersionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a archive version from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The name of the archive version resource. - /// 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 registryName, string packageType, string archiveName, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a archive version from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The name of the archive version resource. - /// 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 registryName, string packageType, string archiveName, string archiveVersionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNullOrEmpty(archiveVersionName, nameof(archiveVersionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, archiveVersionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - 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; - } - - /// Lists all archive versions for the specified container registry, repository type and archive name. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, packageType, archiveName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ArchiveVersionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ArchiveVersionListResult.DeserializeArchiveVersionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all archive versions for the specified container registry, repository type and archive name. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, packageType, archiveName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ArchiveVersionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ArchiveVersionListResult.DeserializeArchiveVersionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ArchivesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ArchivesRestOperations.cs deleted file mode 100644 index 896ccc6e426c..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ArchivesRestOperations.cs +++ /dev/null @@ -1,665 +0,0 @@ -// 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.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class ArchivesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ArchivesRestOperations. - /// 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 ArchivesRestOperations(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 ?? "2025-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all archives for the specified container registry and package type. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string packageType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, packageType); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ArchiveListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ArchiveListResult.DeserializeArchiveListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all archives for the specified container registry and package type. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, string packageType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, packageType); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ArchiveListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ArchiveListResult.DeserializeArchiveListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the properties of the archive. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// 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 registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryArchiveData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryArchiveData.DeserializeContainerRegistryArchiveData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryArchiveData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the properties of the archive. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// 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 registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryArchiveData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryArchiveData.DeserializeContainerRegistryArchiveData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryArchiveData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, ContainerRegistryArchiveData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, ContainerRegistryArchiveData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, 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; - } - - /// Creates a archive for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The parameters for creating a archive. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, ContainerRegistryArchiveData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, 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); - } - } - - /// Creates a archive for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The parameters for creating a archive. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, ContainerRegistryArchiveData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a archive from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// 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 registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a archive from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// 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 registryName, string packageType, string archiveName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, ContainerRegistryArchivePatch 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string packageType, string archiveName, ContainerRegistryArchivePatch 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/packages/", false); - uri.AppendPath(packageType, true); - uri.AppendPath("/archives/", false); - uri.AppendPath(archiveName, 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; - } - - /// Updates a archive for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The parameters for updating a archive. - /// 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 registryName, string packageType, string archiveName, ContainerRegistryArchivePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryArchiveData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryArchiveData.DeserializeContainerRegistryArchiveData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates a archive for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The name of the archive resource. - /// The parameters for updating a archive. - /// 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 registryName, string packageType, string archiveName, ContainerRegistryArchivePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - Argument.AssertNotNullOrEmpty(archiveName, nameof(archiveName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, packageType, archiveName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryArchiveData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryArchiveData.DeserializeContainerRegistryArchiveData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType) - { - 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; - } - - /// Lists all archives for the specified container registry and package type. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, packageType); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ArchiveListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ArchiveListResult.DeserializeArchiveListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all archives for the specified container registry and package type. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The type of the package resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string packageType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(packageType, nameof(packageType)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, packageType); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ArchiveListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ArchiveListResult.DeserializeArchiveListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs index 14002140896e..a1e41940ede1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs @@ -32,7 +32,7 @@ public BuildsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2019-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs index 5df46108b897..47da4d93b01b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs @@ -32,7 +32,7 @@ public CacheRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs index 01d1ad94f185..4a21a3113b4f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs @@ -32,11 +32,11 @@ public ConnectedRegistriesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string filter) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,16 +46,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries", false); + uri.AppendPath("/connectedRegistries/", false); + uri.AppendPath(connectedRegistryName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string filter) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -68,79 +65,82 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries", false); + uri.AppendPath("/connectedRegistries/", false); + uri.AppendPath(connectedRegistryName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists all connected registries for the specified container registry. + /// Gets the properties of the connected registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. + /// The name of the connected registry. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ConnectedRegistryListResult value = default; + ConnectedRegistryData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + value = ConnectedRegistryData.DeserializeConnectedRegistryData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ConnectedRegistryData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Lists all connected registries for the specified container registry. + /// Gets the properties of the connected registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. + /// The name of the connected registry. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ConnectedRegistryListResult value = default; + ConnectedRegistryData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + value = ConnectedRegistryData.DeserializeConnectedRegistryData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ConnectedRegistryData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -156,11 +156,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -174,77 +174,73 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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; } - /// Gets the properties of the connected registry. + /// Creates a connected registry for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the connected registry. + /// The parameters for creating a connectedRegistry. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ConnectedRegistryData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ConnectedRegistryData.DeserializeConnectedRegistryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ConnectedRegistryData)null, message.Response); + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the properties of the connected registry. + /// Creates a connected registry for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the connected registry. + /// The parameters for creating a connectedRegistry. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ConnectedRegistryData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ConnectedRegistryData.DeserializeConnectedRegistryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ConnectedRegistryData)null, message.Response); + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -260,11 +256,11 @@ internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -280,30 +276,30 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; } - /// Creates a connected registry for a container registry with the specified parameters. + /// Updates a connected registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the connected registry. - /// The parameters for creating a connectedRegistry. + /// The parameters for updating a connectedRegistry. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -315,24 +311,24 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } } - /// Creates a connected registry for a container registry with the specified parameters. + /// Updates a connected registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the connected registry. - /// The parameters for creating a connectedRegistry. + /// The parameters for updating a connectedRegistry. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -438,7 +434,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryPatch patch) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string filter) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -448,17 +444,20 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries/", false); - uri.AppendPath(connectedRegistryName, true); + uri.AppendPath("/connectedRegistries", false); uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName, ConnectedRegistryPatch patch) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string filter) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -467,72 +466,73 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries/", false); - uri.AppendPath(connectedRegistryName, true); + uri.AppendPath("/connectedRegistries", false); uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, 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; } - /// Updates a connected registry with the specified parameters. + /// Lists all connected registries for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The name of the connected registry. - /// The parameters for updating a connectedRegistry. + /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. /// 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 registryName, string connectedRegistryName, ConnectedRegistryPatch patch, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, patch); + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ConnectedRegistryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Updates a connected registry with the specified parameters. + /// Lists all connected registries for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The name of the connected registry. - /// The parameters for updating a connectedRegistry. + /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. /// 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 registryName, string connectedRegistryName, ConnectedRegistryPatch patch, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(connectedRegistryName, nameof(connectedRegistryName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, connectedRegistryName, patch); + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ConnectedRegistryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs index ac5016941d18..626f987933ac 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs @@ -32,7 +32,7 @@ public CredentialSetsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ExportPipelinesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ExportPipelinesRestOperations.cs deleted file mode 100644 index 37f0bfe6ed9f..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ExportPipelinesRestOperations.cs +++ /dev/null @@ -1,515 +0,0 @@ -// 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.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class ExportPipelinesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ExportPipelinesRestOperations. - /// 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 ExportPipelinesRestOperations(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 ?? "2025-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all export pipelines for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ExportPipelineListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ExportPipelineListResult.DeserializeExportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all export pipelines for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ExportPipelineListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ExportPipelineListResult.DeserializeExportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines/", false); - uri.AppendPath(exportPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines/", false); - uri.AppendPath(exportPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the properties of the export pipeline. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the export pipeline. - /// 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 registryName, string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, exportPipelineName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryExportPipelineData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryExportPipelineData.DeserializeContainerRegistryExportPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryExportPipelineData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the properties of the export pipeline. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the export pipeline. - /// 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 registryName, string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, exportPipelineName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryExportPipelineData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryExportPipelineData.DeserializeContainerRegistryExportPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryExportPipelineData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName, ContainerRegistryExportPipelineData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines/", false); - uri.AppendPath(exportPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName, ContainerRegistryExportPipelineData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines/", false); - uri.AppendPath(exportPipelineName, 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; - } - - /// Creates an export pipeline for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the export pipeline. - /// The parameters for creating an export pipeline. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName, ContainerRegistryExportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, exportPipelineName, 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); - } - } - - /// Creates an export pipeline for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the export pipeline. - /// The parameters for creating an export pipeline. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName, ContainerRegistryExportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, exportPipelineName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines/", false); - uri.AppendPath(exportPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string exportPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/exportPipelines/", false); - uri.AppendPath(exportPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes an export pipeline from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the export pipeline. - /// 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 registryName, string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, exportPipelineName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an export pipeline from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the export pipeline. - /// 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 registryName, string exportPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(exportPipelineName, nameof(exportPipelineName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, exportPipelineName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string registryName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName) - { - 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; - } - - /// Lists all export pipelines for the specified container registry. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ExportPipelineListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ExportPipelineListResult.DeserializeExportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all export pipelines for the specified container registry. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ExportPipelineListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ExportPipelineListResult.DeserializeExportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ImportPipelinesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ImportPipelinesRestOperations.cs deleted file mode 100644 index f4d2a1b6349a..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ImportPipelinesRestOperations.cs +++ /dev/null @@ -1,515 +0,0 @@ -// 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.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class ImportPipelinesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ImportPipelinesRestOperations. - /// 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 ImportPipelinesRestOperations(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 ?? "2025-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all import pipelines for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ImportPipelineListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ImportPipelineListResult.DeserializeImportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all import pipelines for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ImportPipelineListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ImportPipelineListResult.DeserializeImportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines/", false); - uri.AppendPath(importPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines/", false); - uri.AppendPath(importPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the properties of the import pipeline. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the import pipeline. - /// 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 registryName, string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, importPipelineName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryImportPipelineData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryImportPipelineData.DeserializeContainerRegistryImportPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryImportPipelineData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the properties of the import pipeline. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the import pipeline. - /// 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 registryName, string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, importPipelineName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryImportPipelineData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryImportPipelineData.DeserializeContainerRegistryImportPipelineData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryImportPipelineData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName, ContainerRegistryImportPipelineData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines/", false); - uri.AppendPath(importPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName, ContainerRegistryImportPipelineData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines/", false); - uri.AppendPath(importPipelineName, 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; - } - - /// Creates an import pipeline for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the import pipeline. - /// The parameters for creating an import pipeline. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName, ContainerRegistryImportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, importPipelineName, 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); - } - } - - /// Creates an import pipeline for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the import pipeline. - /// The parameters for creating an import pipeline. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName, ContainerRegistryImportPipelineData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, importPipelineName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines/", false); - uri.AppendPath(importPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string importPipelineName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importPipelines/", false); - uri.AppendPath(importPipelineName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes an import pipeline from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the import pipeline. - /// 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 registryName, string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, importPipelineName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an import pipeline from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the import pipeline. - /// 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 registryName, string importPipelineName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(importPipelineName, nameof(importPipelineName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, importPipelineName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string registryName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName) - { - 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; - } - - /// Lists all import pipelines for the specified container registry. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ImportPipelineListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ImportPipelineListResult.DeserializeImportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all import pipelines for the specified container registry. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ImportPipelineListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ImportPipelineListResult.DeserializeImportPipelineListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PipelineRunsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PipelineRunsRestOperations.cs deleted file mode 100644 index 03cc22b888c7..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PipelineRunsRestOperations.cs +++ /dev/null @@ -1,515 +0,0 @@ -// 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.ContainerRegistry.Models; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal partial class PipelineRunsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PipelineRunsRestOperations. - /// 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 PipelineRunsRestOperations(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 ?? "2025-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the pipeline runs for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PipelineRunListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = PipelineRunListResult.DeserializePipelineRunListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the pipeline runs for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PipelineRunListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = PipelineRunListResult.DeserializePipelineRunListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns/", false); - uri.AppendPath(pipelineRunName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns/", false); - uri.AppendPath(pipelineRunName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the detailed information for a given pipeline run. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the pipeline run. - /// 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 registryName, string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, pipelineRunName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryPipelineRunData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryPipelineRunData.DeserializeContainerRegistryPipelineRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryPipelineRunData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the detailed information for a given pipeline run. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the pipeline run. - /// 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 registryName, string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, pipelineRunName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ContainerRegistryPipelineRunData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryPipelineRunData.DeserializeContainerRegistryPipelineRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerRegistryPipelineRunData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName, ContainerRegistryPipelineRunData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns/", false); - uri.AppendPath(pipelineRunName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName, ContainerRegistryPipelineRunData 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns/", false); - uri.AppendPath(pipelineRunName, 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; - } - - /// Creates a pipeline run for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the pipeline run. - /// The parameters for creating a pipeline run. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName, ContainerRegistryPipelineRunData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, pipelineRunName, 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); - } - } - - /// Creates a pipeline run for a container registry with the specified parameters. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the pipeline run. - /// The parameters for creating a pipeline run. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName, ContainerRegistryPipelineRunData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, pipelineRunName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns/", false); - uri.AppendPath(pipelineRunName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string pipelineRunName) - { - 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.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/pipelineRuns/", false); - uri.AppendPath(pipelineRunName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a pipeline run from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the pipeline run. - /// 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 registryName, string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, pipelineRunName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a pipeline run from a container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The name of the pipeline run. - /// 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 registryName, string pipelineRunName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(pipelineRunName, nameof(pipelineRunName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, pipelineRunName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string registryName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName) - { - 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; - } - - /// Lists all the pipeline runs for the specified container registry. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PipelineRunListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = PipelineRunListResult.DeserializePipelineRunListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the pipeline runs for the specified container registry. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PipelineRunListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = PipelineRunListResult.DeserializePipelineRunListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 2f4e0aadf71f..a85b56949851 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs index cbcb91b62ad8..85e10b61ac4e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs @@ -32,7 +32,7 @@ public RegistriesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs index 6c1ccbf77b76..1acc4a7e9e26 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs @@ -32,7 +32,7 @@ public ReplicationsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs index fc32487f4a18..c7fb77cc5d65 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs @@ -32,7 +32,7 @@ public RunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2019-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -305,7 +305,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// 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 registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -318,12 +318,8 @@ public async Task> UpdateAsync(string subscri switch (message.Response.Status) { case 200: - { - ContainerRegistryRunData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -338,7 +334,7 @@ public async Task> UpdateAsync(string subscri /// 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 registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -351,12 +347,8 @@ public Response Update(string subscriptionId, string r switch (message.Response.Status) { case 200: - { - ContainerRegistryRunData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -524,6 +516,7 @@ public async Task CancelAsync(string subscriptionId, string resourceGr switch (message.Response.Status) { case 200: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -550,6 +543,7 @@ public Response Cancel(string subscriptionId, string resourceGroupName, string r switch (message.Response.Status) { case 200: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs index 0c10ea96db17..de92e87061b2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -32,7 +31,7 @@ public SchedulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2019-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -84,7 +83,7 @@ internal HttpMessage CreateScheduleRunRequest(string subscriptionId, string reso /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ScheduleRunAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public async Task ScheduleRunAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -96,12 +95,8 @@ public async Task> ScheduleRunAsync(string su switch (message.Response.Status) { case 200: - { - ContainerRegistryRunData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -115,7 +110,7 @@ public async Task> ScheduleRunAsync(string su /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ScheduleRun(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public Response ScheduleRun(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -127,12 +122,8 @@ public Response ScheduleRun(string subscriptionId, str switch (message.Response.Status) { case 200: - { - ContainerRegistryRunData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs index 0d42a4a5fd9d..b69836ba9bfb 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs @@ -32,7 +32,7 @@ public ScopeMapsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs index 9fac28691538..306f1ba4f97e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs @@ -32,7 +32,7 @@ public TaskRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2019-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -298,6 +298,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: @@ -325,6 +326,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs index 1b984418bc62..935b0558abb8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs @@ -32,7 +32,7 @@ public TasksRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2019-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -285,7 +285,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -299,12 +299,7 @@ public async Task> CreateAsync(string subscr { case 200: case 201: - { - ContainerRegistryTaskData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -319,7 +314,7 @@ public async Task> CreateAsync(string subscr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -333,12 +328,7 @@ public Response Create(string subscriptionId, string { case 200: case 201: - { - ContainerRegistryTaskData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -402,6 +392,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: @@ -429,6 +420,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: @@ -487,7 +479,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// 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 registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -500,12 +492,8 @@ public async Task> UpdateAsync(string subscr switch (message.Response.Status) { case 200: - { - ContainerRegistryTaskData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -520,7 +508,7 @@ public async Task> UpdateAsync(string subscr /// 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 registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -533,12 +521,8 @@ public Response Update(string subscriptionId, string switch (message.Response.Status) { case 200: - { - ContainerRegistryTaskData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs index 49dfd57d244b..10ba1af82be2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs @@ -32,7 +32,7 @@ public TokensRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs index e843c687cb33..0b36a06d516f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs @@ -32,7 +32,7 @@ public WebhooksRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-03-01-preview"; + _apiVersion = apiVersion ?? "2025-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs index 41ec33eba3bc..3d8c8bc363fe 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string scopeMapNa /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string scopeMapName, CancellationT /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string scopeMapName, Cance /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string scopeMapName, CancellationToken canc /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs index d58e7f3f477c..cb37df2b586c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2025-03-01-preview + /// 2025-04-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md index 90508fbce4b3..e63afc30bc49 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: ContainerRegistry namespace: Azure.ResourceManager.ContainerRegistry -require: https://github.com/Azure/azure-rest-api-specs/blob/cb262725d128f6dfec4622cca03bc9e04e2d0f1f/specification/containerregistry/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/a55917cb512540bc3d0aec760d4e28712c3a4ae0/specification/containerregistry/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -265,6 +265,8 @@ rename-mapping: AzureADAuthenticationAsArmPolicyStatus: AadAuthenticationAsArmPolicyStatus PackageSourceType: ArchivePackageSourceType RoleAssignmentMode: ContainerRegistryRoleAssignmentMode + ConnectedRegistry.properties.clientTokenIds: -|arm-id + ConnectedRegistryUpdateParameters.properties.clientTokenIds: -|arm-id override-operation-name: Schedules_ScheduleRun: ScheduleRun @@ -272,6 +274,7 @@ override-operation-name: Builds_GetBuildSourceUploadUrl: GetBuildSourceUploadUrl directive: + # these two renames of operation would make the xml doc incorrect, but currently this is required because now the same operation would contain multiple api-versions if we do not rename. - rename-operation: from: Registries_GetBuildSourceUploadUrl to: Builds_GetBuildSourceUploadUrl @@ -288,8 +291,16 @@ directive: - from: containerregistry.json where: $.definitions transform: > - $.ConnectedRegistryProperties.properties.clientTokenIds.items['x-ms-format'] = 'arm-id'; - $.ConnectedRegistryUpdateProperties.properties.clientTokenIds.items['x-ms-format'] = 'arm-id'; + $.LoginServerProperties.properties.tls = { + "$ref": "#/definitions/TlsProperties", + "description": "The TLS properties of the connected registry login server.", + "readOnly": true + }; + $.TlsProperties.properties.certificate = { + "$ref": "#/definitions/TlsCertificateProperties", + "description": "The certificate used to configure HTTPS for the login server.", + "readOnly": true + }; - from: swagger-document where: $.definitions..expiry transform: > diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs index ec73ac397903..dbd4e93acbf2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs @@ -352,14 +352,14 @@ public async Task ContainerRegistryTask() } Assert.AreEqual(1, taskCount); // Update the task - var patch = await task.UpdateAsync(new ContainerRegistryTaskPatch() + lro = await task.UpdateAsync(WaitUntil.Completed, new ContainerRegistryTaskPatch() { TimeoutInSeconds = 900 }); - ContainerRegistryTaskResource taskFromUpdate = patch.Value; + ContainerRegistryTaskResource taskFromUpdate = lro.Value; Assert.AreEqual(900, taskFromUpdate.Data.TimeoutInSeconds); // Schedule a run from task - var scheduleRun = await registry.ScheduleRunAsync(new ContainerRegistryTaskRunContent(taskFromUpdate.Data.Id) + var runLro = await registry.ScheduleRunAsync(WaitUntil.Completed, new ContainerRegistryTaskRunContent(taskFromUpdate.Data.Id) { OverrideTaskStepProperties = new ContainerRegistryOverrideTaskStepProperties() { @@ -370,12 +370,12 @@ public async Task ContainerRegistryTask() } } }); - ContainerRegistryRunResource run1 = scheduleRun.Value; + ContainerRegistryRunResource run1 = runLro.Value; Assert.AreEqual("cf1", run1.Data.RunId); // Cancel the run - await run1.CancelAsync(); + await run1.CancelAsync(WaitUntil.Completed); // Schedule a docker build run - scheduleRun = await registry.ScheduleRunAsync(new ContainerRegistryDockerBuildContent("DockerFile", new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) + runLro = await registry.ScheduleRunAsync(WaitUntil.Completed, new ContainerRegistryDockerBuildContent("DockerFile", new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) { IsArchiveEnabled = false, ImageNames = { "testimage1:tag1", "testimage2:tag2" }, @@ -386,10 +386,10 @@ public async Task ContainerRegistryTask() AgentConfiguration = new ContainerRegistryAgentProperties() { Cpu = 2 }, SourceLocation = "https://github.com/azure/acr-builder.git" }); - ContainerRegistryRunResource run2 = scheduleRun.Value; + ContainerRegistryRunResource run2 = runLro.Value; Assert.AreEqual("cf2", run2.Data.RunId); // Schedule a file based task run - scheduleRun = await registry.ScheduleRunAsync(new ContainerRegistryFileTaskRunContent("abc.yaml", new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) + runLro = await registry.ScheduleRunAsync(WaitUntil.Completed, new ContainerRegistryFileTaskRunContent("abc.yaml", new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) { IsArchiveEnabled = false, Values = @@ -401,7 +401,7 @@ public async Task ContainerRegistryTask() AgentConfiguration = new ContainerRegistryAgentProperties() { Cpu = 2 }, SourceLocation = "https://github.com/azure/acr-builder.git" }); - ContainerRegistryRunResource run3 = scheduleRun.Value; + ContainerRegistryRunResource run3 = runLro.Value; Assert.AreEqual("cf3", run3.Data.RunId); // Schedule an encoded task run string taskString = @@ -413,7 +413,7 @@ public async Task ContainerRegistryTask() key1: value1 key2: value2 ".Replace("\r\n", "\n"); - scheduleRun = await registry.ScheduleRunAsync(new ContainerRegistryEncodedTaskRunContent(Convert.ToBase64String(Encoding.UTF8.GetBytes(taskString)), new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) + runLro = await registry.ScheduleRunAsync(WaitUntil.Completed, new ContainerRegistryEncodedTaskRunContent(Convert.ToBase64String(Encoding.UTF8.GetBytes(taskString)), new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) { IsArchiveEnabled = false, EncodedValuesContent = Convert.ToBase64String(Encoding.UTF8.GetBytes(valuesString)), @@ -421,7 +421,7 @@ public async Task ContainerRegistryTask() AgentConfiguration = new ContainerRegistryAgentProperties() { Cpu = 2 }, SourceLocation = "https://github.com/azure/acr-builder.git" }); - ContainerRegistryRunResource run4 = scheduleRun.Value; + ContainerRegistryRunResource run4 = runLro.Value; Assert.AreEqual("cf4", run4.Data.RunId); // List runs var runCount = 0; @@ -478,12 +478,13 @@ public async Task ContainerRegistryAgentPool() version: v1.1.0 steps: - cmd: docker images".Replace("\r\n", "\n"); - await registry.ScheduleRunAsync(new ContainerRegistryEncodedTaskRunContent(Convert.ToBase64String(Encoding.UTF8.GetBytes(taskString)), new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) + var runLro = await registry.ScheduleRunAsync(WaitUntil.Completed, new ContainerRegistryEncodedTaskRunContent(Convert.ToBase64String(Encoding.UTF8.GetBytes(taskString)), new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) { AgentPoolName = agentPoolName, IsArchiveEnabled = false, TimeoutInSeconds = 600 }); + ContainerRegistryRunResource run = runLro.Value; // List runs var runCount = 0; await foreach (var runFromList in registry.GetContainerRegistryRuns())