From ba211a947ca020544f2764b3ce511c181ab7b4aa Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 28 Apr 2025 10:14:36 +0000 Subject: [PATCH] CodeGen from PR 34282 in Azure/azure-rest-api-specs Merge a6e10eb5c4db3645ece4d93edf55293d5b5728f1 into b8cc515b44cc01bb17c1e4f4d74ca8958ac34bcd --- sdk/durabletask/ci.mgmt.yml | 1 - sdk/pineconevectordb/ci.yml | 35 - ...ResourceManager.PowerBIDedicated.net8.0.cs | 65 +- ...Manager.PowerBIDedicated.netstandard2.0.cs | 65 +- .../Sample_DedicatedCapacityResource.cs | 34 +- .../Sample_SubscriptionResourceExtensions.cs | 38 +- .../ArmPowerBIDedicatedModelFactory.cs | 119 ++-- .../src/Generated/AutoScaleVCoreCollection.cs | 6 +- .../AutoScaleVCoreData.Serialization.cs | 57 +- .../src/Generated/AutoScaleVCoreData.cs | 54 +- .../src/Generated/AutoScaleVCoreResource.cs | 2 +- .../Generated/DedicatedCapacityCollection.cs | 4 +- .../DedicatedCapacityData.Serialization.cs | 57 +- .../src/Generated/DedicatedCapacityData.cs | 54 +- .../Generated/DedicatedCapacityResource.cs | 138 ++-- .../MockablePowerBIDedicatedArmClient.cs | 24 +- ...lePowerBIDedicatedResourceGroupResource.cs | 88 +-- ...blePowerBIDedicatedSubscriptionResource.cs | 110 +-- .../Extensions/PowerBIDedicatedExtensions.cs | 224 +++--- .../AutoScaleVCoreListResult.Serialization.cs | 13 +- .../Models/AutoScaleVCoreListResult.cs | 6 +- .../src/Generated/Models/IdentityType.cs | 57 -- ...erBIDedicatedResourceData.Serialization.cs | 207 ------ .../Models/PowerBIDedicatedResourceData.cs | 94 --- .../Models/SystemData.Serialization.cs | 207 ------ .../src/Generated/Models/SystemData.cs | 85 --- .../AutoScaleVCoresRestOperations.cs | 384 +++++++--- .../CapacitiesRestOperations.cs | 666 +++++++++--------- .../src/autorest.md | 2 +- sdk/storage/ci.yml | 2 + 30 files changed, 1166 insertions(+), 1732 deletions(-) delete mode 100644 sdk/pineconevectordb/ci.yml delete mode 100644 sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/IdentityType.cs delete mode 100644 sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.Serialization.cs delete mode 100644 sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.cs delete mode 100644 sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.Serialization.cs delete mode 100644 sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.cs diff --git a/sdk/durabletask/ci.mgmt.yml b/sdk/durabletask/ci.mgmt.yml index 5f63204cd804..32b11e75b082 100644 --- a/sdk/durabletask/ci.mgmt.yml +++ b/sdk/durabletask/ci.mgmt.yml @@ -1,7 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none - pr: branches: include: diff --git a/sdk/pineconevectordb/ci.yml b/sdk/pineconevectordb/ci.yml deleted file mode 100644 index 0b8325c8c903..000000000000 --- a/sdk/pineconevectordb/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/pineconevectordb - - sdk/pineconevectordb/ci.yml - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/pineconevectordb - - sdk/pineconevectordb/ci.yml - - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: pineconevectordb - ArtifactName: packages - Artifacts: - - name: Azure.ResourceManager.PineconeVectorDb - safeName: AzureResourceManagerPineconeVectorDb diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.net8.0.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.net8.0.cs index e93de525c8f7..22637115cc07 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.net8.0.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.net8.0.cs @@ -17,9 +17,9 @@ protected AutoScaleVCoreCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class AutoScaleVCoreData : Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AutoScaleVCoreData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AutoScaleVCoreData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.AutoScaleVCoreSku sku) : base (default(Azure.Core.AzureLocation)) { } + public AutoScaleVCoreData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.AutoScaleVCoreSku sku) { } public int? CapacityLimit { get { throw null; } set { } } public string CapacityObjectId { get { throw null; } set { } } public Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState? ProvisioningState { get { throw null; } } @@ -73,9 +73,9 @@ protected DedicatedCapacityCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DedicatedCapacityData : Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DedicatedCapacityData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DedicatedCapacityData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku) : base (default(Azure.Core.AzureLocation)) { } + public DedicatedCapacityData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku) { } public System.Collections.Generic.IList AdministrationMembers { get { throw null; } } public string FriendlyName { get { throw null; } } public Azure.ResourceManager.PowerBIDedicated.Models.Mode? Mode { get { throw null; } set { } } @@ -176,11 +176,10 @@ namespace Azure.ResourceManager.PowerBIDedicated.Models { public static partial class ArmPowerBIDedicatedModelFactory { - public static Azure.ResourceManager.PowerBIDedicated.AutoScaleVCoreData AutoScaleVCoreData(string id = null, string name = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.PowerBIDedicated.Models.SystemData systemData = null, Azure.ResourceManager.PowerBIDedicated.Models.AutoScaleVCoreSku sku = null, int? capacityLimit = default(int?), string capacityObjectId = null, Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PowerBIDedicated.AutoScaleVCoreData AutoScaleVCoreData(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.PowerBIDedicated.Models.AutoScaleVCoreSku sku = null, int? capacityLimit = default(int?), string capacityObjectId = null, Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState?)) { throw null; } public static Azure.ResourceManager.PowerBIDedicated.Models.CheckCapacityNameAvailabilityResult CheckCapacityNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } - public static Azure.ResourceManager.PowerBIDedicated.DedicatedCapacityData DedicatedCapacityData(string id = null, string name = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.PowerBIDedicated.Models.SystemData systemData = null, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku = null, System.Collections.Generic.IEnumerable administrationMembers = null, Azure.ResourceManager.PowerBIDedicated.Models.Mode? mode = default(Azure.ResourceManager.PowerBIDedicated.Models.Mode?), System.Guid? tenantId = default(System.Guid?), string friendlyName = null, Azure.ResourceManager.PowerBIDedicated.Models.State? state = default(Azure.ResourceManager.PowerBIDedicated.Models.State?), Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PowerBIDedicated.DedicatedCapacityData DedicatedCapacityData(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.PowerBIDedicated.Models.CapacitySku sku = null, System.Collections.Generic.IEnumerable administrationMembers = null, Azure.ResourceManager.PowerBIDedicated.Models.Mode? mode = default(Azure.ResourceManager.PowerBIDedicated.Models.Mode?), System.Guid? tenantId = default(System.Guid?), string friendlyName = null, Azure.ResourceManager.PowerBIDedicated.Models.State? state = default(Azure.ResourceManager.PowerBIDedicated.Models.State?), Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState?)) { throw null; } public static Azure.ResourceManager.PowerBIDedicated.Models.DedicatedCapacityPatch DedicatedCapacityPatch(Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable administrationMembers = null, Azure.ResourceManager.PowerBIDedicated.Models.Mode? mode = default(Azure.ResourceManager.PowerBIDedicated.Models.Mode?), System.Guid? tenantId = default(System.Guid?), string friendlyName = null) { throw null; } - public static Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData PowerBIDedicatedResourceData(string id = null, string name = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.PowerBIDedicated.Models.SystemData systemData = null) { throw null; } public static Azure.ResourceManager.PowerBIDedicated.Models.SkuDetails SkuDetails(string resourceType = null, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku = null) { throw null; } } public partial class AutoScaleVCorePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -311,26 +310,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 IdentityType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IdentityType(string value) { throw null; } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType Application { get { throw null; } } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType Key { get { throw null; } } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType ManagedIdentity { get { throw null; } } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType User { get { throw null; } } - public bool Equals(Azure.ResourceManager.PowerBIDedicated.Models.IdentityType 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.PowerBIDedicated.Models.IdentityType left, Azure.ResourceManager.PowerBIDedicated.Models.IdentityType right) { throw null; } - public static implicit operator Azure.ResourceManager.PowerBIDedicated.Models.IdentityType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PowerBIDedicated.Models.IdentityType left, Azure.ResourceManager.PowerBIDedicated.Models.IdentityType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct Mode : System.IEquatable { private readonly object _dummy; @@ -348,22 +327,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.PowerBIDedicated.Models.Mode left, Azure.ResourceManager.PowerBIDedicated.Models.Mode right) { throw null; } public override string ToString() { throw null; } } - public partial class PowerBIDedicatedResourceData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PowerBIDedicatedResourceData(Azure.Core.AzureLocation location) { } - public string Id { get { throw null; } } - public Azure.Core.AzureLocation Location { get { throw null; } set { } } - public string Name { get { throw null; } } - public string ResourceType { get { throw null; } } - public Azure.ResourceManager.PowerBIDedicated.Models.SystemData SystemData { 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) { } - Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData 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.PowerBIDedicated.Models.PowerBIDedicatedResourceData 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 SkuDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SkuDetails() { } @@ -404,22 +367,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.PowerBIDedicated.Models.State left, Azure.ResourceManager.PowerBIDedicated.Models.State right) { throw null; } public override string ToString() { throw null; } } - public partial class SystemData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SystemData() { } - public string CreatedBy { get { throw null; } set { } } - public Azure.ResourceManager.PowerBIDedicated.Models.IdentityType? CreatedByType { get { throw null; } set { } } - public System.DateTimeOffset? CreatedOn { get { throw null; } set { } } - public string LastModifiedBy { get { throw null; } set { } } - public Azure.ResourceManager.PowerBIDedicated.Models.IdentityType? LastModifiedByType { get { throw null; } set { } } - public System.DateTimeOffset? LastModifiedOn { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PowerBIDedicated.Models.SystemData 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.PowerBIDedicated.Models.SystemData 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 VCoreProvisioningState : System.IEquatable { diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.netstandard2.0.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.netstandard2.0.cs index e93de525c8f7..22637115cc07 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.netstandard2.0.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/api/Azure.ResourceManager.PowerBIDedicated.netstandard2.0.cs @@ -17,9 +17,9 @@ protected AutoScaleVCoreCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class AutoScaleVCoreData : Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AutoScaleVCoreData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AutoScaleVCoreData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.AutoScaleVCoreSku sku) : base (default(Azure.Core.AzureLocation)) { } + public AutoScaleVCoreData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.AutoScaleVCoreSku sku) { } public int? CapacityLimit { get { throw null; } set { } } public string CapacityObjectId { get { throw null; } set { } } public Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState? ProvisioningState { get { throw null; } } @@ -73,9 +73,9 @@ protected DedicatedCapacityCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DedicatedCapacityData : Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DedicatedCapacityData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DedicatedCapacityData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku) : base (default(Azure.Core.AzureLocation)) { } + public DedicatedCapacityData(Azure.Core.AzureLocation location, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku) { } public System.Collections.Generic.IList AdministrationMembers { get { throw null; } } public string FriendlyName { get { throw null; } } public Azure.ResourceManager.PowerBIDedicated.Models.Mode? Mode { get { throw null; } set { } } @@ -176,11 +176,10 @@ namespace Azure.ResourceManager.PowerBIDedicated.Models { public static partial class ArmPowerBIDedicatedModelFactory { - public static Azure.ResourceManager.PowerBIDedicated.AutoScaleVCoreData AutoScaleVCoreData(string id = null, string name = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.PowerBIDedicated.Models.SystemData systemData = null, Azure.ResourceManager.PowerBIDedicated.Models.AutoScaleVCoreSku sku = null, int? capacityLimit = default(int?), string capacityObjectId = null, Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PowerBIDedicated.AutoScaleVCoreData AutoScaleVCoreData(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.PowerBIDedicated.Models.AutoScaleVCoreSku sku = null, int? capacityLimit = default(int?), string capacityObjectId = null, Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.VCoreProvisioningState?)) { throw null; } public static Azure.ResourceManager.PowerBIDedicated.Models.CheckCapacityNameAvailabilityResult CheckCapacityNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } - public static Azure.ResourceManager.PowerBIDedicated.DedicatedCapacityData DedicatedCapacityData(string id = null, string name = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.PowerBIDedicated.Models.SystemData systemData = null, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku = null, System.Collections.Generic.IEnumerable administrationMembers = null, Azure.ResourceManager.PowerBIDedicated.Models.Mode? mode = default(Azure.ResourceManager.PowerBIDedicated.Models.Mode?), System.Guid? tenantId = default(System.Guid?), string friendlyName = null, Azure.ResourceManager.PowerBIDedicated.Models.State? state = default(Azure.ResourceManager.PowerBIDedicated.Models.State?), Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PowerBIDedicated.DedicatedCapacityData DedicatedCapacityData(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.PowerBIDedicated.Models.CapacitySku sku = null, System.Collections.Generic.IEnumerable administrationMembers = null, Azure.ResourceManager.PowerBIDedicated.Models.Mode? mode = default(Azure.ResourceManager.PowerBIDedicated.Models.Mode?), System.Guid? tenantId = default(System.Guid?), string friendlyName = null, Azure.ResourceManager.PowerBIDedicated.Models.State? state = default(Azure.ResourceManager.PowerBIDedicated.Models.State?), Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState? provisioningState = default(Azure.ResourceManager.PowerBIDedicated.Models.CapacityProvisioningState?)) { throw null; } public static Azure.ResourceManager.PowerBIDedicated.Models.DedicatedCapacityPatch DedicatedCapacityPatch(Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable administrationMembers = null, Azure.ResourceManager.PowerBIDedicated.Models.Mode? mode = default(Azure.ResourceManager.PowerBIDedicated.Models.Mode?), System.Guid? tenantId = default(System.Guid?), string friendlyName = null) { throw null; } - public static Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData PowerBIDedicatedResourceData(string id = null, string name = null, string resourceType = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.PowerBIDedicated.Models.SystemData systemData = null) { throw null; } public static Azure.ResourceManager.PowerBIDedicated.Models.SkuDetails SkuDetails(string resourceType = null, Azure.ResourceManager.PowerBIDedicated.Models.CapacitySku sku = null) { throw null; } } public partial class AutoScaleVCorePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -311,26 +310,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 IdentityType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IdentityType(string value) { throw null; } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType Application { get { throw null; } } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType Key { get { throw null; } } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType ManagedIdentity { get { throw null; } } - public static Azure.ResourceManager.PowerBIDedicated.Models.IdentityType User { get { throw null; } } - public bool Equals(Azure.ResourceManager.PowerBIDedicated.Models.IdentityType 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.PowerBIDedicated.Models.IdentityType left, Azure.ResourceManager.PowerBIDedicated.Models.IdentityType right) { throw null; } - public static implicit operator Azure.ResourceManager.PowerBIDedicated.Models.IdentityType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PowerBIDedicated.Models.IdentityType left, Azure.ResourceManager.PowerBIDedicated.Models.IdentityType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct Mode : System.IEquatable { private readonly object _dummy; @@ -348,22 +327,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.PowerBIDedicated.Models.Mode left, Azure.ResourceManager.PowerBIDedicated.Models.Mode right) { throw null; } public override string ToString() { throw null; } } - public partial class PowerBIDedicatedResourceData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PowerBIDedicatedResourceData(Azure.Core.AzureLocation location) { } - public string Id { get { throw null; } } - public Azure.Core.AzureLocation Location { get { throw null; } set { } } - public string Name { get { throw null; } } - public string ResourceType { get { throw null; } } - public Azure.ResourceManager.PowerBIDedicated.Models.SystemData SystemData { 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) { } - Azure.ResourceManager.PowerBIDedicated.Models.PowerBIDedicatedResourceData 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.PowerBIDedicated.Models.PowerBIDedicatedResourceData 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 SkuDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SkuDetails() { } @@ -404,22 +367,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.PowerBIDedicated.Models.State left, Azure.ResourceManager.PowerBIDedicated.Models.State right) { throw null; } public override string ToString() { throw null; } } - public partial class SystemData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SystemData() { } - public string CreatedBy { get { throw null; } set { } } - public Azure.ResourceManager.PowerBIDedicated.Models.IdentityType? CreatedByType { get { throw null; } set { } } - public System.DateTimeOffset? CreatedOn { get { throw null; } set { } } - public string LastModifiedBy { get { throw null; } set { } } - public Azure.ResourceManager.PowerBIDedicated.Models.IdentityType? LastModifiedByType { get { throw null; } set { } } - public System.DateTimeOffset? LastModifiedOn { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PowerBIDedicated.Models.SystemData 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.PowerBIDedicated.Models.SystemData 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 VCoreProvisioningState : System.IEquatable { diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_DedicatedCapacityResource.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_DedicatedCapacityResource.cs index 55c257c9624b..e401a5b4c416 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_DedicatedCapacityResource.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_DedicatedCapacityResource.cs @@ -160,10 +160,10 @@ public async Task Update_UpdateCapacityToGeneration2() [Test] [Ignore("Only validating compilation of examples")] - public async Task Suspend_SuspendCapacity() + public async Task Resume_GetDetailsOfACapacity() { - // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/suspendCapacity.json - // this example is just showing the usage of "Capacities_Suspend" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/resumeCapacity.json + // this example is just showing the usage of "Capacities_Resume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -179,17 +179,17 @@ public async Task Suspend_SuspendCapacity() DedicatedCapacityResource dedicatedCapacity = client.GetDedicatedCapacityResource(dedicatedCapacityResourceId); // invoke the operation - await dedicatedCapacity.SuspendAsync(WaitUntil.Completed); + await dedicatedCapacity.ResumeAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Resume_GetDetailsOfACapacity() + public async Task GetSkusForCapacity_ListEligibleSKUsForAnExistingCapacity() { - // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/resumeCapacity.json - // this example is just showing the usage of "Capacities_Resume" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listSKUsForExisting.json + // this example is just showing the usage of "Capacities_ListSkusForCapacity" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -204,18 +204,21 @@ public async Task Resume_GetDetailsOfACapacity() ResourceIdentifier dedicatedCapacityResourceId = DedicatedCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dedicatedCapacityName); DedicatedCapacityResource dedicatedCapacity = client.GetDedicatedCapacityResource(dedicatedCapacityResourceId); - // invoke the operation - await dedicatedCapacity.ResumeAsync(WaitUntil.Completed); + // invoke the operation and iterate over the result + await foreach (SkuDetails item in dedicatedCapacity.GetSkusForCapacityAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetSkusForCapacity_ListEligibleSKUsForAnExistingCapacity() + public async Task Suspend_SuspendCapacity() { - // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listSKUsForExisting.json - // this example is just showing the usage of "Capacities_ListSkusForCapacity" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/suspendCapacity.json + // this example is just showing the usage of "Capacities_Suspend" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -230,11 +233,8 @@ public async Task GetSkusForCapacity_ListEligibleSKUsForAnExistingCapacity() ResourceIdentifier dedicatedCapacityResourceId = DedicatedCapacityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dedicatedCapacityName); DedicatedCapacityResource dedicatedCapacity = client.GetDedicatedCapacityResource(dedicatedCapacityResourceId); - // invoke the operation and iterate over the result - await foreach (SkuDetails item in dedicatedCapacity.GetSkusForCapacityAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + await dedicatedCapacity.SuspendAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 42dedc875ad7..e813d6db7e68 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDedicatedCapacities_GetDetailsOfACapacity() + public async Task GetAutoScaleVCores_ListAutoScaleVCoresInSubscription() { - // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listCapacitiesInSubscription.json - // this example is just showing the usage of "Capacities_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listAutoScaleVCoresInSubscription.json + // this example is just showing the usage of "AutoScaleVCores_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -36,11 +36,11 @@ public async Task GetDedicatedCapacities_GetDetailsOfACapacity() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (DedicatedCapacityResource item in subscriptionResource.GetDedicatedCapacitiesAsync()) + await foreach (AutoScaleVCoreResource item in subscriptionResource.GetAutoScaleVCoresAsync()) { // 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 - DedicatedCapacityData resourceData = item.Data; + AutoScaleVCoreData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -50,10 +50,10 @@ public async Task GetDedicatedCapacities_GetDetailsOfACapacity() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetSkusCapacities_ListEligibleSKUsForANewCapacity() + public async Task GetDedicatedCapacities_GetDetailsOfACapacity() { - // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listSKUsForNew.json - // this example is just showing the usage of "Capacities_ListSkus" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listCapacitiesInSubscription.json + // this example is just showing the usage of "Capacities_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(); @@ -67,9 +67,13 @@ public async Task GetSkusCapacities_ListEligibleSKUsForANewCapacity() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (CapacitySku item in subscriptionResource.GetSkusCapacitiesAsync()) + await foreach (DedicatedCapacityResource item in subscriptionResource.GetDedicatedCapacitiesAsync()) { - Console.WriteLine($"Succeeded: {item}"); + // 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 + DedicatedCapacityData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); @@ -107,10 +111,10 @@ public async Task CheckNameAvailabilityCapacity_CheckNameAvailabilityOfACapacity [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAutoScaleVCores_ListAutoScaleVCoresInSubscription() + public async Task GetSkusCapacities_ListEligibleSKUsForANewCapacity() { - // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listAutoScaleVCoresInSubscription.json - // this example is just showing the usage of "AutoScaleVCores_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2021-01-01/examples/listSKUsForNew.json + // this example is just showing the usage of "Capacities_ListSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -124,13 +128,9 @@ public async Task GetAutoScaleVCores_ListAutoScaleVCoresInSubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (AutoScaleVCoreResource item in subscriptionResource.GetAutoScaleVCoresAsync()) + await foreach (CapacitySku item in subscriptionResource.GetSkusCapacitiesAsync()) { - // 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 - AutoScaleVCoreData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded: {item}"); } Console.WriteLine("Succeeded"); diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/ArmPowerBIDedicatedModelFactory.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/ArmPowerBIDedicatedModelFactory.cs index 1c6621924f7a..30637f94b857 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/ArmPowerBIDedicatedModelFactory.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/ArmPowerBIDedicatedModelFactory.cs @@ -9,19 +9,50 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.PowerBIDedicated.Models { /// Model factory for models. public static partial class ArmPowerBIDedicatedModelFactory { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU of the auto scale v-core resource. + /// The maximum capacity of an auto scale v-core resource. + /// The object ID of the capacity resource associated with the auto scale v-core resource. + /// The current deployment state of an auto scale v-core resource. The provisioningState is to indicate states for resource provisioning. + /// A new instance for mocking. + public static AutoScaleVCoreData AutoScaleVCoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AutoScaleVCoreSku sku = null, int? capacityLimit = null, string capacityObjectId = null, VCoreProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + + return new AutoScaleVCoreData( + id, + name, + resourceType, + systemData, + tags, + location, + sku, + capacityLimit, + capacityObjectId, + provisioningState, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . - /// An identifier that represents the PowerBI Dedicated resource. - /// The name of the PowerBI Dedicated resource. - /// The type of the PowerBI Dedicated resource. - /// Location of the PowerBI Dedicated resource. - /// Key-value pairs of additional resource provisioning properties. - /// Metadata pertaining to creation and last modification of the resource. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. /// The SKU of the PowerBI Dedicated capacity resource. /// A collection of Dedicated capacity administrators. /// Specifies the generation of the Power BI Embedded capacity. If no value is specified, the default value 'Gen2' is used. [Learn More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2). @@ -30,7 +61,7 @@ public static partial class ArmPowerBIDedicatedModelFactory /// The current state of PowerBI Dedicated resource. The state is to indicate more states outside of resource provisioning. /// The current deployment state of PowerBI Dedicated resource. The provisioningState is to indicate states for resource provisioning. /// A new instance for mocking. - public static DedicatedCapacityData DedicatedCapacityData(string id = null, string name = null, string resourceType = null, AzureLocation location = default, IDictionary tags = null, SystemData systemData = null, CapacitySku sku = null, IEnumerable administrationMembers = null, Mode? mode = null, Guid? tenantId = null, string friendlyName = null, State? state = null, CapacityProvisioningState? provisioningState = null) + public static DedicatedCapacityData DedicatedCapacityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CapacitySku sku = null, IEnumerable administrationMembers = null, Mode? mode = null, Guid? tenantId = null, string friendlyName = null, State? state = null, CapacityProvisioningState? provisioningState = null) { tags ??= new Dictionary(); administrationMembers ??= new List(); @@ -39,39 +70,27 @@ public static DedicatedCapacityData DedicatedCapacityData(string id = null, stri id, name, resourceType, - location, - tags, systemData, - serializedAdditionalRawData: null, + tags, + location, sku, administrationMembers != null ? new DedicatedCapacityAdministrators(administrationMembers?.ToList(), serializedAdditionalRawData: null) : null, mode, tenantId, friendlyName, state, - provisioningState); + provisioningState, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// An identifier that represents the PowerBI Dedicated resource. - /// The name of the PowerBI Dedicated resource. - /// The type of the PowerBI Dedicated resource. - /// Location of the PowerBI Dedicated resource. - /// Key-value pairs of additional resource provisioning properties. - /// Metadata pertaining to creation and last modification of the resource. - /// A new instance for mocking. - public static PowerBIDedicatedResourceData PowerBIDedicatedResourceData(string id = null, string name = null, string resourceType = null, AzureLocation location = default, IDictionary tags = null, SystemData systemData = null) + /// Initializes a new instance of . + /// Indicator of availability of the capacity name. + /// The reason of unavailability. + /// The detailed message of the request unavailability. + /// A new instance for mocking. + public static CheckCapacityNameAvailabilityResult CheckCapacityNameAvailabilityResult(bool? nameAvailable = null, string reason = null, string message = null) { - tags ??= new Dictionary(); - - return new PowerBIDedicatedResourceData( - id, - name, - resourceType, - location, - tags, - systemData, - serializedAdditionalRawData: null); + return new CheckCapacityNameAvailabilityResult(nameAvailable, reason, message, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -105,45 +124,5 @@ public static SkuDetails SkuDetails(string resourceType = null, CapacitySku sku { return new SkuDetails(resourceType, sku, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// Indicator of availability of the capacity name. - /// The reason of unavailability. - /// The detailed message of the request unavailability. - /// A new instance for mocking. - public static CheckCapacityNameAvailabilityResult CheckCapacityNameAvailabilityResult(bool? nameAvailable = null, string reason = null, string message = null) - { - return new CheckCapacityNameAvailabilityResult(nameAvailable, reason, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// An identifier that represents the PowerBI Dedicated resource. - /// The name of the PowerBI Dedicated resource. - /// The type of the PowerBI Dedicated resource. - /// Location of the PowerBI Dedicated resource. - /// Key-value pairs of additional resource provisioning properties. - /// Metadata pertaining to creation and last modification of the resource. - /// The SKU of the auto scale v-core resource. - /// The maximum capacity of an auto scale v-core resource. - /// The object ID of the capacity resource associated with the auto scale v-core resource. - /// The current deployment state of an auto scale v-core resource. The provisioningState is to indicate states for resource provisioning. - /// A new instance for mocking. - public static AutoScaleVCoreData AutoScaleVCoreData(string id = null, string name = null, string resourceType = null, AzureLocation location = default, IDictionary tags = null, SystemData systemData = null, AutoScaleVCoreSku sku = null, int? capacityLimit = null, string capacityObjectId = null, VCoreProvisioningState? provisioningState = null) - { - tags ??= new Dictionary(); - - return new AutoScaleVCoreData( - id, - name, - resourceType, - location, - tags, - systemData, - serializedAdditionalRawData: null, - sku, - capacityLimit, - capacityObjectId, - provisioningState); - } } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreCollection.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreCollection.cs index 53420e3414dc..94778199310a 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreCollection.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreCollection.cs @@ -270,7 +270,8 @@ public virtual Response Get(string vcoreName, Cancellati public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => _autoScaleVCoreRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), _autoScaleVCoreClientDiagnostics, Pipeline, "AutoScaleVCoreCollection.GetAll", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autoScaleVCoreRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), _autoScaleVCoreClientDiagnostics, Pipeline, "AutoScaleVCoreCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -299,7 +300,8 @@ public virtual AsyncPageable GetAllAsync(CancellationTok public virtual Pageable GetAll(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => _autoScaleVCoreRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), _autoScaleVCoreClientDiagnostics, Pipeline, "AutoScaleVCoreCollection.GetAll", "value", null, cancellationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autoScaleVCoreRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), _autoScaleVCoreClientDiagnostics, Pipeline, "AutoScaleVCoreCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.Serialization.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.Serialization.cs index 96f4be4aad5f..74d3934c209c 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.Serialization.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.PowerBIDedicated.Models; namespace Azure.ResourceManager.PowerBIDedicated @@ -79,11 +80,11 @@ internal static AutoScaleVCoreData DeserializeAutoScaleVCoreData(JsonElement ele return null; } AutoScaleVCoreSku sku = default; - string id = default; - string name = default; - string type = default; - AzureLocation location = default; IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; SystemData systemData = default; int? capacityLimit = default; string capacityObjectId = default; @@ -97,38 +98,38 @@ internal static AutoScaleVCoreData DeserializeAutoScaleVCoreData(JsonElement ele sku = AutoScaleVCoreSku.DeserializeAutoScaleVCoreSku(property.Value, options); continue; } - if (property.NameEquals("id"u8)) + if (property.NameEquals("tags"u8)) { - id = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("location"u8)) { - name = property.Value.GetString(); + location = new AzureLocation(property.Value.GetString()); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("id"u8)) { - type = property.Value.GetString(); + id = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("location"u8)) + if (property.NameEquals("name"u8)) { - location = new AzureLocation(property.Value.GetString()); + name = property.Value.GetString(); continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; + type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData"u8)) @@ -137,7 +138,7 @@ internal static AutoScaleVCoreData DeserializeAutoScaleVCoreData(JsonElement ele { continue; } - systemData = SystemData.DeserializeSystemData(property.Value, options); + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("properties"u8)) @@ -185,14 +186,14 @@ internal static AutoScaleVCoreData DeserializeAutoScaleVCoreData(JsonElement ele id, name, type, - location, - tags ?? new ChangeTrackingDictionary(), systemData, - serializedAdditionalRawData, + tags ?? new ChangeTrackingDictionary(), + location, sku, capacityLimit, capacityObjectId, - provisioningState); + provisioningState, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.cs index 777fef0df48f..39dabeade075 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreData.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.PowerBIDedicated.Models; namespace Azure.ResourceManager.PowerBIDedicated @@ -16,10 +17,42 @@ namespace Azure.ResourceManager.PowerBIDedicated /// A class representing the AutoScaleVCore data model. /// Represents an instance of an auto scale v-core resource. /// - public partial class AutoScaleVCoreData : PowerBIDedicatedResourceData + public partial class AutoScaleVCoreData : TrackedResourceData { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . - /// Location of the PowerBI Dedicated resource. + /// The location. /// The SKU of the auto scale v-core resource. /// is null. public AutoScaleVCoreData(AzureLocation location, AutoScaleVCoreSku sku) : base(location) @@ -30,23 +63,24 @@ public AutoScaleVCoreData(AzureLocation location, AutoScaleVCoreSku sku) : base( } /// Initializes a new instance of . - /// An identifier that represents the PowerBI Dedicated resource. - /// The name of the PowerBI Dedicated resource. - /// The type of the PowerBI Dedicated resource. - /// Location of the PowerBI Dedicated resource. - /// Key-value pairs of additional resource provisioning properties. - /// Metadata pertaining to creation and last modification of the resource. - /// Keeps track of any properties unknown to the library. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. /// The SKU of the auto scale v-core resource. /// The maximum capacity of an auto scale v-core resource. /// The object ID of the capacity resource associated with the auto scale v-core resource. /// The current deployment state of an auto scale v-core resource. The provisioningState is to indicate states for resource provisioning. - internal AutoScaleVCoreData(string id, string name, string resourceType, AzureLocation location, IDictionary tags, SystemData systemData, IDictionary serializedAdditionalRawData, AutoScaleVCoreSku sku, int? capacityLimit, string capacityObjectId, VCoreProvisioningState? provisioningState) : base(id, name, resourceType, location, tags, systemData, serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal AutoScaleVCoreData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AutoScaleVCoreSku sku, int? capacityLimit, string capacityObjectId, VCoreProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; CapacityLimit = capacityLimit; CapacityObjectId = capacityObjectId; ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; } /// Initializes a new instance of for deserialization. diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.cs index 60a43b07eb74..5773df073572 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.cs @@ -50,7 +50,7 @@ protected AutoScaleVCoreResource() /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal AutoScaleVCoreResource(ArmClient client, AutoScaleVCoreData data) : this(client, new ResourceIdentifier(data.Id)) + internal AutoScaleVCoreResource(ArmClient client, AutoScaleVCoreData data) : this(client, data.Id) { HasData = true; _data = data; diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityCollection.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityCollection.cs index 1819297c5eea..2b9c0d4e00fb 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityCollection.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityCollection.cs @@ -74,7 +74,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// 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 Dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// Contains the information used to provision the Dedicated capacity. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -123,7 +123,7 @@ public virtual async Task> CreateOrUpdat /// /// /// 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 Dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// Contains the information used to provision the Dedicated capacity. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.Serialization.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.Serialization.cs index ffea772c7c94..5d24b9b7d5b8 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.Serialization.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.PowerBIDedicated.Models; namespace Azure.ResourceManager.PowerBIDedicated @@ -94,11 +95,11 @@ internal static DedicatedCapacityData DeserializeDedicatedCapacityData(JsonEleme return null; } CapacitySku sku = default; - string id = default; - string name = default; - string type = default; - AzureLocation location = default; IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; SystemData systemData = default; DedicatedCapacityAdministrators administration = default; Mode? mode = default; @@ -115,38 +116,38 @@ internal static DedicatedCapacityData DeserializeDedicatedCapacityData(JsonEleme sku = CapacitySku.DeserializeCapacitySku(property.Value, options); continue; } - if (property.NameEquals("id"u8)) + if (property.NameEquals("tags"u8)) { - id = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("location"u8)) { - name = property.Value.GetString(); + location = new AzureLocation(property.Value.GetString()); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("id"u8)) { - type = property.Value.GetString(); + id = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("location"u8)) + if (property.NameEquals("name"u8)) { - location = new AzureLocation(property.Value.GetString()); + name = property.Value.GetString(); continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("type"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; + type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData"u8)) @@ -155,7 +156,7 @@ internal static DedicatedCapacityData DeserializeDedicatedCapacityData(JsonEleme { continue; } - systemData = SystemData.DeserializeSystemData(property.Value, options); + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } if (property.NameEquals("properties"u8)) @@ -230,17 +231,17 @@ internal static DedicatedCapacityData DeserializeDedicatedCapacityData(JsonEleme id, name, type, - location, - tags ?? new ChangeTrackingDictionary(), systemData, - serializedAdditionalRawData, + tags ?? new ChangeTrackingDictionary(), + location, sku, administration, mode, tenantId, friendlyName, state, - provisioningState); + provisioningState, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.cs index 3bf4e658dabf..71351ed6e3f3 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityData.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.PowerBIDedicated.Models; namespace Azure.ResourceManager.PowerBIDedicated @@ -16,10 +17,42 @@ namespace Azure.ResourceManager.PowerBIDedicated /// A class representing the DedicatedCapacity data model. /// Represents an instance of a Dedicated Capacity resource. /// - public partial class DedicatedCapacityData : PowerBIDedicatedResourceData + public partial class DedicatedCapacityData : TrackedResourceData { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . - /// Location of the PowerBI Dedicated resource. + /// The location. /// The SKU of the PowerBI Dedicated capacity resource. /// is null. public DedicatedCapacityData(AzureLocation location, CapacitySku sku) : base(location) @@ -30,13 +63,12 @@ public DedicatedCapacityData(AzureLocation location, CapacitySku sku) : base(loc } /// Initializes a new instance of . - /// An identifier that represents the PowerBI Dedicated resource. - /// The name of the PowerBI Dedicated resource. - /// The type of the PowerBI Dedicated resource. - /// Location of the PowerBI Dedicated resource. - /// Key-value pairs of additional resource provisioning properties. - /// Metadata pertaining to creation and last modification of the resource. - /// Keeps track of any properties unknown to the library. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. /// The SKU of the PowerBI Dedicated capacity resource. /// A collection of Dedicated capacity administrators. /// Specifies the generation of the Power BI Embedded capacity. If no value is specified, the default value 'Gen2' is used. [Learn More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2). @@ -44,7 +76,8 @@ public DedicatedCapacityData(AzureLocation location, CapacitySku sku) : base(loc /// Capacity name. /// The current state of PowerBI Dedicated resource. The state is to indicate more states outside of resource provisioning. /// The current deployment state of PowerBI Dedicated resource. The provisioningState is to indicate states for resource provisioning. - internal DedicatedCapacityData(string id, string name, string resourceType, AzureLocation location, IDictionary tags, SystemData systemData, IDictionary serializedAdditionalRawData, CapacitySku sku, DedicatedCapacityAdministrators administration, Mode? mode, Guid? tenantId, string friendlyName, State? state, CapacityProvisioningState? provisioningState) : base(id, name, resourceType, location, tags, systemData, serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DedicatedCapacityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CapacitySku sku, DedicatedCapacityAdministrators administration, Mode? mode, Guid? tenantId, string friendlyName, State? state, CapacityProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Administration = administration; @@ -53,6 +86,7 @@ internal DedicatedCapacityData(string id, string name, string resourceType, Azur FriendlyName = friendlyName; State = state; ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; } /// Initializes a new instance of for deserialization. diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.cs index 5c1c7d8def88..ec7a44981290 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.cs @@ -51,7 +51,7 @@ protected DedicatedCapacityResource() /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DedicatedCapacityResource(ArmClient client, DedicatedCapacityData data) : this(client, new ResourceIdentifier(data.Id)) + internal DedicatedCapacityResource(ArmClient client, DedicatedCapacityData data) : this(client, data.Id) { HasData = true; _data = data; @@ -348,15 +348,15 @@ public virtual ArmOperation Update(WaitUntil waitUnti } /// - /// Suspends operation of the specified dedicated capacity instance. + /// Resumes operation of the specified Dedicated capacity instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume /// /// /// Operation Id - /// Capacities_Suspend + /// Capacities_Resume /// /// /// Default Api Version @@ -370,14 +370,14 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// 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 SuspendAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task ResumeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Suspend"); + using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Resume"); scope.Start(); try { - var response = await _dedicatedCapacityCapacitiesRestClient.SuspendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateSuspendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dedicatedCapacityCapacitiesRestClient.ResumeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -390,15 +390,15 @@ public virtual async Task SuspendAsync(WaitUntil waitUntil, Cancel } /// - /// Suspends operation of the specified dedicated capacity instance. + /// Resumes operation of the specified Dedicated capacity instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume /// /// /// Operation Id - /// Capacities_Suspend + /// Capacities_Resume /// /// /// Default Api Version @@ -412,14 +412,14 @@ public virtual async Task SuspendAsync(WaitUntil waitUntil, 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 cancellation token to use. - public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Resume(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Suspend"); + using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Resume"); scope.Start(); try { - var response = _dedicatedCapacityCapacitiesRestClient.Suspend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateSuspendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dedicatedCapacityCapacitiesRestClient.Resume(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -432,15 +432,15 @@ public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cance } /// - /// Resumes operation of the specified Dedicated capacity instance. + /// Lists eligible SKUs for a PowerBI Dedicated resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus /// /// /// Operation Id - /// Capacities_Resume + /// Capacities_ListSkusForCapacity /// /// /// Default Api Version @@ -452,37 +452,24 @@ public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cance /// /// /// - /// 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 ResumeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSkusForCapacityAsync(CancellationToken cancellationToken = default) { - using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Resume"); - scope.Start(); - try - { - var response = await _dedicatedCapacityCapacitiesRestClient.ResumeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, 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; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedCapacityCapacitiesRestClient.CreateListSkusForCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SkuDetails.DeserializeSkuDetails(e), _dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "DedicatedCapacityResource.GetSkusForCapacity", "value", null, cancellationToken); } /// - /// Resumes operation of the specified Dedicated capacity instance. + /// Lists eligible SKUs for a PowerBI Dedicated resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus /// /// /// Operation Id - /// Capacities_Resume + /// Capacities_ListSkusForCapacity /// /// /// Default Api Version @@ -494,37 +481,24 @@ public virtual async Task ResumeAsync(WaitUntil waitUntil, Cancell /// /// /// - /// 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 Resume(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSkusForCapacity(CancellationToken cancellationToken = default) { - using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Resume"); - scope.Start(); - try - { - var response = _dedicatedCapacityCapacitiesRestClient.Resume(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedCapacityCapacitiesRestClient.CreateListSkusForCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SkuDetails.DeserializeSkuDetails(e), _dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "DedicatedCapacityResource.GetSkusForCapacity", "value", null, cancellationToken); } /// - /// Lists eligible SKUs for a PowerBI Dedicated resource. + /// Suspends operation of the specified dedicated capacity instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend /// /// /// Operation Id - /// Capacities_ListSkusForCapacity + /// Capacities_Suspend /// /// /// Default Api Version @@ -536,24 +510,37 @@ public virtual ArmOperation Resume(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 cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSkusForCapacityAsync(CancellationToken cancellationToken = default) + public virtual async Task SuspendAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedCapacityCapacitiesRestClient.CreateListSkusForCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SkuDetails.DeserializeSkuDetails(e), _dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "DedicatedCapacityResource.GetSkusForCapacity", "value", null, cancellationToken); + using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Suspend"); + scope.Start(); + try + { + var response = await _dedicatedCapacityCapacitiesRestClient.SuspendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateSuspendRequest(Id.SubscriptionId, Id.ResourceGroupName, 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; + } } /// - /// Lists eligible SKUs for a PowerBI Dedicated resource. + /// Suspends operation of the specified dedicated capacity instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend /// /// /// Operation Id - /// Capacities_ListSkusForCapacity + /// Capacities_Suspend /// /// /// Default Api Version @@ -565,12 +552,25 @@ public virtual AsyncPageable GetSkusForCapacityAsync(CancellationTok /// /// /// + /// 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. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSkusForCapacity(CancellationToken cancellationToken = default) + public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedCapacityCapacitiesRestClient.CreateListSkusForCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SkuDetails.DeserializeSkuDetails(e), _dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "DedicatedCapacityResource.GetSkusForCapacity", "value", null, cancellationToken); + using var scope = _dedicatedCapacityCapacitiesClientDiagnostics.CreateScope("DedicatedCapacityResource.Suspend"); + scope.Start(); + try + { + var response = _dedicatedCapacityCapacitiesRestClient.Suspend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PowerBIDedicatedArmOperation(_dedicatedCapacityCapacitiesClientDiagnostics, Pipeline, _dedicatedCapacityCapacitiesRestClient.CreateSuspendRequest(Id.SubscriptionId, Id.ResourceGroupName, 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/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedArmClient.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedArmClient.cs index de71900846d0..2c1f4875e3cf 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedArmClient.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedArmClient.cs @@ -34,18 +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 DedicatedCapacityResource GetDedicatedCapacityResource(ResourceIdentifier id) - { - DedicatedCapacityResource.ValidateResourceId(id); - return new DedicatedCapacityResource(Client, id); - } - /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -57,5 +45,17 @@ public virtual AutoScaleVCoreResource GetAutoScaleVCoreResource(ResourceIdentifi AutoScaleVCoreResource.ValidateResourceId(id); return new AutoScaleVCoreResource(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 DedicatedCapacityResource GetDedicatedCapacityResource(ResourceIdentifier id) + { + DedicatedCapacityResource.ValidateResourceId(id); + return new DedicatedCapacityResource(Client, id); + } } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedResourceGroupResource.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedResourceGroupResource.cs index 7a090aac594e..e37671d3727f 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedResourceGroupResource.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedResourceGroupResource.cs @@ -33,23 +33,23 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of DedicatedCapacityResources in the ResourceGroupResource. - /// An object representing collection of DedicatedCapacityResources and their operations over a DedicatedCapacityResource. - public virtual DedicatedCapacityCollection GetDedicatedCapacities() + /// Gets a collection of AutoScaleVCoreResources in the ResourceGroupResource. + /// An object representing collection of AutoScaleVCoreResources and their operations over a AutoScaleVCoreResource. + public virtual AutoScaleVCoreCollection GetAutoScaleVCores() { - return GetCachedClient(client => new DedicatedCapacityCollection(client, Id)); + return GetCachedClient(client => new AutoScaleVCoreCollection(client, Id)); } /// - /// Gets details about the specified dedicated capacity. + /// Gets details about the specified auto scale v-core. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} /// /// /// Operation Id - /// Capacities_GetDetails + /// AutoScaleVCores_Get /// /// /// Default Api Version @@ -57,30 +57,30 @@ public virtual DedicatedCapacityCollection GetDedicatedCapacities() /// /// /// Resource - /// + /// /// /// /// - /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDedicatedCapacityAsync(string dedicatedCapacityName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutoScaleVCoreAsync(string vcoreName, CancellationToken cancellationToken = default) { - return await GetDedicatedCapacities().GetAsync(dedicatedCapacityName, cancellationToken).ConfigureAwait(false); + return await GetAutoScaleVCores().GetAsync(vcoreName, cancellationToken).ConfigureAwait(false); } /// - /// Gets details about the specified dedicated capacity. + /// Gets details about the specified auto scale v-core. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} /// /// /// Operation Id - /// Capacities_GetDetails + /// AutoScaleVCores_Get /// /// /// Default Api Version @@ -88,37 +88,37 @@ public virtual async Task> GetDedicatedCapac /// /// /// Resource - /// + /// /// /// /// - /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDedicatedCapacity(string dedicatedCapacityName, CancellationToken cancellationToken = default) + public virtual Response GetAutoScaleVCore(string vcoreName, CancellationToken cancellationToken = default) { - return GetDedicatedCapacities().Get(dedicatedCapacityName, cancellationToken); + return GetAutoScaleVCores().Get(vcoreName, cancellationToken); } - /// Gets a collection of AutoScaleVCoreResources in the ResourceGroupResource. - /// An object representing collection of AutoScaleVCoreResources and their operations over a AutoScaleVCoreResource. - public virtual AutoScaleVCoreCollection GetAutoScaleVCores() + /// Gets a collection of DedicatedCapacityResources in the ResourceGroupResource. + /// An object representing collection of DedicatedCapacityResources and their operations over a DedicatedCapacityResource. + public virtual DedicatedCapacityCollection GetDedicatedCapacities() { - return GetCachedClient(client => new AutoScaleVCoreCollection(client, Id)); + return GetCachedClient(client => new DedicatedCapacityCollection(client, Id)); } /// - /// Gets details about the specified auto scale v-core. + /// Gets details about the specified dedicated capacity. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} /// /// /// Operation Id - /// AutoScaleVCores_Get + /// Capacities_GetDetails /// /// /// Default Api Version @@ -126,30 +126,30 @@ public virtual AutoScaleVCoreCollection GetAutoScaleVCores() /// /// /// Resource - /// + /// /// /// /// - /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetAutoScaleVCoreAsync(string vcoreName, CancellationToken cancellationToken = default) + public virtual async Task> GetDedicatedCapacityAsync(string dedicatedCapacityName, CancellationToken cancellationToken = default) { - return await GetAutoScaleVCores().GetAsync(vcoreName, cancellationToken).ConfigureAwait(false); + return await GetDedicatedCapacities().GetAsync(dedicatedCapacityName, cancellationToken).ConfigureAwait(false); } /// - /// Gets details about the specified auto scale v-core. + /// Gets details about the specified dedicated capacity. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} /// /// /// Operation Id - /// AutoScaleVCores_Get + /// Capacities_GetDetails /// /// /// Default Api Version @@ -157,18 +157,18 @@ public virtual async Task> GetAutoScaleVCoreAsy /// /// /// Resource - /// + /// /// /// /// - /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetAutoScaleVCore(string vcoreName, CancellationToken cancellationToken = default) + public virtual Response GetDedicatedCapacity(string dedicatedCapacityName, CancellationToken cancellationToken = default) { - return GetAutoScaleVCores().Get(vcoreName, cancellationToken); + return GetDedicatedCapacities().Get(dedicatedCapacityName, cancellationToken); } } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedSubscriptionResource.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedSubscriptionResource.cs index dc86433fee55..ecf21ce89ecb 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedSubscriptionResource.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/MockablePowerBIDedicatedSubscriptionResource.cs @@ -18,10 +18,10 @@ namespace Azure.ResourceManager.PowerBIDedicated.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockablePowerBIDedicatedSubscriptionResource : ArmResource { - private ClientDiagnostics _dedicatedCapacityCapacitiesClientDiagnostics; - private CapacitiesRestOperations _dedicatedCapacityCapacitiesRestClient; private ClientDiagnostics _autoScaleVCoreClientDiagnostics; private AutoScaleVCoresRestOperations _autoScaleVCoreRestClient; + private ClientDiagnostics _dedicatedCapacityCapacitiesClientDiagnostics; + private CapacitiesRestOperations _dedicatedCapacityCapacitiesRestClient; /// Initializes a new instance of the class for mocking. protected MockablePowerBIDedicatedSubscriptionResource() @@ -35,10 +35,10 @@ internal MockablePowerBIDedicatedSubscriptionResource(ArmClient client, Resource { } - private ClientDiagnostics DedicatedCapacityCapacitiesClientDiagnostics => _dedicatedCapacityCapacitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PowerBIDedicated", DedicatedCapacityResource.ResourceType.Namespace, Diagnostics); - private CapacitiesRestOperations DedicatedCapacityCapacitiesRestClient => _dedicatedCapacityCapacitiesRestClient ??= new CapacitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DedicatedCapacityResource.ResourceType)); private ClientDiagnostics AutoScaleVCoreClientDiagnostics => _autoScaleVCoreClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PowerBIDedicated", AutoScaleVCoreResource.ResourceType.Namespace, Diagnostics); private AutoScaleVCoresRestOperations AutoScaleVCoreRestClient => _autoScaleVCoreRestClient ??= new AutoScaleVCoresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AutoScaleVCoreResource.ResourceType)); + private ClientDiagnostics DedicatedCapacityCapacitiesClientDiagnostics => _dedicatedCapacityCapacitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PowerBIDedicated", DedicatedCapacityResource.ResourceType.Namespace, Diagnostics); + private CapacitiesRestOperations DedicatedCapacityCapacitiesRestClient => _dedicatedCapacityCapacitiesRestClient ??= new CapacitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DedicatedCapacityResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -47,15 +47,15 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Lists all the Dedicated capacities for the given subscription. + /// Lists all the auto scale v-cores for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores /// /// /// Operation Id - /// Capacities_List + /// AutoScaleVCores_ListBySubscription /// /// /// Default Api Version @@ -63,28 +63,29 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDedicatedCapacitiesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAutoScaleVCoresAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new DedicatedCapacityResource(Client, DedicatedCapacityData.DeserializeDedicatedCapacityData(e)), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetDedicatedCapacities", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => AutoScaleVCoreRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutoScaleVCoreRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), AutoScaleVCoreClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetAutoScaleVCores", "value", "nextLink", cancellationToken); } /// - /// Lists all the Dedicated capacities for the given subscription. + /// Lists all the auto scale v-cores for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores /// /// /// Operation Id - /// Capacities_List + /// AutoScaleVCores_ListBySubscription /// /// /// Default Api Version @@ -92,28 +93,29 @@ public virtual AsyncPageable GetDedicatedCapacitiesAs /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDedicatedCapacities(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAutoScaleVCores(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new DedicatedCapacityResource(Client, DedicatedCapacityData.DeserializeDedicatedCapacityData(e)), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetDedicatedCapacities", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => AutoScaleVCoreRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutoScaleVCoreRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), AutoScaleVCoreClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetAutoScaleVCores", "value", "nextLink", cancellationToken); } /// - /// Lists eligible SKUs for PowerBI Dedicated resource provider. + /// Lists all the Dedicated capacities for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities /// /// /// Operation Id - /// Capacities_ListSkus + /// Capacities_List /// /// /// Default Api Version @@ -126,23 +128,23 @@ public virtual Pageable GetDedicatedCapacities(Cancel /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSkusCapacitiesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDedicatedCapacitiesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListSkusRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => CapacitySku.DeserializeCapacitySku(e), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetSkusCapacities", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListRequest(Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new DedicatedCapacityResource(Client, DedicatedCapacityData.DeserializeDedicatedCapacityData(e)), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetDedicatedCapacities", "value", null, cancellationToken); } /// - /// Lists eligible SKUs for PowerBI Dedicated resource provider. + /// Lists all the Dedicated capacities for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities /// /// /// Operation Id - /// Capacities_ListSkus + /// Capacities_List /// /// /// Default Api Version @@ -155,11 +157,11 @@ public virtual AsyncPageable GetSkusCapacitiesAsync(CancellationTok /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSkusCapacities(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDedicatedCapacities(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListSkusRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => CapacitySku.DeserializeCapacitySku(e), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetSkusCapacities", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListRequest(Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new DedicatedCapacityResource(Client, DedicatedCapacityData.DeserializeDedicatedCapacityData(e)), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetDedicatedCapacities", "value", null, cancellationToken); } /// @@ -183,8 +185,8 @@ public virtual Pageable GetSkusCapacities(CancellationToken cancell /// /// /// - /// The region name which the operation will lookup into. - /// The name of the capacity. + /// The name of Azure region. + /// The request body. /// The cancellation token to use. /// is null. public virtual async Task> CheckNameAvailabilityCapacityAsync(AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -226,8 +228,8 @@ public virtual async Task> CheckNa /// /// /// - /// The region name which the operation will lookup into. - /// The name of the capacity. + /// The name of Azure region. + /// The request body. /// The cancellation token to use. /// is null. public virtual Response CheckNameAvailabilityCapacity(AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -249,15 +251,15 @@ public virtual Response CheckNameAvailabili } /// - /// Lists all the auto scale v-cores for the given subscription. + /// Lists eligible SKUs for PowerBI Dedicated resource provider. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus /// /// /// Operation Id - /// AutoScaleVCores_ListBySubscription + /// Capacities_ListSkus /// /// /// Default Api Version @@ -265,28 +267,28 @@ public virtual Response CheckNameAvailabili /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAutoScaleVCoresAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSkusCapacitiesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AutoScaleVCoreRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), AutoScaleVCoreClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetAutoScaleVCores", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListSkusRequest(Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => CapacitySku.DeserializeCapacitySku(e), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetSkusCapacities", "value", null, cancellationToken); } /// - /// Lists all the auto scale v-cores for the given subscription. + /// Lists eligible SKUs for PowerBI Dedicated resource provider. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus /// /// /// Operation Id - /// AutoScaleVCores_ListBySubscription + /// Capacities_ListSkus /// /// /// Default Api Version @@ -294,16 +296,16 @@ public virtual AsyncPageable GetAutoScaleVCoresAsync(Can /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAutoScaleVCores(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSkusCapacities(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AutoScaleVCoreRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new AutoScaleVCoreResource(Client, AutoScaleVCoreData.DeserializeAutoScaleVCoreData(e)), AutoScaleVCoreClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetAutoScaleVCores", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedCapacityCapacitiesRestClient.CreateListSkusRequest(Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => CapacitySku.DeserializeCapacitySku(e), DedicatedCapacityCapacitiesClientDiagnostics, Pipeline, "MockablePowerBIDedicatedSubscriptionResource.GetSkusCapacities", "value", null, cancellationToken); } } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/PowerBIDedicatedExtensions.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/PowerBIDedicatedExtensions.cs index 27acb9cf5f7f..0a3a23492309 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/PowerBIDedicatedExtensions.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Extensions/PowerBIDedicatedExtensions.cs @@ -34,70 +34,70 @@ private static MockablePowerBIDedicatedSubscriptionResource GetMockablePowerBIDe } /// - /// 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. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// 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 DedicatedCapacityResource GetDedicatedCapacityResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutoScaleVCoreResource GetAutoScaleVCoreResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockablePowerBIDedicatedArmClient(client).GetDedicatedCapacityResource(id); + return GetMockablePowerBIDedicatedArmClient(client).GetAutoScaleVCoreResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// 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. + /// 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 AutoScaleVCoreResource GetAutoScaleVCoreResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DedicatedCapacityResource GetDedicatedCapacityResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockablePowerBIDedicatedArmClient(client).GetAutoScaleVCoreResource(id); + return GetMockablePowerBIDedicatedArmClient(client).GetDedicatedCapacityResource(id); } /// - /// Gets a collection of DedicatedCapacityResources in the ResourceGroupResource. + /// Gets a collection of AutoScaleVCoreResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of DedicatedCapacityResources and their operations over a DedicatedCapacityResource. - public static DedicatedCapacityCollection GetDedicatedCapacities(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of AutoScaleVCoreResources and their operations over a AutoScaleVCoreResource. + public static AutoScaleVCoreCollection GetAutoScaleVCores(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetDedicatedCapacities(); + return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetAutoScaleVCores(); } /// - /// Gets details about the specified dedicated capacity. + /// Gets details about the specified auto scale v-core. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} /// /// /// Operation Id - /// Capacities_GetDetails + /// AutoScaleVCores_Get /// /// /// Default Api Version @@ -105,37 +105,37 @@ public static DedicatedCapacityCollection GetDedicatedCapacities(this ResourceGr /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetDedicatedCapacityAsync(this ResourceGroupResource resourceGroupResource, string dedicatedCapacityName, CancellationToken cancellationToken = default) + public static async Task> GetAutoScaleVCoreAsync(this ResourceGroupResource resourceGroupResource, string vcoreName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetDedicatedCapacityAsync(dedicatedCapacityName, cancellationToken).ConfigureAwait(false); + return await GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetAutoScaleVCoreAsync(vcoreName, cancellationToken).ConfigureAwait(false); } /// - /// Gets details about the specified dedicated capacity. + /// Gets details about the specified auto scale v-core. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} /// /// /// Operation Id - /// Capacities_GetDetails + /// AutoScaleVCores_Get /// /// /// Default Api Version @@ -143,54 +143,54 @@ public static async Task> GetDedicatedCapaci /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetDedicatedCapacity(this ResourceGroupResource resourceGroupResource, string dedicatedCapacityName, CancellationToken cancellationToken = default) + public static Response GetAutoScaleVCore(this ResourceGroupResource resourceGroupResource, string vcoreName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetDedicatedCapacity(dedicatedCapacityName, cancellationToken); + return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetAutoScaleVCore(vcoreName, cancellationToken); } /// - /// Gets a collection of AutoScaleVCoreResources in the ResourceGroupResource. + /// Gets a collection of DedicatedCapacityResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of AutoScaleVCoreResources and their operations over a AutoScaleVCoreResource. - public static AutoScaleVCoreCollection GetAutoScaleVCores(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of DedicatedCapacityResources and their operations over a DedicatedCapacityResource. + public static DedicatedCapacityCollection GetDedicatedCapacities(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetAutoScaleVCores(); + return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetDedicatedCapacities(); } /// - /// Gets details about the specified auto scale v-core. + /// Gets details about the specified dedicated capacity. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} /// /// /// Operation Id - /// AutoScaleVCores_Get + /// Capacities_GetDetails /// /// /// Default Api Version @@ -198,37 +198,37 @@ public static AutoScaleVCoreCollection GetAutoScaleVCores(this ResourceGroupReso /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetAutoScaleVCoreAsync(this ResourceGroupResource resourceGroupResource, string vcoreName, CancellationToken cancellationToken = default) + public static async Task> GetDedicatedCapacityAsync(this ResourceGroupResource resourceGroupResource, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetAutoScaleVCoreAsync(vcoreName, cancellationToken).ConfigureAwait(false); + return await GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetDedicatedCapacityAsync(dedicatedCapacityName, cancellationToken).ConfigureAwait(false); } /// - /// Gets details about the specified auto scale v-core. + /// Gets details about the specified dedicated capacity. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName} /// /// /// Operation Id - /// AutoScaleVCores_Get + /// Capacities_GetDetails /// /// /// Default Api Version @@ -236,37 +236,37 @@ public static async Task> GetAutoScaleVCoreAsyn /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetAutoScaleVCore(this ResourceGroupResource resourceGroupResource, string vcoreName, CancellationToken cancellationToken = default) + public static Response GetDedicatedCapacity(this ResourceGroupResource resourceGroupResource, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetAutoScaleVCore(vcoreName, cancellationToken); + return GetMockablePowerBIDedicatedResourceGroupResource(resourceGroupResource).GetDedicatedCapacity(dedicatedCapacityName, cancellationToken); } /// - /// Lists all the Dedicated capacities for the given subscription. + /// Lists all the auto scale v-cores for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores /// /// /// Operation Id - /// Capacities_List + /// AutoScaleVCores_ListBySubscription /// /// /// Default Api Version @@ -274,35 +274,35 @@ public static Response GetAutoScaleVCore(this ResourceGr /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDedicatedCapacitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAutoScaleVCoresAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetDedicatedCapacitiesAsync(cancellationToken); + return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetAutoScaleVCoresAsync(cancellationToken); } /// - /// Lists all the Dedicated capacities for the given subscription. + /// Lists all the auto scale v-cores for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores /// /// /// Operation Id - /// Capacities_List + /// AutoScaleVCores_ListBySubscription /// /// /// Default Api Version @@ -310,35 +310,35 @@ public static AsyncPageable GetDedicatedCapacitiesAsy /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDedicatedCapacities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAutoScaleVCores(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetDedicatedCapacities(cancellationToken); + return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetAutoScaleVCores(cancellationToken); } /// - /// Lists eligible SKUs for PowerBI Dedicated resource provider. + /// Lists all the Dedicated capacities for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities /// /// /// Operation Id - /// Capacities_ListSkus + /// Capacities_List /// /// /// Default Api Version @@ -351,30 +351,30 @@ public static Pageable GetDedicatedCapacities(this Su /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetSkusCapacitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDedicatedCapacitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetSkusCapacitiesAsync(cancellationToken); + return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetDedicatedCapacitiesAsync(cancellationToken); } /// - /// Lists eligible SKUs for PowerBI Dedicated resource provider. + /// Lists all the Dedicated capacities for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities /// /// /// Operation Id - /// Capacities_ListSkus + /// Capacities_List /// /// /// Default Api Version @@ -387,18 +387,18 @@ public static AsyncPageable GetSkusCapacitiesAsync(this Subscriptio /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetSkusCapacities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDedicatedCapacities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetSkusCapacities(cancellationToken); + return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetDedicatedCapacities(cancellationToken); } /// @@ -427,8 +427,8 @@ public static Pageable GetSkusCapacities(this SubscriptionResource /// /// /// The instance the method will execute against. - /// The region name which the operation will lookup into. - /// The name of the capacity. + /// The name of Azure region. + /// The request body. /// The cancellation token to use. /// or is null. public static async Task> CheckNameAvailabilityCapacityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -464,8 +464,8 @@ public static async Task> CheckNam /// /// /// The instance the method will execute against. - /// The region name which the operation will lookup into. - /// The name of the capacity. + /// The name of Azure region. + /// The request body. /// The cancellation token to use. /// or is null. public static Response CheckNameAvailabilityCapacity(this SubscriptionResource subscriptionResource, AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -476,15 +476,15 @@ public static Response CheckNameAvailabilit } /// - /// Lists all the auto scale v-cores for the given subscription. + /// Lists eligible SKUs for PowerBI Dedicated resource provider. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus /// /// /// Operation Id - /// AutoScaleVCores_ListBySubscription + /// Capacities_ListSkus /// /// /// Default Api Version @@ -492,35 +492,35 @@ public static Response CheckNameAvailabilit /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAutoScaleVCoresAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSkusCapacitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetAutoScaleVCoresAsync(cancellationToken); + return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetSkusCapacitiesAsync(cancellationToken); } /// - /// Lists all the auto scale v-cores for the given subscription. + /// Lists eligible SKUs for PowerBI Dedicated resource provider. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores + /// /subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus /// /// /// Operation Id - /// AutoScaleVCores_ListBySubscription + /// Capacities_ListSkus /// /// /// Default Api Version @@ -528,23 +528,23 @@ public static AsyncPageable GetAutoScaleVCoresAsync(this /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAutoScaleVCores(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSkusCapacities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetAutoScaleVCores(cancellationToken); + return GetMockablePowerBIDedicatedSubscriptionResource(subscriptionResource).GetSkusCapacities(cancellationToken); } } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.Serialization.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.Serialization.cs index bb3928ac0082..8522cbf8b165 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.Serialization.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.Serialization.cs @@ -41,6 +41,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit 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) @@ -79,6 +84,7 @@ internal static AutoScaleVCoreListResult DeserializeAutoScaleVCoreListResult(Jso return null; } IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -93,13 +99,18 @@ internal static AutoScaleVCoreListResult DeserializeAutoScaleVCoreListResult(Jso 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 AutoScaleVCoreListResult(value, serializedAdditionalRawData); + return new AutoScaleVCoreListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.cs index 20891a5ae90c..b3614097a92b 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/AutoScaleVCoreListResult.cs @@ -58,10 +58,12 @@ internal AutoScaleVCoreListResult(IEnumerable value) /// Initializes a new instance of . /// An array of auto scale v-core resources. + /// /// Keeps track of any properties unknown to the library. - internal AutoScaleVCoreListResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal AutoScaleVCoreListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,5 +74,7 @@ internal AutoScaleVCoreListResult() /// An array of auto scale v-core resources. public IReadOnlyList Value { get; } + /// Gets the next link. + public string NextLink { get; } } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/IdentityType.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/IdentityType.cs deleted file mode 100644 index 6857aacd1f39..000000000000 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/IdentityType.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.PowerBIDedicated.Models -{ - /// The type of identity that created/modified the resource. - public readonly partial struct IdentityType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IdentityType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UserValue = "User"; - private const string ApplicationValue = "Application"; - private const string ManagedIdentityValue = "ManagedIdentity"; - private const string KeyValue = "Key"; - - /// User. - public static IdentityType User { get; } = new IdentityType(UserValue); - /// Application. - public static IdentityType Application { get; } = new IdentityType(ApplicationValue); - /// ManagedIdentity. - public static IdentityType ManagedIdentity { get; } = new IdentityType(ManagedIdentityValue); - /// Key. - public static IdentityType Key { get; } = new IdentityType(KeyValue); - /// Determines if two values are the same. - public static bool operator ==(IdentityType left, IdentityType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IdentityType left, IdentityType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator IdentityType(string value) => new IdentityType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IdentityType other && Equals(other); - /// - public bool Equals(IdentityType 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/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.Serialization.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.Serialization.cs deleted file mode 100644 index 207f9ffb27fe..000000000000 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.Serialization.cs +++ /dev/null @@ -1,207 +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.PowerBIDedicated.Models -{ - public partial class PowerBIDedicatedResourceData : 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(PowerBIDedicatedResourceData)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - writer.WriteObjectValue(SystemData, 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 - } - } - } - - PowerBIDedicatedResourceData 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(PowerBIDedicatedResourceData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePowerBIDedicatedResourceData(document.RootElement, options); - } - - internal static PowerBIDedicatedResourceData DeserializePowerBIDedicatedResourceData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string name = default; - string type = default; - AzureLocation location = default; - IDictionary tags = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PowerBIDedicatedResourceData( - id, - name, - type, - location, - tags ?? new ChangeTrackingDictionary(), - systemData, - 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(PowerBIDedicatedResourceData)} does not support writing '{options.Format}' format."); - } - } - - PowerBIDedicatedResourceData 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 DeserializePowerBIDedicatedResourceData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PowerBIDedicatedResourceData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.cs deleted file mode 100644 index 99531421d7fa..000000000000 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/PowerBIDedicatedResourceData.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; -using Azure.Core; - -namespace Azure.ResourceManager.PowerBIDedicated.Models -{ - /// Represents an instance of an PowerBI Dedicated resource. - public partial class PowerBIDedicatedResourceData - { - /// - /// 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 . - /// Location of the PowerBI Dedicated resource. - public PowerBIDedicatedResourceData(AzureLocation location) - { - Location = location; - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// An identifier that represents the PowerBI Dedicated resource. - /// The name of the PowerBI Dedicated resource. - /// The type of the PowerBI Dedicated resource. - /// Location of the PowerBI Dedicated resource. - /// Key-value pairs of additional resource provisioning properties. - /// Metadata pertaining to creation and last modification of the resource. - /// Keeps track of any properties unknown to the library. - internal PowerBIDedicatedResourceData(string id, string name, string resourceType, AzureLocation location, IDictionary tags, SystemData systemData, IDictionary serializedAdditionalRawData) - { - Id = id; - Name = name; - ResourceType = resourceType; - Location = location; - Tags = tags; - SystemData = systemData; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal PowerBIDedicatedResourceData() - { - } - - /// An identifier that represents the PowerBI Dedicated resource. - public string Id { get; } - /// The name of the PowerBI Dedicated resource. - public string Name { get; } - /// The type of the PowerBI Dedicated resource. - public string ResourceType { get; } - /// Location of the PowerBI Dedicated resource. - public AzureLocation Location { get; set; } - /// Key-value pairs of additional resource provisioning properties. - public IDictionary Tags { get; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; set; } - } -} diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.Serialization.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.Serialization.cs deleted file mode 100644 index 9c919dd1ae82..000000000000 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.Serialization.cs +++ /dev/null @@ -1,207 +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.PowerBIDedicated.Models -{ - public partial class SystemData : 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(SystemData)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(CreatedBy)) - { - writer.WritePropertyName("createdBy"u8); - writer.WriteStringValue(CreatedBy); - } - if (Optional.IsDefined(CreatedByType)) - { - writer.WritePropertyName("createdByType"u8); - writer.WriteStringValue(CreatedByType.Value.ToString()); - } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdAt"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(LastModifiedBy)) - { - writer.WritePropertyName("lastModifiedBy"u8); - writer.WriteStringValue(LastModifiedBy); - } - if (Optional.IsDefined(LastModifiedByType)) - { - writer.WritePropertyName("lastModifiedByType"u8); - writer.WriteStringValue(LastModifiedByType.Value.ToString()); - } - if (Optional.IsDefined(LastModifiedOn)) - { - writer.WritePropertyName("lastModifiedAt"u8); - writer.WriteStringValue(LastModifiedOn.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 - } - } - } - - SystemData 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(SystemData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSystemData(document.RootElement, options); - } - - internal static SystemData DeserializeSystemData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string createdBy = default; - IdentityType? createdByType = default; - DateTimeOffset? createdAt = default; - string lastModifiedBy = default; - IdentityType? lastModifiedByType = default; - DateTimeOffset? lastModifiedAt = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("createdBy"u8)) - { - createdBy = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdByType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createdByType = new IdentityType(property.Value.GetString()); - continue; - } - if (property.NameEquals("createdAt"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createdAt = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastModifiedBy"u8)) - { - lastModifiedBy = property.Value.GetString(); - continue; - } - if (property.NameEquals("lastModifiedByType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastModifiedByType = new IdentityType(property.Value.GetString()); - continue; - } - if (property.NameEquals("lastModifiedAt"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastModifiedAt = property.Value.GetDateTimeOffset("O"); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SystemData( - createdBy, - createdByType, - createdAt, - lastModifiedBy, - lastModifiedByType, - lastModifiedAt, - 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(SystemData)} does not support writing '{options.Format}' format."); - } - } - - SystemData 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 DeserializeSystemData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SystemData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.cs deleted file mode 100644 index 710d7b9086b5..000000000000 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/Models/SystemData.cs +++ /dev/null @@ -1,85 +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.PowerBIDedicated.Models -{ - /// Metadata pertaining to creation and last modification of the resource. - public partial class SystemData - { - /// - /// 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 SystemData() - { - } - - /// Initializes a new instance of . - /// An identifier for the identity that created the resource. - /// The type of identity that created the resource. - /// The timestamp of resource creation (UTC). - /// An identifier for the identity that last modified the resource. - /// The type of identity that last modified the resource. - /// The timestamp of resource last modification (UTC). - /// Keeps track of any properties unknown to the library. - internal SystemData(string createdBy, IdentityType? createdByType, DateTimeOffset? createdOn, string lastModifiedBy, IdentityType? lastModifiedByType, DateTimeOffset? lastModifiedOn, IDictionary serializedAdditionalRawData) - { - CreatedBy = createdBy; - CreatedByType = createdByType; - CreatedOn = createdOn; - LastModifiedBy = lastModifiedBy; - LastModifiedByType = lastModifiedByType; - LastModifiedOn = lastModifiedOn; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// An identifier for the identity that created the resource. - public string CreatedBy { get; set; } - /// The type of identity that created the resource. - public IdentityType? CreatedByType { get; set; } - /// The timestamp of resource creation (UTC). - public DateTimeOffset? CreatedOn { get; set; } - /// An identifier for the identity that last modified the resource. - public string LastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - public IdentityType? LastModifiedByType { get; set; } - /// The timestamp of resource last modification (UTC). - public DateTimeOffset? LastModifiedOn { get; set; } - } -} diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/AutoScaleVCoresRestOperations.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/AutoScaleVCoresRestOperations.cs index 159fc1e9bc36..06192b2d6d35 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/AutoScaleVCoresRestOperations.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/AutoScaleVCoresRestOperations.cs @@ -36,6 +36,170 @@ public AutoScaleVCoresRestOperations(HttpPipeline pipeline, string applicationId _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/autoScaleVCores", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + 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("/providers/Microsoft.PowerBIDedicated/autoScaleVCores", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the auto scale v-cores for the given subscription. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutoScaleVCoreListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutoScaleVCoreListResult.DeserializeAutoScaleVCoreListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the auto scale v-cores for the given subscription. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutoScaleVCoreListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutoScaleVCoreListResult.DeserializeAutoScaleVCoreListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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.PowerBIDedicated/autoScaleVCores", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + 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.PowerBIDedicated/autoScaleVCores", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all the auto scale v-cores for the given resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutoScaleVCoreListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutoScaleVCoreListResult.DeserializeAutoScaleVCoreListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all the auto scale v-cores for the given resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutoScaleVCoreListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutoScaleVCoreListResult.DeserializeAutoScaleVCoreListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vcoreName) { var uri = new RawRequestUriBuilder(); @@ -71,8 +235,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets details about the specified auto scale v-core. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. /// , or is null. @@ -102,8 +266,8 @@ public async Task> GetAsync(string subscriptionId, } /// Gets details about the specified auto scale v-core. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. /// , or is null. @@ -171,8 +335,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Provisions the specified auto scale v-core based on the configuration specified in the request. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// Contains the information used to provision the auto scale v-core. /// The cancellation token to use. @@ -202,8 +366,8 @@ public async Task> CreateAsync(string subscriptionI } /// Provisions the specified auto scale v-core based on the configuration specified in the request. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. /// Contains the information used to provision the auto scale v-core. /// The cancellation token to use. @@ -232,7 +396,7 @@ public Response Create(string subscriptionId, string resourc } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vcoreName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -246,11 +410,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vcoreName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -262,61 +426,77 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG 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; } - /// Deletes the specified auto scale v-core. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Updates the current state of the specified auto scale v-core. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + /// Request object that contains the updated information for the auto scale v-core. /// 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 DeleteAsync(string subscriptionId, string resourceGroupName, string vcoreName, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vcoreName, nameof(vcoreName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vcoreName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vcoreName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + AutoScaleVCoreData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutoScaleVCoreData.DeserializeAutoScaleVCoreData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes the specified auto scale v-core. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Updates the current state of the specified auto scale v-core. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. + /// Request object that contains the updated information for the auto scale v-core. /// 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 Delete(string subscriptionId, string resourceGroupName, string vcoreName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vcoreName, nameof(vcoreName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vcoreName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vcoreName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + AutoScaleVCoreData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutoScaleVCoreData.DeserializeAutoScaleVCoreData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vcoreName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -330,11 +510,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vcoreName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -346,120 +526,94 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG 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 the current state of the specified auto scale v-core. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Deletes the specified auto scale v-core. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - /// Request object that contains the updated information for the auto scale v-core. /// 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> UpdateAsync(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vcoreName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vcoreName, nameof(vcoreName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vcoreName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vcoreName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - AutoScaleVCoreData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AutoScaleVCoreData.DeserializeAutoScaleVCoreData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates the current state of the specified auto scale v-core. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Deletes the specified auto scale v-core. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the auto scale v-core. It must be a minimum of 3 characters, and a maximum of 63. - /// Request object that contains the updated information for the auto scale v-core. /// 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 Update(string subscriptionId, string resourceGroupName, string vcoreName, AutoScaleVCorePatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string vcoreName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vcoreName, nameof(vcoreName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vcoreName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vcoreName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - AutoScaleVCoreData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AutoScaleVCoreData.DeserializeAutoScaleVCoreData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) { 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.PowerBIDedicated/autoScaleVCores", false); - uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendRawNextLink(nextLink, false); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) { 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.PowerBIDedicated/autoScaleVCores", false); - uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendRawNextLink(nextLink, false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Gets all the auto scale v-cores for the given resource group. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Lists all the auto scale v-cores for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -475,18 +629,18 @@ public async Task> ListByResourceGroupAsync(s } } - /// Gets all the auto scale v-cores for the given resource group. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Lists all the auto scale v-cores for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -502,44 +656,42 @@ public Response ListByResourceGroup(string subscriptio } } - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/autoScaleVCores", false); - uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendRawNextLink(nextLink, false); return uri; } - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { 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("/providers/Microsoft.PowerBIDedicated/autoScaleVCores", false); - uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendRawNextLink(nextLink, false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists all the auto scale v-cores for the given subscription. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Gets all the auto scale v-cores for the given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListBySubscriptionRequest(subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -555,16 +707,20 @@ public async Task> ListBySubscriptionAsync(st } } - /// Lists all the auto scale v-cores for the given subscription. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Gets all the auto scale v-cores for the given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListBySubscriptionRequest(subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/CapacitiesRestOperations.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/CapacitiesRestOperations.cs index dad38f170e5a..4bfa21684a08 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/CapacitiesRestOperations.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/RestOperations/CapacitiesRestOperations.cs @@ -36,21 +36,18 @@ public CapacitiesRestOperations(HttpPipeline pipeline, string applicationId, Uri _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetDetailsRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) { 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.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal HttpMessage CreateListRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -59,10 +56,7 @@ internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resou uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -70,187 +64,169 @@ internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resou return message; } - /// Gets details about the specified dedicated capacity. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// Lists all the Dedicated capacities for the given subscription. + /// The ID of the target subscription. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetDetailsAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateListRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DedicatedCapacityData value = default; + DedicatedCapacities value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DedicatedCapacityData.DeserializeDedicatedCapacityData(document.RootElement); + value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((DedicatedCapacityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets details about the specified dedicated capacity. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// Lists all the Dedicated capacities for the given subscription. + /// The ID of the target subscription. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetDetails(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateListRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DedicatedCapacityData value = default; + DedicatedCapacities value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DedicatedCapacityData.DeserializeDedicatedCapacityData(document.RootElement); + value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((DedicatedCapacityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityData data) + internal RequestUriBuilder CreateCheckNameAvailabilityRequestUri(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content) { 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.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/checkNameAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityData data) + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; 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.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/checkNameAvailability", false); 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Provisions the specified Dedicated capacity based on the configuration specified in the request. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. - /// Contains the information used to provision the Dedicated capacity. + /// Check the name availability in the target location. + /// The ID of the target subscription. + /// The name of Azure region. + /// The request body. /// 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 dedicatedCapacityName, DedicatedCapacityData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, data); + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + CheckCapacityNameAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CheckCapacityNameAvailabilityResult.DeserializeCheckCapacityNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Provisions the specified Dedicated capacity based on the configuration specified in the request. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. - /// Contains the information used to provision the Dedicated capacity. + /// Check the name availability in the target location. + /// The ID of the target subscription. + /// The name of Azure region. + /// The request body. /// 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 dedicatedCapacityName, DedicatedCapacityData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response CheckNameAvailability(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, data); + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + CheckCapacityNameAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CheckCapacityNameAvailabilityResult.DeserializeCheckCapacityNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal RequestUriBuilder CreateListSkusRequestUri(string subscriptionId) { 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.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/skus", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal HttpMessage CreateListSkusRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + 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.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/skus", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -258,59 +234,57 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes the specified Dedicated capacity. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// Lists eligible SKUs for PowerBI Dedicated resource provider. + /// The ID of the target subscription. /// 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 dedicatedCapacityName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListSkusAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateListSkusRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + SkuEnumerationForNewResourceResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SkuEnumerationForNewResourceResult.DeserializeSkuEnumerationForNewResourceResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes the specified Dedicated capacity. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// Lists eligible SKUs for PowerBI Dedicated resource provider. + /// The ID of the target subscription. /// 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 dedicatedCapacityName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListSkus(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateListSkusRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + SkuEnumerationForNewResourceResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SkuEnumerationForNewResourceResult.DeserializeSkuEnumerationForNewResourceResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityPatch patch) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -318,91 +292,85 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityPatch patch) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { 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); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); - uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities", false); 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 the current state of the specified Dedicated capacity. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. - /// Request object that contains the updated information for the capacity. + /// Gets all the Dedicated capacities for the given resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// 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 dedicatedCapacityName, DedicatedCapacityPatch patch, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + DedicatedCapacities value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Updates the current state of the specified Dedicated capacity. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. - /// Request object that contains the updated information for the capacity. + /// Gets all the Dedicated capacities for the given resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// 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 dedicatedCapacityName, DedicatedCapacityPatch patch, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + DedicatedCapacities value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateSuspendRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal RequestUriBuilder CreateGetDetailsRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -412,16 +380,15 @@ internal RequestUriBuilder CreateSuspendRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); uri.AppendPath(dedicatedCapacityName, true); - uri.AppendPath("/suspend", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateSuspendRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -430,7 +397,6 @@ internal HttpMessage CreateSuspendRequest(string subscriptionId, string resource uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); uri.AppendPath(dedicatedCapacityName, true); - uri.AppendPath("/suspend", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -438,57 +404,69 @@ internal HttpMessage CreateSuspendRequest(string subscriptionId, string resource return message; } - /// Suspends operation of the specified dedicated capacity instance. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// Gets details about the specified dedicated capacity. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task SuspendAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) + public async Task> GetDetailsAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateSuspendRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + DedicatedCapacityData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DedicatedCapacityData.DeserializeDedicatedCapacityData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DedicatedCapacityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Suspends operation of the specified dedicated capacity instance. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// Gets details about the specified dedicated capacity. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Suspend(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) + public Response GetDetails(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateSuspendRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + DedicatedCapacityData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DedicatedCapacityData.DeserializeDedicatedCapacityData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DedicatedCapacityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateResumeRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -498,16 +476,15 @@ internal RequestUriBuilder CreateResumeRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); uri.AppendPath(dedicatedCapacityName, true); - uri.AppendPath("/resume", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResumeRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -516,65 +493,72 @@ internal HttpMessage CreateResumeRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); uri.AppendPath(dedicatedCapacityName, true); - uri.AppendPath("/resume", false); 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; } - /// Resumes operation of the specified Dedicated capacity instance. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// Provisions the specified Dedicated capacity based on the configuration specified in the request. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// Contains the information used to provision the Dedicated capacity. /// 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 ResumeAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateResumeRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Resumes operation of the specified Dedicated capacity instance. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// Provisions the specified Dedicated capacity based on the configuration specified in the request. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// Contains the information used to provision the Dedicated capacity. /// 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 Resume(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateResumeRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -582,105 +566,117 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities", false); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + 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.PowerBIDedicated/capacities", false); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, 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; } - /// Gets all the Dedicated capacities for the given resource group. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Updates the current state of the specified Dedicated capacity. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// Request object that contains the updated information for the capacity. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - DedicatedCapacities value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets all the Dedicated capacities for the given resource group. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. + /// Updates the current state of the specified Dedicated capacity. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. + /// Request object that contains the updated information for the capacity. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, dedicatedCapacityName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - DedicatedCapacities value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -688,77 +684,87 @@ internal HttpMessage CreateListRequest(string subscriptionId) return message; } - /// Lists all the Dedicated capacities for the given subscription. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Deletes the specified Dedicated capacity. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - DedicatedCapacities value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists all the Dedicated capacities for the given subscription. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Deletes the specified Dedicated capacity. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - DedicatedCapacities value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DedicatedCapacities.DeserializeDedicatedCapacities(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListSkusRequestUri(string subscriptionId) + internal RequestUriBuilder CreateResumeRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/skus", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/resume", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListSkusRequest(string subscriptionId) + internal HttpMessage CreateResumeRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/skus", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/resume", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -766,51 +772,51 @@ internal HttpMessage CreateListSkusRequest(string subscriptionId) return message; } - /// Lists eligible SKUs for PowerBI Dedicated resource provider. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Resumes operation of the specified Dedicated capacity instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListSkusAsync(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResumeAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateListSkusRequest(subscriptionId); + using var message = CreateResumeRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - SkuEnumerationForNewResourceResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SkuEnumerationForNewResourceResult.DeserializeSkuEnumerationForNewResourceResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists eligible SKUs for PowerBI Dedicated resource provider. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Resumes operation of the specified Dedicated capacity instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListSkus(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Resume(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateListSkusRequest(subscriptionId); + using var message = CreateResumeRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - SkuEnumerationForNewResourceResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SkuEnumerationForNewResourceResult.DeserializeSkuEnumerationForNewResourceResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -853,9 +859,9 @@ internal HttpMessage CreateListSkusForCapacityRequest(string subscriptionId, str } /// Lists eligible SKUs for a PowerBI Dedicated resource. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -882,9 +888,9 @@ public async Task> ListSkusFor } /// Lists eligible SKUs for a PowerBI Dedicated resource. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. - /// The name of the Dedicated capacity. It must be at least 3 characters in length, and no more than 63. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -910,20 +916,22 @@ public Response ListSkusForCapacity(str } } - internal RequestUriBuilder CreateCheckNameAvailabilityRequestUri(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content) + internal RequestUriBuilder CreateSuspendRequestUri(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/checkNameAvailability", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/suspend", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content) + internal HttpMessage CreateSuspendRequest(string subscriptionId, string resourceGroupName, string dedicatedCapacityName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -932,71 +940,63 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.PowerBIDedicated/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/checkNameAvailability", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.PowerBIDedicated/capacities/", false); + uri.AppendPath(dedicatedCapacityName, true); + uri.AppendPath("/suspend", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Check the name availability in the target location. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The region name which the operation will lookup into. - /// The name of the capacity. + /// Suspends operation of the specified dedicated capacity instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task SuspendAsync(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); + using var message = CreateSuspendRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - CheckCapacityNameAvailabilityResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = CheckCapacityNameAvailabilityResult.DeserializeCheckCapacityNameAvailabilityResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Check the name availability in the target location. - /// A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The region name which the operation will lookup into. - /// The name of the capacity. + /// Suspends operation of the specified dedicated capacity instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the dedicated capacity. It must be a minimum of 3 characters, and a maximum of 63. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response CheckNameAvailability(string subscriptionId, AzureLocation location, CheckCapacityNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Suspend(string subscriptionId, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dedicatedCapacityName, nameof(dedicatedCapacityName)); - using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); + using var message = CreateSuspendRequest(subscriptionId, resourceGroupName, dedicatedCapacityName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - CheckCapacityNameAvailabilityResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = CheckCapacityNameAvailabilityResult.DeserializeCheckCapacityNameAvailabilityResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/autorest.md b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/autorest.md index 07bcd551b134..e09aba7b6bca 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/autorest.md +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: PowerBIDedicated namespace: Azure.ResourceManager.PowerBIDedicated -require: https://github.com/Azure/azure-rest-api-specs/blob/34ba022add0034e30462b76e1548ce5a7e053e33/specification/powerbidedicated/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/powerbidedicated/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/