forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.NET SDK Resource Provider:'Billing' (Azure#5682)
REST Spec PR 'Azure/azure-rest-api-specs#5546' REST Spec PR Author 'asarkar84' REST Spec PR Last commit
- Loading branch information
Showing
18 changed files
with
1,755 additions
and
322 deletions.
There are no files selected for viewing
433 changes: 433 additions & 0 deletions
433
src/SDKs/Billing/Management.Billing/Generated/AgreementsOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
111 changes: 111 additions & 0 deletions
111
src/SDKs/Billing/Management.Billing/Generated/AgreementsOperationsExtensions.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,111 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.Billing | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Extension methods for AgreementsOperations. | ||
/// </summary> | ||
public static partial class AgreementsOperationsExtensions | ||
{ | ||
/// <summary> | ||
/// Lists all agreements for a billing account. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='billingAccountName'> | ||
/// billing Account Id. | ||
/// </param> | ||
/// <param name='expand'> | ||
/// May be used to expand the participants. | ||
/// </param> | ||
public static AgreementListResult ListByBillingAccountName(this IAgreementsOperations operations, string billingAccountName, string expand = default(string)) | ||
{ | ||
return operations.ListByBillingAccountNameAsync(billingAccountName, expand).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Lists all agreements for a billing account. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='billingAccountName'> | ||
/// billing Account Id. | ||
/// </param> | ||
/// <param name='expand'> | ||
/// May be used to expand the participants. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<AgreementListResult> ListByBillingAccountNameAsync(this IAgreementsOperations operations, string billingAccountName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.ListByBillingAccountNameWithHttpMessagesAsync(billingAccountName, expand, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Get the agreement by name. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='billingAccountName'> | ||
/// billing Account Id. | ||
/// </param> | ||
/// <param name='agreementName'> | ||
/// Agreement Id. | ||
/// </param> | ||
/// <param name='expand'> | ||
/// May be used to expand the participants. | ||
/// </param> | ||
public static Agreement Get(this IAgreementsOperations operations, string billingAccountName, string agreementName, string expand = default(string)) | ||
{ | ||
return operations.GetAsync(billingAccountName, agreementName, expand).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Get the agreement by name. | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='billingAccountName'> | ||
/// billing Account Id. | ||
/// </param> | ||
/// <param name='agreementName'> | ||
/// Agreement Id. | ||
/// </param> | ||
/// <param name='expand'> | ||
/// May be used to expand the participants. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<Agreement> GetAsync(this IAgreementsOperations operations, string billingAccountName, string agreementName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, agreementName, expand, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
} | ||
} |
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
Oops, something went wrong.