From 44a283a602576d3bf01f4909a7a9479eb1a6c64e Mon Sep 17 00:00:00 2001
From: JoyerJin <116236375+JoyerJin@users.noreply.github.com>
Date: Tue, 19 Nov 2024 17:54:30 +0800
Subject: [PATCH 1/3] generate PowerBIEmbedded and PowerBIDedicated SDK, add
project
remove package reference Microsoft.Azure.Management.PowerBIDedicated Version 0.11.0-preview
---
.../PowerBI.Test/PowerBI.Test.csproj | 2 +-
src/PowerBIEmbedded/PowerBI/PowerBI.csproj | 2 +-
.../Customizations/AzureCapacityClient.cs | 18 +
.../CustomCapacitiesOperations.cs | 151 ++
.../Generated/CapacitiesOperations.cs | 2355 +++++++++++++++++
.../CapacitiesOperationsExtensions.cs | 683 +++++
.../Generated/ICapacitiesOperations.cs | 423 +++
.../Generated/IOperations.cs | 68 +
.../IPowerBIDedicatedManagementClient.cs | 86 +
.../Generated/Models/DedicatedCapacity.cs | 113 +
.../Models/DedicatedCapacityAdministrators.cs | 56 +
.../DedicatedCapacityUpdateParameters.cs | 90 +
.../Generated/Models/ErrorResponse.cs | 60 +
.../Models/ErrorResponseException.cs | 62 +
.../Generated/Models/Operation.cs | 61 +
.../Generated/Models/OperationDisplay.cs | 70 +
.../Generated/Models/Page.cs | 53 +
.../Generated/Models/Page1.cs | 53 +
.../Generated/Models/ProvisioningState.cs | 32 +
.../Generated/Models/Resource.cs | 123 +
.../Generated/Models/ResourceSku.cs | 76 +
.../Models/SkuDetailsForExistingResource.cs | 67 +
...SkuEnumerationForExistingResourceResult.cs | 57 +
.../SkuEnumerationForNewResourceResult.cs | 56 +
.../Generated/Models/SkuTier.cs | 21 +
.../Generated/Models/State.cs | 32 +
.../Generated/Operations.cs | 390 +++
.../Generated/OperationsExtensions.cs | 87 +
.../PowerBIDedicatedManagementClient.cs | 369 +++
.../Generated/SdkInfo_PowerBIDedicated.cs | 28 +
.../PowerBIDedicated.Management.Sdk.csproj | 13 +
.../Properties/AssemblyInfo.cs | 29 +
.../PowerBIDedicated.Management.Sdk/README.md | 34 +
.../IPowerBIEmbeddedManagementClient.cs | 102 +
.../IWorkspaceCollectionsOperations.cs | 303 +++
.../Generated/IWorkspacesOperations.cs | 53 +
.../Generated/Models/AccessKeyName.cs | 60 +
.../Generated/Models/AzureSku.cs | 53 +
.../Generated/Models/CheckNameReason.cs | 22 +
.../Generated/Models/CheckNameRequest.cs | 56 +
.../Generated/Models/CheckNameResponse.cs | 73 +
.../CreateWorkspaceCollectionRequest.cs | 70 +
.../Generated/Models/Display.cs | 107 +
.../Generated/Models/Error.cs | 66 +
.../Generated/Models/ErrorDetail.cs | 58 +
.../Generated/Models/ErrorException.cs | 61 +
.../MigrateWorkspaceCollectionRequest.cs | 60 +
.../Generated/Models/Operation.cs | 58 +
.../Generated/Models/OperationList.cs | 48 +
.../Generated/Models/Page.cs | 53 +
.../UpdateWorkspaceCollectionRequest.cs | 62 +
.../Generated/Models/Workspace.cs | 72 +
.../Generated/Models/WorkspaceCollection.cs | 100 +
.../Models/WorkspaceCollectionAccessKey.cs | 51 +
.../Models/WorkspaceCollectionAccessKeys.cs | 58 +
.../PowerBIEmbeddedManagementClient.cs | 538 ++++
...werBIEmbeddedManagementClientExtensions.cs | 55 +
...SdkInfo_PowerBIEmbeddedManagementClient.cs | 30 +
.../WorkspaceCollectionsOperations.cs | 1978 ++++++++++++++
...orkspaceCollectionsOperationsExtensions.cs | 476 ++++
.../Generated/WorkspacesOperations.cs | 246 ++
.../WorkspacesOperationsExtensions.cs | 69 +
.../PowerBIEmbedded.Management.Sdk.csproj | 13 +
.../Properties/AssemblyInfo.cs | 29 +
.../PowerBIEmbedded.Management.Sdk/README.md | 34 +
src/PowerBIEmbedded/PowerBIEmbedded.sln | 40 +-
.../PowerBIEmbedded/Az.PowerBIEmbedded.psd1 | 4 +-
.../PowerBIEmbedded/PowerBIEmbedded.csproj | 6 +-
68 files changed, 10963 insertions(+), 21 deletions(-)
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/AzureCapacityClient.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/CustomCapacitiesOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperationsExtensions.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/ICapacitiesOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IPowerBIDedicatedManagementClient.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacity.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityAdministrators.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityUpdateParameters.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponse.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponseException.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Operation.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/OperationDisplay.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page1.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ProvisioningState.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Resource.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ResourceSku.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuDetailsForExistingResource.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForExistingResourceResult.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForNewResourceResult.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuTier.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/State.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Operations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/OperationsExtensions.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/PowerBIDedicatedManagementClient.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/SdkInfo_PowerBIDedicated.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/PowerBIDedicated.Management.Sdk.csproj
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Properties/AssemblyInfo.cs
create mode 100644 src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/README.md
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IPowerBIEmbeddedManagementClient.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspaceCollectionsOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspacesOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/AccessKeyName.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/AzureSku.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/CheckNameReason.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/CheckNameRequest.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/CheckNameResponse.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/CreateWorkspaceCollectionRequest.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/Display.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/Error.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/ErrorDetail.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/ErrorException.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/MigrateWorkspaceCollectionRequest.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/Operation.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/OperationList.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/Page.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/UpdateWorkspaceCollectionRequest.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/Workspace.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/WorkspaceCollection.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/WorkspaceCollectionAccessKey.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/WorkspaceCollectionAccessKeys.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/PowerBIEmbeddedManagementClient.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/PowerBIEmbeddedManagementClientExtensions.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/SdkInfo_PowerBIEmbeddedManagementClient.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/WorkspaceCollectionsOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/WorkspaceCollectionsOperationsExtensions.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/WorkspacesOperations.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/WorkspacesOperationsExtensions.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/PowerBIEmbedded.Management.Sdk.csproj
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Properties/AssemblyInfo.cs
create mode 100644 src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/README.md
diff --git a/src/PowerBIEmbedded/PowerBI.Test/PowerBI.Test.csproj b/src/PowerBIEmbedded/PowerBI.Test/PowerBI.Test.csproj
index 81ec54719790..6b64dbc746b2 100644
--- a/src/PowerBIEmbedded/PowerBI.Test/PowerBI.Test.csproj
+++ b/src/PowerBIEmbedded/PowerBI.Test/PowerBI.Test.csproj
@@ -11,7 +11,7 @@
-
+
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBI/PowerBI.csproj b/src/PowerBIEmbedded/PowerBI/PowerBI.csproj
index d3b52e1f33c0..4dc8697c24fe 100644
--- a/src/PowerBIEmbedded/PowerBI/PowerBI.csproj
+++ b/src/PowerBIEmbedded/PowerBI/PowerBI.csproj
@@ -12,11 +12,11 @@
-
+
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/AzureCapacityClient.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/AzureCapacityClient.cs
new file mode 100644
index 000000000000..3c0404096cb8
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/AzureCapacityClient.cs
@@ -0,0 +1,18 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+
+using System;
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ ///
+ public partial class PowerBIDedicatedManagementClient
+ {
+ partial void CustomInitialize()
+ {
+ // Override the capacities operations which includes override of UpdateWithHttpMessagesAsync to support non long running operation in case of OK response
+ this.Capacities = new CustomCapacitiesOperations(this.Capacities, this);
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/CustomCapacitiesOperations.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/CustomCapacitiesOperations.cs
new file mode 100644
index 000000000000..972bca10bce0
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/CustomCapacitiesOperations.cs
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+
+using Microsoft.Azure.Management.PowerBIDedicated.Models;
+using Microsoft.Rest.Azure;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ ///
+ /// Customize UpdateWithHttpMessagesAsync to skip LRO when response is OK. -- migration engineer
+ ///
+ public class CustomCapacitiesOperations : ICapacitiesOperations
+ {
+ private readonly ICapacitiesOperations innerCapacityOperations;
+ private readonly PowerBIDedicatedManagementClient client;
+
+ internal CustomCapacitiesOperations(ICapacitiesOperations inner, PowerBIDedicatedManagementClient client)
+ {
+ this.innerCapacityOperations = inner;
+ this.client = client;
+ }
+
+ public PowerBIDedicatedManagementClient Client => client;
+
+ ///
+ public async Task> GetDetailsWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .GetDetailsWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .CreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .DeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ /// Customize response return 200 skip LRO operation. -- migration engineer
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ if (_response.Response.StatusCode != System.Net.HttpStatusCode.OK)
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ return _response;
+ }
+
+ ///
+ public async Task SuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .SuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task ResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .ResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .ListWithHttpMessagesAsync(customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task> ListSkusWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .ListSkusWithHttpMessagesAsync(customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task> ListSkusForCapacityWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .ListSkusForCapacityWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .BeginCreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .BeginDeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .BeginUpdateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .BeginSuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ ///
+ public async Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return await innerCapacityOperations
+ .BeginResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken)
+ .ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperations.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperations.cs
new file mode 100644
index 000000000000..927c2afbfbe8
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperations.cs
@@ -0,0 +1,2355 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// CapacitiesOperations operations.
+ ///
+ internal partial class CapacitiesOperations : IServiceOperations, ICapacitiesOperations
+ {
+ ///
+ /// Initializes a new instance of the CapacitiesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal CapacitiesOperations(PowerBIDedicatedManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PowerBIDedicatedManagementClient
+ ///
+ public PowerBIDedicatedManagementClient Client { get; private set; }
+
+ ///
+ /// Gets details about the specified dedicated capacity.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetDetailsWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetDetails", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{dedicatedCapacityName}", System.Uri.EscapeDataString(dedicatedCapacityName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task SuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginSuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task ResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets all the Dedicated capacities for the given resource group.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists all the Dedicated capacities for the given subscription.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/capacities").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists eligible SKUs for PowerBI Dedicated resource provider.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> ListSkusWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListSkus", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/skus").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists eligible SKUs for a PowerBI Dedicated resource.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> ListSkusForCapacityWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListSkusForCapacity", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/skus").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{dedicatedCapacityName}", System.Uri.EscapeDataString(dedicatedCapacityName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (capacityParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "capacityParameters");
+ }
+ if (capacityParameters != null)
+ {
+ capacityParameters.Validate();
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+ tracingParameters.Add("capacityParameters", capacityParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{dedicatedCapacityName}", System.Uri.EscapeDataString(dedicatedCapacityName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(capacityParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(capacityParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{dedicatedCapacityName}", System.Uri.EscapeDataString(dedicatedCapacityName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (capacityUpdateParameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "capacityUpdateParameters");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+ tracingParameters.Add("capacityUpdateParameters", capacityUpdateParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{dedicatedCapacityName}", System.Uri.EscapeDataString(dedicatedCapacityName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(capacityUpdateParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(capacityUpdateParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 202)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginSuspend", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/suspend").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{dedicatedCapacityName}", System.Uri.EscapeDataString(dedicatedCapacityName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginResume", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}/resume").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{dedicatedCapacityName}", System.Uri.EscapeDataString(dedicatedCapacityName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperationsExtensions.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperationsExtensions.cs
new file mode 100644
index 000000000000..10a9a5f779ef
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperationsExtensions.cs
@@ -0,0 +1,683 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for CapacitiesOperations.
+ ///
+ public static partial class CapacitiesOperationsExtensions
+ {
+ ///
+ /// Gets details about the specified dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static DedicatedCapacity GetDetails(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ return operations.GetDetailsAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets details about the specified dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetDetailsAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetDetailsWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static DedicatedCapacity Create(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters)
+ {
+ return operations.CreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static void Delete(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ operations.DeleteAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task DeleteAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static DedicatedCapacity Update(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters)
+ {
+ return operations.UpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static void Suspend(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ operations.SuspendAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task SuspendAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.SuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static void Resume(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ operations.ResumeAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task ResumeAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.ResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Gets all the Dedicated capacities for the given resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static IEnumerable ListByResourceGroup(this ICapacitiesOperations operations, string resourceGroupName)
+ {
+ return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets all the Dedicated capacities for the given resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task> ListByResourceGroupAsync(this ICapacitiesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the Dedicated capacities for the given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IEnumerable List(this ICapacitiesOperations operations)
+ {
+ return operations.ListAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the Dedicated capacities for the given subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ICapacitiesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists eligible SKUs for PowerBI Dedicated resource provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static SkuEnumerationForNewResourceResult ListSkus(this ICapacitiesOperations operations)
+ {
+ return operations.ListSkusAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists eligible SKUs for PowerBI Dedicated resource provider.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListSkusAsync(this ICapacitiesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListSkusWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists eligible SKUs for a PowerBI Dedicated resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static SkuEnumerationForExistingResourceResult ListSkusForCapacity(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ return operations.ListSkusForCapacityAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists eligible SKUs for a PowerBI Dedicated resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task ListSkusForCapacityAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListSkusForCapacityWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static DedicatedCapacity BeginCreate(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters)
+ {
+ return operations.BeginCreateAsync(resourceGroupName, dedicatedCapacityName, capacityParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static void BeginDelete(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static DedicatedCapacity BeginUpdate(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters)
+ {
+ return operations.BeginUpdateAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpdateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static void BeginSuspend(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ operations.BeginSuspendAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task BeginSuspendAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginSuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static void BeginResume(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName)
+ {
+ operations.BeginResumeAsync(resourceGroupName, dedicatedCapacityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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 cancellation token.
+ ///
+ public static async Task BeginResumeAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/ICapacitiesOperations.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/ICapacitiesOperations.cs
new file mode 100644
index 000000000000..985174e0c941
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/ICapacitiesOperations.cs
@@ -0,0 +1,423 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// CapacitiesOperations operations.
+ ///
+ public partial interface ICapacitiesOperations
+ {
+ ///
+ /// Gets details about the specified dedicated capacity.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetDetailsWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Provisions the specified Dedicated capacity based on the
+ /// configuration specified in the request.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task SuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task ResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all the Dedicated capacities for the given resource group.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the Dedicated capacities for the given subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists eligible SKUs for PowerBI Dedicated resource provider.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> ListSkusWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists eligible SKUs for a PowerBI Dedicated resource.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> ListSkusForCapacityWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Provisions the specified Dedicated capacity based on the
+ /// configuration specified in the request.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IOperations.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IOperations.cs
new file mode 100644
index 000000000000..ba6a40caea46
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IOperations.cs
@@ -0,0 +1,68 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IPowerBIDedicatedManagementClient.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IPowerBIDedicatedManagementClient.cs
new file mode 100644
index 000000000000..46ceca37c946
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IPowerBIDedicatedManagementClient.cs
@@ -0,0 +1,86 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+
+ ///
+ /// PowerBI Dedicated Web API provides a RESTful set of web services that
+ /// enables users to create, retrieve, update, and delete Power BI
+ /// dedicated capacities
+ ///
+ public partial interface IPowerBIDedicatedManagementClient : System.IDisposable
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ ServiceClientCredentials Credentials { get; }
+
+ ///
+ /// A unique identifier for a Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// The client API version.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
+ ///
+ int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
+ ///
+ bool? GenerateClientRequestId { get; set; }
+
+
+ ///
+ /// Gets the ICapacitiesOperations.
+ ///
+ ICapacitiesOperations Capacities { get; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacity.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacity.cs
new file mode 100644
index 000000000000..0fec40850ab1
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacity.cs
@@ -0,0 +1,113 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Represents an instance of a Dedicated Capacity resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class DedicatedCapacity : Resource
+ {
+ ///
+ /// Initializes a new instance of the DedicatedCapacity class.
+ ///
+ public DedicatedCapacity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DedicatedCapacity class.
+ ///
+ /// Location of the PowerBI Dedicated
+ /// resource.
+ /// The SKU of the PowerBI Dedicated
+ /// resource.
+ /// An identifier that represents the PowerBI
+ /// Dedicated resource.
+ /// The name of the PowerBI Dedicated
+ /// resource.
+ /// The type of the PowerBI Dedicated
+ /// resource.
+ /// Key-value pairs of additional resource
+ /// provisioning properties.
+ /// A collection of Dedicated capacity
+ /// administrators
+ /// The current state of PowerBI Dedicated
+ /// resource. The state is to indicate more states outside of resource
+ /// provisioning. Possible values include: 'Deleting', 'Succeeded',
+ /// 'Failed', 'Paused', 'Suspended', 'Provisioning', 'Updating',
+ /// 'Suspending', 'Pausing', 'Resuming', 'Preparing', 'Scaling'
+ /// The current deployment state of
+ /// PowerBI Dedicatedresource. The provisioningState is to indicate
+ /// states for resource provisioning. Possible values include:
+ /// 'Deleting', 'Succeeded', 'Failed', 'Paused', 'Suspended',
+ /// 'Provisioning', 'Updating', 'Suspending', 'Pausing', 'Resuming',
+ /// 'Preparing', 'Scaling'
+ public DedicatedCapacity(string location, ResourceSku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators), string state = default(string), string provisioningState = default(string))
+ : base(location, sku, id, name, type, tags)
+ {
+ Administration = administration;
+ State = state;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets a collection of Dedicated capacity administrators
+ ///
+ [JsonProperty(PropertyName = "properties.administration")]
+ public DedicatedCapacityAdministrators Administration { get; set; }
+
+ ///
+ /// Gets the current state of PowerBI Dedicated resource. The state is
+ /// to indicate more states outside of resource provisioning. Possible
+ /// values include: 'Deleting', 'Succeeded', 'Failed', 'Paused',
+ /// 'Suspended', 'Provisioning', 'Updating', 'Suspending', 'Pausing',
+ /// 'Resuming', 'Preparing', 'Scaling'
+ ///
+ [JsonProperty(PropertyName = "properties.state")]
+ public string State { get; private set; }
+
+ ///
+ /// Gets the current deployment state of PowerBI Dedicatedresource. The
+ /// provisioningState is to indicate states for resource provisioning.
+ /// Possible values include: 'Deleting', 'Succeeded', 'Failed',
+ /// 'Paused', 'Suspended', 'Provisioning', 'Updating', 'Suspending',
+ /// 'Pausing', 'Resuming', 'Preparing', 'Scaling'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityAdministrators.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityAdministrators.cs
new file mode 100644
index 000000000000..0bb98597b459
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityAdministrators.cs
@@ -0,0 +1,56 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An array of administrator user identities
+ ///
+ public partial class DedicatedCapacityAdministrators
+ {
+ ///
+ /// Initializes a new instance of the DedicatedCapacityAdministrators
+ /// class.
+ ///
+ public DedicatedCapacityAdministrators()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DedicatedCapacityAdministrators
+ /// class.
+ ///
+ /// An array of administrator user
+ /// identities.
+ public DedicatedCapacityAdministrators(IList members = default(IList))
+ {
+ Members = members;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets an array of administrator user identities.
+ ///
+ [JsonProperty(PropertyName = "members")]
+ public IList Members { get; set; }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityUpdateParameters.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityUpdateParameters.cs
new file mode 100644
index 000000000000..72381dbcc672
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityUpdateParameters.cs
@@ -0,0 +1,90 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Provision request specification
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class DedicatedCapacityUpdateParameters
+ {
+ ///
+ /// Initializes a new instance of the DedicatedCapacityUpdateParameters
+ /// class.
+ ///
+ public DedicatedCapacityUpdateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DedicatedCapacityUpdateParameters
+ /// class.
+ ///
+ /// The SKU of the Dedicated capacity
+ /// resource.
+ /// Key-value pairs of additional provisioning
+ /// properties.
+ /// A collection of Dedicated capacity
+ /// administrators
+ public DedicatedCapacityUpdateParameters(ResourceSku sku = default(ResourceSku), IDictionary tags = default(IDictionary), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators))
+ {
+ Sku = sku;
+ Tags = tags;
+ Administration = administration;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the SKU of the Dedicated capacity resource.
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public ResourceSku Sku { get; set; }
+
+ ///
+ /// Gets or sets key-value pairs of additional provisioning properties.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets a collection of Dedicated capacity administrators
+ ///
+ [JsonProperty(PropertyName = "properties.administration")]
+ public DedicatedCapacityAdministrators Administration { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponse.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponse.cs
new file mode 100644
index 000000000000..cdecd42c60a4
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponse.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes the format of Error response.
+ ///
+ public partial class ErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ public ErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// Error code
+ /// Error message indicating why the operation
+ /// failed.
+ public ErrorResponse(string code = default(string), string message = default(string))
+ {
+ Code = code;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error code
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets error message indicating why the operation failed.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponseException.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponseException.cs
new file mode 100644
index 000000000000..cfd05966349c
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponseException.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponse
+ /// information.
+ ///
+ public partial class ErrorResponseException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public ErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ public ErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ public ErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Operation.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Operation.cs
new file mode 100644
index 000000000000..9b3aa76597e4
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Operation.cs
@@ -0,0 +1,61 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Capacities REST API operation.
+ ///
+ public partial class Operation
+ {
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ public Operation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ /// Operation name:
+ /// {provider}/{resource}/{operation}.
+ /// The object that represents the
+ /// operation.
+ public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay))
+ {
+ Name = name;
+ Display = display;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets operation name: {provider}/{resource}/{operation}.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets the object that represents the operation.
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationDisplay Display { get; set; }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/OperationDisplay.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/OperationDisplay.cs
new file mode 100644
index 000000000000..ab9378af4e1c
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/OperationDisplay.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object that represents the operation.
+ ///
+ public partial class OperationDisplay
+ {
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ public OperationDisplay()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ /// Service provider:
+ /// Microsoft.PowerBIDedicated.
+ /// Resource on which the operation is
+ /// performed: capacity, etc.
+ /// Operation type: create, update, delete,
+ /// etc.
+ public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string))
+ {
+ Provider = provider;
+ Resource = resource;
+ Operation = operation;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets service provider: Microsoft.PowerBIDedicated.
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; private set; }
+
+ ///
+ /// Gets resource on which the operation is performed: capacity, etc.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; private set; }
+
+ ///
+ /// Gets operation type: create, update, delete, etc.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; private set; }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page.cs
new file mode 100644
index 000000000000..e42e9a070292
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page1.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page1.cs
new file mode 100644
index 000000000000..b8b0151a7c29
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page1.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page1 : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("nextLink")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ProvisioningState.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ProvisioningState.cs
new file mode 100644
index 000000000000..7296bd306616
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ProvisioningState.cs
@@ -0,0 +1,32 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+
+ ///
+ /// Defines values for ProvisioningState.
+ ///
+ public static class ProvisioningState
+ {
+ public const string Deleting = "Deleting";
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ public const string Paused = "Paused";
+ public const string Suspended = "Suspended";
+ public const string Provisioning = "Provisioning";
+ public const string Updating = "Updating";
+ public const string Suspending = "Suspending";
+ public const string Pausing = "Pausing";
+ public const string Resuming = "Resuming";
+ public const string Preparing = "Preparing";
+ public const string Scaling = "Scaling";
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Resource.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Resource.cs
new file mode 100644
index 000000000000..b17cd1ef1108
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Resource.cs
@@ -0,0 +1,123 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Represents an instance of an PowerBI Dedicated resource.
+ ///
+ public partial class Resource : IResource
+ {
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ public Resource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ /// Location of the PowerBI Dedicated
+ /// resource.
+ /// The SKU of the PowerBI Dedicated
+ /// resource.
+ /// An identifier that represents the PowerBI
+ /// Dedicated resource.
+ /// The name of the PowerBI Dedicated
+ /// resource.
+ /// The type of the PowerBI Dedicated
+ /// resource.
+ /// Key-value pairs of additional resource
+ /// provisioning properties.
+ public Resource(string location, ResourceSku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Location = location;
+ Sku = sku;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets an identifier that represents the PowerBI Dedicated resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the PowerBI Dedicated resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of the PowerBI Dedicated resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets or sets location of the PowerBI Dedicated resource.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets the SKU of the PowerBI Dedicated resource.
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public ResourceSku Sku { get; set; }
+
+ ///
+ /// Gets or sets key-value pairs of additional resource provisioning
+ /// properties.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Location");
+ }
+ if (Sku == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
+ }
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ResourceSku.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ResourceSku.cs
new file mode 100644
index 000000000000..1518b79bdd06
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ResourceSku.cs
@@ -0,0 +1,76 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Represents the SKU name and Azure pricing tier for PowerBI Dedicated
+ /// resource.
+ ///
+ public partial class ResourceSku
+ {
+ ///
+ /// Initializes a new instance of the ResourceSku class.
+ ///
+ public ResourceSku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceSku class.
+ ///
+ /// Name of the SKU level.
+ /// The name of the Azure pricing tier to which the
+ /// SKU applies. Possible values include: 'PBIE_Azure'
+ public ResourceSku(string name, string tier = default(string))
+ {
+ Name = name;
+ Tier = tier;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the SKU level.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the name of the Azure pricing tier to which the SKU
+ /// applies. Possible values include: 'PBIE_Azure'
+ ///
+ [JsonProperty(PropertyName = "tier")]
+ public string Tier { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuDetailsForExistingResource.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuDetailsForExistingResource.cs
new file mode 100644
index 000000000000..4880d366e38e
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuDetailsForExistingResource.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An object that represents SKU details for existing resources
+ ///
+ public partial class SkuDetailsForExistingResource
+ {
+ ///
+ /// Initializes a new instance of the SkuDetailsForExistingResource
+ /// class.
+ ///
+ public SkuDetailsForExistingResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SkuDetailsForExistingResource
+ /// class.
+ ///
+ /// The SKU in SKU details for existing
+ /// resources.
+ public SkuDetailsForExistingResource(ResourceSku sku = default(ResourceSku))
+ {
+ Sku = sku;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the SKU in SKU details for existing resources.
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public ResourceSku Sku { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForExistingResourceResult.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForExistingResourceResult.cs
new file mode 100644
index 000000000000..5572990a3727
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForExistingResourceResult.cs
@@ -0,0 +1,57 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An object that represents enumerating SKUs for existing resources
+ ///
+ public partial class SkuEnumerationForExistingResourceResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// SkuEnumerationForExistingResourceResult class.
+ ///
+ public SkuEnumerationForExistingResourceResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// SkuEnumerationForExistingResourceResult class.
+ ///
+ /// The collection of available SKUs for existing
+ /// resources
+ public SkuEnumerationForExistingResourceResult(IList value = default(IList))
+ {
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the collection of available SKUs for existing
+ /// resources
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForNewResourceResult.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForNewResourceResult.cs
new file mode 100644
index 000000000000..540b0ee7e973
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForNewResourceResult.cs
@@ -0,0 +1,56 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An object that represents enumerating SKUs for new resources
+ ///
+ public partial class SkuEnumerationForNewResourceResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// SkuEnumerationForNewResourceResult class.
+ ///
+ public SkuEnumerationForNewResourceResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// SkuEnumerationForNewResourceResult class.
+ ///
+ /// The collection of available SKUs for new
+ /// resources
+ public SkuEnumerationForNewResourceResult(IList value = default(IList))
+ {
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the collection of available SKUs for new resources
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuTier.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuTier.cs
new file mode 100644
index 000000000000..f7af61d620d1
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuTier.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+
+ ///
+ /// Defines values for SkuTier.
+ ///
+ public static class SkuTier
+ {
+ public const string PBIEAzure = "PBIE_Azure";
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/State.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/State.cs
new file mode 100644
index 000000000000..962a375c909f
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/State.cs
@@ -0,0 +1,32 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated.Models
+{
+
+ ///
+ /// Defines values for State.
+ ///
+ public static class State
+ {
+ public const string Deleting = "Deleting";
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ public const string Paused = "Paused";
+ public const string Suspended = "Suspended";
+ public const string Provisioning = "Provisioning";
+ public const string Updating = "Updating";
+ public const string Suspending = "Suspending";
+ public const string Pausing = "Pausing";
+ public const string Resuming = "Resuming";
+ public const string Preparing = "Preparing";
+ public const string Scaling = "Scaling";
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Operations.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Operations.cs
new file mode 100644
index 000000000000..55c8c2176602
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Operations.cs
@@ -0,0 +1,390 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ internal partial class Operations : IServiceOperations, IOperations
+ {
+ ///
+ /// Initializes a new instance of the Operations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal Operations(PowerBIDedicatedManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the PowerBIDedicatedManagementClient
+ ///
+ public PowerBIDedicatedManagementClient Client { get; private set; }
+
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.PowerBIDedicated/operations").ToString();
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/OperationsExtensions.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/OperationsExtensions.cs
new file mode 100644
index 000000000000..ffbe0b160963
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/OperationsExtensions.cs
@@ -0,0 +1,87 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for Operations.
+ ///
+ public static partial class OperationsExtensions
+ {
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IPage List(this IOperations operations)
+ {
+ return operations.ListAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/PowerBIDedicatedManagementClient.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/PowerBIDedicatedManagementClient.cs
new file mode 100644
index 000000000000..17b1a7f0c261
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/PowerBIDedicatedManagementClient.cs
@@ -0,0 +1,369 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Serialization;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+
+ ///
+ /// PowerBI Dedicated Web API provides a RESTful set of web services that
+ /// enables users to create, retrieve, update, and delete Power BI
+ /// dedicated capacities
+ ///
+ public partial class PowerBIDedicatedManagementClient : ServiceClient, IPowerBIDedicatedManagementClient, IAzureClient
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ public System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ public JsonSerializerSettings SerializationSettings { get; private set; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ public JsonSerializerSettings DeserializationSettings { get; private set; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ public ServiceClientCredentials Credentials { get; private set; }
+
+ ///
+ /// A unique identifier for a Microsoft Azure subscription. The subscription ID
+ /// forms part of the URI for every service call.
+ ///
+ public string SubscriptionId { get; set; }
+
+ ///
+ /// The client API version.
+ ///
+ public string ApiVersion { get; private set; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ public string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default value is
+ /// 30.
+ ///
+ public int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When set to
+ /// true a unique x-ms-client-request-id value is generated and included in
+ /// each request. Default is true.
+ ///
+ public bool? GenerateClientRequestId { get; set; }
+
+ ///
+ /// Gets the ICapacitiesOperations.
+ ///
+ public virtual ICapacitiesOperations Capacities { get; private set; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ public virtual IOperations Operations { get; private set; }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling PowerBIDedicatedManagementClient.Dispose(). False: will not dispose provided httpClient
+ protected PowerBIDedicatedManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected PowerBIDedicatedManagementClient(params DelegatingHandler[] handlers) : base(handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected PowerBIDedicatedManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected PowerBIDedicatedManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected PowerBIDedicatedManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public PowerBIDedicatedManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling PowerBIDedicatedManagementClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public PowerBIDedicatedManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public PowerBIDedicatedManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public PowerBIDedicatedManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public PowerBIDedicatedManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// An optional partial-method to perform custom initialization.
+ ///
+ partial void CustomInitialize();
+ ///
+ /// Initializes client properties.
+ ///
+ private void Initialize()
+ {
+ Capacities = new CapacitiesOperations(this);
+ Operations = new Operations(this);
+ BaseUri = new System.Uri("https://management.azure.com");
+ ApiVersion = "2017-10-01";
+ AcceptLanguage = "en-US";
+ LongRunningOperationRetryTimeout = 30;
+ GenerateClientRequestId = true;
+ SerializationSettings = new JsonSerializerSettings
+ {
+ Formatting = Newtonsoft.Json.Formatting.Indented,
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ SerializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings = new JsonSerializerSettings
+ {
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ CustomInitialize();
+ DeserializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/SdkInfo_PowerBIDedicated.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/SdkInfo_PowerBIDedicated.cs
new file mode 100644
index 000000000000..29cefc19f816
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/SdkInfo_PowerBIDedicated.cs
@@ -0,0 +1,28 @@
+
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIDedicated
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ internal static partial class SdkInfo
+ {
+ public static IEnumerable> ApiInfo_PowerBIDedicated
+ {
+ get
+ {
+ return new Tuple[]
+ {
+ new Tuple("PowerBIDedicated", "Capacities", "2017-10-01"),
+ new Tuple("PowerBIDedicated", "Operations", "2017-10-01"),
+ }.AsEnumerable();
+ }
+ }
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/PowerBIDedicated.Management.Sdk.csproj b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/PowerBIDedicated.Management.Sdk.csproj
new file mode 100644
index 000000000000..35cc77b468b4
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/PowerBIDedicated.Management.Sdk.csproj
@@ -0,0 +1,13 @@
+
+
+ PowerBIEmbedded
+
+
+
+ netstandard2.0
+ Microsoft.Azure.PowerShell.PowerBIDedicated.Management.Sdk
+ Microsoft.Azure.Management.PowerBIDedicated
+ $(NoWarn);CS0108;CS1573
+
+
+
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Properties/AssemblyInfo.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..d0e85ec29ad8
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Microsoft Azure Powershell - PowerBI Dedicated Management SDK")]
+[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
+[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
+[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+
+[assembly: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+
+[assembly: AssemblyVersion("0.11.0.0")]
+[assembly: AssemblyFileVersion("0.11.0.0")]
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/README.md b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/README.md
new file mode 100644
index 000000000000..ab2b0a948e32
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/README.md
@@ -0,0 +1,34 @@
+# Overall
+This directory contains management plane service clients of Az.Storage module.
+
+## Run Generation
+In this directory, run AutoRest:
+```
+autorest --reset
+autorest --use:@microsoft.azure/autorest.csharp@2.3.90
+autorest.cmd README.md --version=v2
+```
+
+### AutoRest Configuration
+> see https://aka.ms/autorest
+``` yaml
+csharp: true
+clear-output-folder: true
+reflect-api-versions: true
+openapi-type: arm
+azure-arm: true
+license-header: MICROSOFT_MIT_NO_VERSION
+```
+
+
+
+###
+``` yaml
+commit: d2bb2feadd0deb1c7212706aa65cab2f56adccc7
+input-file:
+ - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json
+
+output-folder: Generated
+
+namespace: Microsoft.Azure.Management.PowerBIDedicated
+```
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IPowerBIEmbeddedManagementClient.cs b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IPowerBIEmbeddedManagementClient.cs
new file mode 100644
index 000000000000..88d97ae56e31
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IPowerBIEmbeddedManagementClient.cs
@@ -0,0 +1,102 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIEmbedded
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Client to manage your Power BI Embedded workspace collections and
+ /// retrieve workspaces.
+ ///
+ public partial interface IPowerBIEmbeddedManagementClient : System.IDisposable
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ ServiceClientCredentials Credentials { get; }
+
+ ///
+ /// Gets subscription credentials which uniquely identify a Microsoft
+ /// Azure subscription. The subscription ID forms part of the URI for
+ /// every service call.
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// Client Api Version.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
+ ///
+ int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
+ ///
+ bool? GenerateClientRequestId { get; set; }
+
+
+ ///
+ /// Gets the IWorkspaceCollectionsOperations.
+ ///
+ IWorkspaceCollectionsOperations WorkspaceCollections { get; }
+
+ ///
+ /// Gets the IWorkspacesOperations.
+ ///
+ IWorkspacesOperations Workspaces { get; }
+
+ ///
+ /// Indicates which operations can be performed by the Power BI
+ /// Resource Provider.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ Task> GetAvailableOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ }
+}
diff --git a/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspaceCollectionsOperations.cs b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspaceCollectionsOperations.cs
new file mode 100644
index 000000000000..147603d35988
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspaceCollectionsOperations.cs
@@ -0,0 +1,303 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.PowerBIEmbedded
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// WorkspaceCollectionsOperations operations.
+ ///
+ public partial interface IWorkspaceCollectionsOperations
+ {
+ ///
+ /// Retrieves an existing Power BI Workspace Collection.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// Power BI Embedded Workspace Collection name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetByNameWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a new Power BI Workspace Collection with the specified
+ /// properties. A Power BI Workspace Collection contains one or more
+ /// workspaces, and can be used to provision keys that provide API
+ /// access to those workspaces.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// Power BI Embedded Workspace Collection name
+ ///
+ ///
+ /// Create workspace collection request
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, CreateWorkspaceCollectionRequest body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update an existing Power BI Workspace Collection with the specified
+ /// properties.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// Power BI Embedded Workspace Collection name
+ ///
+ ///
+ /// Update workspace collection request
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, UpdateWorkspaceCollectionRequest body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a Power BI Workspace Collection.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// Power BI Embedded Workspace Collection name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Verify the specified Power BI Workspace Collection name is valid
+ /// and not already in use.
+ ///
+ ///
+ /// Azure location
+ ///
+ ///
+ /// Check name availability request
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CheckNameAvailabilityWithHttpMessagesAsync(string location, CheckNameRequest body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves all existing Power BI workspace collections in the
+ /// specified resource group.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves all existing Power BI workspace collections in the
+ /// specified subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves the primary and secondary access keys for the specified
+ /// Power BI Workspace Collection.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// Power BI Embedded Workspace Collection name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetAccessKeysWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Regenerates the primary or secondary access key for the specified
+ /// Power BI Workspace Collection.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// Power BI Embedded Workspace Collection name
+ ///
+ ///
+ /// Access key to regenerate
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> RegenerateKeyWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, WorkspaceCollectionAccessKey body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Migrates an existing Power BI Workspace Collection to a different
+ /// resource group and/or subscription.
+ ///
+ ///
+ /// Azure resource group
+ ///
+ ///
+ /// Workspace migration request
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task MigrateWithHttpMessagesAsync(string resourceGroupName, MigrateWorkspaceCollectionRequest body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///