From f9cbc296845932be678ed9a95adce1b39d765b8f Mon Sep 17 00:00:00 2001 From: adxsdknet Date: Thu, 23 May 2019 17:31:23 +0000 Subject: [PATCH 1/3] .NET SDK Resource Provider:'Billing' REST Spec PR 'https://github.com/Azure/azure-rest-api-specs/pull/6090' REST Spec PR Author 'sarang-amondikar' REST Spec PR Last commit --- .../Generated/BillingManagementClient.cs | 6 + .../Generated/IBillingManagementClient.cs | 5 + .../Generated/IValidateAddressOperations.cs | 48 ++++ .../Models/AddressValidationStatus.cs | 22 ++ .../Models/ValidateAddressResponse.cs | 72 ++++++ .../SdkInfo_BillingManagementClient.cs | 1 + .../Generated/ValidateAddressOperations.cs | 235 ++++++++++++++++++ .../ValidateAddressOperationsExtensions.cs | 57 +++++ 8 files changed, 446 insertions(+) create mode 100644 src/SDKs/Billing/Management.Billing/Generated/IValidateAddressOperations.cs create mode 100644 src/SDKs/Billing/Management.Billing/Generated/Models/AddressValidationStatus.cs create mode 100644 src/SDKs/Billing/Management.Billing/Generated/Models/ValidateAddressResponse.cs create mode 100644 src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperations.cs create mode 100644 src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperationsExtensions.cs diff --git a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs index c1d0683efb03..36eb218a34f9 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs @@ -86,6 +86,11 @@ public partial class BillingManagementClient : ServiceClient public virtual IPaymentMethodsOperations PaymentMethods { get; private set; } + /// + /// Gets the IValidateAddressOperations. + /// + public virtual IValidateAddressOperations ValidateAddress { get; private set; } + /// /// Gets the IAvailableBalancesOperations. /// @@ -424,6 +429,7 @@ private void Initialize() { BillingAccounts = new BillingAccountsOperations(this); PaymentMethods = new PaymentMethodsOperations(this); + ValidateAddress = new ValidateAddressOperations(this); AvailableBalances = new AvailableBalancesOperations(this); BillingProfiles = new BillingProfilesOperations(this); InvoiceSections = new InvoiceSectionsOperations(this); diff --git a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs index 1a737016940c..18d42e9b48ee 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs @@ -81,6 +81,11 @@ public partial interface IBillingManagementClient : System.IDisposable /// IPaymentMethodsOperations PaymentMethods { get; } + /// + /// Gets the IValidateAddressOperations. + /// + IValidateAddressOperations ValidateAddress { get; } + /// /// Gets the IAvailableBalancesOperations. /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/IValidateAddressOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/IValidateAddressOperations.cs new file mode 100644 index 000000000000..7212bb5fa475 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/IValidateAddressOperations.cs @@ -0,0 +1,48 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Billing +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ValidateAddressOperations operations. + /// + public partial interface IValidateAddressOperations + { + /// + /// Validates the address. + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ValidateWithHttpMessagesAsync(Address address, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/AddressValidationStatus.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/AddressValidationStatus.cs new file mode 100644 index 000000000000..41d215933e7e --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/AddressValidationStatus.cs @@ -0,0 +1,22 @@ +// +// 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.Models +{ + + /// + /// Defines values for AddressValidationStatus. + /// + public static class AddressValidationStatus + { + public const string Valid = "Valid"; + public const string Invalid = "Invalid"; + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/ValidateAddressResponse.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/ValidateAddressResponse.cs new file mode 100644 index 000000000000..8e6b3487d409 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/ValidateAddressResponse.cs @@ -0,0 +1,72 @@ +// +// 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.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Result of the address validation + /// + public partial class ValidateAddressResponse + { + /// + /// Initializes a new instance of the ValidateAddressResponse class. + /// + public ValidateAddressResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ValidateAddressResponse class. + /// + /// status of the address validation. Possible + /// values include: 'Valid', 'Invalid' + /// list of suggested + /// addresses. + /// Validation error message. + public ValidateAddressResponse(string status = default(string), IList
suggestedAddresses = default(IList
), string validationMessage = default(string)) + { + Status = status; + SuggestedAddresses = suggestedAddresses; + ValidationMessage = validationMessage; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets status of the address validation. Possible values + /// include: 'Valid', 'Invalid' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets list of suggested addresses. + /// + [JsonProperty(PropertyName = "suggestedAddresses")] + public IList
SuggestedAddresses { get; set; } + + /// + /// Gets or sets validation error message. + /// + [JsonProperty(PropertyName = "validationMessage")] + public string ValidationMessage { get; set; } + + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs index ea1bcebcf0bd..a1ce505336d5 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs @@ -40,6 +40,7 @@ public static IEnumerable> ApiInfo_BillingManageme new Tuple("Billing", "RecipientTransfers", "2018-11-01-preview"), new Tuple("Billing", "Transactions", "2018-11-01-preview"), new Tuple("Billing", "Transfers", "2018-11-01-preview"), + new Tuple("Billing", "ValidateAddress", "2018-11-01-preview"), }.AsEnumerable(); } } diff --git a/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperations.cs new file mode 100644 index 000000000000..506969467672 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperations.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; + + /// + /// ValidateAddressOperations operations. + /// + internal partial class ValidateAddressOperations : IServiceOperations, IValidateAddressOperations + { + /// + /// Initializes a new instance of the ValidateAddressOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ValidateAddressOperations(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(Address 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/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperationsExtensions.cs b/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperationsExtensions.cs new file mode 100644 index 000000000000..61eda5245791 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperationsExtensions.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 ValidateAddressOperations. + /// + public static partial class ValidateAddressOperationsExtensions + { + /// + /// Validates the address. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + public static ValidateAddressResponse Validate(this IValidateAddressOperations operations, Address 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 IValidateAddressOperations operations, Address address, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ValidateWithHttpMessagesAsync(address, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} From 7085e5e7b851508185ec31e422d3137a0529fe97 Mon Sep 17 00:00:00 2001 From: adxsdknet Date: Thu, 23 May 2019 18:39:34 +0000 Subject: [PATCH 2/3] .NET SDK Resource Provider:'Billing' REST Spec PR 'https://github.com/Azure/azure-rest-api-specs/pull/6090' REST Spec PR Author 'sarang-amondikar' REST Spec PR Last commit --- ...{ValidateAddressOperations.cs => AddressOperations.cs} | 8 ++++---- ...ationsExtensions.cs => AddressOperationsExtensions.cs} | 8 ++++---- .../Generated/BillingManagementClient.cs | 6 +++--- ...ValidateAddressOperations.cs => IAddressOperations.cs} | 4 ++-- .../Generated/IBillingManagementClient.cs | 4 ++-- .../Generated/SdkInfo_BillingManagementClient.cs | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename src/SDKs/Billing/Management.Billing/Generated/{ValidateAddressOperations.cs => AddressOperations.cs} (96%) rename src/SDKs/Billing/Management.Billing/Generated/{ValidateAddressOperationsExtensions.cs => AddressOperationsExtensions.cs} (84%) rename src/SDKs/Billing/Management.Billing/Generated/{IValidateAddressOperations.cs => IAddressOperations.cs} (94%) diff --git a/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/AddressOperations.cs similarity index 96% rename from src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperations.cs rename to src/SDKs/Billing/Management.Billing/Generated/AddressOperations.cs index 506969467672..56b268be2ae1 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/AddressOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Billing using System.Threading.Tasks; /// - /// ValidateAddressOperations operations. + /// AddressOperations operations. /// - internal partial class ValidateAddressOperations : IServiceOperations, IValidateAddressOperations + internal partial class AddressOperations : IServiceOperations, IAddressOperations { /// - /// Initializes a new instance of the ValidateAddressOperations class. + /// Initializes a new instance of the AddressOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class ValidateAddressOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ValidateAddressOperations(BillingManagementClient client) + internal AddressOperations(BillingManagementClient client) { if (client == null) { diff --git a/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperationsExtensions.cs b/src/SDKs/Billing/Management.Billing/Generated/AddressOperationsExtensions.cs similarity index 84% rename from src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperationsExtensions.cs rename to src/SDKs/Billing/Management.Billing/Generated/AddressOperationsExtensions.cs index 61eda5245791..276ab71ffc3a 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/ValidateAddressOperationsExtensions.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/AddressOperationsExtensions.cs @@ -17,9 +17,9 @@ namespace Microsoft.Azure.Management.Billing using System.Threading.Tasks; /// - /// Extension methods for ValidateAddressOperations. + /// Extension methods for AddressOperations. /// - public static partial class ValidateAddressOperationsExtensions + public static partial class AddressOperationsExtensions { /// /// Validates the address. @@ -29,7 +29,7 @@ public static partial class ValidateAddressOperationsExtensions /// /// /// - public static ValidateAddressResponse Validate(this IValidateAddressOperations operations, Address address) + public static ValidateAddressResponse Validate(this IAddressOperations operations, Address address) { return operations.ValidateAsync(address).GetAwaiter().GetResult(); } @@ -45,7 +45,7 @@ public static ValidateAddressResponse Validate(this IValidateAddressOperations o /// /// The cancellation token. /// - public static async Task ValidateAsync(this IValidateAddressOperations operations, Address address, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ValidateAsync(this IAddressOperations operations, Address address, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ValidateWithHttpMessagesAsync(address, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs index 36eb218a34f9..cf9c9b36bc9c 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs @@ -87,9 +87,9 @@ public partial class BillingManagementClient : ServiceClient - /// Gets the IValidateAddressOperations. + /// Gets the IAddressOperations. /// - public virtual IValidateAddressOperations ValidateAddress { get; private set; } + public virtual IAddressOperations Address { get; private set; } /// /// Gets the IAvailableBalancesOperations. @@ -429,7 +429,7 @@ private void Initialize() { BillingAccounts = new BillingAccountsOperations(this); PaymentMethods = new PaymentMethodsOperations(this); - ValidateAddress = new ValidateAddressOperations(this); + Address = new AddressOperations(this); AvailableBalances = new AvailableBalancesOperations(this); BillingProfiles = new BillingProfilesOperations(this); InvoiceSections = new InvoiceSectionsOperations(this); diff --git a/src/SDKs/Billing/Management.Billing/Generated/IValidateAddressOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/IAddressOperations.cs similarity index 94% rename from src/SDKs/Billing/Management.Billing/Generated/IValidateAddressOperations.cs rename to src/SDKs/Billing/Management.Billing/Generated/IAddressOperations.cs index 7212bb5fa475..a5271550fcb0 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IValidateAddressOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IAddressOperations.cs @@ -19,9 +19,9 @@ namespace Microsoft.Azure.Management.Billing using System.Threading.Tasks; /// - /// ValidateAddressOperations operations. + /// AddressOperations operations. /// - public partial interface IValidateAddressOperations + public partial interface IAddressOperations { /// /// Validates the address. diff --git a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs index 18d42e9b48ee..b1f877c08e9b 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs @@ -82,9 +82,9 @@ public partial interface IBillingManagementClient : System.IDisposable IPaymentMethodsOperations PaymentMethods { get; } /// - /// Gets the IValidateAddressOperations. + /// Gets the IAddressOperations. /// - IValidateAddressOperations ValidateAddress { get; } + IAddressOperations Address { get; } /// /// Gets the IAvailableBalancesOperations. diff --git a/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs index a1ce505336d5..8eca61d02d12 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs @@ -19,6 +19,7 @@ public static IEnumerable> ApiInfo_BillingManageme { return new Tuple[] { + new Tuple("Billing", "Address", "2018-11-01-preview"), new Tuple("Billing", "Agreements", "2018-11-01-preview"), new Tuple("Billing", "AvailableBalances", "2018-11-01-preview"), new Tuple("Billing", "BillingAccounts", "2018-11-01-preview"), @@ -40,7 +41,6 @@ public static IEnumerable> ApiInfo_BillingManageme new Tuple("Billing", "RecipientTransfers", "2018-11-01-preview"), new Tuple("Billing", "Transactions", "2018-11-01-preview"), new Tuple("Billing", "Transfers", "2018-11-01-preview"), - new Tuple("Billing", "ValidateAddress", "2018-11-01-preview"), }.AsEnumerable(); } } From 37d8471ab2b3ad77dd43c5a9f1999d099a34147e Mon Sep 17 00:00:00 2001 From: adxsdknet Date: Thu, 23 May 2019 22:17:37 +0000 Subject: [PATCH 3/3] .NET SDK Resource Provider:'Billing' REST Spec PR 'https://github.com/Azure/azure-rest-api-specs/pull/6090' REST Spec PR Author 'sarang-amondikar' REST Spec PR Last commit --- .../{AddressOperations.cs => AddressesOperations.cs} | 8 ++++---- ...ionsExtensions.cs => AddressesOperationsExtensions.cs} | 8 ++++---- .../Generated/BillingManagementClient.cs | 6 +++--- .../{IAddressOperations.cs => IAddressesOperations.cs} | 4 ++-- .../Generated/IBillingManagementClient.cs | 4 ++-- .../Generated/SdkInfo_BillingManagementClient.cs | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename src/SDKs/Billing/Management.Billing/Generated/{AddressOperations.cs => AddressesOperations.cs} (97%) rename src/SDKs/Billing/Management.Billing/Generated/{AddressOperationsExtensions.cs => AddressesOperationsExtensions.cs} (85%) rename src/SDKs/Billing/Management.Billing/Generated/{IAddressOperations.cs => IAddressesOperations.cs} (94%) diff --git a/src/SDKs/Billing/Management.Billing/Generated/AddressOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/AddressesOperations.cs similarity index 97% rename from src/SDKs/Billing/Management.Billing/Generated/AddressOperations.cs rename to src/SDKs/Billing/Management.Billing/Generated/AddressesOperations.cs index 56b268be2ae1..8579f8a403b3 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/AddressOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/AddressesOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Billing using System.Threading.Tasks; /// - /// AddressOperations operations. + /// AddressesOperations operations. /// - internal partial class AddressOperations : IServiceOperations, IAddressOperations + internal partial class AddressesOperations : IServiceOperations, IAddressesOperations { /// - /// Initializes a new instance of the AddressOperations class. + /// Initializes a new instance of the AddressesOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class AddressOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal AddressOperations(BillingManagementClient client) + internal AddressesOperations(BillingManagementClient client) { if (client == null) { diff --git a/src/SDKs/Billing/Management.Billing/Generated/AddressOperationsExtensions.cs b/src/SDKs/Billing/Management.Billing/Generated/AddressesOperationsExtensions.cs similarity index 85% rename from src/SDKs/Billing/Management.Billing/Generated/AddressOperationsExtensions.cs rename to src/SDKs/Billing/Management.Billing/Generated/AddressesOperationsExtensions.cs index 276ab71ffc3a..10140a4da622 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/AddressOperationsExtensions.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/AddressesOperationsExtensions.cs @@ -17,9 +17,9 @@ namespace Microsoft.Azure.Management.Billing using System.Threading.Tasks; /// - /// Extension methods for AddressOperations. + /// Extension methods for AddressesOperations. /// - public static partial class AddressOperationsExtensions + public static partial class AddressesOperationsExtensions { /// /// Validates the address. @@ -29,7 +29,7 @@ public static partial class AddressOperationsExtensions /// /// /// - public static ValidateAddressResponse Validate(this IAddressOperations operations, Address address) + public static ValidateAddressResponse Validate(this IAddressesOperations operations, Address address) { return operations.ValidateAsync(address).GetAwaiter().GetResult(); } @@ -45,7 +45,7 @@ public static ValidateAddressResponse Validate(this IAddressOperations operation /// /// The cancellation token. /// - public static async Task ValidateAsync(this IAddressOperations operations, Address address, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ValidateAsync(this IAddressesOperations operations, Address address, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ValidateWithHttpMessagesAsync(address, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs index cf9c9b36bc9c..12e96aba454d 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs @@ -87,9 +87,9 @@ public partial class BillingManagementClient : ServiceClient - /// Gets the IAddressOperations. + /// Gets the IAddressesOperations. /// - public virtual IAddressOperations Address { get; private set; } + public virtual IAddressesOperations Addresses { get; private set; } /// /// Gets the IAvailableBalancesOperations. @@ -429,7 +429,7 @@ private void Initialize() { BillingAccounts = new BillingAccountsOperations(this); PaymentMethods = new PaymentMethodsOperations(this); - Address = new AddressOperations(this); + Addresses = new AddressesOperations(this); AvailableBalances = new AvailableBalancesOperations(this); BillingProfiles = new BillingProfilesOperations(this); InvoiceSections = new InvoiceSectionsOperations(this); diff --git a/src/SDKs/Billing/Management.Billing/Generated/IAddressOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/IAddressesOperations.cs similarity index 94% rename from src/SDKs/Billing/Management.Billing/Generated/IAddressOperations.cs rename to src/SDKs/Billing/Management.Billing/Generated/IAddressesOperations.cs index a5271550fcb0..3e6ba55ce461 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IAddressOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IAddressesOperations.cs @@ -19,9 +19,9 @@ namespace Microsoft.Azure.Management.Billing using System.Threading.Tasks; /// - /// AddressOperations operations. + /// AddressesOperations operations. /// - public partial interface IAddressOperations + public partial interface IAddressesOperations { /// /// Validates the address. diff --git a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs index b1f877c08e9b..9392d85757d3 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs @@ -82,9 +82,9 @@ public partial interface IBillingManagementClient : System.IDisposable IPaymentMethodsOperations PaymentMethods { get; } /// - /// Gets the IAddressOperations. + /// Gets the IAddressesOperations. /// - IAddressOperations Address { get; } + IAddressesOperations Addresses { get; } /// /// Gets the IAvailableBalancesOperations. diff --git a/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs index 8eca61d02d12..967a9d3706c2 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs @@ -19,7 +19,7 @@ public static IEnumerable> ApiInfo_BillingManageme { return new Tuple[] { - new Tuple("Billing", "Address", "2018-11-01-preview"), + new Tuple("Billing", "Addresses", "2018-11-01-preview"), new Tuple("Billing", "Agreements", "2018-11-01-preview"), new Tuple("Billing", "AvailableBalances", "2018-11-01-preview"), new Tuple("Billing", "BillingAccounts", "2018-11-01-preview"),