forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PowerBIEmbedded] Removed "Microsoft.Azure.Management.PowerBIEmbedded…
…" and "Microsoft.Azure.Management.PowerBIDedicated" PackageReference (Azure#26738) * generate PowerBIEmbedded and PowerBIDedicated SDK, add project remove package reference Microsoft.Azure.Management.PowerBIDedicated Version 0.11.0-preview * generated migration csharp to powershell * PowerBIEmbedded change log
- Loading branch information
Showing
72 changed files
with
11,067 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/PowerBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/AzureCapacityClient.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <inheritdoc/> | ||
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); | ||
} | ||
} | ||
} |
151 changes: 151 additions & 0 deletions
151
...erBIEmbedded/PowerBIDedicated.Management.Sdk/Customizations/CustomCapacitiesOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// Customize UpdateWithHttpMessagesAsync to skip LRO when response is OK. -- migration engineer | ||
/// </summary> | ||
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; | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<DedicatedCapacity>> GetDetailsWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.GetDetailsWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<DedicatedCapacity>> CreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.CreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.DeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
/// Customize response return 200 skip LRO operation. -- migration engineer | ||
public async Task<AzureOperationResponse<DedicatedCapacity>> UpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
AzureOperationResponse<DedicatedCapacity> _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; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<Microsoft.Rest.Azure.AzureOperationResponse> SuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.SuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<Microsoft.Rest.Azure.AzureOperationResponse> ResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.ResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<IEnumerable<DedicatedCapacity>>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<IEnumerable<DedicatedCapacity>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.ListWithHttpMessagesAsync(customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<SkuEnumerationForNewResourceResult>> ListSkusWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.ListSkusWithHttpMessagesAsync(customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<SkuEnumerationForExistingResourceResult>> ListSkusForCapacityWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.ListSkusForCapacityWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<DedicatedCapacity>> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacity capacityParameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.BeginCreateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityParameters, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.BeginDeleteWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<AzureOperationResponse<DedicatedCapacity>> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, DedicatedCapacityUpdateParameters capacityUpdateParameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.BeginUpdateWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, capacityUpdateParameters, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.BeginSuspendWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public async Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginResumeWithHttpMessagesAsync(string resourceGroupName, string dedicatedCapacityName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
return await innerCapacityOperations | ||
.BeginResumeWithHttpMessagesAsync(resourceGroupName, dedicatedCapacityName, customHeaders, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
} | ||
} |
Oops, something went wrong.