From 1614133a629a1d979e671881c58d16a24a576c10 Mon Sep 17 00:00:00 2001 From: frantran Date: Sun, 13 Oct 2024 23:32:42 -0700 Subject: [PATCH] update ContainerServiceFleet variables for more clear naming --- ...er.ContainerServiceFleet.netstandard2.0.cs | 132 +++++++++--------- .../Sample_AutoUpgradeProfileCollection.cs | 2 +- .../Sample_AutoUpgradeProfileResource.cs | 2 +- ..._ContainerServiceFleetUpdateRunResource.cs | 4 +- ...ntainerServiceFleetManagedClusterUpdate.cs | 2 +- .../ArmContainerServiceFleetModelFactory.cs | 2 +- .../AutoUpgradeProfileData.Serialization.cs | 4 +- .../src/Generated/AutoUpgradeProfileData.cs | 4 +- .../ContainerServiceFleetUpdateRunResource.cs | 4 +- ...rviceFleetSkipProperties.Serialization.cs} | 44 +++--- ...=> ContainerServiceFleetSkipProperties.cs} | 16 +-- ...erServiceFleetSkipTarget.Serialization.cs} | 42 +++--- ....cs => ContainerServiceFleetSkipTarget.cs} | 16 +-- .../Models/ContainerServiceFleetTargetType.cs | 57 ++++++++ ...=> ContainerServiceFleetUpgradeChannel.cs} | 28 ++-- .../src/Generated/Models/TargetType.cs | 57 -------- .../UpdateRunsRestOperations.cs | 8 +- .../src/autorest.md | 4 + .../tests/Scenario/FleetCRUD.cs | 7 +- 19 files changed, 219 insertions(+), 216 deletions(-) rename sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/{SkipProperties.Serialization.cs => ContainerServiceFleetSkipProperties.Serialization.cs} (59%) rename sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/{SkipProperties.cs => ContainerServiceFleetSkipProperties.cs} (74%) rename sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/{SkipTarget.Serialization.cs => ContainerServiceFleetSkipTarget.Serialization.cs} (61%) rename sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/{SkipTarget.cs => ContainerServiceFleetSkipTarget.cs} (79%) create mode 100644 sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetTargetType.cs rename sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/{UpgradeChannel.cs => ContainerServiceFleetUpgradeChannel.cs} (51%) delete mode 100644 sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/TargetType.cs diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs index f13afe088b375..9f9e2768319f5 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/api/Azure.ResourceManager.ContainerServiceFleet.netstandard2.0.cs @@ -20,7 +20,7 @@ protected AutoUpgradeProfileCollection() { } public partial class AutoUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AutoUpgradeProfileData() { } - public Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel? Channel { get { throw null; } set { } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel? Channel { get { throw null; } set { } } public bool? Disabled { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState? ProvisioningState { get { throw null; } } @@ -229,8 +229,8 @@ protected ContainerServiceFleetUpdateRunResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, 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.ResourceManager.ArmOperation Skip(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.SkipProperties body, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SkipAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.SkipProperties body, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Skip(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties body, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SkipAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties body, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -322,7 +322,7 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { public static partial class ArmContainerServiceFleetModelFactory { - public static Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData AutoUpgradeProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState?), Azure.Core.ResourceIdentifier updateStrategyId = null, Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel? channel = default(Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel?), Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType? selectionType = default(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType?), bool? disabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.AutoUpgradeProfileData AutoUpgradeProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeProfileProvisioningState?), Azure.Core.ResourceIdentifier updateStrategyId = null, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel? channel = default(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel?), Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType? selectionType = default(Azure.ResourceManager.ContainerServiceFleet.Models.AutoUpgradeNodeImageSelectionType?), bool? disabled = default(bool?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData ContainerServiceFleetData(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.ETag? eTag, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.ContainerServiceFleet.ContainerServiceFleetData ContainerServiceFleetData(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.ETag? eTag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerServiceFleet.Models.FleetProvisioningState?), Azure.ResourceManager.ContainerServiceFleet.Models.FleetHubProfile hubProfile = null) { throw null; } @@ -470,6 +470,49 @@ 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 ContainerServiceFleetSkipProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerServiceFleetSkipProperties(System.Collections.Generic.IEnumerable targets) { } + public System.Collections.Generic.IList Targets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties 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.ContainerServiceFleet.Models.ContainerServiceFleetSkipProperties 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 ContainerServiceFleetSkipTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerServiceFleetSkipTarget(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType targetType, string name) { } + public string Name { get { throw null; } } + public Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType TargetType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetSkipTarget 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.ContainerServiceFleet.Models.ContainerServiceFleetSkipTarget 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 ContainerServiceFleetTargetType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerServiceFleetTargetType(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType AfterStageWait { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType Group { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType Member { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType Stage { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType 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.ContainerServiceFleet.Models.ContainerServiceFleetTargetType left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetTargetType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerServiceFleetUpdateGroup : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerServiceFleetUpdateGroup(string name) { } @@ -590,6 +633,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerServiceFleetUpgradeChannel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerServiceFleetUpgradeChannel(string value) { throw null; } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel NodeImage { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel Rapid { get { throw null; } } + public static Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel Stable { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel 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.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel left, Azure.ResourceManager.ContainerServiceFleet.Models.ContainerServiceFleetUpgradeChannel right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerServiceFleetWaitStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerServiceFleetWaitStatus() { } @@ -761,66 +823,4 @@ 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 SkipProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SkipProperties(System.Collections.Generic.IEnumerable targets) { } - public System.Collections.Generic.IList Targets { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerServiceFleet.Models.SkipProperties 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.ContainerServiceFleet.Models.SkipProperties 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 SkipTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SkipTarget(Azure.ResourceManager.ContainerServiceFleet.Models.TargetType targetType, string name) { } - public string Name { get { throw null; } } - public Azure.ResourceManager.ContainerServiceFleet.Models.TargetType TargetType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ContainerServiceFleet.Models.SkipTarget 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.ContainerServiceFleet.Models.SkipTarget 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 TargetType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TargetType(string value) { throw null; } - public static Azure.ResourceManager.ContainerServiceFleet.Models.TargetType AfterStageWait { get { throw null; } } - public static Azure.ResourceManager.ContainerServiceFleet.Models.TargetType Group { get { throw null; } } - public static Azure.ResourceManager.ContainerServiceFleet.Models.TargetType Member { get { throw null; } } - public static Azure.ResourceManager.ContainerServiceFleet.Models.TargetType Stage { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.TargetType 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.ContainerServiceFleet.Models.TargetType left, Azure.ResourceManager.ContainerServiceFleet.Models.TargetType right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.TargetType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.TargetType left, Azure.ResourceManager.ContainerServiceFleet.Models.TargetType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UpgradeChannel : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public UpgradeChannel(string value) { throw null; } - public static Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel NodeImage { get { throw null; } } - public static Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel Rapid { get { throw null; } } - public static Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel Stable { get { throw null; } } - public bool Equals(Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel 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.ContainerServiceFleet.Models.UpgradeChannel left, Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel right) { throw null; } - public static implicit operator Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel left, Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel right) { throw null; } - public override string ToString() { throw null; } - } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileCollection.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileCollection.cs index 6778e8edb60bc..6323445b066b2 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileCollection.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileCollection.cs @@ -189,7 +189,7 @@ public async Task CreateOrUpdate_CreateAnAutoUpgradeProfile() string autoUpgradeProfileName = "autoupgradeprofile1"; AutoUpgradeProfileData data = new AutoUpgradeProfileData() { - Channel = UpgradeChannel.Stable, + Channel = ContainerServiceFleetUpgradeChannel.Stable, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, autoUpgradeProfileName, data); AutoUpgradeProfileResource result = lro.Value; diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileResource.cs index f389b62c32b2f..e05407f26281a 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_AutoUpgradeProfileResource.cs @@ -72,7 +72,7 @@ public async Task Update_CreateAnAutoUpgradeProfile() // invoke the operation AutoUpgradeProfileData data = new AutoUpgradeProfileData() { - Channel = UpgradeChannel.Stable, + Channel = ContainerServiceFleetUpgradeChannel.Stable, }; ArmOperation lro = await autoUpgradeProfile.UpdateAsync(WaitUntil.Completed, data); AutoUpgradeProfileResource result = lro.Value; diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs index 42bd2c237ed80..5c93bd897c7bb 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/samples/Generated/Samples/Sample_ContainerServiceFleetUpdateRunResource.cs @@ -153,9 +153,9 @@ public async Task Skip_SkipsOneOrMoreMemberGroupStageAfterStageWaitSOfAnUpdateRu ContainerServiceFleetUpdateRunResource containerServiceFleetUpdateRun = client.GetContainerServiceFleetUpdateRunResource(containerServiceFleetUpdateRunResourceId); // invoke the operation - SkipProperties body = new SkipProperties(new SkipTarget[] + ContainerServiceFleetSkipProperties body = new ContainerServiceFleetSkipProperties(new ContainerServiceFleetSkipTarget[] { -new SkipTarget(TargetType.Member,"member-one"),new SkipTarget(TargetType.AfterStageWait,"stage1") +new ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType.Member,"member-one"),new ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType.AfterStageWait,"stage1") }); ArmOperation lro = await containerServiceFleetUpdateRun.SkipAsync(WaitUntil.Completed, body); ContainerServiceFleetUpdateRunResource result = lro.Value; diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Customized/ContainerServiceFleetManagedClusterUpdate.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Customized/ContainerServiceFleetManagedClusterUpdate.cs index ad3aaaccc87dd..71f4ae8d12ced 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Customized/ContainerServiceFleetManagedClusterUpdate.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Customized/ContainerServiceFleetManagedClusterUpdate.cs @@ -22,4 +22,4 @@ public NodeImageSelectionType? SelectionType } } } -} +} \ No newline at end of file diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs index f37479cd9b4fa..6c1a73fc79691 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ArmContainerServiceFleetModelFactory.cs @@ -84,7 +84,7 @@ public static FleetHubProfile FleetHubProfile(string dnsPrefix = null, Container /// By default, this is set to False. /// /// A new instance for mocking. - public static AutoUpgradeProfileData AutoUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, AutoUpgradeProfileProvisioningState? provisioningState = null, ResourceIdentifier updateStrategyId = null, UpgradeChannel? channel = null, AutoUpgradeNodeImageSelectionType? selectionType = null, bool? disabled = null) + public static AutoUpgradeProfileData AutoUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, AutoUpgradeProfileProvisioningState? provisioningState = null, ResourceIdentifier updateStrategyId = null, ContainerServiceFleetUpgradeChannel? channel = null, AutoUpgradeNodeImageSelectionType? selectionType = null, bool? disabled = null) { return new AutoUpgradeProfileData( id, diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.Serialization.cs index 2fdde953e70a7..83170695a5959 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.Serialization.cs @@ -99,7 +99,7 @@ internal static AutoUpgradeProfileData DeserializeAutoUpgradeProfileData(JsonEle SystemData systemData = default; AutoUpgradeProfileProvisioningState? provisioningState = default; ResourceIdentifier updateStrategyId = default; - UpgradeChannel? channel = default; + ContainerServiceFleetUpgradeChannel? channel = default; AutoUpgradeNodeImageSelection nodeImageSelection = default; bool? disabled = default; IDictionary serializedAdditionalRawData = default; @@ -172,7 +172,7 @@ internal static AutoUpgradeProfileData DeserializeAutoUpgradeProfileData(JsonEle { continue; } - channel = new UpgradeChannel(property0.Value.GetString()); + channel = new ContainerServiceFleetUpgradeChannel(property0.Value.GetString()); continue; } if (property0.NameEquals("nodeImageSelection"u8)) diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.cs index dd6cb137735e8..4b97106a49843 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileData.cs @@ -73,7 +73,7 @@ public AutoUpgradeProfileData() /// By default, this is set to False. /// /// Keeps track of any properties unknown to the library. - internal AutoUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, AutoUpgradeProfileProvisioningState? provisioningState, ResourceIdentifier updateStrategyId, UpgradeChannel? channel, AutoUpgradeNodeImageSelection nodeImageSelection, bool? disabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AutoUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, AutoUpgradeProfileProvisioningState? provisioningState, ResourceIdentifier updateStrategyId, ContainerServiceFleetUpgradeChannel? channel, AutoUpgradeNodeImageSelection nodeImageSelection, bool? disabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ETag = eTag; ProvisioningState = provisioningState; @@ -91,7 +91,7 @@ internal AutoUpgradeProfileData(ResourceIdentifier id, string name, ResourceType /// The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet. public ResourceIdentifier UpdateStrategyId { get; set; } /// Configures how auto-upgrade will be run. - public UpgradeChannel? Channel { get; set; } + public ContainerServiceFleetUpgradeChannel? Channel { get; set; } /// The node image upgrade to be applied to the target clusters in auto upgrade. internal AutoUpgradeNodeImageSelection NodeImageSelection { get; set; } /// The node image upgrade type. diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs index 33bf088be5ef5..4d87ffb505b2c 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.cs @@ -377,7 +377,7 @@ public virtual ArmOperation Update(WaitU /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual async Task> SkipAsync(WaitUntil waitUntil, SkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual async Task> SkipAsync(WaitUntil waitUntil, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -424,7 +424,7 @@ public virtual async Task> /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// is null. - public virtual ArmOperation Skip(WaitUntil waitUntil, SkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Skip(WaitUntil waitUntil, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipProperties.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.Serialization.cs similarity index 59% rename from sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipProperties.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.Serialization.cs index 2a8cff226edf5..6b67621e2f951 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipProperties.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class SkipProperties : IUtf8JsonSerializable, IJsonModel + public partial class ContainerServiceFleetSkipProperties : 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); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SkipProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support writing '{format}' format."); } writer.WritePropertyName("targets"u8); @@ -58,19 +58,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SkipProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ContainerServiceFleetSkipProperties 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(SkipProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSkipProperties(document.RootElement, options); + return DeserializeContainerServiceFleetSkipProperties(document.RootElement, options); } - internal static SkipProperties DeserializeSkipProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static ContainerServiceFleetSkipProperties DeserializeContainerServiceFleetSkipProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -78,17 +78,17 @@ internal static SkipProperties DeserializeSkipProperties(JsonElement element, Mo { return null; } - IList targets = default; + IList targets = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("targets"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SkipTarget.DeserializeSkipTarget(item, options)); + array.Add(ContainerServiceFleetSkipTarget.DeserializeContainerServiceFleetSkipTarget(item, options)); } targets = array; continue; @@ -99,38 +99,38 @@ internal static SkipProperties DeserializeSkipProperties(JsonElement element, Mo } } serializedAdditionalRawData = rawDataDictionary; - return new SkipProperties(targets, serializedAdditionalRawData); + return new ContainerServiceFleetSkipProperties(targets, serializedAdditionalRawData); } - 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) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(SkipProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support writing '{options.Format}' format."); } } - SkipProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ContainerServiceFleetSkipProperties 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); - return DeserializeSkipProperties(document.RootElement, options); + return DeserializeContainerServiceFleetSkipProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SkipProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipProperties.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.cs similarity index 74% rename from sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipProperties.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.cs index b25f0d78ae101..1e5a2f99a4ab7 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipProperties.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipProperties.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The properties of a skip operation containing multiple skip requests. - public partial class SkipProperties + public partial class ContainerServiceFleetSkipProperties { /// /// Keeps track of any properties unknown to the library. @@ -46,31 +46,31 @@ public partial class SkipProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The targets to skip. /// is null. - public SkipProperties(IEnumerable targets) + public ContainerServiceFleetSkipProperties(IEnumerable targets) { Argument.AssertNotNull(targets, nameof(targets)); Targets = targets.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The targets to skip. /// Keeps track of any properties unknown to the library. - internal SkipProperties(IList targets, IDictionary serializedAdditionalRawData) + internal ContainerServiceFleetSkipProperties(IList targets, IDictionary serializedAdditionalRawData) { Targets = targets; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SkipProperties() + /// Initializes a new instance of for deserialization. + internal ContainerServiceFleetSkipProperties() { } /// The targets to skip. - public IList Targets { get; } + public IList Targets { get; } } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipTarget.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.Serialization.cs similarity index 61% rename from sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipTarget.Serialization.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.Serialization.cs index 193f81abee8b7..16828ee4f8de5 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipTarget.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { - public partial class SkipTarget : IUtf8JsonSerializable, IJsonModel + public partial class ContainerServiceFleetSkipTarget : 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); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SkipTarget)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support writing '{format}' format."); } writer.WritePropertyName("type"u8); @@ -55,19 +55,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SkipTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ContainerServiceFleetSkipTarget 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(SkipTarget)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSkipTarget(document.RootElement, options); + return DeserializeContainerServiceFleetSkipTarget(document.RootElement, options); } - internal static SkipTarget DeserializeSkipTarget(JsonElement element, ModelReaderWriterOptions options = null) + internal static ContainerServiceFleetSkipTarget DeserializeContainerServiceFleetSkipTarget(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -75,7 +75,7 @@ internal static SkipTarget DeserializeSkipTarget(JsonElement element, ModelReade { return null; } - TargetType type = default; + ContainerServiceFleetTargetType type = default; string name = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -83,7 +83,7 @@ internal static SkipTarget DeserializeSkipTarget(JsonElement element, ModelReade { if (property.NameEquals("type"u8)) { - type = new TargetType(property.Value.GetString()); + type = new ContainerServiceFleetTargetType(property.Value.GetString()); continue; } if (property.NameEquals("name"u8)) @@ -97,38 +97,38 @@ internal static SkipTarget DeserializeSkipTarget(JsonElement element, ModelReade } } serializedAdditionalRawData = rawDataDictionary; - return new SkipTarget(type, name, serializedAdditionalRawData); + return new ContainerServiceFleetSkipTarget(type, name, serializedAdditionalRawData); } - 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) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(SkipTarget)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support writing '{options.Format}' format."); } } - SkipTarget IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ContainerServiceFleetSkipTarget 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); - return DeserializeSkipTarget(document.RootElement, options); + return DeserializeContainerServiceFleetSkipTarget(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SkipTarget)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ContainerServiceFleetSkipTarget)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipTarget.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.cs similarity index 79% rename from sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipTarget.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.cs index 8d7076d22f259..00cec6af3b69d 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/SkipTarget.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetSkipTarget.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// The definition of a single skip request. - public partial class SkipTarget + public partial class ContainerServiceFleetSkipTarget { /// /// Keeps track of any properties unknown to the library. @@ -45,7 +45,7 @@ public partial class SkipTarget /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The skip target type. /// /// The skip target's name. @@ -53,7 +53,7 @@ public partial class SkipTarget /// Tp skip an after stage wait, use the parent stage's name. /// /// is null. - public SkipTarget(TargetType targetType, string name) + public ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType targetType, string name) { Argument.AssertNotNull(name, nameof(name)); @@ -61,7 +61,7 @@ public SkipTarget(TargetType targetType, string name) Name = name; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The skip target type. /// /// The skip target's name. @@ -69,20 +69,20 @@ public SkipTarget(TargetType targetType, string name) /// Tp skip an after stage wait, use the parent stage's name. /// /// Keeps track of any properties unknown to the library. - internal SkipTarget(TargetType targetType, string name, IDictionary serializedAdditionalRawData) + internal ContainerServiceFleetSkipTarget(ContainerServiceFleetTargetType targetType, string name, IDictionary serializedAdditionalRawData) { TargetType = targetType; Name = name; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SkipTarget() + /// Initializes a new instance of for deserialization. + internal ContainerServiceFleetSkipTarget() { } /// The skip target type. - public TargetType TargetType { get; } + public ContainerServiceFleetTargetType TargetType { get; } /// /// The skip target's name. /// To skip a member/group/stage, use the member/group/stage's name; diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetTargetType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetTargetType.cs new file mode 100644 index 0000000000000..a7fcc26720348 --- /dev/null +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetTargetType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerServiceFleet.Models +{ + /// The target type of a skip request. + public readonly partial struct ContainerServiceFleetTargetType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerServiceFleetTargetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MemberValue = "Member"; + private const string GroupValue = "Group"; + private const string StageValue = "Stage"; + private const string AfterStageWaitValue = "AfterStageWait"; + + /// Skip the update of a member. + public static ContainerServiceFleetTargetType Member { get; } = new ContainerServiceFleetTargetType(MemberValue); + /// Skip the update of a group. + public static ContainerServiceFleetTargetType Group { get; } = new ContainerServiceFleetTargetType(GroupValue); + /// Skip the update of an entire stage including the after stage wait. + public static ContainerServiceFleetTargetType Stage { get; } = new ContainerServiceFleetTargetType(StageValue); + /// Skip the update of the after stage wait of a certain stage. + public static ContainerServiceFleetTargetType AfterStageWait { get; } = new ContainerServiceFleetTargetType(AfterStageWaitValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceFleetTargetType left, ContainerServiceFleetTargetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceFleetTargetType left, ContainerServiceFleetTargetType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerServiceFleetTargetType(string value) => new ContainerServiceFleetTargetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerServiceFleetTargetType other && Equals(other); + /// + public bool Equals(ContainerServiceFleetTargetType 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/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/UpgradeChannel.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpgradeChannel.cs similarity index 51% rename from sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/UpgradeChannel.cs rename to sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpgradeChannel.cs index 3ec3fa494c263..52de992761d9e 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/UpgradeChannel.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/ContainerServiceFleetUpgradeChannel.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.ContainerServiceFleet.Models { /// Configuration of how auto upgrade will be run. - public readonly partial struct UpgradeChannel : IEquatable + public readonly partial struct ContainerServiceFleetUpgradeChannel : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public UpgradeChannel(string value) + public ContainerServiceFleetUpgradeChannel(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -30,23 +30,23 @@ public UpgradeChannel(string value) /// Upgrades the clusters kubernetes version to the latest supported patch release on minor version N-1, where N is the latest supported minor version. /// For example, if a cluster runs version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, the cluster upgrades to 1.18.6. /// - public static UpgradeChannel Stable { get; } = new UpgradeChannel(StableValue); + public static ContainerServiceFleetUpgradeChannel Stable { get; } = new ContainerServiceFleetUpgradeChannel(StableValue); /// Upgrades the clusters kubernetes version to the latest supported patch release on the latest supported minor version. - public static UpgradeChannel Rapid { get; } = new UpgradeChannel(RapidValue); + public static ContainerServiceFleetUpgradeChannel Rapid { get; } = new ContainerServiceFleetUpgradeChannel(RapidValue); /// Upgrade node image version of the clusters. - public static UpgradeChannel NodeImage { get; } = new UpgradeChannel(NodeImageValue); - /// Determines if two values are the same. - public static bool operator ==(UpgradeChannel left, UpgradeChannel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UpgradeChannel left, UpgradeChannel right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator UpgradeChannel(string value) => new UpgradeChannel(value); + public static ContainerServiceFleetUpgradeChannel NodeImage { get; } = new ContainerServiceFleetUpgradeChannel(NodeImageValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceFleetUpgradeChannel left, ContainerServiceFleetUpgradeChannel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceFleetUpgradeChannel left, ContainerServiceFleetUpgradeChannel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerServiceFleetUpgradeChannel(string value) => new ContainerServiceFleetUpgradeChannel(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UpgradeChannel other && Equals(other); + public override bool Equals(object obj) => obj is ContainerServiceFleetUpgradeChannel other && Equals(other); /// - public bool Equals(UpgradeChannel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(ContainerServiceFleetUpgradeChannel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/TargetType.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/TargetType.cs deleted file mode 100644 index 22b1ad8d169c3..0000000000000 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/Models/TargetType.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.ContainerServiceFleet.Models -{ - /// The target type of a skip request. - public readonly partial struct TargetType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TargetType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MemberValue = "Member"; - private const string GroupValue = "Group"; - private const string StageValue = "Stage"; - private const string AfterStageWaitValue = "AfterStageWait"; - - /// Skip the update of a member. - public static TargetType Member { get; } = new TargetType(MemberValue); - /// Skip the update of a group. - public static TargetType Group { get; } = new TargetType(GroupValue); - /// Skip the update of an entire stage including the after stage wait. - public static TargetType Stage { get; } = new TargetType(StageValue); - /// Skip the update of the after stage wait of a certain stage. - public static TargetType AfterStageWait { get; } = new TargetType(AfterStageWaitValue); - /// Determines if two values are the same. - public static bool operator ==(TargetType left, TargetType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TargetType left, TargetType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator TargetType(string value) => new TargetType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TargetType other && Equals(other); - /// - public bool Equals(TargetType 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/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs index 7b72bdb633fc3..de5aaf814cc73 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/RestOperations/UpdateRunsRestOperations.cs @@ -446,7 +446,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string f } } - internal RequestUriBuilder CreateSkipRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, SkipProperties body, string ifMatch) + internal RequestUriBuilder CreateSkipRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -463,7 +463,7 @@ internal RequestUriBuilder CreateSkipRequestUri(string subscriptionId, string re return uri; } - internal HttpMessage CreateSkipRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, SkipProperties body, string ifMatch) + internal HttpMessage CreateSkipRequest(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -504,7 +504,7 @@ internal HttpMessage CreateSkipRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task SkipAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, SkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + public async Task SkipAsync(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -534,7 +534,7 @@ public async Task SkipAsync(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Skip(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, SkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) + public Response Skip(string subscriptionId, string resourceGroupName, string fleetName, string updateRunName, ContainerServiceFleetSkipProperties body, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md index 76c0f60b27791..284c85f7778c4 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md @@ -28,6 +28,10 @@ rename-mapping: FleetMember: ContainerServiceFleetMember FleetMemberListResult: ContainerServiceFleetMemberListResult MemberUpdateStatus.clusterResourceId: -|arm-id + SkipProperties: ContainerServiceFleetSkipProperties + SkipTarget: ContainerServiceFleetSkipTarget + TargetType: ContainerServiceFleetTargetType + UpgradeChannel: ContainerServiceFleetUpgradeChannel prepend-rp-prefix: - AgentProfile diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs index 8bb50cd636788..f63590493341d 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/tests/Scenario/FleetCRUD.cs @@ -19,7 +19,6 @@ using Azure.ResourceManager.Resources; using Azure.ResourceManager.ContainerService.Models; using System.Drawing; -using UpgradeChannel = Azure.ResourceManager.ContainerServiceFleet.Models.UpgradeChannel; namespace Azure.ResourceManager.ContainerServiceFleet.Tests.Scenario { @@ -129,7 +128,7 @@ public async Task FleetCRUDTest() string autoUpgradeProfileName = "autoupgradeprofile1"; AutoUpgradeProfileData createAutoUpgradeProfileData = new AutoUpgradeProfileData() { - Channel = UpgradeChannel.Stable, + Channel = ContainerServiceFleetUpgradeChannel.Stable, }; ArmOperation createAutoUpgradeProfileLRO = await autoUpgradeProfileCollection.CreateOrUpdateAsync(WaitUntil.Completed, autoUpgradeProfileName, createAutoUpgradeProfileData); AutoUpgradeProfileResource createAutoUpgradeProfileResult = createAutoUpgradeProfileLRO.Value; @@ -151,12 +150,12 @@ public async Task FleetCRUDTest() // Update AutoUpgradeProfile AutoUpgradeProfileData updateAutoUpgradeProfileData = new AutoUpgradeProfileData() { - Channel = UpgradeChannel.Rapid, + Channel = ContainerServiceFleetUpgradeChannel.Rapid, }; ArmOperation updateAutoUpgradeProfileLRO = await autoUpgradeProfileCollection.CreateOrUpdateAsync(WaitUntil.Completed, autoUpgradeProfileName, updateAutoUpgradeProfileData); AutoUpgradeProfileResource updateAutoUpgradeProfileResult = updateAutoUpgradeProfileLRO.Value; Debug.Assert(updateAutoUpgradeProfileResult.HasData, "CreateOrUpdateAsync AutoUpgradeProfile data was not valid"); - Debug.Assert(updateAutoUpgradeProfileResult.Data.Channel == UpgradeChannel.Rapid, "CreateOrUpdateAsync AutoUpgradeProfile channel was not successfully updated."); + Debug.Assert(updateAutoUpgradeProfileResult.Data.Channel == ContainerServiceFleetUpgradeChannel.Rapid, "CreateOrUpdateAsync AutoUpgradeProfile channel was not successfully updated."); // Delete AutoUpgradeProfile await updateAutoUpgradeProfileResult.DeleteAsync(WaitUntil.Completed);