diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AddressOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AddressOperations.cs
new file mode 100644
index 0000000000000..39dd36a238d12
--- /dev/null
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AddressOperations.cs
@@ -0,0 +1,235 @@
+//
+// 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.Billing
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// AddressOperations operations.
+ ///
+ internal partial class AddressOperations : IServiceOperations, IAddressOperations
+ {
+ ///
+ /// Initializes a new instance of the AddressOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal AddressOperations(BillingManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the BillingManagementClient
+ ///
+ public BillingManagementClient Client { get; private set; }
+
+ ///
+ /// Validates the address.
+ ///
+ ///
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> ValidateWithHttpMessagesAsync(AddressDetails address, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (address == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "address");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("address", address);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/validateAddress").ToString();
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(address != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(address, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AddressOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AddressOperationsExtensions.cs
new file mode 100644
index 0000000000000..c0e8399bdcc2c
--- /dev/null
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AddressOperationsExtensions.cs
@@ -0,0 +1,57 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Billing
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for AddressOperations.
+ ///
+ public static partial class AddressOperationsExtensions
+ {
+ ///
+ /// Validates the address.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ ///
+ public static ValidateAddressResponse Validate(this IAddressOperations operations, AddressDetails address)
+ {
+ return operations.ValidateAsync(address).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Validates the address.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ValidateAsync(this IAddressOperations operations, AddressDetails address, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ValidateWithHttpMessagesAsync(address, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperations.cs
index b7bfd8dccd112..355ab9591a9b8 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperations.cs
@@ -80,7 +80,7 @@ internal AgreementsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByBillingAccountWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -100,7 +100,7 @@ internal AgreementsOperations(BillingManagementClient client)
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperationsExtensions.cs
index 2657b2b3af171..459d373677610 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperationsExtensions.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/AgreementsOperationsExtensions.cs
@@ -33,9 +33,9 @@ public static partial class AgreementsOperationsExtensions
///
/// May be used to expand the participants.
///
- public static AgreementListResult ListByBillingAccountName(this IAgreementsOperations operations, string billingAccountName, string expand = default(string))
+ public static AgreementListResult ListByBillingAccount(this IAgreementsOperations operations, string billingAccountName, string expand = default(string))
{
- return operations.ListByBillingAccountNameAsync(billingAccountName, expand).GetAwaiter().GetResult();
+ return operations.ListByBillingAccountAsync(billingAccountName, expand).GetAwaiter().GetResult();
}
///
@@ -53,9 +53,9 @@ public static partial class AgreementsOperationsExtensions
///
/// The cancellation token.
///
- public static async Task ListByBillingAccountNameAsync(this IAgreementsOperations operations, string billingAccountName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByBillingAccountAsync(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))
+ using (var _result = await operations.ListByBillingAccountWithHttpMessagesAsync(billingAccountName, expand, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperations.cs
index 1d076d68748bf..e4b1b16addf6c 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperations.cs
@@ -54,7 +54,7 @@ internal BillingAccountsOperations(BillingManagementClient client)
/// Lists all billing accounts for a user which he has access to.
///
///
- /// May be used to expand the invoiceSections and billingProfiles.
+ /// May be used to expand the address, invoiceSections and billingProfiles.
///
///
/// Headers that will be added to request.
@@ -233,7 +233,7 @@ internal BillingAccountsOperations(BillingManagementClient client)
/// billing Account Id.
///
///
- /// May be used to expand the invoiceSections and billingProfiles.
+ /// May be used to expand the address, invoiceSections and billingProfiles.
///
///
/// Headers that will be added to request.
@@ -411,5 +411,218 @@ internal BillingAccountsOperations(BillingManagementClient client)
return _result;
}
+ ///
+ /// The operation to update a billing account.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Request parameters supplied to the update billing account operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string billingAccountName, BillingAccountUpdateRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(billingAccountName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// The operation to update a billing account.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Request parameters supplied to the update billing account operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginUpdateWithHttpMessagesAsync(string billingAccountName, BillingAccountUpdateRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (billingAccountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}").ToString();
+ _url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperationsExtensions.cs
index ba67081d83811..073c2a3f17fec 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperationsExtensions.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingAccountsOperationsExtensions.cs
@@ -28,7 +28,7 @@ public static partial class BillingAccountsOperationsExtensions
/// The operations group for this extension method.
///
///
- /// May be used to expand the invoiceSections and billingProfiles.
+ /// May be used to expand the address, invoiceSections and billingProfiles.
///
public static BillingAccountListResult List(this IBillingAccountsOperations operations, string expand = default(string))
{
@@ -42,7 +42,7 @@ public static partial class BillingAccountsOperationsExtensions
/// The operations group for this extension method.
///
///
- /// May be used to expand the invoiceSections and billingProfiles.
+ /// May be used to expand the address, invoiceSections and billingProfiles.
///
///
/// The cancellation token.
@@ -65,7 +65,7 @@ public static partial class BillingAccountsOperationsExtensions
/// billing Account Id.
///
///
- /// May be used to expand the invoiceSections and billingProfiles.
+ /// May be used to expand the address, invoiceSections and billingProfiles.
///
public static BillingAccount Get(this IBillingAccountsOperations operations, string billingAccountName, string expand = default(string))
{
@@ -82,7 +82,7 @@ public static partial class BillingAccountsOperationsExtensions
/// billing Account Id.
///
///
- /// May be used to expand the invoiceSections and billingProfiles.
+ /// May be used to expand the address, invoiceSections and billingProfiles.
///
///
/// The cancellation token.
@@ -95,5 +95,85 @@ public static partial class BillingAccountsOperationsExtensions
}
}
+ ///
+ /// The operation to update a billing account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Request parameters supplied to the update billing account operation.
+ ///
+ public static BillingAccount Update(this IBillingAccountsOperations operations, string billingAccountName, BillingAccountUpdateRequest parameters)
+ {
+ return operations.UpdateAsync(billingAccountName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to update a billing account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Request parameters supplied to the update billing account operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IBillingAccountsOperations operations, string billingAccountName, BillingAccountUpdateRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(billingAccountName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// The operation to update a billing account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Request parameters supplied to the update billing account operation.
+ ///
+ public static BillingAccount BeginUpdate(this IBillingAccountsOperations operations, string billingAccountName, BillingAccountUpdateRequest parameters)
+ {
+ return operations.BeginUpdateAsync(billingAccountName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to update a billing account.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Request parameters supplied to the update billing account operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpdateAsync(this IBillingAccountsOperations operations, string billingAccountName, BillingAccountUpdateRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(billingAccountName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingManagementClient.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingManagementClient.cs
index c1d0683efb03e..ff06f40bc480a 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingManagementClient.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingManagementClient.cs
@@ -49,7 +49,7 @@ public partial class BillingManagementClient : ServiceClient
/// Version of the API to be used with the client request. The current version
- /// is 2018-11-01-preview.
+ /// is 2019-10-01-preview.
///
public string ApiVersion { get; private set; }
@@ -86,6 +86,11 @@ public partial class BillingManagementClient : ServiceClient
public virtual IPaymentMethodsOperations PaymentMethods { get; private set; }
+ ///
+ /// Gets the IAddressOperations.
+ ///
+ public virtual IAddressOperations Address { get; private set; }
+
///
/// Gets the IAvailableBalancesOperations.
///
@@ -96,45 +101,55 @@ public partial class BillingManagementClient : ServiceClient
public virtual IBillingProfilesOperations BillingProfiles { get; private set; }
+ ///
+ /// Gets the ICustomersOperations.
+ ///
+ public virtual ICustomersOperations Customers { get; private set; }
+
///
/// Gets the IInvoiceSectionsOperations.
///
public virtual IInvoiceSectionsOperations InvoiceSections { get; private set; }
///
- /// Gets the IDepartmentsOperations.
+ /// Gets the IBillingPermissionsOperations.
///
- public virtual IDepartmentsOperations Departments { get; private set; }
+ public virtual IBillingPermissionsOperations BillingPermissions { get; private set; }
///
- /// Gets the IEnrollmentAccountsOperations.
+ /// Gets the IBillingSubscriptionsOperations.
///
- public virtual IEnrollmentAccountsOperations EnrollmentAccounts { get; private set; }
+ public virtual IBillingSubscriptionsOperations BillingSubscriptions { get; private set; }
///
- /// Gets the IInvoicesOperations.
+ /// Gets the IProductsOperations.
///
- public virtual IInvoicesOperations Invoices { get; private set; }
+ public virtual IProductsOperations Products { get; private set; }
///
- /// Gets the IPriceSheetOperations.
+ /// Gets the ITransactionsOperations.
///
- public virtual IPriceSheetOperations PriceSheet { get; private set; }
+ public virtual ITransactionsOperations Transactions { get; private set; }
///
- /// Gets the IBillingSubscriptionsOperations.
+ /// Gets the IDepartmentsOperations.
///
- public virtual IBillingSubscriptionsOperations BillingSubscriptions { get; private set; }
+ public virtual IDepartmentsOperations Departments { get; private set; }
///
- /// Gets the IProductsOperations.
+ /// Gets the IEnrollmentAccountsOperations.
///
- public virtual IProductsOperations Products { get; private set; }
+ public virtual IEnrollmentAccountsOperations EnrollmentAccounts { get; private set; }
///
- /// Gets the ITransactionsOperations.
+ /// Gets the IInvoicesOperations.
///
- public virtual ITransactionsOperations Transactions { get; private set; }
+ public virtual IInvoicesOperations Invoices { get; private set; }
+
+ ///
+ /// Gets the IPriceSheetOperations.
+ ///
+ public virtual IPriceSheetOperations PriceSheet { get; private set; }
///
/// Gets the IPoliciesOperations.
@@ -151,6 +166,16 @@ public partial class BillingManagementClient : ServiceClient
public virtual ITransfersOperations Transfers { get; private set; }
+ ///
+ /// Gets the IPartnerTransfersOperations.
+ ///
+ public virtual IPartnerTransfersOperations PartnerTransfers { get; private set; }
+
+ ///
+ /// Gets the IPartnerTransfersTransfersOperations.
+ ///
+ public virtual IPartnerTransfersTransfersOperations PartnerTransfersTransfers { get; private set; }
+
///
/// Gets the IRecipientTransfersOperations.
///
@@ -161,11 +186,6 @@ public partial class BillingManagementClient : ServiceClient
public virtual IOperations Operations { get; private set; }
- ///
- /// Gets the IBillingPermissionsOperations.
- ///
- public virtual IBillingPermissionsOperations BillingPermissions { get; private set; }
-
///
/// Gets the IBillingRoleDefinitionsOperations.
///
@@ -181,6 +201,11 @@ public partial class BillingManagementClient : ServiceClient
public virtual IAgreementsOperations Agreements { get; private set; }
+ ///
+ /// Gets the ILineOfCreditsOperations.
+ ///
+ public virtual ILineOfCreditsOperations LineOfCredits { get; private set; }
+
///
/// Initializes a new instance of the BillingManagementClient class.
///
@@ -424,27 +449,32 @@ private void Initialize()
{
BillingAccounts = new BillingAccountsOperations(this);
PaymentMethods = new PaymentMethodsOperations(this);
+ Address = new AddressOperations(this);
AvailableBalances = new AvailableBalancesOperations(this);
BillingProfiles = new BillingProfilesOperations(this);
+ Customers = new CustomersOperations(this);
InvoiceSections = new InvoiceSectionsOperations(this);
+ BillingPermissions = new BillingPermissionsOperations(this);
+ BillingSubscriptions = new BillingSubscriptionsOperations(this);
+ Products = new ProductsOperations(this);
+ Transactions = new TransactionsOperations(this);
Departments = new DepartmentsOperations(this);
EnrollmentAccounts = new EnrollmentAccountsOperations(this);
Invoices = new InvoicesOperations(this);
PriceSheet = new PriceSheetOperations(this);
- BillingSubscriptions = new BillingSubscriptionsOperations(this);
- Products = new ProductsOperations(this);
- Transactions = new TransactionsOperations(this);
Policies = new PoliciesOperations(this);
BillingProperty = new BillingPropertyOperations(this);
Transfers = new TransfersOperations(this);
+ PartnerTransfers = new PartnerTransfersOperations(this);
+ PartnerTransfersTransfers = new PartnerTransfersTransfersOperations(this);
RecipientTransfers = new RecipientTransfersOperations(this);
Operations = new Operations(this);
- BillingPermissions = new BillingPermissionsOperations(this);
BillingRoleDefinitions = new BillingRoleDefinitionsOperations(this);
BillingRoleAssignments = new BillingRoleAssignmentsOperations(this);
Agreements = new AgreementsOperations(this);
+ LineOfCredits = new LineOfCreditsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2018-11-01-preview";
+ ApiVersion = "2019-10-01-preview";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperations.cs
index 1018381b8005b..391530e8e1671 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperations.cs
@@ -50,6 +50,192 @@ internal BillingPermissionsOperations(BillingManagementClient client)
///
public BillingManagementClient Client { get; private set; }
+ ///
+ /// Lists all billing permissions the caller has for a customer.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Customer name.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> ListByCustomerWithHttpMessagesAsync(string billingAccountName, string customerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (billingAccountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
+ }
+ if (customerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "customerName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("customerName", customerName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByCustomer", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingPermissions").ToString();
+ _url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{customerName}", System.Uri.EscapeDataString(customerName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Lists all billing permissions for the caller under a billing account.
///
@@ -100,7 +286,7 @@ internal BillingPermissionsOperations(BillingManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingPermissions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingPermissions").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -233,6 +419,9 @@ internal BillingPermissionsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -257,7 +446,7 @@ internal BillingPermissionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByInvoiceSectionsWithHttpMessagesAsync(string billingAccountName, string invoiceSectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByInvoiceSectionsWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string invoiceSectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -267,6 +456,10 @@ internal BillingPermissionsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
if (invoiceSectionName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "invoiceSectionName");
@@ -279,14 +472,16 @@ internal BillingPermissionsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("invoiceSectionName", invoiceSectionName);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListByInvoiceSections", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingPermissions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingPermissions").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{invoiceSectionName}", System.Uri.EscapeDataString(invoiceSectionName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -414,7 +609,7 @@ internal BillingPermissionsOperations(BillingManagementClient client)
}
///
- /// Lists all billingPermissions for the caller has for a billing account.
+ /// Lists all billing permissions the caller has for a billing account.
///
///
/// billing Account Id.
@@ -471,7 +666,7 @@ internal BillingPermissionsOperations(BillingManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingPermissions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingPermissions").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
List _queryParameters = new List();
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperationsExtensions.cs
index a6b04a53d5e7b..1367a626c59df 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperationsExtensions.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPermissionsOperationsExtensions.cs
@@ -21,6 +21,46 @@ namespace Microsoft.Azure.Management.Billing
///
public static partial class BillingPermissionsOperationsExtensions
{
+ ///
+ /// Lists all billing permissions the caller has for a customer.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Customer name.
+ ///
+ public static BillingPermissionsListResult ListByCustomer(this IBillingPermissionsOperations operations, string billingAccountName, string customerName)
+ {
+ return operations.ListByCustomerAsync(billingAccountName, customerName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all billing permissions the caller has for a customer.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Customer name.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListByCustomerAsync(this IBillingPermissionsOperations operations, string billingAccountName, string customerName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByCustomerWithHttpMessagesAsync(billingAccountName, customerName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Lists all billing permissions for the caller under a billing account.
///
@@ -64,12 +104,15 @@ public static BillingPermissionsListResult ListByBillingAccount(this IBillingPer
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
- public static BillingPermissionsListResult ListByInvoiceSections(this IBillingPermissionsOperations operations, string billingAccountName, string invoiceSectionName)
+ public static BillingPermissionsListResult ListByInvoiceSections(this IBillingPermissionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName)
{
- return operations.ListByInvoiceSectionsAsync(billingAccountName, invoiceSectionName).GetAwaiter().GetResult();
+ return operations.ListByInvoiceSectionsAsync(billingAccountName, billingProfileName, invoiceSectionName).GetAwaiter().GetResult();
}
///
@@ -81,22 +124,25 @@ public static BillingPermissionsListResult ListByInvoiceSections(this IBillingPe
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
///
/// The cancellation token.
///
- public static async Task ListByInvoiceSectionsAsync(this IBillingPermissionsOperations operations, string billingAccountName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByInvoiceSectionsAsync(this IBillingPermissionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByInvoiceSectionsWithHttpMessagesAsync(billingAccountName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByInvoiceSectionsWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
///
- /// Lists all billingPermissions for the caller has for a billing account.
+ /// Lists all billing permissions the caller has for a billing account.
///
///
/// The operations group for this extension method.
@@ -113,7 +159,7 @@ public static BillingPermissionsListResult ListByBillingProfile(this IBillingPer
}
///
- /// Lists all billingPermissions for the caller has for a billing account.
+ /// Lists all billing permissions the caller has for a billing account.
///
///
/// The operations group for this extension method.
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperations.cs
index 9eece86c0e50b..061988d6dd628 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperations.cs
@@ -80,7 +80,7 @@ internal BillingProfilesOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByBillingAccountWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -100,7 +100,7 @@ internal BillingProfilesOperations(BillingManagementClient client)
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -429,6 +429,31 @@ internal BillingProfilesOperations(BillingManagementClient client)
return _result;
}
+ ///
+ /// The operation to create a BillingProfile.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Billing Profile Id.
+ ///
+ ///
+ /// Request parameters supplied to the Create BillingProfile operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string billingAccountName, string billingProfileName, BillingProfileCreationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(billingAccountName, billingProfileName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// The operation to update a billing profile.
///
@@ -439,7 +464,7 @@ internal BillingProfilesOperations(BillingManagementClient client)
/// Billing Profile Id.
///
///
- /// Parameters supplied to the update billing profile operation.
+ /// Request parameters supplied to the update billing profile operation.
///
///
/// The headers that will be added to request.
@@ -454,6 +479,219 @@ internal BillingProfilesOperations(BillingManagementClient client)
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
+ ///
+ /// The operation to create a BillingProfile.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Billing Profile Id.
+ ///
+ ///
+ /// Request parameters supplied to the Create BillingProfile operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginCreateWithHttpMessagesAsync(string billingAccountName, string billingProfileName, BillingProfileCreationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (billingAccountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
+ }
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}").ToString();
+ _url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// The operation to update a billing profile.
///
@@ -464,7 +702,7 @@ internal BillingProfilesOperations(BillingManagementClient client)
/// Billing Profile Id.
///
///
- /// Parameters supplied to the update billing profile operation.
+ /// Request parameters supplied to the update billing profile operation.
///
///
/// Headers that will be added to request.
@@ -535,7 +773,7 @@ internal BillingProfilesOperations(BillingManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperationsExtensions.cs
index 7d9e353cfb461..a38bc7332d4e1 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperationsExtensions.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingProfilesOperationsExtensions.cs
@@ -33,9 +33,9 @@ public static partial class BillingProfilesOperationsExtensions
///
/// May be used to expand the invoiceSections.
///
- public static BillingProfileListResult ListByBillingAccountName(this IBillingProfilesOperations operations, string billingAccountName, string expand = default(string))
+ public static BillingProfileListResult ListByBillingAccount(this IBillingProfilesOperations operations, string billingAccountName, string expand = default(string))
{
- return operations.ListByBillingAccountNameAsync(billingAccountName, expand).GetAwaiter().GetResult();
+ return operations.ListByBillingAccountAsync(billingAccountName, expand).GetAwaiter().GetResult();
}
///
@@ -53,9 +53,9 @@ public static partial class BillingProfilesOperationsExtensions
///
/// The cancellation token.
///
- public static async Task ListByBillingAccountNameAsync(this IBillingProfilesOperations operations, string billingAccountName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByBillingAccountAsync(this IBillingProfilesOperations operations, string billingAccountName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByBillingAccountNameWithHttpMessagesAsync(billingAccountName, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByBillingAccountWithHttpMessagesAsync(billingAccountName, expand, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -107,6 +107,52 @@ public static partial class BillingProfilesOperationsExtensions
}
}
+ ///
+ /// The operation to create a BillingProfile.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Billing Profile Id.
+ ///
+ ///
+ /// Request parameters supplied to the Create BillingProfile operation.
+ ///
+ public static BillingProfile Create(this IBillingProfilesOperations operations, string billingAccountName, string billingProfileName, BillingProfileCreationRequest parameters)
+ {
+ return operations.CreateAsync(billingAccountName, billingProfileName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to create a BillingProfile.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Billing Profile Id.
+ ///
+ ///
+ /// Request parameters supplied to the Create BillingProfile operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this IBillingProfilesOperations operations, string billingAccountName, string billingProfileName, BillingProfileCreationRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(billingAccountName, billingProfileName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// The operation to update a billing profile.
///
@@ -120,7 +166,7 @@ public static partial class BillingProfilesOperationsExtensions
/// Billing Profile Id.
///
///
- /// Parameters supplied to the update billing profile operation.
+ /// Request parameters supplied to the update billing profile operation.
///
public static BillingProfile Update(this IBillingProfilesOperations operations, string billingAccountName, string billingProfileName, BillingProfile parameters)
{
@@ -140,7 +186,7 @@ public static BillingProfile Update(this IBillingProfilesOperations operations,
/// Billing Profile Id.
///
///
- /// Parameters supplied to the update billing profile operation.
+ /// Request parameters supplied to the update billing profile operation.
///
///
/// The cancellation token.
@@ -153,6 +199,52 @@ public static BillingProfile Update(this IBillingProfilesOperations operations,
}
}
+ ///
+ /// The operation to create a BillingProfile.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Billing Profile Id.
+ ///
+ ///
+ /// Request parameters supplied to the Create BillingProfile operation.
+ ///
+ public static BillingProfile BeginCreate(this IBillingProfilesOperations operations, string billingAccountName, string billingProfileName, BillingProfileCreationRequest parameters)
+ {
+ return operations.BeginCreateAsync(billingAccountName, billingProfileName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// The operation to create a BillingProfile.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// billing Account Id.
+ ///
+ ///
+ /// Billing Profile Id.
+ ///
+ ///
+ /// Request parameters supplied to the Create BillingProfile operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateAsync(this IBillingProfilesOperations operations, string billingAccountName, string billingProfileName, BillingProfileCreationRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateWithHttpMessagesAsync(billingAccountName, billingProfileName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// The operation to update a billing profile.
///
@@ -166,7 +258,7 @@ public static BillingProfile Update(this IBillingProfilesOperations operations,
/// Billing Profile Id.
///
///
- /// Parameters supplied to the update billing profile operation.
+ /// Request parameters supplied to the update billing profile operation.
///
public static BillingProfile BeginUpdate(this IBillingProfilesOperations operations, string billingAccountName, string billingProfileName, BillingProfile parameters)
{
@@ -186,7 +278,7 @@ public static BillingProfile BeginUpdate(this IBillingProfilesOperations operati
/// Billing Profile Id.
///
///
- /// Parameters supplied to the update billing profile operation.
+ /// Request parameters supplied to the update billing profile operation.
///
///
/// The cancellation token.
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperations.cs
index beaef84cd1f68..2fc34c5602fd8 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperations.cs
@@ -52,7 +52,7 @@ internal BillingPropertyOperations(BillingManagementClient client)
///
/// Get billing property by subscription Id.
- ///
+ ///
///
///
/// Headers that will be added to request.
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperationsExtensions.cs
index 1cd9c6c24a446..99b7476e92a25 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperationsExtensions.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingPropertyOperationsExtensions.cs
@@ -23,7 +23,7 @@ public static partial class BillingPropertyOperationsExtensions
{
///
/// Get billing property by subscription Id.
- ///
+ ///
///
///
/// The operations group for this extension method.
@@ -35,7 +35,7 @@ public static BillingProperty Get(this IBillingPropertyOperations operations)
///
/// Get billing property by subscription Id.
- ///
+ ///
///
///
/// The operations group for this extension method.
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperations.cs
index ad2df2ce04443..5375183fd3b56 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperations.cs
@@ -108,7 +108,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingRoleAssignmentName}", System.Uri.EscapeDataString(billingRoleAssignmentName));
List _queryParameters = new List();
@@ -266,7 +266,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> DeleteByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> DeleteByBillingAccountWithHttpMessagesAsync(string billingAccountName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -290,11 +290,11 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("billingRoleAssignmentName", billingRoleAssignmentName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "DeleteByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "DeleteByBillingAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingRoleAssignmentName}", System.Uri.EscapeDataString(billingRoleAssignmentName));
List _queryParameters = new List();
@@ -428,6 +428,9 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -455,7 +458,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetByInvoiceSectionNameWithHttpMessagesAsync(string billingAccountName, string invoiceSectionName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetByInvoiceSectionWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -465,6 +468,10 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
if (invoiceSectionName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "invoiceSectionName");
@@ -481,15 +488,17 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("invoiceSectionName", invoiceSectionName);
tracingParameters.Add("billingRoleAssignmentName", billingRoleAssignmentName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetByInvoiceSectionName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetByInvoiceSection", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{invoiceSectionName}", System.Uri.EscapeDataString(invoiceSectionName));
_url = _url.Replace("{billingRoleAssignmentName}", System.Uri.EscapeDataString(billingRoleAssignmentName));
List _queryParameters = new List();
@@ -623,6 +632,9 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -650,7 +662,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> DeleteByInvoiceSectionNameWithHttpMessagesAsync(string billingAccountName, string invoiceSectionName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> DeleteByInvoiceSectionWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -660,6 +672,10 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
if (invoiceSectionName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "invoiceSectionName");
@@ -676,15 +692,17 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("invoiceSectionName", invoiceSectionName);
tracingParameters.Add("billingRoleAssignmentName", billingRoleAssignmentName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "DeleteByInvoiceSectionName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "DeleteByInvoiceSection", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{invoiceSectionName}", System.Uri.EscapeDataString(invoiceSectionName));
_url = _url.Replace("{billingRoleAssignmentName}", System.Uri.EscapeDataString(billingRoleAssignmentName));
List _queryParameters = new List();
@@ -845,7 +863,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetByBillingProfileNameWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetByBillingProfileWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -874,11 +892,11 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("billingRoleAssignmentName", billingRoleAssignmentName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetByBillingProfileName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetByBillingProfile", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{billingRoleAssignmentName}", System.Uri.EscapeDataString(billingRoleAssignmentName));
@@ -1040,7 +1058,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> DeleteByBillingProfileNameWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> DeleteByBillingProfileWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string billingRoleAssignmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1069,11 +1087,11 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("billingRoleAssignmentName", billingRoleAssignmentName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "DeleteByBillingProfileName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "DeleteByBillingProfile", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{billingRoleAssignmentName}", System.Uri.EscapeDataString(billingRoleAssignmentName));
@@ -1229,7 +1247,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByBillingAccountWithHttpMessagesAsync(string billingAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1248,11 +1266,11 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleAssignments").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -1385,6 +1403,9 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
///
/// Headers that will be added to request.
///
@@ -1406,7 +1427,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> AddByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> AddByBillingAccountWithHttpMessagesAsync(string billingAccountName, BillingRoleAssignmentPayload parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1416,7 +1437,10 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
- BillingRoleAssignmentPayload parameters = new BillingRoleAssignmentPayload();
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1427,11 +1451,11 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "AddByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "AddByBillingAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/createBillingRoleAssignment").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -1570,6 +1594,9 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -1594,7 +1621,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByInvoiceSectionNameWithHttpMessagesAsync(string billingAccountName, string invoiceSectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByInvoiceSectionWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string invoiceSectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1604,6 +1631,10 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
if (invoiceSectionName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "invoiceSectionName");
@@ -1616,14 +1647,16 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("invoiceSectionName", invoiceSectionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByInvoiceSectionName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByInvoiceSection", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleAssignments").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{invoiceSectionName}", System.Uri.EscapeDataString(invoiceSectionName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -1756,9 +1789,15 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
///
/// Headers that will be added to request.
///
@@ -1780,7 +1819,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> AddByInvoiceSectionNameWithHttpMessagesAsync(string billingAccountName, string invoiceSectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> AddByInvoiceSectionWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string invoiceSectionName, BillingRoleAssignmentPayload parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1790,11 +1829,18 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
if (invoiceSectionName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "invoiceSectionName");
}
- BillingRoleAssignmentPayload parameters = new BillingRoleAssignmentPayload();
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1803,15 +1849,17 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("invoiceSectionName", invoiceSectionName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "AddByInvoiceSectionName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "AddByInvoiceSection", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/createBillingRoleAssignment").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/createBillingRoleAssignment").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{invoiceSectionName}", System.Uri.EscapeDataString(invoiceSectionName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -1974,7 +2022,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByBillingProfileNameWithHttpMessagesAsync(string billingAccountName, string billingProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByBillingProfileWithHttpMessagesAsync(string billingAccountName, string billingProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1998,11 +2046,11 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByBillingProfileName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByBillingProfile", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleAssignments").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
List _queryParameters = new List();
@@ -2139,6 +2187,9 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// Billing Profile Id.
///
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
///
/// Headers that will be added to request.
///
@@ -2160,7 +2211,7 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> AddByBillingProfileNameWithHttpMessagesAsync(string billingAccountName, string billingProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> AddByBillingProfileWithHttpMessagesAsync(string billingAccountName, string billingProfileName, BillingRoleAssignmentPayload parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -2174,7 +2225,10 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
}
- BillingRoleAssignmentPayload parameters = new BillingRoleAssignmentPayload();
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -2186,11 +2240,11 @@ internal BillingRoleAssignmentsOperations(BillingManagementClient client)
tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "AddByBillingProfileName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "AddByBillingProfile", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/createBillingRoleAssignment").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/createBillingRoleAssignment").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
List _queryParameters = new List();
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperationsExtensions.cs
index c4067a9f8cd30..cb60a1654a818 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperationsExtensions.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleAssignmentsOperationsExtensions.cs
@@ -73,9 +73,9 @@ public static BillingRoleAssignment GetByBillingAccount(this IBillingRoleAssignm
///
/// role assignment id.
///
- public static BillingRoleAssignment DeleteByBillingAccountName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingRoleAssignmentName)
+ public static BillingRoleAssignment DeleteByBillingAccount(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingRoleAssignmentName)
{
- return operations.DeleteByBillingAccountNameAsync(billingAccountName, billingRoleAssignmentName).GetAwaiter().GetResult();
+ return operations.DeleteByBillingAccountAsync(billingAccountName, billingRoleAssignmentName).GetAwaiter().GetResult();
}
///
@@ -93,9 +93,9 @@ public static BillingRoleAssignment DeleteByBillingAccountName(this IBillingRole
///
/// The cancellation token.
///
- public static async Task DeleteByBillingAccountNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteByBillingAccountAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.DeleteByBillingAccountNameWithHttpMessagesAsync(billingAccountName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.DeleteByBillingAccountWithHttpMessagesAsync(billingAccountName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -110,15 +110,18 @@ public static BillingRoleAssignment DeleteByBillingAccountName(this IBillingRole
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
///
/// role assignment id.
///
- public static BillingRoleAssignment GetByInvoiceSectionName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName, string billingRoleAssignmentName)
+ public static BillingRoleAssignment GetByInvoiceSection(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleAssignmentName)
{
- return operations.GetByInvoiceSectionNameAsync(billingAccountName, invoiceSectionName, billingRoleAssignmentName).GetAwaiter().GetResult();
+ return operations.GetByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName).GetAwaiter().GetResult();
}
///
@@ -130,6 +133,9 @@ public static BillingRoleAssignment GetByInvoiceSectionName(this IBillingRoleAss
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -139,9 +145,9 @@ public static BillingRoleAssignment GetByInvoiceSectionName(this IBillingRoleAss
///
/// The cancellation token.
///
- public static async Task GetByInvoiceSectionNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetByInvoiceSectionAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetByInvoiceSectionNameWithHttpMessagesAsync(billingAccountName, invoiceSectionName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -156,15 +162,18 @@ public static BillingRoleAssignment GetByInvoiceSectionName(this IBillingRoleAss
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
///
/// role assignment id.
///
- public static BillingRoleAssignment DeleteByInvoiceSectionName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName, string billingRoleAssignmentName)
+ public static BillingRoleAssignment DeleteByInvoiceSection(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleAssignmentName)
{
- return operations.DeleteByInvoiceSectionNameAsync(billingAccountName, invoiceSectionName, billingRoleAssignmentName).GetAwaiter().GetResult();
+ return operations.DeleteByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName).GetAwaiter().GetResult();
}
///
@@ -176,6 +185,9 @@ public static BillingRoleAssignment DeleteByInvoiceSectionName(this IBillingRole
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -185,9 +197,9 @@ public static BillingRoleAssignment DeleteByInvoiceSectionName(this IBillingRole
///
/// The cancellation token.
///
- public static async Task DeleteByInvoiceSectionNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteByInvoiceSectionAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.DeleteByInvoiceSectionNameWithHttpMessagesAsync(billingAccountName, invoiceSectionName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.DeleteByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -208,9 +220,9 @@ public static BillingRoleAssignment DeleteByInvoiceSectionName(this IBillingRole
///
/// role assignment id.
///
- public static BillingRoleAssignment GetByBillingProfileName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName)
+ public static BillingRoleAssignment GetByBillingProfile(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName)
{
- return operations.GetByBillingProfileNameAsync(billingAccountName, billingProfileName, billingRoleAssignmentName).GetAwaiter().GetResult();
+ return operations.GetByBillingProfileAsync(billingAccountName, billingProfileName, billingRoleAssignmentName).GetAwaiter().GetResult();
}
///
@@ -231,9 +243,9 @@ public static BillingRoleAssignment GetByBillingProfileName(this IBillingRoleAss
///
/// The cancellation token.
///
- public static async Task GetByBillingProfileNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetByBillingProfileAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetByBillingProfileNameWithHttpMessagesAsync(billingAccountName, billingProfileName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetByBillingProfileWithHttpMessagesAsync(billingAccountName, billingProfileName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -254,9 +266,9 @@ public static BillingRoleAssignment GetByBillingProfileName(this IBillingRoleAss
///
/// role assignment id.
///
- public static BillingRoleAssignment DeleteByBillingProfileName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName)
+ public static BillingRoleAssignment DeleteByBillingProfile(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName)
{
- return operations.DeleteByBillingProfileNameAsync(billingAccountName, billingProfileName, billingRoleAssignmentName).GetAwaiter().GetResult();
+ return operations.DeleteByBillingProfileAsync(billingAccountName, billingProfileName, billingRoleAssignmentName).GetAwaiter().GetResult();
}
///
@@ -277,9 +289,9 @@ public static BillingRoleAssignment DeleteByBillingProfileName(this IBillingRole
///
/// The cancellation token.
///
- public static async Task DeleteByBillingProfileNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task DeleteByBillingProfileAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string billingRoleAssignmentName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.DeleteByBillingProfileNameWithHttpMessagesAsync(billingAccountName, billingProfileName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.DeleteByBillingProfileWithHttpMessagesAsync(billingAccountName, billingProfileName, billingRoleAssignmentName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -294,9 +306,9 @@ public static BillingRoleAssignment DeleteByBillingProfileName(this IBillingRole
///
/// billing Account Id.
///
- public static BillingRoleAssignmentListResult ListByBillingAccountName(this IBillingRoleAssignmentsOperations operations, string billingAccountName)
+ public static BillingRoleAssignmentListResult ListByBillingAccount(this IBillingRoleAssignmentsOperations operations, string billingAccountName)
{
- return operations.ListByBillingAccountNameAsync(billingAccountName).GetAwaiter().GetResult();
+ return operations.ListByBillingAccountAsync(billingAccountName).GetAwaiter().GetResult();
}
///
@@ -311,9 +323,9 @@ public static BillingRoleAssignmentListResult ListByBillingAccountName(this IBil
///
/// The cancellation token.
///
- public static async Task ListByBillingAccountNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByBillingAccountAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByBillingAccountNameWithHttpMessagesAsync(billingAccountName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByBillingAccountWithHttpMessagesAsync(billingAccountName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -328,9 +340,12 @@ public static BillingRoleAssignmentListResult ListByBillingAccountName(this IBil
///
/// billing Account Id.
///
- public static BillingRoleAssignmentListResult AddByBillingAccountName(this IBillingRoleAssignmentsOperations operations, string billingAccountName)
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
+ public static BillingRoleAssignmentListResult AddByBillingAccount(this IBillingRoleAssignmentsOperations operations, string billingAccountName, BillingRoleAssignmentPayload parameters)
{
- return operations.AddByBillingAccountNameAsync(billingAccountName).GetAwaiter().GetResult();
+ return operations.AddByBillingAccountAsync(billingAccountName, parameters).GetAwaiter().GetResult();
}
///
@@ -342,12 +357,15 @@ public static BillingRoleAssignmentListResult AddByBillingAccountName(this IBill
///
/// billing Account Id.
///
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
///
/// The cancellation token.
///
- public static async Task AddByBillingAccountNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task AddByBillingAccountAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, BillingRoleAssignmentPayload parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.AddByBillingAccountNameWithHttpMessagesAsync(billingAccountName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.AddByBillingAccountWithHttpMessagesAsync(billingAccountName, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -362,12 +380,15 @@ public static BillingRoleAssignmentListResult AddByBillingAccountName(this IBill
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
- public static BillingRoleAssignmentListResult ListByInvoiceSectionName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName)
+ public static BillingRoleAssignmentListResult ListByInvoiceSection(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName)
{
- return operations.ListByInvoiceSectionNameAsync(billingAccountName, invoiceSectionName).GetAwaiter().GetResult();
+ return operations.ListByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName).GetAwaiter().GetResult();
}
///
@@ -379,15 +400,18 @@ public static BillingRoleAssignmentListResult ListByInvoiceSectionName(this IBil
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
///
/// The cancellation token.
///
- public static async Task ListByInvoiceSectionNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByInvoiceSectionAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByInvoiceSectionNameWithHttpMessagesAsync(billingAccountName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -402,12 +426,18 @@ public static BillingRoleAssignmentListResult ListByInvoiceSectionName(this IBil
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
- public static BillingRoleAssignmentListResult AddByInvoiceSectionName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName)
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
+ public static BillingRoleAssignmentListResult AddByInvoiceSection(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, BillingRoleAssignmentPayload parameters)
{
- return operations.AddByInvoiceSectionNameAsync(billingAccountName, invoiceSectionName).GetAwaiter().GetResult();
+ return operations.AddByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, parameters).GetAwaiter().GetResult();
}
///
@@ -419,15 +449,21 @@ public static BillingRoleAssignmentListResult AddByInvoiceSectionName(this IBill
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
///
/// The cancellation token.
///
- public static async Task AddByInvoiceSectionNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task AddByInvoiceSectionAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, BillingRoleAssignmentPayload parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.AddByInvoiceSectionNameWithHttpMessagesAsync(billingAccountName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.AddByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -445,9 +481,9 @@ public static BillingRoleAssignmentListResult AddByInvoiceSectionName(this IBill
///
/// Billing Profile Id.
///
- public static BillingRoleAssignmentListResult ListByBillingProfileName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName)
+ public static BillingRoleAssignmentListResult ListByBillingProfile(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName)
{
- return operations.ListByBillingProfileNameAsync(billingAccountName, billingProfileName).GetAwaiter().GetResult();
+ return operations.ListByBillingProfileAsync(billingAccountName, billingProfileName).GetAwaiter().GetResult();
}
///
@@ -465,9 +501,9 @@ public static BillingRoleAssignmentListResult ListByBillingProfileName(this IBil
///
/// The cancellation token.
///
- public static async Task ListByBillingProfileNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByBillingProfileAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByBillingProfileNameWithHttpMessagesAsync(billingAccountName, billingProfileName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByBillingProfileWithHttpMessagesAsync(billingAccountName, billingProfileName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -485,9 +521,12 @@ public static BillingRoleAssignmentListResult ListByBillingProfileName(this IBil
///
/// Billing Profile Id.
///
- public static BillingRoleAssignmentListResult AddByBillingProfileName(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName)
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
+ public static BillingRoleAssignmentListResult AddByBillingProfile(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, BillingRoleAssignmentPayload parameters)
{
- return operations.AddByBillingProfileNameAsync(billingAccountName, billingProfileName).GetAwaiter().GetResult();
+ return operations.AddByBillingProfileAsync(billingAccountName, billingProfileName, parameters).GetAwaiter().GetResult();
}
///
@@ -502,12 +541,15 @@ public static BillingRoleAssignmentListResult AddByBillingProfileName(this IBill
///
/// Billing Profile Id.
///
+ ///
+ /// Parameters supplied to add a role assignment.
+ ///
///
/// The cancellation token.
///
- public static async Task AddByBillingProfileNameAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task AddByBillingProfileAsync(this IBillingRoleAssignmentsOperations operations, string billingAccountName, string billingProfileName, BillingRoleAssignmentPayload parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.AddByBillingProfileNameWithHttpMessagesAsync(billingAccountName, billingProfileName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.AddByBillingProfileWithHttpMessagesAsync(billingAccountName, billingProfileName, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperations.cs
index 3388eb2759dad..db1c6fc46e7f4 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperations.cs
@@ -80,7 +80,7 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, string billingRoleDefinitionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetByBillingAccountWithHttpMessagesAsync(string billingAccountName, string billingRoleDefinitionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -104,11 +104,11 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("billingRoleDefinitionName", billingRoleDefinitionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetByBillingAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleDefinitions/{billingRoleDefinitionName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{billingRoleDefinitionName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingRoleDefinitionName}", System.Uri.EscapeDataString(billingRoleDefinitionName));
List _queryParameters = new List();
@@ -242,6 +242,9 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -269,7 +272,7 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetByInvoiceSectionNameWithHttpMessagesAsync(string billingAccountName, string invoiceSectionName, string billingRoleDefinitionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetByInvoiceSectionWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleDefinitionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -279,6 +282,10 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
if (invoiceSectionName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "invoiceSectionName");
@@ -295,15 +302,17 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("invoiceSectionName", invoiceSectionName);
tracingParameters.Add("billingRoleDefinitionName", billingRoleDefinitionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetByInvoiceSectionName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetByInvoiceSection", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleDefinitions/{billingRoleDefinitionName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{billingRoleDefinitionName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{invoiceSectionName}", System.Uri.EscapeDataString(invoiceSectionName));
_url = _url.Replace("{billingRoleDefinitionName}", System.Uri.EscapeDataString(billingRoleDefinitionName));
List _queryParameters = new List();
@@ -464,7 +473,7 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetByBillingProfileNameWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string billingRoleDefinitionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetByBillingProfileWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string billingRoleDefinitionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -493,11 +502,11 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("billingRoleDefinitionName", billingRoleDefinitionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetByBillingProfileName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetByBillingProfile", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleDefinitions/{billingRoleDefinitionName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{billingRoleDefinitionName}").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{billingRoleDefinitionName}", System.Uri.EscapeDataString(billingRoleDefinitionName));
@@ -653,7 +662,7 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByBillingAccountWithHttpMessagesAsync(string billingAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -672,11 +681,11 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccount", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleDefinitions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -809,6 +818,9 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -833,7 +845,7 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByInvoiceSectionNameWithHttpMessagesAsync(string billingAccountName, string invoiceSectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByInvoiceSectionWithHttpMessagesAsync(string billingAccountName, string billingProfileName, string invoiceSectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -843,6 +855,10 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (billingProfileName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "billingProfileName");
+ }
if (invoiceSectionName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "invoiceSectionName");
@@ -855,14 +871,16 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("invoiceSectionName", invoiceSectionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByInvoiceSectionName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByInvoiceSection", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleDefinitions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
_url = _url.Replace("{invoiceSectionName}", System.Uri.EscapeDataString(invoiceSectionName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
@@ -1019,7 +1037,7 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListByBillingProfileNameWithHttpMessagesAsync(string billingAccountName, string billingProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListByBillingProfileWithHttpMessagesAsync(string billingAccountName, string billingProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1043,11 +1061,11 @@ internal BillingRoleDefinitionsOperations(BillingManagementClient client)
tracingParameters.Add("billingAccountName", billingAccountName);
tracingParameters.Add("billingProfileName", billingProfileName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByBillingProfileName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByBillingProfile", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleDefinitions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
_url = _url.Replace("{billingProfileName}", System.Uri.EscapeDataString(billingProfileName));
List _queryParameters = new List();
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperationsExtensions.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperationsExtensions.cs
index cb1c83e8c9233..10e68be3ec676 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperationsExtensions.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingRoleDefinitionsOperationsExtensions.cs
@@ -33,9 +33,9 @@ public static partial class BillingRoleDefinitionsOperationsExtensions
///
/// role definition id.
///
- public static BillingRoleDefinition GetByBillingAccountName(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingRoleDefinitionName)
+ public static BillingRoleDefinition GetByBillingAccount(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingRoleDefinitionName)
{
- return operations.GetByBillingAccountNameAsync(billingAccountName, billingRoleDefinitionName).GetAwaiter().GetResult();
+ return operations.GetByBillingAccountAsync(billingAccountName, billingRoleDefinitionName).GetAwaiter().GetResult();
}
///
@@ -53,9 +53,9 @@ public static BillingRoleDefinition GetByBillingAccountName(this IBillingRoleDef
///
/// The cancellation token.
///
- public static async Task GetByBillingAccountNameAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingRoleDefinitionName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetByBillingAccountAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingRoleDefinitionName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetByBillingAccountNameWithHttpMessagesAsync(billingAccountName, billingRoleDefinitionName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetByBillingAccountWithHttpMessagesAsync(billingAccountName, billingRoleDefinitionName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -70,15 +70,18 @@ public static BillingRoleDefinition GetByBillingAccountName(this IBillingRoleDef
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
///
/// role definition id.
///
- public static BillingRoleDefinition GetByInvoiceSectionName(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string invoiceSectionName, string billingRoleDefinitionName)
+ public static BillingRoleDefinition GetByInvoiceSection(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleDefinitionName)
{
- return operations.GetByInvoiceSectionNameAsync(billingAccountName, invoiceSectionName, billingRoleDefinitionName).GetAwaiter().GetResult();
+ return operations.GetByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName).GetAwaiter().GetResult();
}
///
@@ -90,6 +93,9 @@ public static BillingRoleDefinition GetByInvoiceSectionName(this IBillingRoleDef
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
@@ -99,9 +105,9 @@ public static BillingRoleDefinition GetByInvoiceSectionName(this IBillingRoleDef
///
/// The cancellation token.
///
- public static async Task GetByInvoiceSectionNameAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string invoiceSectionName, string billingRoleDefinitionName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetByInvoiceSectionAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string billingRoleDefinitionName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetByInvoiceSectionNameWithHttpMessagesAsync(billingAccountName, invoiceSectionName, billingRoleDefinitionName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, billingRoleDefinitionName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -122,9 +128,9 @@ public static BillingRoleDefinition GetByInvoiceSectionName(this IBillingRoleDef
///
/// role definition id.
///
- public static BillingRoleDefinition GetByBillingProfileName(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string billingRoleDefinitionName)
+ public static BillingRoleDefinition GetByBillingProfile(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string billingRoleDefinitionName)
{
- return operations.GetByBillingProfileNameAsync(billingAccountName, billingProfileName, billingRoleDefinitionName).GetAwaiter().GetResult();
+ return operations.GetByBillingProfileAsync(billingAccountName, billingProfileName, billingRoleDefinitionName).GetAwaiter().GetResult();
}
///
@@ -145,9 +151,9 @@ public static BillingRoleDefinition GetByBillingProfileName(this IBillingRoleDef
///
/// The cancellation token.
///
- public static async Task GetByBillingProfileNameAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string billingRoleDefinitionName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetByBillingProfileAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string billingRoleDefinitionName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetByBillingProfileNameWithHttpMessagesAsync(billingAccountName, billingProfileName, billingRoleDefinitionName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetByBillingProfileWithHttpMessagesAsync(billingAccountName, billingProfileName, billingRoleDefinitionName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -162,9 +168,9 @@ public static BillingRoleDefinition GetByBillingProfileName(this IBillingRoleDef
///
/// billing Account Id.
///
- public static BillingRoleDefinitionListResult ListByBillingAccountName(this IBillingRoleDefinitionsOperations operations, string billingAccountName)
+ public static BillingRoleDefinitionListResult ListByBillingAccount(this IBillingRoleDefinitionsOperations operations, string billingAccountName)
{
- return operations.ListByBillingAccountNameAsync(billingAccountName).GetAwaiter().GetResult();
+ return operations.ListByBillingAccountAsync(billingAccountName).GetAwaiter().GetResult();
}
///
@@ -179,9 +185,9 @@ public static BillingRoleDefinitionListResult ListByBillingAccountName(this IBil
///
/// The cancellation token.
///
- public static async Task ListByBillingAccountNameAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByBillingAccountAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByBillingAccountNameWithHttpMessagesAsync(billingAccountName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByBillingAccountWithHttpMessagesAsync(billingAccountName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -196,12 +202,15 @@ public static BillingRoleDefinitionListResult ListByBillingAccountName(this IBil
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
- public static BillingRoleDefinitionListResult ListByInvoiceSectionName(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string invoiceSectionName)
+ public static BillingRoleDefinitionListResult ListByInvoiceSection(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName)
{
- return operations.ListByInvoiceSectionNameAsync(billingAccountName, invoiceSectionName).GetAwaiter().GetResult();
+ return operations.ListByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName).GetAwaiter().GetResult();
}
///
@@ -213,15 +222,18 @@ public static BillingRoleDefinitionListResult ListByInvoiceSectionName(this IBil
///
/// billing Account Id.
///
+ ///
+ /// Billing Profile Id.
+ ///
///
/// InvoiceSection Id.
///
///
/// The cancellation token.
///
- public static async Task ListByInvoiceSectionNameAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByInvoiceSectionAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByInvoiceSectionNameWithHttpMessagesAsync(billingAccountName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -239,9 +251,9 @@ public static BillingRoleDefinitionListResult ListByInvoiceSectionName(this IBil
///
/// Billing Profile Id.
///
- public static BillingRoleDefinitionListResult ListByBillingProfileName(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName)
+ public static BillingRoleDefinitionListResult ListByBillingProfile(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName)
{
- return operations.ListByBillingProfileNameAsync(billingAccountName, billingProfileName).GetAwaiter().GetResult();
+ return operations.ListByBillingProfileAsync(billingAccountName, billingProfileName).GetAwaiter().GetResult();
}
///
@@ -259,9 +271,9 @@ public static BillingRoleDefinitionListResult ListByBillingProfileName(this IBil
///
/// The cancellation token.
///
- public static async Task ListByBillingProfileNameAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListByBillingProfileAsync(this IBillingRoleDefinitionsOperations operations, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListByBillingProfileNameWithHttpMessagesAsync(billingAccountName, billingProfileName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListByBillingProfileWithHttpMessagesAsync(billingAccountName, billingProfileName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingSubscriptionsOperations.cs b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingSubscriptionsOperations.cs
index 08090ecc31179..fa77fa944c0a0 100644
--- a/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingSubscriptionsOperations.cs
+++ b/sdk/billing/Microsoft.Azure.Management.Billing/src/Generated/BillingSubscriptionsOperations.cs
@@ -51,12 +51,15 @@ internal BillingSubscriptionsOperations(BillingManagementClient client)
public BillingManagementClient Client { get; private set; }
///
- /// Lists billing subscriptions by billing account name.
+ /// Lists billing subscription by customer id.
///
///
///
/// billing Account Id.
///
+ ///
+ /// Customer name.
+ ///
///
/// Headers that will be added to request.
///
@@ -78,12 +81,16 @@ internal BillingSubscriptionsOperations(BillingManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListByBillingAccountNameWithHttpMessagesAsync(string billingAccountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListByCustomerWithHttpMessagesAsync(string billingAccountName, string customerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (billingAccountName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "billingAccountName");
}
+ if (customerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "customerName");
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -96,13 +103,15 @@ internal BillingSubscriptionsOperations(BillingManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("billingAccountName", billingAccountName);
+ tracingParameters.Add("customerName", customerName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByBillingAccountName", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByCustomer", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions").ToString();
_url = _url.Replace("{billingAccountName}", System.Uri.EscapeDataString(billingAccountName));
+ _url = _url.Replace("{customerName}", System.Uri.EscapeDataString(customerName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
{
@@ -196,7 +205,7 @@ internal BillingSubscriptionsOperations(BillingManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -209,7 +218,7 @@ internal BillingSubscriptionsOperations(BillingManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject