diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/EndpointsOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/EndpointsOperations.cs index 90c1757a29b7..ffd4e82741dd 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/EndpointsOperations.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/EndpointsOperations.cs @@ -163,7 +163,7 @@ internal EndpointsOperations(FrontDoorManagementClient client) { contentFilePaths.Validate(); } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorManagementClient.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorManagementClient.cs index d8636ec3a54b..54aed6c0fca7 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorManagementClient.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorManagementClient.cs @@ -20,8 +20,6 @@ namespace Microsoft.Azure.Management.FrontDoor using System.Linq; using System.Net; using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// FrontDoor Client @@ -93,6 +91,16 @@ public partial class FrontDoorManagementClient : ServiceClient public virtual IReportsOperations Reports { get; private set; } + /// + /// Gets the IFrontDoorNameAvailabilityOperations. + /// + public virtual IFrontDoorNameAvailabilityOperations FrontDoorNameAvailability { get; private set; } + + /// + /// Gets the IFrontDoorNameAvailabilityWithSubscriptionOperations. + /// + public virtual IFrontDoorNameAvailabilityWithSubscriptionOperations FrontDoorNameAvailabilityWithSubscription { get; private set; } + /// /// Gets the IFrontDoorsOperations. /// @@ -368,6 +376,8 @@ private void Initialize() PreconfiguredEndpoints = new PreconfiguredEndpointsOperations(this); Experiments = new ExperimentsOperations(this); Reports = new ReportsOperations(this); + FrontDoorNameAvailability = new FrontDoorNameAvailabilityOperations(this); + FrontDoorNameAvailabilityWithSubscription = new FrontDoorNameAvailabilityWithSubscriptionOperations(this); FrontDoors = new FrontDoorsOperations(this); FrontendEndpoints = new FrontendEndpointsOperations(this); Endpoints = new EndpointsOperations(this); @@ -410,378 +420,5 @@ private void Initialize() DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } - /// - /// Check the availability of a Front Door resource name. - /// - /// - /// Input to check. - /// - /// - /// 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> CheckFrontDoorNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (checkFrontDoorNameAvailabilityInput == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "checkFrontDoorNameAvailabilityInput"); - } - if (checkFrontDoorNameAvailabilityInput != null) - { - checkFrontDoorNameAvailabilityInput.Validate(); - } - string apiVersion = "2020-01-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("checkFrontDoorNameAvailabilityInput", checkFrontDoorNameAvailabilityInput); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckFrontDoorNameAvailability", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Network/checkFrontDoorNameAvailability").ToString(); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(checkFrontDoorNameAvailabilityInput != null) - { - _requestContent = SafeJsonConvert.SerializeObject(checkFrontDoorNameAvailabilityInput, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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; - } - - /// - /// Check the availability of a Front Door subdomain. - /// - /// - /// Input to check. - /// - /// - /// 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> CheckFrontDoorNameAvailabilityWithSubscriptionWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (checkFrontDoorNameAvailabilityInput == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "checkFrontDoorNameAvailabilityInput"); - } - if (checkFrontDoorNameAvailabilityInput != null) - { - checkFrontDoorNameAvailabilityInput.Validate(); - } - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - string apiVersion = "2020-01-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("checkFrontDoorNameAvailabilityInput", checkFrontDoorNameAvailabilityInput); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckFrontDoorNameAvailabilityWithSubscription", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(checkFrontDoorNameAvailabilityInput != null) - { - _requestContent = SafeJsonConvert.SerializeObject(checkFrontDoorNameAvailabilityInput, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityOperations.cs new file mode 100644 index 000000000000..2a257d126651 --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityOperations.cs @@ -0,0 +1,238 @@ +// +// 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.FrontDoor +{ + 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; + + /// + /// FrontDoorNameAvailabilityOperations operations. + /// + internal partial class FrontDoorNameAvailabilityOperations : IServiceOperations, IFrontDoorNameAvailabilityOperations + { + /// + /// Initializes a new instance of the FrontDoorNameAvailabilityOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal FrontDoorNameAvailabilityOperations(FrontDoorManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the FrontDoorManagementClient + /// + public FrontDoorManagementClient Client { get; private set; } + + /// + /// Check the availability of a Front Door resource name. + /// + /// + /// Input to check. + /// + /// + /// 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> CheckWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (checkFrontDoorNameAvailabilityInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "checkFrontDoorNameAvailabilityInput"); + } + if (checkFrontDoorNameAvailabilityInput != null) + { + checkFrontDoorNameAvailabilityInput.Validate(); + } + string apiVersion = "2020-05-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("checkFrontDoorNameAvailabilityInput", checkFrontDoorNameAvailabilityInput); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Check", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Network/checkFrontDoorNameAvailability").ToString(); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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(checkFrontDoorNameAvailabilityInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(checkFrontDoorNameAvailabilityInput, 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/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityOperationsExtensions.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityOperationsExtensions.cs new file mode 100644 index 000000000000..25efaec632b7 --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityOperationsExtensions.cs @@ -0,0 +1,59 @@ +// +// 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.FrontDoor +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for FrontDoorNameAvailabilityOperations. + /// + public static partial class FrontDoorNameAvailabilityOperationsExtensions + { + /// + /// Check the availability of a Front Door resource name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Input to check. + /// + public static CheckNameAvailabilityOutput Check(this IFrontDoorNameAvailabilityOperations operations, CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput) + { + return operations.CheckAsync(checkFrontDoorNameAvailabilityInput).GetAwaiter().GetResult(); + } + + /// + /// Check the availability of a Front Door resource name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Input to check. + /// + /// + /// The cancellation token. + /// + public static async Task CheckAsync(this IFrontDoorNameAvailabilityOperations operations, CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckWithHttpMessagesAsync(checkFrontDoorNameAvailabilityInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityWithSubscriptionOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityWithSubscriptionOperations.cs new file mode 100644 index 000000000000..972d1fc80307 --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityWithSubscriptionOperations.cs @@ -0,0 +1,243 @@ +// +// 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.FrontDoor +{ + 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; + + /// + /// FrontDoorNameAvailabilityWithSubscriptionOperations operations. + /// + internal partial class FrontDoorNameAvailabilityWithSubscriptionOperations : IServiceOperations, IFrontDoorNameAvailabilityWithSubscriptionOperations + { + /// + /// Initializes a new instance of the FrontDoorNameAvailabilityWithSubscriptionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal FrontDoorNameAvailabilityWithSubscriptionOperations(FrontDoorManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the FrontDoorManagementClient + /// + public FrontDoorManagementClient Client { get; private set; } + + /// + /// Check the availability of a Front Door subdomain. + /// + /// + /// Input to check. + /// + /// + /// 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> CheckWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (checkFrontDoorNameAvailabilityInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "checkFrontDoorNameAvailabilityInput"); + } + if (checkFrontDoorNameAvailabilityInput != null) + { + checkFrontDoorNameAvailabilityInput.Validate(); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-05-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("checkFrontDoorNameAvailabilityInput", checkFrontDoorNameAvailabilityInput); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Check", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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(checkFrontDoorNameAvailabilityInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(checkFrontDoorNameAvailabilityInput, 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/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityWithSubscriptionOperationsExtensions.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityWithSubscriptionOperationsExtensions.cs new file mode 100644 index 000000000000..7e32b5025fa6 --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorNameAvailabilityWithSubscriptionOperationsExtensions.cs @@ -0,0 +1,59 @@ +// +// 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.FrontDoor +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for FrontDoorNameAvailabilityWithSubscriptionOperations. + /// + public static partial class FrontDoorNameAvailabilityWithSubscriptionOperationsExtensions + { + /// + /// Check the availability of a Front Door subdomain. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Input to check. + /// + public static CheckNameAvailabilityOutput Check(this IFrontDoorNameAvailabilityWithSubscriptionOperations operations, CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput) + { + return operations.CheckAsync(checkFrontDoorNameAvailabilityInput).GetAwaiter().GetResult(); + } + + /// + /// Check the availability of a Front Door subdomain. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Input to check. + /// + /// + /// The cancellation token. + /// + public static async Task CheckAsync(this IFrontDoorNameAvailabilityWithSubscriptionOperations operations, CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckWithHttpMessagesAsync(checkFrontDoorNameAvailabilityInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorsOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorsOperations.cs index f89105f0aab3..b594b9589780 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorsOperations.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontDoorsOperations.cs @@ -80,7 +80,7 @@ internal FrontDoorsOperations(FrontDoorManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -273,7 +273,7 @@ internal FrontDoorsOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[a-zA-Z0-9_\\-\\(\\)\\.]*[^\\.]$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -491,7 +491,7 @@ internal FrontDoorsOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "frontDoorName", "^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -770,7 +770,7 @@ internal FrontDoorsOperations(FrontDoorManagementClient client) { customDomainProperties.Validate(); } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1008,7 +1008,7 @@ internal FrontDoorsOperations(FrontDoorManagementClient client) { frontDoorParameters.Validate(); } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1267,7 +1267,7 @@ internal FrontDoorsOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "frontDoorName", "^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontendEndpointsOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontendEndpointsOperations.cs index a9394677e5e5..c48db14c46bc 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontendEndpointsOperations.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/FrontendEndpointsOperations.cs @@ -124,7 +124,7 @@ internal FrontendEndpointsOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "frontDoorName", "^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -366,7 +366,7 @@ internal FrontendEndpointsOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "frontendEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -670,7 +670,7 @@ internal FrontendEndpointsOperations(FrontDoorManagementClient client) { customHttpsConfiguration.Validate(); } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -899,7 +899,7 @@ internal FrontendEndpointsOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "frontendEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorManagementClient.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorManagementClient.cs index d70706e3fe1c..d4327514f3b6 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorManagementClient.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorManagementClient.cs @@ -14,10 +14,6 @@ namespace Microsoft.Azure.Management.FrontDoor using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// FrontDoor Client @@ -90,6 +86,16 @@ public partial interface IFrontDoorManagementClient : System.IDisposable /// IReportsOperations Reports { get; } + /// + /// Gets the IFrontDoorNameAvailabilityOperations. + /// + IFrontDoorNameAvailabilityOperations FrontDoorNameAvailability { get; } + + /// + /// Gets the IFrontDoorNameAvailabilityWithSubscriptionOperations. + /// + IFrontDoorNameAvailabilityWithSubscriptionOperations FrontDoorNameAvailabilityWithSubscription { get; } + /// /// Gets the IFrontDoorsOperations. /// @@ -120,33 +126,5 @@ public partial interface IFrontDoorManagementClient : System.IDisposable /// IManagedRuleSetsOperations ManagedRuleSets { get; } - /// - /// Check the availability of a Front Door resource name. - /// - /// - /// Input to check. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> CheckFrontDoorNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Check the availability of a Front Door subdomain. - /// - /// - /// Input to check. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> CheckFrontDoorNameAvailabilityWithSubscriptionWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } } diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorNameAvailabilityOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorNameAvailabilityOperations.cs new file mode 100644 index 000000000000..06ff23a2ac88 --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorNameAvailabilityOperations.cs @@ -0,0 +1,49 @@ +// +// 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.FrontDoor +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FrontDoorNameAvailabilityOperations operations. + /// + public partial interface IFrontDoorNameAvailabilityOperations + { + /// + /// Check the availability of a Front Door resource name. + /// + /// + /// Input to check. + /// + /// + /// 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> CheckWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorNameAvailabilityWithSubscriptionOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorNameAvailabilityWithSubscriptionOperations.cs new file mode 100644 index 000000000000..cb0af605bcd6 --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/IFrontDoorNameAvailabilityWithSubscriptionOperations.cs @@ -0,0 +1,49 @@ +// +// 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.FrontDoor +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FrontDoorNameAvailabilityWithSubscriptionOperations operations. + /// + public partial interface IFrontDoorNameAvailabilityWithSubscriptionOperations + { + /// + /// Check the availability of a Front Door subdomain. + /// + /// + /// Input to check. + /// + /// + /// 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> CheckWithHttpMessagesAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/ManagedRuleSetsOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/ManagedRuleSetsOperations.cs index 3f366487cd7e..fa101cccb730 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/ManagedRuleSetsOperations.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/ManagedRuleSetsOperations.cs @@ -80,7 +80,7 @@ internal ManagedRuleSetsOperations(FrontDoorManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-11-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/Backend.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/Backend.cs index c76462908cc6..921ee85f71c0 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/Backend.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/Backend.cs @@ -35,6 +35,12 @@ public Backend() /// The Alias of the Private Link /// resource. Populating this optional field indicates that this /// backend is 'Private' + /// The Resource Id of the Private + /// Link resource. Populating this optional field indicates that this + /// backend is 'Private' + /// The location of the Private Link + /// resource. Required only if 'privateLinkResourceId' is + /// populated /// The Approval status for the /// connection to the Private Link. Possible values include: 'Pending', /// 'Approved', 'Rejected', 'Disconnected', 'Timeout' @@ -56,10 +62,12 @@ public Backend() /// The value to use as the host header /// sent to the backend. If blank or unspecified, this defaults to the /// incoming host. - public Backend(string address = default(string), string privateLinkAlias = default(string), PrivateEndpointStatus? privateEndpointStatus = default(PrivateEndpointStatus?), string privateLinkApprovalMessage = default(string), int? httpPort = default(int?), int? httpsPort = default(int?), string enabledState = default(string), int? priority = default(int?), int? weight = default(int?), string backendHostHeader = default(string)) + public Backend(string address = default(string), string privateLinkAlias = default(string), string privateLinkResourceId = default(string), string privateLinkLocation = default(string), string privateEndpointStatus = default(string), string privateLinkApprovalMessage = default(string), int? httpPort = default(int?), int? httpsPort = default(int?), string enabledState = default(string), int? priority = default(int?), int? weight = default(int?), string backendHostHeader = default(string)) { Address = address; PrivateLinkAlias = privateLinkAlias; + PrivateLinkResourceId = privateLinkResourceId; + PrivateLinkLocation = privateLinkLocation; PrivateEndpointStatus = privateEndpointStatus; PrivateLinkApprovalMessage = privateLinkApprovalMessage; HttpPort = httpPort; @@ -89,13 +97,28 @@ public Backend() [JsonProperty(PropertyName = "privateLinkAlias")] public string PrivateLinkAlias { get; set; } + /// + /// Gets or sets the Resource Id of the Private Link resource. + /// Populating this optional field indicates that this backend is + /// 'Private' + /// + [JsonProperty(PropertyName = "privateLinkResourceId")] + public string PrivateLinkResourceId { get; set; } + + /// + /// Gets or sets the location of the Private Link resource. Required + /// only if 'privateLinkResourceId' is populated + /// + [JsonProperty(PropertyName = "privateLinkLocation")] + public string PrivateLinkLocation { get; set; } + /// /// Gets the Approval status for the connection to the Private Link. /// Possible values include: 'Pending', 'Approved', 'Rejected', /// 'Disconnected', 'Timeout' /// [JsonProperty(PropertyName = "privateEndpointStatus")] - public PrivateEndpointStatus? PrivateEndpointStatus { get; private set; } + public string PrivateEndpointStatus { get; private set; } /// /// Gets or sets a custom message to be included in the approval diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/PrivateEndpointStatus.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/PrivateEndpointStatus.cs index 8aaca09cb4f4..9610a315b530 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/PrivateEndpointStatus.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/PrivateEndpointStatus.cs @@ -10,69 +10,16 @@ namespace Microsoft.Azure.Management.FrontDoor.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for PrivateEndpointStatus. /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrivateEndpointStatus + public static class PrivateEndpointStatus { - [EnumMember(Value = "Pending")] - Pending, - [EnumMember(Value = "Approved")] - Approved, - [EnumMember(Value = "Rejected")] - Rejected, - [EnumMember(Value = "Disconnected")] - Disconnected, - [EnumMember(Value = "Timeout")] - Timeout - } - internal static class PrivateEndpointStatusEnumExtension - { - internal static string ToSerializedValue(this PrivateEndpointStatus? value) - { - return value == null ? null : ((PrivateEndpointStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this PrivateEndpointStatus value) - { - switch( value ) - { - case PrivateEndpointStatus.Pending: - return "Pending"; - case PrivateEndpointStatus.Approved: - return "Approved"; - case PrivateEndpointStatus.Rejected: - return "Rejected"; - case PrivateEndpointStatus.Disconnected: - return "Disconnected"; - case PrivateEndpointStatus.Timeout: - return "Timeout"; - } - return null; - } - - internal static PrivateEndpointStatus? ParsePrivateEndpointStatus(this string value) - { - switch( value ) - { - case "Pending": - return PrivateEndpointStatus.Pending; - case "Approved": - return PrivateEndpointStatus.Approved; - case "Rejected": - return PrivateEndpointStatus.Rejected; - case "Disconnected": - return PrivateEndpointStatus.Disconnected; - case "Timeout": - return PrivateEndpointStatus.Timeout; - } - return null; - } + public const string Pending = "Pending"; + public const string Approved = "Approved"; + public const string Rejected = "Rejected"; + public const string Disconnected = "Disconnected"; + public const string Timeout = "Timeout"; } } diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RouteConfiguration.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RouteConfiguration.cs index 75c3f91c243a..6790a4cfceae 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RouteConfiguration.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RouteConfiguration.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.FrontDoor.Models { - using Newtonsoft.Json; using System.Linq; /// /// Base class for all types of Route. /// - [Newtonsoft.Json.JsonObject("RouteConfiguration")] public partial class RouteConfiguration { /// diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRule.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRule.cs index c0651ae98f49..ecda3ed116e2 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRule.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRule.cs @@ -49,12 +49,15 @@ public RoutingRule() /// configuration. /// A reference to a specific Rules Engine /// Configuration to apply to this route. + /// Defines the Web + /// Application Firewall policy for each routing rule (if + /// applicable) /// Resource status. Possible values /// include: 'Creating', 'Enabling', 'Enabled', 'Disabling', /// 'Disabled', 'Deleting' /// Resource name. /// Resource type. - public RoutingRule(string id = default(string), IList frontendEndpoints = default(IList), IList acceptedProtocols = default(IList), IList patternsToMatch = default(IList), string enabledState = default(string), RouteConfiguration routeConfiguration = default(RouteConfiguration), SubResource rulesEngine = default(SubResource), string resourceState = default(string), string name = default(string), string type = default(string)) + public RoutingRule(string id = default(string), IList frontendEndpoints = default(IList), IList acceptedProtocols = default(IList), IList patternsToMatch = default(IList), string enabledState = default(string), RouteConfiguration routeConfiguration = default(RouteConfiguration), SubResource rulesEngine = default(SubResource), RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink = default(RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink), string resourceState = default(string), string name = default(string), string type = default(string)) : base(id) { FrontendEndpoints = frontendEndpoints; @@ -63,6 +66,7 @@ public RoutingRule() EnabledState = enabledState; RouteConfiguration = routeConfiguration; RulesEngine = rulesEngine; + WebApplicationFirewallPolicyLink = webApplicationFirewallPolicyLink; ResourceState = resourceState; Name = name; Type = type; @@ -113,6 +117,13 @@ public RoutingRule() [JsonProperty(PropertyName = "properties.rulesEngine")] public SubResource RulesEngine { get; set; } + /// + /// Gets or sets defines the Web Application Firewall policy for each + /// routing rule (if applicable) + /// + [JsonProperty(PropertyName = "properties.webApplicationFirewallPolicyLink")] + public RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get; set; } + /// /// Gets or sets resource status. Possible values include: 'Creating', /// 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleLink.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleLink.cs new file mode 100644 index 000000000000..133675f487cf --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleLink.cs @@ -0,0 +1,51 @@ +// +// 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.FrontDoor.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the Resource ID for a Routing Rule. + /// + public partial class RoutingRuleLink + { + /// + /// Initializes a new instance of the RoutingRuleLink class. + /// + public RoutingRuleLink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RoutingRuleLink class. + /// + /// Resource ID. + public RoutingRuleLink(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleUpdateParameters.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleUpdateParameters.cs index bd23c35c05f2..9218536aa6be 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleUpdateParameters.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleUpdateParameters.cs @@ -46,7 +46,10 @@ public RoutingRuleUpdateParameters() /// configuration. /// A reference to a specific Rules Engine /// Configuration to apply to this route. - public RoutingRuleUpdateParameters(IList frontendEndpoints = default(IList), IList acceptedProtocols = default(IList), IList patternsToMatch = default(IList), string enabledState = default(string), RouteConfiguration routeConfiguration = default(RouteConfiguration), SubResource rulesEngine = default(SubResource)) + /// Defines the Web + /// Application Firewall policy for each routing rule (if + /// applicable) + public RoutingRuleUpdateParameters(IList frontendEndpoints = default(IList), IList acceptedProtocols = default(IList), IList patternsToMatch = default(IList), string enabledState = default(string), RouteConfiguration routeConfiguration = default(RouteConfiguration), SubResource rulesEngine = default(SubResource), RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink = default(RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink)) { FrontendEndpoints = frontendEndpoints; AcceptedProtocols = acceptedProtocols; @@ -54,6 +57,7 @@ public RoutingRuleUpdateParameters() EnabledState = enabledState; RouteConfiguration = routeConfiguration; RulesEngine = rulesEngine; + WebApplicationFirewallPolicyLink = webApplicationFirewallPolicyLink; CustomInit(); } @@ -101,5 +105,12 @@ public RoutingRuleUpdateParameters() [JsonProperty(PropertyName = "rulesEngine")] public SubResource RulesEngine { get; set; } + /// + /// Gets or sets defines the Web Application Firewall policy for each + /// routing rule (if applicable) + /// + [JsonProperty(PropertyName = "webApplicationFirewallPolicyLink")] + public RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get; set; } + } } diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.cs new file mode 100644 index 000000000000..d1c8625931fe --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.cs @@ -0,0 +1,54 @@ +// +// 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.FrontDoor.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the Web Application Firewall policy for each routing rule (if + /// applicable) + /// + public partial class RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink + { + /// + /// Initializes a new instance of the + /// RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink class. + /// + public RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink class. + /// + /// Resource ID. + public RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource ID. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/Sku.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/Sku.cs new file mode 100644 index 000000000000..de61e9b2f936 --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/Sku.cs @@ -0,0 +1,55 @@ +// +// 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.FrontDoor.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The pricing tier of the web application firewall policy. + /// + public partial class Sku + { + /// + /// Initializes a new instance of the Sku class. + /// + public Sku() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Sku class. + /// + /// Name of the pricing tier. Possible values + /// include: 'Classic_AzureFrontDoor', 'Standard_AzureFrontDoor', + /// 'Premium_AzureFrontDoor' + public Sku(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the pricing tier. Possible values include: + /// 'Classic_AzureFrontDoor', 'Standard_AzureFrontDoor', + /// 'Premium_AzureFrontDoor' + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/SkuName.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/SkuName.cs new file mode 100644 index 000000000000..482a0843239e --- /dev/null +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/SkuName.cs @@ -0,0 +1,23 @@ +// +// 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.FrontDoor.Models +{ + + /// + /// Defines values for SkuName. + /// + public static class SkuName + { + public const string ClassicAzureFrontDoor = "Classic_AzureFrontDoor"; + public const string StandardAzureFrontDoor = "Standard_AzureFrontDoor"; + public const string PremiumAzureFrontDoor = "Premium_AzureFrontDoor"; + } +} diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/WebApplicationFirewallPolicy.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/WebApplicationFirewallPolicy.cs index dbc4bfe3b084..c0811c34dd6b 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/WebApplicationFirewallPolicy.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/Models/WebApplicationFirewallPolicy.cs @@ -36,6 +36,8 @@ public WebApplicationFirewallPolicy() /// Initializes a new instance of the WebApplicationFirewallPolicy /// class. /// + /// The pricing tier of web application firewall + /// policy. /// Resource ID. /// Resource name. /// Resource type. @@ -49,21 +51,25 @@ public WebApplicationFirewallPolicy() /// policy. /// Describes Frontend Endpoints /// associated with this Web Application Firewall policy. + /// Describes Routing Rules associated + /// with this Web Application Firewall policy. /// Provisioning state of the /// policy. /// Resource status of the policy. /// Gets a unique read-only string that changes /// whenever the resource is updated. - public WebApplicationFirewallPolicy(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), PolicySettings policySettings = default(PolicySettings), CustomRuleList customRules = default(CustomRuleList), ManagedRuleSetList managedRules = default(ManagedRuleSetList), IList frontendEndpointLinks = default(IList), string provisioningState = default(string), string resourceState = default(string), string etag = default(string)) + public WebApplicationFirewallPolicy(Sku sku, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), PolicySettings policySettings = default(PolicySettings), CustomRuleList customRules = default(CustomRuleList), ManagedRuleSetList managedRules = default(ManagedRuleSetList), IList frontendEndpointLinks = default(IList), IList routingRuleLinks = default(IList), string provisioningState = default(string), string resourceState = default(string), string etag = default(string)) : base(id, name, type, location, tags) { PolicySettings = policySettings; CustomRules = customRules; ManagedRules = managedRules; FrontendEndpointLinks = frontendEndpointLinks; + RoutingRuleLinks = routingRuleLinks; ProvisioningState = provisioningState; ResourceState = resourceState; Etag = etag; + Sku = sku; CustomInit(); } @@ -97,6 +103,13 @@ public WebApplicationFirewallPolicy() [JsonProperty(PropertyName = "properties.frontendEndpointLinks")] public IList FrontendEndpointLinks { get; private set; } + /// + /// Gets describes Routing Rules associated with this Web Application + /// Firewall policy. + /// + [JsonProperty(PropertyName = "properties.routingRuleLinks")] + public IList RoutingRuleLinks { get; private set; } + /// /// Gets provisioning state of the policy. /// @@ -120,6 +133,12 @@ public WebApplicationFirewallPolicy() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets or sets the pricing tier of web application firewall policy. + /// + [JsonProperty(PropertyName = "sku")] + public Sku Sku { get; set; } + /// /// Validate the object. /// @@ -128,6 +147,10 @@ public WebApplicationFirewallPolicy() /// public virtual void Validate() { + if (Sku == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Sku"); + } if (PolicySettings != null) { PolicySettings.Validate(); diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/PoliciesOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/PoliciesOperations.cs index 583e9daba588..8451e70df29a 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/PoliciesOperations.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/PoliciesOperations.cs @@ -102,7 +102,7 @@ internal PoliciesOperations(FrontDoorManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-11-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -117,7 +117,7 @@ internal PoliciesOperations(FrontDoorManagementClient client) } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); @@ -311,7 +311,7 @@ internal PoliciesOperations(FrontDoorManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-11-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -582,7 +582,7 @@ internal PoliciesOperations(FrontDoorManagementClient client) { parameters.Validate(); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-11-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -833,7 +833,7 @@ internal PoliciesOperations(FrontDoorManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-11-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/RulesEnginesOperations.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/RulesEnginesOperations.cs index b590e2d4f6dc..a4254bdaaca4 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/RulesEnginesOperations.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/RulesEnginesOperations.cs @@ -124,7 +124,7 @@ internal RulesEnginesOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "frontDoorName", "^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -366,7 +366,7 @@ internal RulesEnginesOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "rulesEngineName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -674,7 +674,7 @@ internal RulesEnginesOperations(FrontDoorManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "rulesEngineParameters"); } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -958,7 +958,7 @@ internal RulesEnginesOperations(FrontDoorManagementClient client) throw new ValidationException(ValidationRules.Pattern, "rulesEngineName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-01-01"; + string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/SdkInfo_FrontDoorManagementClient.cs b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/SdkInfo_FrontDoorManagementClient.cs index 885315462903..55726593de5a 100644 --- a/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/SdkInfo_FrontDoorManagementClient.cs +++ b/sdk/frontdoor/Microsoft.Azure.Management.FrontDoor/src/Generated/SdkInfo_FrontDoorManagementClient.cs @@ -19,31 +19,20 @@ public static IEnumerable> ApiInfo_FrontDoorManage { return new Tuple[] { - new Tuple("Network", "CheckFrontDoorNameAvailability", "2020-01-01"), - new Tuple("Network", "CheckFrontDoorNameAvailabilityWithSubscription", "2020-01-01"), - new Tuple("Network", "Endpoints", "2020-01-01"), + new Tuple("Network", "Endpoints", "2020-05-01"), new Tuple("Network", "Experiments", "2019-11-01"), - new Tuple("Network", "FrontDoors", "2020-01-01"), - new Tuple("Network", "FrontendEndpoints", "2020-01-01"), - new Tuple("Network", "ManagedRuleSets", "2019-10-01"), + new Tuple("Network", "FrontDoorNameAvailability", "2020-05-01"), + new Tuple("Network", "FrontDoorNameAvailabilityWithSubscription", "2020-05-01"), + new Tuple("Network", "FrontDoors", "2020-05-01"), + new Tuple("Network", "FrontendEndpoints", "2020-05-01"), + new Tuple("Network", "ManagedRuleSets", "2020-11-01"), new Tuple("Network", "NetworkExperimentProfiles", "2019-11-01"), - new Tuple("Network", "Policies", "2019-10-01"), + new Tuple("Network", "Policies", "2020-11-01"), new Tuple("Network", "PreconfiguredEndpoints", "2019-11-01"), new Tuple("Network", "Reports", "2019-11-01"), - new Tuple("Network", "RulesEngines", "2020-01-01"), + new Tuple("Network", "RulesEngines", "2020-05-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "2.0.4413"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/frontdoor/resource-manager/readme.md --csharp --version=2.0.4413 --reflect-api-versions --csharp-sdks-folder=C:\\AFD\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "1580acb8ce9108317cb629532ece1cea272450d3"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -