diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperations.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperations.cs
index 1d93cfb73513..9084679f3e40 100644
--- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperations.cs
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperations.cs
@@ -1697,6 +1697,237 @@ internal AccountsOperations(CognitiveServicesManagementClient client)
return _result;
}
+ ///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of Cognitive Services account.
+ ///
+ ///
+ /// 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>> ListModelsWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (accountName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accountName");
+ }
+ if (accountName != null)
+ {
+ if (accountName.Length > 64)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "accountName", 64);
+ }
+ if (accountName.Length < 2)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "accountName", 2);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(accountName, "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "accountName", "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("accountName", accountName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListModels", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/models").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Create Cognitive Services Account. Accounts is a resource group wide
/// resource type. It holds the keys for developer to access intelligent APIs.
@@ -2794,5 +3025,173 @@ internal AccountsOperations(CognitiveServicesManagementClient client)
return _result;
}
+ ///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListModelsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListModelsNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperationsExtensions.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperationsExtensions.cs
index f778047249dc..711132eb3020 100644
--- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperationsExtensions.cs
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/AccountsOperationsExtensions.cs
@@ -436,6 +436,46 @@ public static AccountSkuListResult ListSkus(this IAccountsOperations operations,
}
}
+ ///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of Cognitive Services account.
+ ///
+ public static IPage ListModels(this IAccountsOperations operations, string resourceGroupName, string accountName)
+ {
+ return operations.ListModelsAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of Cognitive Services account.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListModelsAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListModelsWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Create Cognitive Services Account. Accounts is a resource group wide
/// resource type. It holds the keys for developer to access intelligent APIs.
@@ -639,5 +679,39 @@ public static IPage ListNext(this IAccountsOperations operations, strin
}
}
+ ///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListModelsNext(this IAccountsOperations operations, string nextPageLink)
+ {
+ return operations.ListModelsNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListModelsNextAsync(this IAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListModelsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs
index 003c42073636..d9424222f6cc 100644
--- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/CognitiveServicesManagementClient.cs
@@ -372,7 +372,7 @@ private void Initialize()
Deployments = new DeploymentsOperations(this);
CommitmentPlans = new CommitmentPlansOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2021-10-01";
+ ApiVersion = "2022-03-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/IAccountsOperations.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/IAccountsOperations.cs
index 02cffbba224d..0f7fccf74955 100644
--- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/IAccountsOperations.cs
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/IAccountsOperations.cs
@@ -283,6 +283,31 @@ public partial interface IAccountsOperations
///
Task> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string accountName, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of Cognitive Services account.
+ ///
+ ///
+ /// 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>> ListModelsWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Create Cognitive Services Account. Accounts is a resource group
/// wide resource type. It holds the keys for developer to access
/// intelligent APIs. It's also the resource type for billing.
@@ -408,5 +433,27 @@ public partial interface IAccountsOperations
/// Thrown when a required parameter is null
///
Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List available Models for the requested Cognitive Services account
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListModelsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/AccountModel.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/AccountModel.cs
new file mode 100644
index 000000000000..13b35a543e8f
--- /dev/null
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/AccountModel.cs
@@ -0,0 +1,85 @@
+//
+// 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.CognitiveServices.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Cognitive Services account Model.
+ ///
+ public partial class AccountModel : DeploymentModel
+ {
+ ///
+ /// Initializes a new instance of the AccountModel class.
+ ///
+ public AccountModel()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccountModel class.
+ ///
+ /// Deployment model format.
+ /// Deployment model name.
+ /// Deployment model version.
+ /// Base Model Identifier.
+ /// The max capacity.
+ /// The capabilities.
+ public AccountModel(string format = default(string), string name = default(string), string version = default(string), DeploymentModel baseModel = default(DeploymentModel), int? maxCapacity = default(int?), IDictionary capabilities = default(IDictionary), ModelDeprecationInfo deprecation = default(ModelDeprecationInfo), SystemData systemData = default(SystemData))
+ : base(format, name, version)
+ {
+ BaseModel = baseModel;
+ MaxCapacity = maxCapacity;
+ Capabilities = capabilities;
+ Deprecation = deprecation;
+ SystemData = systemData;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets base Model Identifier.
+ ///
+ [JsonProperty(PropertyName = "baseModel")]
+ public DeploymentModel BaseModel { get; set; }
+
+ ///
+ /// Gets or sets the max capacity.
+ ///
+ [JsonProperty(PropertyName = "maxCapacity")]
+ public int? MaxCapacity { get; set; }
+
+ ///
+ /// Gets or sets the capabilities.
+ ///
+ [JsonProperty(PropertyName = "capabilities")]
+ public IDictionary Capabilities { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "deprecation")]
+ public ModelDeprecationInfo Deprecation { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; set; }
+
+ }
+}
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/AccountProperties.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/AccountProperties.cs
index f6290197210c..e0881fd7809c 100644
--- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/AccountProperties.cs
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/AccountProperties.cs
@@ -56,14 +56,19 @@ public AccountProperties()
/// The private endpoint
/// connection associated with the Cognitive Services account.
/// Whether or not public endpoint
- /// access is allowed for this account. Value is optional but if passed
- /// in, must be 'Enabled' or 'Disabled'. Possible values include:
+ /// access is allowed for this account. Possible values include:
/// 'Enabled', 'Disabled'
/// The api properties for special
/// APIs.
/// Gets the date of cognitive services
/// account creation.
- public AccountProperties(string provisioningState = default(string), string endpoint = default(string), string internalId = default(string), IList capabilities = default(IList), bool? isMigrated = default(bool?), string migrationToken = default(string), SkuChangeInfo skuChangeInfo = default(SkuChangeInfo), string customSubDomainName = default(string), NetworkRuleSet networkAcls = default(NetworkRuleSet), Encryption encryption = default(Encryption), IList userOwnedStorage = default(IList), IList privateEndpointConnections = default(IList), string publicNetworkAccess = default(string), ApiProperties apiProperties = default(ApiProperties), string dateCreated = default(string), CallRateLimit callRateLimit = default(CallRateLimit), QuotaLimit quotaLimit = default(QuotaLimit), bool? restrictOutboundNetworkAccess = default(bool?), IList allowedFqdnList = default(IList), bool? disableLocalAuth = default(bool?), IDictionary endpoints = default(IDictionary), bool? restore = default(bool?))
+ /// The flag to enable dynamic
+ /// throttling.
+ /// The deletion date, only available for
+ /// deleted account.
+ /// The scheduled purge date, only
+ /// available for deleted account.
+ public AccountProperties(string provisioningState = default(string), string endpoint = default(string), string internalId = default(string), IList capabilities = default(IList), bool? isMigrated = default(bool?), string migrationToken = default(string), SkuChangeInfo skuChangeInfo = default(SkuChangeInfo), string customSubDomainName = default(string), NetworkRuleSet networkAcls = default(NetworkRuleSet), Encryption encryption = default(Encryption), IList userOwnedStorage = default(IList), IList privateEndpointConnections = default(IList), string publicNetworkAccess = default(string), ApiProperties apiProperties = default(ApiProperties), string dateCreated = default(string), CallRateLimit callRateLimit = default(CallRateLimit), bool? dynamicThrottlingEnabled = default(bool?), QuotaLimit quotaLimit = default(QuotaLimit), bool? restrictOutboundNetworkAccess = default(bool?), IList allowedFqdnList = default(IList), bool? disableLocalAuth = default(bool?), IDictionary endpoints = default(IDictionary), bool? restore = default(bool?), string deletionDate = default(string), string scheduledPurgeDate = default(string))
{
ProvisioningState = provisioningState;
Endpoint = endpoint;
@@ -81,12 +86,15 @@ public AccountProperties()
ApiProperties = apiProperties;
DateCreated = dateCreated;
CallRateLimit = callRateLimit;
+ DynamicThrottlingEnabled = dynamicThrottlingEnabled;
QuotaLimit = quotaLimit;
RestrictOutboundNetworkAccess = restrictOutboundNetworkAccess;
AllowedFqdnList = allowedFqdnList;
DisableLocalAuth = disableLocalAuth;
Endpoints = endpoints;
Restore = restore;
+ DeletionDate = deletionDate;
+ ScheduledPurgeDate = scheduledPurgeDate;
CustomInit();
}
@@ -178,8 +186,7 @@ public AccountProperties()
///
/// Gets or sets whether or not public endpoint access is allowed for
- /// this account. Value is optional but if passed in, must be 'Enabled'
- /// or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
+ /// this account. Possible values include: 'Enabled', 'Disabled'
///
[JsonProperty(PropertyName = "publicNetworkAccess")]
public string PublicNetworkAccess { get; set; }
@@ -201,6 +208,12 @@ public AccountProperties()
[JsonProperty(PropertyName = "callRateLimit")]
public CallRateLimit CallRateLimit { get; private set; }
+ ///
+ /// Gets or sets the flag to enable dynamic throttling.
+ ///
+ [JsonProperty(PropertyName = "dynamicThrottlingEnabled")]
+ public bool? DynamicThrottlingEnabled { get; set; }
+
///
///
[JsonProperty(PropertyName = "quotaLimit")]
@@ -231,6 +244,18 @@ public AccountProperties()
[JsonProperty(PropertyName = "restore")]
public bool? Restore { get; set; }
+ ///
+ /// Gets the deletion date, only available for deleted account.
+ ///
+ [JsonProperty(PropertyName = "deletionDate")]
+ public string DeletionDate { get; private set; }
+
+ ///
+ /// Gets the scheduled purge date, only available for deleted account.
+ ///
+ [JsonProperty(PropertyName = "scheduledPurgeDate")]
+ public string ScheduledPurgeDate { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/DeploymentScaleSettings.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/DeploymentScaleSettings.cs
index 8942e14ff2af..7769a7a4b6e2 100644
--- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/DeploymentScaleSettings.cs
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/DeploymentScaleSettings.cs
@@ -32,10 +32,14 @@ public DeploymentScaleSettings()
/// Deployment scale type. Possible values
/// include: 'Manual'
/// Deployment capacity.
- public DeploymentScaleSettings(string scaleType = default(string), int? capacity = default(int?))
+ /// Deployment active capacity. This value
+ /// might be different from `capacity` if customer recently updated
+ /// `capacity`.
+ public DeploymentScaleSettings(string scaleType = default(string), int? capacity = default(int?), int? activeCapacity = default(int?))
{
ScaleType = scaleType;
Capacity = capacity;
+ ActiveCapacity = activeCapacity;
CustomInit();
}
@@ -57,5 +61,12 @@ public DeploymentScaleSettings()
[JsonProperty(PropertyName = "capacity")]
public int? Capacity { get; set; }
+ ///
+ /// Gets deployment active capacity. This value might be different from
+ /// `capacity` if customer recently updated `capacity`.
+ ///
+ [JsonProperty(PropertyName = "activeCapacity")]
+ public int? ActiveCapacity { get; private set; }
+
}
}
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IPRule.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IpRule.cs
similarity index 100%
rename from sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IPRule.cs
rename to sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/IpRule.cs
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/ModelDeprecationInfo.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/ModelDeprecationInfo.cs
new file mode 100644
index 000000000000..f3905cf80e4a
--- /dev/null
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/Models/ModelDeprecationInfo.cs
@@ -0,0 +1,61 @@
+//
+// 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.CognitiveServices.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Cognitive Services account ModelDeprecationInfo.
+ ///
+ public partial class ModelDeprecationInfo
+ {
+ ///
+ /// Initializes a new instance of the ModelDeprecationInfo class.
+ ///
+ public ModelDeprecationInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ModelDeprecationInfo class.
+ ///
+ /// The datetime of deprecation of the fineTune
+ /// Model.
+ /// The datetime of deprecation of the
+ /// inference Model.
+ public ModelDeprecationInfo(string fineTune = default(string), string inference = default(string))
+ {
+ FineTune = fineTune;
+ Inference = inference;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the datetime of deprecation of the fineTune Model.
+ ///
+ [JsonProperty(PropertyName = "fineTune")]
+ public string FineTune { get; set; }
+
+ ///
+ /// Gets or sets the datetime of deprecation of the inference Model.
+ ///
+ [JsonProperty(PropertyName = "inference")]
+ public string Inference { get; set; }
+
+ }
+}
diff --git a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs
index fd6632466d1f..59adf50feb67 100644
--- a/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs
+++ b/sdk/cognitiveservices/Microsoft.Azure.Management.CognitiveServices/src/Generated/SdkInfo_CognitiveServicesManagementClient.cs
@@ -19,30 +19,19 @@ public static IEnumerable> ApiInfo_CognitiveServic
{
return new Tuple[]
{
- new Tuple("CognitiveServices", "Accounts", "2021-10-01"),
- new Tuple("CognitiveServices", "CheckDomainAvailability", "2021-10-01"),
- new Tuple("CognitiveServices", "CheckSkuAvailability", "2021-10-01"),
- new Tuple("CognitiveServices", "CommitmentPlans", "2021-10-01"),
- new Tuple("CognitiveServices", "CommitmentTiers", "2021-10-01"),
- new Tuple("CognitiveServices", "DeletedAccounts", "2021-10-01"),
- new Tuple("CognitiveServices", "Deployments", "2021-10-01"),
- new Tuple("CognitiveServices", "Operations", "2021-10-01"),
- new Tuple("CognitiveServices", "PrivateEndpointConnections", "2021-10-01"),
- new Tuple("CognitiveServices", "PrivateLinkResources", "2021-10-01"),
- new Tuple("CognitiveServices", "ResourceSkus", "2021-10-01"),
+ new Tuple("CognitiveServices", "Accounts", "2022-03-01"),
+ new Tuple("CognitiveServices", "CheckDomainAvailability", "2022-03-01"),
+ new Tuple("CognitiveServices", "CheckSkuAvailability", "2022-03-01"),
+ new Tuple("CognitiveServices", "CommitmentPlans", "2022-03-01"),
+ new Tuple("CognitiveServices", "CommitmentTiers", "2022-03-01"),
+ new Tuple("CognitiveServices", "DeletedAccounts", "2022-03-01"),
+ new Tuple("CognitiveServices", "Deployments", "2022-03-01"),
+ new Tuple("CognitiveServices", "Operations", "2022-03-01"),
+ new Tuple("CognitiveServices", "PrivateEndpointConnections", "2022-03-01"),
+ new Tuple("CognitiveServices", "PrivateLinkResources", "2022-03-01"),
+ new Tuple("CognitiveServices", "ResourceSkus", "2022-03-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@3.4.1";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Repos\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "main";
- public static readonly String GithubCommidId = "18479a01a549e9942ea38da8761919066aa87234";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-