diff --git a/src/SDKs/CognitiveServices/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs b/src/SDKs/CognitiveServices/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs index 8b4f826686659..634d4449c3ec1 100644 --- a/src/SDKs/CognitiveServices/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs +++ b/src/SDKs/CognitiveServices/CognitiveServices.Tests/Tests/CognitiveServicesAccountTests.cs @@ -552,9 +552,8 @@ public void CognitiveServicesCheckSkuAvailabilityTest() var resourcesClient = CognitiveServicesManagementTestUtilities.GetResourceManagementClient(context, handler); var cognitiveServicesMgmtClient = CognitiveServicesManagementTestUtilities.GetCognitiveServicesManagementClient(context, handler); - cognitiveServicesMgmtClient.Location = "westus"; - var skus = cognitiveServicesMgmtClient.CheckSkuAvailability.List( + location: "westus", skus: new List() { SkuName.S0 }, kind: Kind.Face, type: $"{c_resourceNamespace}/{c_resourceType}"); diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperations.cs index a85a9e4a1e81e..4107ef18c8102 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -118,9 +118,9 @@ internal AccountsOperations(CognitiveServicesManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -291,9 +291,9 @@ internal AccountsOperations(CognitiveServicesManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -460,9 +460,9 @@ internal AccountsOperations(CognitiveServicesManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -628,9 +628,9 @@ internal AccountsOperations(CognitiveServicesManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -745,4 +745,3 @@ internal AccountsOperations(CognitiveServicesManagementClient client) } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperationsExtensions.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperationsExtensions.cs index 0d04253390abf..673b8f804e25b 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/AccountsOperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Threading; using System.Threading.Tasks; @@ -157,4 +157,3 @@ public static IPage ListNext(this IAccountsOperations } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs index a99decaf5f098..235400e1d52c1 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -53,6 +53,9 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client /// /// Check available SKUs. /// + /// + /// Resource location. + /// /// /// The SKU of the resource. /// @@ -87,7 +90,7 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(IList skus, string kind, string type, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListWithHttpMessagesAsync(string location, IList skus, string kind, string type, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -97,9 +100,9 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.Location == null) + if (location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Location"); + throw new ValidationException(ValidationRules.CannotBeNull, "location"); } if (skus == null) { @@ -127,6 +130,7 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); @@ -135,7 +139,7 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client var _baseUrl = Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(Client.Location)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); if (Client.ApiVersion != null) { @@ -146,9 +150,9 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -182,7 +186,7 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -274,4 +278,3 @@ internal CheckSkuAvailabilityOperations(CognitiveServicesManagementClient client } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs index 8264eb90cf720..8bea7f599d2a7 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CheckSkuAvailabilityOperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -29,6 +29,9 @@ public static partial class CheckSkuAvailabilityOperationsExtensions /// /// The operations group for this extension method. /// + /// + /// Resource location. + /// /// /// The SKU of the resource. /// @@ -42,9 +45,9 @@ public static partial class CheckSkuAvailabilityOperationsExtensions /// /// The Type of the resource. /// - public static CheckSkuAvailabilityResultList List(this ICheckSkuAvailabilityOperations operations, IList skus, string kind, string type) + public static CheckSkuAvailabilityResultList List(this ICheckSkuAvailabilityOperations operations, string location, IList skus, string kind, string type) { - return operations.ListAsync(skus, kind, type).GetAwaiter().GetResult(); + return operations.ListAsync(location, skus, kind, type).GetAwaiter().GetResult(); } /// @@ -53,6 +56,9 @@ public static CheckSkuAvailabilityResultList List(this ICheckSkuAvailabilityOper /// /// The operations group for this extension method. /// + /// + /// Resource location. + /// /// /// The SKU of the resource. /// @@ -69,9 +75,9 @@ public static CheckSkuAvailabilityResultList List(this ICheckSkuAvailabilityOper /// /// The cancellation token. /// - public static async Task ListAsync(this ICheckSkuAvailabilityOperations operations, IList skus, string kind, string type, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListAsync(this ICheckSkuAvailabilityOperations operations, string location, IList skus, string kind, string type, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(skus, kind, type, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(location, skus, kind, type, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -79,4 +85,3 @@ public static CheckSkuAvailabilityResultList List(this ICheckSkuAvailabilityOper } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperations.cs index febf46692ad5d..c824a46152d79 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -155,9 +155,9 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -191,7 +191,7 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -406,9 +406,9 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -442,7 +442,7 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -615,9 +615,9 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -803,9 +803,9 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1009,9 +1009,9 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -1222,9 +1222,9 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + 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) @@ -1258,7 +1258,7 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c if(parameters != null) { _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _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 @@ -1434,9 +1434,9 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1551,4 +1551,3 @@ internal CognitiveServicesAccountsOperations(CognitiveServicesManagementClient c } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperationsExtensions.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperationsExtensions.cs index b8f5f38e41059..1bcb03a4bc7f1 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesAccountsOperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -167,7 +167,7 @@ public static void Delete(this ICognitiveServicesAccountsOperations operations, /// public static async Task DeleteAsync(this ICognitiveServicesAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { - await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -340,4 +340,3 @@ public static CognitiveServicesAccountEnumerateSkusResult ListSkus(this ICogniti } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesManagementClient.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesManagementClient.cs index 356fd5e86bd77..55391fe5ceaa3 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesManagementClient.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/CognitiveServicesManagementClient.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; using Models; using Newtonsoft.Json; using System.Collections; @@ -57,11 +57,6 @@ public partial class CognitiveServicesManagementClient : ServiceClient public string ApiVersion { get; private set; } - /// - /// Resource location. - /// - public string Location { get; set; } - /// /// Gets or sets the preferred language for the response. /// @@ -105,7 +100,7 @@ public partial class CognitiveServicesManagementClient : ServiceClient /// Optional. The delegating handlers to add to the http client pipeline. /// - protected CognitiveServicesManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) + protected CognitiveServicesManagementClient(params DelegatingHandler[] handlers) : base(handlers) { Initialize(); } @@ -119,7 +114,7 @@ protected CognitiveServicesManagementClient(params System.Net.Http.DelegatingHan /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected CognitiveServicesManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected CognitiveServicesManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { Initialize(); } @@ -136,7 +131,7 @@ protected CognitiveServicesManagementClient(System.Net.Http.HttpClientHandler ro /// /// Thrown when a required parameter is null /// - protected CognitiveServicesManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + protected CognitiveServicesManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -160,7 +155,7 @@ protected CognitiveServicesManagementClient(System.Uri baseUri, params System.Ne /// /// Thrown when a required parameter is null /// - protected CognitiveServicesManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected CognitiveServicesManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -181,7 +176,7 @@ protected CognitiveServicesManagementClient(System.Uri baseUri, System.Net.Http. /// /// Thrown when a required parameter is null /// - public CognitiveServicesManagementClient(ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + public CognitiveServicesManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -209,7 +204,7 @@ public CognitiveServicesManagementClient(ServiceClientCredentials credentials, p /// /// Thrown when a required parameter is null /// - public CognitiveServicesManagementClient(ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + public CognitiveServicesManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { @@ -237,7 +232,7 @@ public CognitiveServicesManagementClient(ServiceClientCredentials credentials, S /// /// Thrown when a required parameter is null /// - public CognitiveServicesManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + public CognitiveServicesManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -273,7 +268,7 @@ public CognitiveServicesManagementClient(System.Uri baseUri, ServiceClientCreden /// /// Thrown when a required parameter is null /// - public CognitiveServicesManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + public CognitiveServicesManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -311,11 +306,11 @@ private void Initialize() GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { - Formatting = Formatting.Indented, - DateFormatHandling = DateFormatHandling.IsoDateFormat, - DateTimeZoneHandling = DateTimeZoneHandling.Utc, - NullValueHandling = NullValueHandling.Ignore, - ReferenceLoopHandling = ReferenceLoopHandling.Serialize, + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List { @@ -325,10 +320,10 @@ private void Initialize() SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { - DateFormatHandling = DateFormatHandling.IsoDateFormat, - DateTimeZoneHandling = DateTimeZoneHandling.Utc, - NullValueHandling = NullValueHandling.Ignore, - ReferenceLoopHandling = ReferenceLoopHandling.Serialize, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List { @@ -341,4 +336,3 @@ private void Initialize() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IAccountsOperations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IAccountsOperations.cs index 3f9f0850e0d3f..9543066af2504 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IAccountsOperations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IAccountsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -114,4 +114,3 @@ public partial interface IAccountsOperations Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs index 23626aaed2c62..e73cad2040715 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICheckSkuAvailabilityOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -26,6 +26,9 @@ public partial interface ICheckSkuAvailabilityOperations /// /// Check available SKUs. /// + /// + /// Resource location. + /// /// /// The SKU of the resource. /// @@ -55,7 +58,6 @@ public partial interface ICheckSkuAvailabilityOperations /// /// Thrown when a required parameter is null /// - Task> ListWithHttpMessagesAsync(IList skus, string kind, string type, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListWithHttpMessagesAsync(string location, IList skus, string kind, string type, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesAccountsOperations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesAccountsOperations.cs index db373bf87eae9..672cd297df3dc 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesAccountsOperations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesAccountsOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -218,4 +218,3 @@ public partial interface ICognitiveServicesAccountsOperations Task> ListSkusWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesManagementClient.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesManagementClient.cs index e1aca8a5a5851..13c056f145220 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesManagementClient.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/ICognitiveServicesManagementClient.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; @@ -51,11 +51,6 @@ public partial interface ICognitiveServicesManagementClient : System.IDisposable /// string ApiVersion { get; } - /// - /// Resource location. - /// - string Location { get; set; } - /// /// Gets or sets the preferred language for the response. /// @@ -96,4 +91,3 @@ public partial interface ICognitiveServicesManagementClient : System.IDisposable } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IOperations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IOperations.cs index 270d36af4f1c5..ab3cb52501664 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IOperations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/IOperations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; @@ -66,4 +66,3 @@ public partial interface IOperations Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs index ba1edc06f979c..4336e7eecf307 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityParameter.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; - using Rest; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; + using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -26,7 +26,10 @@ public partial class CheckSkuAvailabilityParameter /// Initializes a new instance of the CheckSkuAvailabilityParameter /// class. /// - public CheckSkuAvailabilityParameter() { } + public CheckSkuAvailabilityParameter() + { + CustomInit(); + } /// /// Initializes a new instance of the CheckSkuAvailabilityParameter @@ -46,8 +49,14 @@ public CheckSkuAvailabilityParameter(IList skus, string kind, string typ Skus = skus; Kind = kind; Type = type; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the SKU of the resource. /// @@ -94,4 +103,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs index daf5d4b0bfc70..148904a5bd037 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResult.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class CheckSkuAvailabilityResult /// /// Initializes a new instance of the CheckSkuAvailabilityResult class. /// - public CheckSkuAvailabilityResult() { } + public CheckSkuAvailabilityResult() + { + CustomInit(); + } /// /// Initializes a new instance of the CheckSkuAvailabilityResult class. @@ -50,8 +53,14 @@ public CheckSkuAvailabilityResult() { } SkuAvailable = skuAvailable; Reason = reason; Message = message; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the Kind of the resource. Possible values include: /// 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', @@ -97,4 +106,3 @@ public CheckSkuAvailabilityResult() { } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResultList.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResultList.cs index 89c9b5da7a4a5..a5a46b241ea18 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResultList.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CheckSkuAvailabilityResultList.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -25,7 +25,10 @@ public partial class CheckSkuAvailabilityResultList /// Initializes a new instance of the CheckSkuAvailabilityResultList /// class. /// - public CheckSkuAvailabilityResultList() { } + public CheckSkuAvailabilityResultList() + { + CustomInit(); + } /// /// Initializes a new instance of the CheckSkuAvailabilityResultList @@ -35,8 +38,14 @@ public CheckSkuAvailabilityResultList() { } public CheckSkuAvailabilityResultList(IList value = default(IList)) { Value = value; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets check SKU availability result list. /// @@ -45,4 +54,3 @@ public CheckSkuAvailabilityResultList() { } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs index 99acf4d5c2453..b8e7827d7b857 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs @@ -2,18 +2,18 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; - using Rest; - using Rest.Azure; - using Rest.Serialization; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -23,13 +23,16 @@ namespace Microsoft.Azure.Management.CognitiveServices.Models /// Cognitive Services Account is an Azure resource representing the /// provisioned account, its type, location and SKU. /// - [JsonTransformation] + [Rest.Serialization.JsonTransformation] public partial class CognitiveServicesAccount : IResource { /// /// Initializes a new instance of the CognitiveServicesAccount class. /// - public CognitiveServicesAccount() { } + public CognitiveServicesAccount() + { + CustomInit(); + } /// /// Initializes a new instance of the CognitiveServicesAccount class. @@ -66,8 +69,14 @@ public CognitiveServicesAccount() { } Sku = sku; Tags = tags; Type = type; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets entity Tag /// @@ -104,7 +113,7 @@ public CognitiveServicesAccount() { } /// 'ResolvingDNS', 'Succeeded', 'Failed' /// [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; protected set; } + public ProvisioningState? ProvisioningState { get; private set; } /// /// Gets or sets endpoint of the created account. @@ -155,4 +164,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs index f4b2cb5a2c458..f1627e748a217 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountCreateParameters.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; - using Rest; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; + using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -26,7 +26,10 @@ public partial class CognitiveServicesAccountCreateParameters /// Initializes a new instance of the /// CognitiveServicesAccountCreateParameters class. /// - public CognitiveServicesAccountCreateParameters() { } + public CognitiveServicesAccountCreateParameters() + { + CustomInit(); + } /// /// Initializes a new instance of the @@ -62,8 +65,14 @@ public CognitiveServicesAccountCreateParameters() { } Location = location; Tags = tags; Properties = properties; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets required. Gets or sets the SKU of the resource. /// @@ -139,4 +148,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountEnumerateSkusResult.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountEnumerateSkusResult.cs index 89a345f83e65d..a1670b8dfa8c9 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountEnumerateSkusResult.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountEnumerateSkusResult.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -25,7 +25,10 @@ public partial class CognitiveServicesAccountEnumerateSkusResult /// Initializes a new instance of the /// CognitiveServicesAccountEnumerateSkusResult class. /// - public CognitiveServicesAccountEnumerateSkusResult() { } + public CognitiveServicesAccountEnumerateSkusResult() + { + CustomInit(); + } /// /// Initializes a new instance of the @@ -36,14 +39,19 @@ public CognitiveServicesAccountEnumerateSkusResult() { } public CognitiveServicesAccountEnumerateSkusResult(IList value = default(IList)) { Value = value; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the list of Cognitive Services accounts and their properties. /// [JsonProperty(PropertyName = "value")] - public IList Value { get; protected set; } + public IList Value { get; private set; } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountKeys.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountKeys.cs index ba4f5c0f3ff10..44e541c5e2f8c 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountKeys.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountKeys.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Linq; @@ -23,7 +23,10 @@ public partial class CognitiveServicesAccountKeys /// Initializes a new instance of the CognitiveServicesAccountKeys /// class. /// - public CognitiveServicesAccountKeys() { } + public CognitiveServicesAccountKeys() + { + CustomInit(); + } /// /// Initializes a new instance of the CognitiveServicesAccountKeys @@ -35,8 +38,14 @@ public CognitiveServicesAccountKeys() { } { Key1 = key1; Key2 = key2; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets the value of key 1. /// @@ -51,4 +60,3 @@ public CognitiveServicesAccountKeys() { } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountUpdateParameters.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountUpdateParameters.cs index afd5114827617..370d9d51fd0b1 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountUpdateParameters.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesAccountUpdateParameters.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -25,7 +25,10 @@ public partial class CognitiveServicesAccountUpdateParameters /// Initializes a new instance of the /// CognitiveServicesAccountUpdateParameters class. /// - public CognitiveServicesAccountUpdateParameters() { } + public CognitiveServicesAccountUpdateParameters() + { + CustomInit(); + } /// /// Initializes a new instance of the @@ -42,8 +45,14 @@ public CognitiveServicesAccountUpdateParameters() { } { Sku = sku; Tags = tags; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the SKU of the resource. /// @@ -75,4 +84,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesResourceAndSku.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesResourceAndSku.cs index 67762976c1f75..bd07f0a0ac963 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesResourceAndSku.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/CognitiveServicesResourceAndSku.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Linq; @@ -23,7 +23,10 @@ public partial class CognitiveServicesResourceAndSku /// Initializes a new instance of the CognitiveServicesResourceAndSku /// class. /// - public CognitiveServicesResourceAndSku() { } + public CognitiveServicesResourceAndSku() + { + CustomInit(); + } /// /// Initializes a new instance of the CognitiveServicesResourceAndSku @@ -35,8 +38,14 @@ public CognitiveServicesResourceAndSku() { } { ResourceType = resourceType; Sku = sku; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets resource Namespace and Type /// @@ -64,4 +73,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Error.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Error.cs index 98cbcc849bdae..c0498b0cb8c92 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Error.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Error.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class Error /// /// Initializes a new instance of the Error class. /// - public Error() { } + public Error() + { + CustomInit(); + } /// /// Initializes a new instance of the Error class. @@ -31,8 +34,14 @@ public Error() { } public Error(ErrorBody errorProperty = default(ErrorBody)) { ErrorProperty = errorProperty; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the error body. /// @@ -54,4 +63,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorBody.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorBody.cs index 38d7dc794e65d..3a1ae6acec5c1 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorBody.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorBody.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; - using Rest; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -23,7 +23,10 @@ public partial class ErrorBody /// /// Initializes a new instance of the ErrorBody class. /// - public ErrorBody() { } + public ErrorBody() + { + CustomInit(); + } /// /// Initializes a new instance of the ErrorBody class. @@ -34,8 +37,14 @@ public ErrorBody(string code, string message) { Code = code; Message = message; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets error code /// @@ -67,4 +76,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorException.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorException.cs index daea2dfb93e72..b2fb213d29c14 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorException.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ErrorException.cs @@ -2,26 +2,20 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; - using Rest; - using System.Runtime; - using System.Runtime.Serialization; - using System.Security; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; + using Microsoft.Rest; /// /// Exception thrown for an invalid response with Error information. /// -#if FullNetFx - [System.Serializable] -#endif public class ErrorException : RestException { /// @@ -64,40 +58,5 @@ public ErrorException(string message, System.Exception innerException) : base(message, innerException) { } - -#if FullNetFx - /// - /// Initializes a new instance of the ErrorException class. - /// - /// Serialization info. - /// Streaming context. - protected ErrorException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } - - /// - /// Serializes content of the exception. - /// - /// Serialization info. - /// Streaming context. - /// - /// Thrown when a required parameter is null - /// - [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter = true)] - public override void GetObjectData(SerializationInfo info, StreamingContext context) - { - base.GetObjectData(info, context); - if (info == null) - { - throw new System.ArgumentNullException("info"); - } - - info.AddValue("Request", Request); - info.AddValue("Response", Response); - info.AddValue("Body", Body); - } -#endif } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/KeyName.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/KeyName.cs index 4fc9d255cac64..c90a3e15d6f74 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/KeyName.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/KeyName.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -27,5 +27,33 @@ public enum KeyName [EnumMember(Value = "Key2")] Key2 } -} + internal static class KeyNameEnumExtension + { + internal static string ToSerializedValue(this KeyName? value) => + value == null ? null : ((KeyName)value).ToSerializedValue(); + + internal static string ToSerializedValue(this KeyName value) + { + switch( value ) + { + case KeyName.Key1: + return "Key1"; + case KeyName.Key2: + return "Key2"; + } + return null; + } + internal static KeyName? ParseKeyName(this string value) + { + switch( value ) + { + case "Key1": + return KeyName.Key1; + case "Key2": + return KeyName.Key2; + } + return null; + } + } +} diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Kind.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Kind.cs index 6e32b78bfc8ce..07c512a048c2c 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Kind.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Kind.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; /// /// Defines values for Kind. @@ -37,4 +37,3 @@ public static class Kind public const string WebLM = "WebLM"; } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationDisplayInfo.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationDisplayInfo.cs index 2f8d2f5651058..aabb871a2adde 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationDisplayInfo.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationDisplayInfo.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class OperationDisplayInfo /// /// Initializes a new instance of the OperationDisplayInfo class. /// - public OperationDisplayInfo() { } + public OperationDisplayInfo() + { + CustomInit(); + } /// /// Initializes a new instance of the OperationDisplayInfo class. @@ -40,8 +43,14 @@ public OperationDisplayInfo() { } Operation = operation; Provider = provider; Resource = resource; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the description of the operation. /// @@ -69,4 +78,3 @@ public OperationDisplayInfo() { } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationEntity.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationEntity.cs index 4383e20bece4f..dbd3fc21d57d0 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationEntity.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/OperationEntity.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class OperationEntity /// /// Initializes a new instance of the OperationEntity class. /// - public OperationEntity() { } + public OperationEntity() + { + CustomInit(); + } /// /// Initializes a new instance of the OperationEntity class. @@ -39,8 +42,14 @@ public OperationEntity() { } Display = display; Origin = origin; Properties = properties; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets operation name: {provider}/{resource}/{operation}. /// @@ -67,4 +76,3 @@ public OperationEntity() { } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Page.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Page.cs index 8f62b014046a4..9a6c81caf90e2 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Page.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Page.cs @@ -2,17 +2,17 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -52,4 +52,3 @@ IEnumerator IEnumerable.GetEnumerator() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ProvisioningState.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ProvisioningState.cs index 8be620d98e644..b90bc9217207a 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ProvisioningState.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/ProvisioningState.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -31,5 +31,41 @@ public enum ProvisioningState [EnumMember(Value = "Failed")] Failed } -} + internal static class ProvisioningStateEnumExtension + { + internal static string ToSerializedValue(this ProvisioningState? value) => + value == null ? null : ((ProvisioningState)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ProvisioningState value) + { + switch( value ) + { + case ProvisioningState.Creating: + return "Creating"; + case ProvisioningState.ResolvingDNS: + return "ResolvingDNS"; + case ProvisioningState.Succeeded: + return "Succeeded"; + case ProvisioningState.Failed: + return "Failed"; + } + return null; + } + internal static ProvisioningState? ParseProvisioningState(this string value) + { + switch( value ) + { + case "Creating": + return ProvisioningState.Creating; + case "ResolvingDNS": + return ProvisioningState.ResolvingDNS; + case "Succeeded": + return ProvisioningState.Succeeded; + case "Failed": + return ProvisioningState.Failed; + } + return null; + } + } +} diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/RegenerateKeyParameters.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/RegenerateKeyParameters.cs index a706183d51d0d..ff52b89aaed32 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/RegenerateKeyParameters.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/RegenerateKeyParameters.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using System.Linq; @@ -22,7 +22,10 @@ public partial class RegenerateKeyParameters /// /// Initializes a new instance of the RegenerateKeyParameters class. /// - public RegenerateKeyParameters() { } + public RegenerateKeyParameters() + { + CustomInit(); + } /// /// Initializes a new instance of the RegenerateKeyParameters class. @@ -32,8 +35,14 @@ public RegenerateKeyParameters() { } public RegenerateKeyParameters(KeyName keyName) { KeyName = keyName; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets key name to generate (Key1|Key2). Possible values /// include: 'Key1', 'Key2' @@ -52,4 +61,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Sku.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Sku.cs index 6bac56a6bab07..e2e4dbd314a24 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Sku.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/Sku.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; - using Rest; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -23,7 +23,10 @@ public partial class Sku /// /// Initializes a new instance of the Sku class. /// - public Sku() { } + public Sku() + { + CustomInit(); + } /// /// Initializes a new instance of the Sku class. @@ -38,8 +41,14 @@ public Sku() { } { Name = name; Tier = tier; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the sku name. Required for account creation, optional /// for update. Possible values include: 'F0', 'P0', 'P1', 'P2', 'S0', @@ -53,7 +62,7 @@ public Sku() { } /// include: 'Free', 'Standard', 'Premium' /// [JsonProperty(PropertyName = "tier")] - public SkuTier? Tier { get; protected set; } + public SkuTier? Tier { get; private set; } /// /// Validate the object. @@ -70,4 +79,3 @@ public virtual void Validate() } } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuName.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuName.cs index f6e805e37b110..a81d44530a16c 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuName.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuName.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; /// /// Defines values for SkuName. @@ -30,4 +30,3 @@ public static class SkuName public const string S6 = "S6"; } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuTier.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuTier.cs index 6d78dde68db8f..8ef7d563f614c 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuTier.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Models/SkuTier.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices.Models { - using Azure; - using Management; - using CognitiveServices; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.CognitiveServices; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime; @@ -29,5 +29,37 @@ public enum SkuTier [EnumMember(Value = "Premium")] Premium } -} + internal static class SkuTierEnumExtension + { + internal static string ToSerializedValue(this SkuTier? value) => + value == null ? null : ((SkuTier)value).ToSerializedValue(); + + internal static string ToSerializedValue(this SkuTier value) + { + switch( value ) + { + case SkuTier.Free: + return "Free"; + case SkuTier.Standard: + return "Standard"; + case SkuTier.Premium: + return "Premium"; + } + return null; + } + internal static SkuTier? ParseSkuTier(this string value) + { + switch( value ) + { + case "Free": + return SkuTier.Free; + case "Standard": + return SkuTier.Standard; + case "Premium": + return SkuTier.Premium; + } + return null; + } + } +} diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Operations.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Operations.cs index 2233d65c2001f..329d8d68cf57d 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Operations.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/Operations.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; using System.Collections; @@ -103,9 +103,9 @@ internal Operations(CognitiveServicesManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -276,9 +276,9 @@ internal Operations(CognitiveServicesManagementClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new System.Net.Http.HttpRequestMessage(); - System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -398,4 +398,3 @@ internal Operations(CognitiveServicesManagementClient client) } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/OperationsExtensions.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/OperationsExtensions.cs index ed1d6c3758f21..ea7d1aae81bf1 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/OperationsExtensions.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Generated/OperationsExtensions.cs @@ -2,16 +2,16 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0 +// 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.CognitiveServices { - using Azure; - using Management; - using Rest; - using Rest.Azure; + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Rest; + using Microsoft.Rest.Azure; using Models; using System.Threading; using System.Threading.Tasks; @@ -85,4 +85,3 @@ public static IPage ListNext(this IOperations operations, strin } } - diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj b/src/SDKs/CognitiveServices/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj index bf65dfcf73d7c..39d5ed1779497 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Microsoft.Azure.Management.CognitiveServices.csproj @@ -3,7 +3,7 @@ Microsoft.Azure.Management.CognitiveServices Microsoft Azure Management Cognitive Services Library - 1.0.0 + 2.0.0 Microsoft.Azure.Management.CognitiveServices Microsoft Azure Cognitive Services management;Cognitive Services;Cognitive Services management;REST HTTP client;windowsazureofficial;netcore451511 diff --git a/src/SDKs/CognitiveServices/Management.CognitiveServices/Properties/AssemblyInfo.cs b/src/SDKs/CognitiveServices/Management.CognitiveServices/Properties/AssemblyInfo.cs index 04c50ca9365e1..d3d48f88eb5e8 100644 --- a/src/SDKs/CognitiveServices/Management.CognitiveServices/Properties/AssemblyInfo.cs +++ b/src/SDKs/CognitiveServices/Management.CognitiveServices/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ [assembly: AssemblyTitle("Microsoft Azure Cognitive Services Management Library")] [assembly: AssemblyDescription("Provides Microsoft Azure Cognitive Services management functions for managing Microsoft Azure Cognitive Services accounts.")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")]