forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR Microsoft.Azure.Management.CostManagement] Supporting Managem…
…ent Group scope for Exports (#94) * Update swagger_to_sdk_config.json * Update swagger_to_sdk_config.json * Update swagger_to_sdk_config.json * Update swagger_to_sdk_config.json * Generated from 967f9659d62a831649ef83f6a52cf2e35dbb87bd Fixed model validation
- Loading branch information
1 parent
514a6fd
commit 2c86c56
Showing
52 changed files
with
8,141 additions
and
0 deletions.
There are no files selected for viewing
673 changes: 673 additions & 0 deletions
673
...st-management/Microsoft.Azure.Management.CostManagement/src/Generated/BudgetOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
248 changes: 248 additions & 0 deletions
248
...ent/Microsoft.Azure.Management.CostManagement/src/Generated/BudgetOperationsExtensions.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,248 @@ | ||
// <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.CostManagement | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Extension methods for BudgetOperations. | ||
/// </summary> | ||
public static partial class BudgetOperationsExtensions | ||
{ | ||
/// <summary> | ||
/// Gets the budget for the scope by budget name. | ||
/// <see href="https://docs.microsoft.com/en-us/rest/api/cost-management/" /> | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// The scope associated with budget operations. This includes | ||
/// '/subscriptions/{subscriptionId}/' for subscription scope, | ||
/// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for | ||
/// resourceGroup scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for | ||
/// Billing Account scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' | ||
/// for Department scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' | ||
/// for EnrollmentAccount scope, | ||
/// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for | ||
/// Management Group scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' | ||
/// for billingProfile scope, | ||
/// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' | ||
/// for invoiceSection scope. | ||
/// </param> | ||
/// <param name='budgetName'> | ||
/// Budget Name. | ||
/// </param> | ||
public static BudgetModel Get(this IBudgetOperations operations, string scope, string budgetName) | ||
{ | ||
return operations.GetAsync(scope, budgetName).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the budget for the scope by budget name. | ||
/// <see href="https://docs.microsoft.com/en-us/rest/api/cost-management/" /> | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// The scope associated with budget operations. This includes | ||
/// '/subscriptions/{subscriptionId}/' for subscription scope, | ||
/// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for | ||
/// resourceGroup scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for | ||
/// Billing Account scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' | ||
/// for Department scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' | ||
/// for EnrollmentAccount scope, | ||
/// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for | ||
/// Management Group scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' | ||
/// for billingProfile scope, | ||
/// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' | ||
/// for invoiceSection scope. | ||
/// </param> | ||
/// <param name='budgetName'> | ||
/// Budget Name. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<BudgetModel> GetAsync(this IBudgetOperations operations, string scope, string budgetName, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.GetWithHttpMessagesAsync(scope, budgetName, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The operation to create or update a budget. Update operation requires | ||
/// latest eTag to be set in the request mandatorily. You may obtain the latest | ||
/// eTag by performing a get operation. Create operation does not require eTag. | ||
/// <see href="https://docs.microsoft.com/en-us/rest/api/cost-management/" /> | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// The scope associated with budget operations. This includes | ||
/// '/subscriptions/{subscriptionId}/' for subscription scope, | ||
/// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for | ||
/// resourceGroup scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for | ||
/// Billing Account scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' | ||
/// for Department scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' | ||
/// for EnrollmentAccount scope, | ||
/// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for | ||
/// Management Group scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' | ||
/// for billingProfile scope, | ||
/// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' | ||
/// for invoiceSection scope. | ||
/// </param> | ||
/// <param name='budgetName'> | ||
/// Budget Name. | ||
/// </param> | ||
/// <param name='parameters'> | ||
/// Parameters supplied to the Create Budget operation. | ||
/// </param> | ||
public static BudgetModel CreateOrUpdate(this IBudgetOperations operations, string scope, string budgetName, BudgetModel parameters = default(BudgetModel)) | ||
{ | ||
return operations.CreateOrUpdateAsync(scope, budgetName, parameters).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// The operation to create or update a budget. Update operation requires | ||
/// latest eTag to be set in the request mandatorily. You may obtain the latest | ||
/// eTag by performing a get operation. Create operation does not require eTag. | ||
/// <see href="https://docs.microsoft.com/en-us/rest/api/cost-management/" /> | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// The scope associated with budget operations. This includes | ||
/// '/subscriptions/{subscriptionId}/' for subscription scope, | ||
/// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for | ||
/// resourceGroup scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for | ||
/// Billing Account scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' | ||
/// for Department scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' | ||
/// for EnrollmentAccount scope, | ||
/// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for | ||
/// Management Group scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' | ||
/// for billingProfile scope, | ||
/// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' | ||
/// for invoiceSection scope. | ||
/// </param> | ||
/// <param name='budgetName'> | ||
/// Budget Name. | ||
/// </param> | ||
/// <param name='parameters'> | ||
/// Parameters supplied to the Create Budget operation. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<BudgetModel> CreateOrUpdateAsync(this IBudgetOperations operations, string scope, string budgetName, BudgetModel parameters = default(BudgetModel), CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, budgetName, parameters, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The operation to delete a budget. | ||
/// <see href="https://docs.microsoft.com/en-us/rest/api/cost-management/" /> | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// The scope associated with budget operations. This includes | ||
/// '/subscriptions/{subscriptionId}/' for subscription scope, | ||
/// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for | ||
/// resourceGroup scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for | ||
/// Billing Account scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' | ||
/// for Department scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' | ||
/// for EnrollmentAccount scope, | ||
/// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for | ||
/// Management Group scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' | ||
/// for billingProfile scope, | ||
/// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' | ||
/// for invoiceSection scope. | ||
/// </param> | ||
/// <param name='budgetName'> | ||
/// Budget Name. | ||
/// </param> | ||
public static void Delete(this IBudgetOperations operations, string scope, string budgetName) | ||
{ | ||
operations.DeleteAsync(scope, budgetName).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// The operation to delete a budget. | ||
/// <see href="https://docs.microsoft.com/en-us/rest/api/cost-management/" /> | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// The scope associated with budget operations. This includes | ||
/// '/subscriptions/{subscriptionId}/' for subscription scope, | ||
/// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for | ||
/// resourceGroup scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for | ||
/// Billing Account scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' | ||
/// for Department scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' | ||
/// for EnrollmentAccount scope, | ||
/// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for | ||
/// Management Group scope, | ||
/// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' | ||
/// for billingProfile scope, | ||
/// 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' | ||
/// for invoiceSection scope. | ||
/// </param> | ||
/// <param name='budgetName'> | ||
/// Budget Name. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task DeleteAsync(this IBudgetOperations operations, string scope, string budgetName, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
(await operations.DeleteWithHttpMessagesAsync(scope, budgetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.