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/Models/PowerBIClient.cs b/src/PowerBIEmbedded/PowerBI/Models/PowerBIClient.cs
index a2e712248913..e36d7aa999f3 100644
--- a/src/PowerBIEmbedded/PowerBI/Models/PowerBIClient.cs
+++ b/src/PowerBIEmbedded/PowerBI/Models/PowerBIClient.cs
@@ -203,7 +203,7 @@ private string GetResourceGroupByCapacity(string capacityName)
private ResourceSku GetResourceSkuFromName(string skuName)
{
- var tier = skuName.StartsWith("A") ? SkuTier.PBIEAzure : null;
+ var tier = skuName.StartsWith("A") ? SkuTier.PbieAzure : null;
return new ResourceSku(skuName, tier);
}
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..886295f00b7b
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperations.cs
@@ -0,0 +1,2493 @@
+// 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 System.Linq;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// CapacitiesOperations operations.
+ ///
+ internal partial class CapacitiesOperations : Microsoft.Rest.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");
+ }
+ this.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 System.Threading.Tasks.Task> GetDetailsWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetDetails", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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.
+ ///
+ public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task SuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginSuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task ResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.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 System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task> ListSkusWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListSkus", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task> ListSkusForCapacityWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListSkusForCapacity", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (capacityParameters == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityParameters");
+ }
+ if (capacityParameters != null)
+ {
+ capacityParameters.Validate();
+ }
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+
+ tracingParameters.Add("capacityParameters", capacityParameters);
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(capacityParameters, this.Client.SerializationSettings);
+ _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (capacityUpdateParameters == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityUpdateParameters");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+
+ tracingParameters.Add("capacityUpdateParameters", capacityUpdateParameters);
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(capacityUpdateParameters, this.Client.SerializationSettings);
+ _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 202)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginSuspend", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (resourceGroupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (dedicatedCapacityName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dedicatedCapacityName");
+ }
+ if (dedicatedCapacityName != null)
+ {
+ if (dedicatedCapacityName.Length > 63)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "dedicatedCapacityName", 63);
+ }
+ if (dedicatedCapacityName.Length < 3)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "dedicatedCapacityName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(dedicatedCapacityName, "^[a-z][a-z0-9]*$"))
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "dedicatedCapacityName", "^[a-z][a-z0-9]*$");
+ }
+ }
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ if (this.Client.SubscriptionId == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("dedicatedCapacityName", dedicatedCapacityName);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginResume", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.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(this.Client.SubscriptionId));
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ }
+}
\ No newline at end of file
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..d8edaa044692
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/CapacitiesOperationsExtensions.cs
@@ -0,0 +1,633 @@
+// 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.Azure;
+ using Models;
+
+ ///
+ /// 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 ((ICapacitiesOperations)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 System.Threading.Tasks.Task GetDetailsAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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.
+ ///
+ public static DedicatedCapacity Create(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters)
+ {
+ return ((ICapacitiesOperations)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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task CreateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.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)
+ {
+ ((ICapacitiesOperations)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 System.Threading.Tasks.Task DeleteAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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.
+ ///
+ public static DedicatedCapacity Update(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters)
+ {
+ return ((ICapacitiesOperations)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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task UpdateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.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)
+ {
+ ((ICapacitiesOperations)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 System.Threading.Tasks.Task SuspendAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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)
+ {
+ ((ICapacitiesOperations)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 System.Threading.Tasks.Task ResumeAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 System.Collections.Generic.IEnumerable ListByResourceGroup(this ICapacitiesOperations operations, string resourceGroupName)
+ {
+ return ((ICapacitiesOperations)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 System.Threading.Tasks.Task> ListByResourceGroupAsync(this ICapacitiesOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 System.Collections.Generic.IEnumerable List(this ICapacitiesOperations operations)
+ {
+ return ((ICapacitiesOperations)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 System.Threading.Tasks.Task> ListAsync(this ICapacitiesOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 ((ICapacitiesOperations)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 System.Threading.Tasks.Task ListSkusAsync(this ICapacitiesOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 ((ICapacitiesOperations)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 System.Threading.Tasks.Task ListSkusForCapacityAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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.
+ ///
+ public static DedicatedCapacity BeginCreate(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters)
+ {
+ return ((ICapacitiesOperations)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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task BeginCreateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.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)
+ {
+ ((ICapacitiesOperations)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 System.Threading.Tasks.Task BeginDeleteAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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.
+ ///
+ public static DedicatedCapacity BeginUpdate(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters)
+ {
+ return ((ICapacitiesOperations)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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task BeginUpdateAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.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)
+ {
+ ((ICapacitiesOperations)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 System.Threading.Tasks.Task BeginSuspendAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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)
+ {
+ ((ICapacitiesOperations)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 System.Threading.Tasks.Task BeginResumeAsync(this ICapacitiesOperations operations, string resourceGroupName, string dedicatedCapacityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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..704334d7c4ee
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/ICapacitiesOperations.cs
@@ -0,0 +1,428 @@
+// 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.Azure;
+ using Models;
+
+ ///
+ /// CapacitiesOperations operations.
+ ///
+ public partial interface ICapacitiesOperations
+ {
+ ///
+ /// Gets details about the specified dedicated capacity.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetDetailsWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task SuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task ResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets all the Dedicated capacities for the given resource group.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists all the Dedicated capacities for the given subscription.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists eligible SKUs for PowerBI Dedicated resource provider.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> ListSkusWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists eligible SKUs for a PowerBI Dedicated resource.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> ListSkusForCapacityWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Provisions the specified Dedicated capacity based on the configuration
+ /// specified in the request.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes the specified Dedicated capacity.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Updates the current state of the specified Dedicated capacity.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Suspends operation of the specified dedicated capacity instance.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Resumes operation of the specified Dedicated capacity instance.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ }
+}
\ No newline at end of file
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..2b2de69eab2b
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IOperations.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
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists all of the available PowerBIDedicated REST API operations.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ }
+}
\ No newline at end of file
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..1ff6e398525d
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/IPowerBIDedicatedManagementClient.cs
@@ -0,0 +1,85 @@
+// 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;
+
+ ///
+ /// 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.
+ ///
+ Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ Microsoft.Rest.ServiceClientCredentials Credentials { get;}
+
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion { 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 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; }
+
+ }
+}
\ No newline at end of file
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..fb8362d7f029
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacity.cs
@@ -0,0 +1,109 @@
+// 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 System.Linq;
+
+ ///
+ /// Represents an instance of a Dedicated Capacity resource.
+ ///
+ [Microsoft.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.
+ ///
+
+ /// An identifier that represents the PowerBI Dedicated resource.
+ ///
+
+ /// The name of the PowerBI Dedicated resource.
+ ///
+
+ /// The type of the PowerBI Dedicated resource.
+ ///
+
+ /// Location of the PowerBI Dedicated resource.
+ ///
+
+ /// The SKU of the PowerBI Dedicated resource.
+ ///
+
+ /// Key-value pairs of additional resource provisioning properties.
+ ///
+
+ /// 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'
+
+ /// A collection of Dedicated capacity administrators
+ ///
+ public DedicatedCapacity(string location, ResourceSku sku, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string state = default(string), string provisioningState = default(string), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators))
+
+ : base(location, sku, id, name, type, tags)
+ {
+ this.State = state;
+ this.ProvisioningState = provisioningState;
+ this.Administration = administration;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// 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'
+ ///
+ [Newtonsoft.Json.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'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState {get; private set; }
+
+ ///
+ /// Gets or sets a collection of Dedicated capacity administrators
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.administration")]
+ public DedicatedCapacityAdministrators Administration {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+
+
+
+ }
+ }
+}
\ No newline at end of file
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..0374dbb25953
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityAdministrators.cs
@@ -0,0 +1,48 @@
+// 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 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(System.Collections.Generic.IList members = default(System.Collections.Generic.IList))
+
+ {
+ this.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.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "members")]
+ public System.Collections.Generic.IList Members {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityMutableProperties.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityMutableProperties.cs
new file mode 100644
index 000000000000..61c435c77b48
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityMutableProperties.cs
@@ -0,0 +1,49 @@
+// 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 System.Linq;
+
+ ///
+ /// An object that represents a set of mutable Dedicated capacity resource
+ /// properties.
+ ///
+ public partial class DedicatedCapacityMutableProperties
+ {
+ ///
+ /// Initializes a new instance of the DedicatedCapacityMutableProperties class.
+ ///
+ public DedicatedCapacityMutableProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DedicatedCapacityMutableProperties class.
+ ///
+
+ /// A collection of Dedicated capacity administrators
+ ///
+ public DedicatedCapacityMutableProperties(DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators))
+
+ {
+ this.Administration = administration;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets a collection of Dedicated capacity administrators
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "administration")]
+ public DedicatedCapacityAdministrators Administration {get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityProperties.cs b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityProperties.cs
new file mode 100644
index 000000000000..ddecf52c4a8d
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityProperties.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 System.Linq;
+
+ ///
+ /// Properties of Dedicated Capacity resource.
+ ///
+ public partial class DedicatedCapacityProperties : DedicatedCapacityMutableProperties
+ {
+ ///
+ /// Initializes a new instance of the DedicatedCapacityProperties class.
+ ///
+ public DedicatedCapacityProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DedicatedCapacityProperties class.
+ ///
+
+ /// 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 DedicatedCapacityProperties(DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators), string state = default(string), string provisioningState = default(string))
+
+ : base(administration)
+ {
+ this.State = state;
+ this.ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// 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'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "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'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState {get; private set; }
+ }
+}
\ No newline at end of file
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..3f994e2d89b5
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/DedicatedCapacityUpdateParameters.cs
@@ -0,0 +1,84 @@
+// 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 System.Linq;
+
+ ///
+ /// Provision request specification
+ ///
+ [Microsoft.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), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), DedicatedCapacityAdministrators administration = default(DedicatedCapacityAdministrators))
+
+ {
+ this.Sku = sku;
+ this.Tags = tags;
+ this.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.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sku")]
+ public ResourceSku Sku {get; set; }
+
+ ///
+ /// Gets or sets key-value pairs of additional provisioning properties.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tags")]
+ public System.Collections.Generic.IDictionary Tags {get; set; }
+
+ ///
+ /// Gets or sets a collection of Dedicated capacity administrators
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "properties.administration")]
+ public DedicatedCapacityAdministrators Administration {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Sku != null)
+ {
+ this.Sku.Validate();
+ }
+
+
+ }
+ }
+}
\ No newline at end of file
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..de05400f242f
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponse.cs
@@ -0,0 +1,58 @@
+// 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 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))
+
+ {
+ this.Code = code;
+ this.Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets error code
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "code")]
+ public string Code {get; set; }
+
+ ///
+ /// Gets or sets error message indicating why the operation failed.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "message")]
+ public string Message {get; set; }
+ }
+}
\ No newline at end of file
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..07354b12e064
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ErrorResponseException.cs
@@ -0,0 +1,55 @@
+// 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
+{
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponse information.
+ ///
+ public partial class ErrorResponseException : Microsoft.Rest.RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public Microsoft.Rest.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 ErrorResponse class.
+ ///
+ /// The exception message.
+ public ErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
\ No newline at end of file
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..e2d10fe91357
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Operation.cs
@@ -0,0 +1,58 @@
+// 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 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))
+
+ {
+ this.Name = name;
+ this.Display = display;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets operation name: {provider}/{resource}/{operation}.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ public string Name {get; private set; }
+
+ ///
+ /// Gets or sets the object that represents the operation.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "display")]
+ public OperationDisplay Display {get; set; }
+ }
+}
\ No newline at end of file
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..2326292f4f55
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/OperationDisplay.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.Models
+{
+ 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))
+
+ {
+ this.Provider = provider;
+ this.Resource = resource;
+ this.Operation = operation;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets service provider: Microsoft.PowerBIDedicated.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "provider")]
+ public string Provider {get; private set; }
+
+ ///
+ /// Gets resource on which the operation is performed: capacity, etc.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "resource")]
+ public string Resource {get; private set; }
+
+ ///
+ /// Gets operation type: create, update, delete, etc.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "operation")]
+ public string Operation {get; private set; }
+ }
+}
\ No newline at end of file
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..2829c4caa207
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page.cs
@@ -0,0 +1,43 @@
+// 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 a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [Newtonsoft.Json.JsonObject]
+ public class Page : Microsoft.Rest.Azure.IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [Newtonsoft.Json.JsonProperty("")]
+ public System.String NextPageLink { get; private set; }
+
+ [Newtonsoft.Json.JsonProperty("value")]
+ private System.Collections.Generic.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 System.Collections.Generic.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.
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
\ No newline at end of file
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..d1a0445c554e
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Page1.cs
@@ -0,0 +1,43 @@
+// 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 a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [Newtonsoft.Json.JsonObject]
+ public class Page1 : Microsoft.Rest.Azure.IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [Newtonsoft.Json.JsonProperty("nextLink")]
+ public System.String NextPageLink { get; private set; }
+
+ [Newtonsoft.Json.JsonProperty("value")]
+ private System.Collections.Generic.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 System.Collections.Generic.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.
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
\ No newline at end of file
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..178cd04ec905
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ProvisioningState.cs
@@ -0,0 +1,29 @@
+// 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";
+ }
+}
\ No newline at end of file
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..5225afec8540
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/Resource.cs
@@ -0,0 +1,125 @@
+// 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 System.Linq;
+
+ ///
+ /// Represents an instance of an PowerBI Dedicated resource.
+ ///
+ public partial class Resource : Microsoft.Rest.Azure.IResource
+ {
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ public Resource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+
+ /// An identifier that represents the PowerBI Dedicated resource.
+ ///
+
+ /// The name of the PowerBI Dedicated resource.
+ ///
+
+ /// The type of the PowerBI Dedicated resource.
+ ///
+
+ /// Location of the PowerBI Dedicated resource.
+ ///
+
+ /// The SKU 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), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary))
+
+ {
+ this.Id = id;
+ this.Name = name;
+ this.Type = type;
+ this.Location = location;
+ this.Sku = sku;
+ this.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.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "id")]
+ public string Id {get; private set; }
+
+ ///
+ /// Gets the name of the PowerBI Dedicated resource.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ public string Name {get; private set; }
+
+ ///
+ /// Gets the type of the PowerBI Dedicated resource.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "type")]
+ public string Type {get; private set; }
+
+ ///
+ /// Gets or sets location of the PowerBI Dedicated resource.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "location")]
+ public string Location {get; set; }
+
+ ///
+ /// Gets or sets the SKU of the PowerBI Dedicated resource.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sku")]
+ public ResourceSku Sku {get; set; }
+
+ ///
+ /// Gets or sets key-value pairs of additional resource provisioning
+ /// properties.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tags")]
+ public System.Collections.Generic.IDictionary Tags {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Location == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location");
+ }
+ if (this.Sku == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Sku");
+ }
+
+
+
+
+ if (this.Sku != null)
+ {
+ this.Sku.Validate();
+ }
+
+ }
+ }
+}
\ No newline at end of file
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..c55ff5d4298b
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/ResourceSku.cs
@@ -0,0 +1,74 @@
+// 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 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))
+
+ {
+ this.Name = name;
+ this.Tier = tier;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+
+ ///
+ /// Gets or sets name of the SKU level.
+ ///
+ [Newtonsoft.Json.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'
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "tier")]
+ public string Tier {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Name == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name");
+ }
+
+
+ }
+ }
+}
\ No newline at end of file
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..c502568dc78d
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuDetailsForExistingResource.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 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))
+
+ {
+ this.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.
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "sku")]
+ public ResourceSku Sku {get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (this.Sku != null)
+ {
+ this.Sku.Validate();
+ }
+ }
+ }
+}
\ No newline at end of file
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..6835013669d8
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForExistingResourceResult.cs
@@ -0,0 +1,48 @@
+// 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 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(System.Collections.Generic.IList value = default(System.Collections.Generic.IList))
+
+ {
+ this.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
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "value")]
+ public System.Collections.Generic.IList Value {get; set; }
+ }
+}
\ No newline at end of file
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..14127ccd697e
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuEnumerationForNewResourceResult.cs
@@ -0,0 +1,48 @@
+// 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 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(System.Collections.Generic.IList value = default(System.Collections.Generic.IList))
+
+ {
+ this.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
+ ///
+ [Newtonsoft.Json.JsonProperty(PropertyName = "value")]
+ public System.Collections.Generic.IList Value {get; set; }
+ }
+}
\ No newline at end of file
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..db7638dfb8d0
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/SkuTier.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.
+// 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";
+ }
+}
\ No newline at end of file
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..ae8f38c3ab50
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Models/State.cs
@@ -0,0 +1,29 @@
+// 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";
+ }
+}
\ No newline at end of file
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..ea15f5c8f84e
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/Operations.cs
@@ -0,0 +1,401 @@
+// 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 System.Linq;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// Operations operations.
+ ///
+ internal partial class Operations : Microsoft.Rest.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");
+ }
+ this.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 System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+
+
+
+ if (this.Client.ApiVersion == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+
+ var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.PowerBIDedicated/operations").ToString();
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (this.Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.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 System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ if (nextPageLink == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
+ System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+
+
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+
+ System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new System.Net.Http.HttpRequestMessage();
+ System.Net.Http.HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (this.Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+
+ System.Net.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (Newtonsoft.Json.JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ }
+ catch (Newtonsoft.Json.JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+
+
+
+
+
+ }
+ }
+}
\ No newline at end of file
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..1b82fe96ac86
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/OperationsExtensions.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
+{
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// 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 Microsoft.Rest.Azure.IPage List(this IOperations operations)
+ {
+ return ((IOperations)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 System.Threading.Tasks.Task> ListAsync(this IOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 Microsoft.Rest.Azure.IPage ListNext(this IOperations operations, string nextPageLink)
+ {
+ return ((IOperations)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 System.Threading.Tasks.Task> ListNextAsync(this IOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.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..3126e0224b7d
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Generated/PowerBIDedicatedManagementClient.cs
@@ -0,0 +1,347 @@
+// 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 System.Linq;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+
+ ///
+ /// 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 : Microsoft.Rest.ServiceClient, IPowerBIDedicatedManagementClient, IAzureClient
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ public System.Uri BaseUri { get; set; }
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; }
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; }
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ public string ApiVersion { 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 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(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ this.Initialize();
+ }
+ ///
+ /// Initializes a new instance of the PowerBIDedicatedManagementClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected PowerBIDedicatedManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers)
+ {
+ this.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(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ this.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 System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ this.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, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+
+ this.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(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.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(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.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(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.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, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.BaseUri = baseUri;
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.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.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public PowerBIDedicatedManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ this.BaseUri = baseUri;
+ this.Credentials = credentials;
+ if (this.Credentials != null)
+ {
+ this.Credentials.InitializeServiceClient(this);
+ }
+
+ }
+ ///
+ /// An optional partial-method to perform custom initialization.
+ ///
+ partial void CustomInitialize();
+
+ ///
+ /// Initializes client properties.
+ ///
+ private void Initialize()
+ {
+ this.Capacities = new CapacitiesOperations(this);
+ this.Operations = new Operations(this);
+ this.BaseUri = new System.Uri("https://management.azure.com");
+ this.ApiVersion = "2017-10-01";
+ this.AcceptLanguage = "en-US";
+ this.LongRunningOperationRetryTimeout = 30;
+ this.GenerateClientRequestId = true;
+ SerializationSettings = new Newtonsoft.Json.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 Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
+ Converters = new System.Collections.Generic.List
+ {
+ new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
+ }
+ };
+ SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
+ DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings
+ {
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
+ Converters = new System.Collections.Generic.List
+ {
+ new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
+ }
+ };
+ CustomInitialize();
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
+ DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter());
+ }
+ }
+}
\ No newline at end of file
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..63a86fab14dd
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/README.md
@@ -0,0 +1,35 @@
+# Overall
+This directory contains PowerBI Dedicated management plane service clients of Az.PowerBIEmbedded module.
+
+## Run Generation
+In this directory, run AutoRest:
+```
+autorest --reset
+autorest --use:@autorest/powershell@4.x
+```
+
+### AutoRest Configuration
+> see https://aka.ms/autorest
+``` yaml
+isSdkGenerator: true
+powershell: true
+clear-output-folder: true
+reflect-api-versions: true
+openapi-type: arm
+azure-arm: true
+license-header: MICROSOFT_MIT_NO_VERSION
+title: PowerBIDedicatedManagementClient
+```
+
+
+
+###
+``` 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..361284517796
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IPowerBIEmbeddedManagementClient.cs
@@ -0,0 +1,107 @@
+// 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;
+
+ ///
+ /// 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.
+ ///
+ Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ Microsoft.Rest.ServiceClientCredentials Credentials { get;}
+
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion { 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;}
+
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// Indicates which operations can be performed by the Power BI 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
+ ///
+ System.Threading.Tasks.Task> GetAvailableOperationsWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ }
+}
\ No newline at end of file
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..12f2a8964a34
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspaceCollectionsOperations.cs
@@ -0,0 +1,312 @@
+// 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.Azure;
+ using Models;
+
+ ///
+ /// WorkspaceCollectionsOperations operations.
+ ///
+ public partial interface IWorkspaceCollectionsOperations
+ {
+ ///
+ /// Retrieves an existing Power BI Workspace Collection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetByNameWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.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.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, CreateWorkspaceCollectionRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Update an existing Power BI Workspace Collection with the specified
+ /// properties.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, UpdateWorkspaceCollectionRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Delete a Power BI Workspace Collection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Verify the specified Power BI Workspace Collection name is valid and not
+ /// already in use.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CheckNameAvailabilityWithHttpMessagesAsync(string location, CheckNameRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Retrieves all existing Power BI workspace collections in the specified
+ /// resource group.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Retrieves all existing Power BI workspace collections in the specified
+ /// subscription.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Retrieves the primary and secondary access keys for the specified Power BI
+ /// Workspace Collection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetAccessKeysWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Regenerates the primary or secondary access key for the specified Power BI
+ /// Workspace Collection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> RegenerateKeyWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, WorkspaceCollectionAccessKey body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Migrates an existing Power BI Workspace Collection to a different resource
+ /// group and/or subscription.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task MigrateWithHttpMessagesAsync(string resourceGroupName, MigrateWorkspaceCollectionRequest body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Delete a Power BI Workspace Collection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ }
+}
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspacesOperations.cs b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspacesOperations.cs
new file mode 100644
index 000000000000..c0c099869947
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/IWorkspacesOperations.cs
@@ -0,0 +1,45 @@
+// 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.Azure;
+ using Models;
+
+ ///
+ /// WorkspacesOperations operations.
+ ///
+ public partial interface IWorkspacesOperations
+ {
+ ///
+ /// Retrieves all existing Power BI workspaces in the specified workspace
+ /// collection.
+ ///
+ ///
+ /// Retrieves all existing Power BI workspaces in the specified 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceCollectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ }
+}
\ No newline at end of file
diff --git a/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/AccessKeyName.cs b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/AccessKeyName.cs
new file mode 100644
index 000000000000..3151fed94bca
--- /dev/null
+++ b/src/PowerBIEmbedded/PowerBIEmbedded.Management.Sdk/Generated/Models/AccessKeyName.cs
@@ -0,0 +1,51 @@
+// 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.Models
+{
+
+ ///