/* * 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. */ import { BaseResource, CloudError } from "ms-rest-azure"; import * as moment from "moment"; export { BaseResource, CloudError }; /** * The SKU of the cognitive services account. */ export interface Sku { /** * Gets or sets the sku name. Required for account creation, optional for update. */ name: string; /** * Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard', * 'Premium' */ readonly tier?: string; } /** * The parameters to provide for the account. */ export interface CognitiveServicesAccountCreateParameters { /** * Required. Gets or sets the SKU of the resource. */ sku: Sku; /** * Required. Gets or sets the Kind of the resource. */ kind: string; /** * Required. Gets or sets the location of the resource. This will be one of the supported and * registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of * a resource cannot be changed once it is created, but if an identical geo region is specified * on update the request will succeed. */ location: string; /** * Gets or sets a list of key value pairs that describe the resource. These tags can be used in * viewing and grouping this resource (across resource groups). A maximum of 15 tags can be * provided for a resource. Each tag must have a key no greater than 128 characters and value no * greater than 256 characters. */ tags?: { [propertyName: string]: string }; /** * Must exist in the request. Must be an empty object. Must not be null. */ properties: any; } /** * The parameters to provide for the account. */ export interface CognitiveServicesAccountUpdateParameters { /** * Gets or sets the SKU of the resource. */ sku?: Sku; /** * Gets or sets a list of key value pairs that describe the resource. These tags can be used in * viewing and grouping this resource (across resource groups). A maximum of 15 tags can be * provided for a resource. Each tag must have a key no greater than 128 characters and value no * greater than 256 characters. */ tags?: { [propertyName: string]: string }; /** * Additional properties for Account. Only provided fields will be updated. */ properties?: any; } /** * Cognitive Services Account is an Azure resource representing the provisioned account, its type, * location and SKU. */ export interface CognitiveServicesAccount extends BaseResource { /** * Entity Tag */ etag?: string; /** * The id of the created account */ readonly id?: string; /** * Type of cognitive service account. */ kind?: string; /** * The location of the resource */ location?: string; /** * The name of the created account */ readonly name?: string; /** * Gets the status of the cognitive services account at the time the operation was called. * Possible values include: 'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', * 'Failed' */ readonly provisioningState?: string; /** * Endpoint of the created account. */ endpoint?: string; /** * The internal identifier. */ internalId?: string; /** * Optional subdomain name used for token-based authentication. */ customSubDomainName?: string; /** * The SKU of Cognitive Services account. */ sku?: Sku; /** * Gets or sets a list of key value pairs that describe the resource. These tags can be used in * viewing and grouping this resource (across resource groups). A maximum of 15 tags can be * provided for a resource. Each tag must have a key no greater than 128 characters and value no * greater than 256 characters. */ tags?: { [propertyName: string]: string }; /** * Resource type */ readonly type?: string; } /** * The access keys for the cognitive services account. */ export interface CognitiveServicesAccountKeys { /** * Gets the value of key 1. */ key1?: string; /** * Gets the value of key 2. */ key2?: string; } /** * Regenerate key parameters. */ export interface RegenerateKeyParameters { /** * key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2' */ keyName: string; } /** * Cognitive Services resource type and SKU. */ export interface CognitiveServicesResourceAndSku { /** * Resource Namespace and Type */ resourceType?: string; /** * The SKU of Cognitive Services account. */ sku?: Sku; } /** * The list of cognitive services accounts operation response. */ export interface CognitiveServicesAccountEnumerateSkusResult { /** * Gets the list of Cognitive Services accounts and their properties. */ readonly value?: CognitiveServicesResourceAndSku[]; } /** * A metric name. */ export interface MetricName { /** * The name of the metric. */ readonly value?: string; /** * The friendly name of the metric. */ readonly localizedValue?: string; } /** * The usage data for a usage request. */ export interface Usage { /** * The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', * 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' */ unit?: string; /** * The name information for the metric. */ readonly name?: MetricName; /** * The quota period used to summarize the usage values. */ readonly quotaPeriod?: string; /** * Maximum value for this metric. */ readonly limit?: number; /** * Current value for this metric. */ readonly currentValue?: number; /** * Next reset time for current quota. */ readonly nextResetTime?: string; /** * Cognitive Services account quota usage status. Possible values include: 'Included', 'Blocked', * 'InOverage', 'Unknown' */ status?: string; } /** * The response to a list usage request. */ export interface UsagesResult { /** * The list of usages for Cognitive Service account. */ readonly value?: Usage[]; } /** * Cognitive Services error body. */ export interface ErrorBody { /** * error code */ code: string; /** * error message */ message: string; } /** * Cognitive Services error object. */ export interface ErrorModel { /** * The error body. */ error?: ErrorBody; } /** * The operation supported by Cognitive Services. */ export interface OperationDisplayInfo { /** * The description of the operation. */ description?: string; /** * The action that users can perform, based on their permission level. */ operation?: string; /** * Service provider: Microsoft Cognitive Services. */ provider?: string; /** * Resource on which the operation is performed. */ resource?: string; } /** * The operation supported by Cognitive Services. */ export interface OperationEntity { /** * Operation name: {provider}/{resource}/{operation}. */ name?: string; /** * The operation supported by Cognitive Services. */ display?: OperationDisplayInfo; /** * The origin of the operation. */ origin?: string; /** * Additional properties. */ properties?: any; } /** * Check SKU availability parameter. */ export interface CheckSkuAvailabilityParameter { /** * The SKU of the resource. */ skus: string[]; /** * The Kind of the resource. */ kind: string; /** * The Type of the resource. */ type: string; } /** * Check SKU availability result. */ export interface CheckSkuAvailabilityResult { /** * The Kind of the resource. */ kind?: string; /** * The Type of the resource. */ type?: string; /** * The SKU of Cognitive Services account. */ skuName?: string; /** * Indicates the given SKU is available or not. */ skuAvailable?: boolean; /** * Reason why the SKU is not available. */ reason?: string; /** * Additional error message. */ message?: string; } /** * Check SKU availability result list. */ export interface CheckSkuAvailabilityResultList { /** * Check SKU availability result list. */ value?: CheckSkuAvailabilityResult[]; } export interface ResourceSkuRestrictionInfo { /** * Locations where the SKU is restricted */ readonly locations?: string[]; /** * List of availability zones where the SKU is restricted. */ readonly zones?: string[]; } /** * Describes restrictions of a SKU. */ export interface ResourceSkuRestrictions { /** * The type of restrictions. Possible values include: 'Location', 'Zone' */ readonly type?: string; /** * The value of restrictions. If the restriction type is set to location. This would be different * locations where the SKU is restricted. */ readonly values?: string[]; /** * The information about the restriction where the SKU cannot be used. */ readonly restrictionInfo?: ResourceSkuRestrictionInfo; /** * The reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' */ readonly reasonCode?: string; } /** * Describes an available Cognitive Services SKU. */ export interface ResourceSku { /** * The type of resource the SKU applies to. */ readonly resourceType?: string; /** * The name of SKU. */ readonly name?: string; /** * Specifies the tier of Cognitive Services account. */ readonly tier?: string; /** * The Kind of resources that are supported in this SKU. */ readonly kind?: string; /** * The set of locations that the SKU is available. */ readonly locations?: string[]; /** * The restrictions because of which SKU cannot be used. This is empty if there are no * restrictions. */ readonly restrictions?: ResourceSkuRestrictions[]; } /** * The list of cognitive services accounts operation response. */ export interface CognitiveServicesAccountListResult extends Array { /** * The link used to get the next page of accounts. */ nextLink?: string; } /** * The Get Skus operation response. */ export interface ResourceSkusResult extends Array { /** * The uri to fetch the next page of Skus. */ nextLink?: string; } /** * The list of cognitive services accounts operation response. */ export interface OperationEntityListResult extends Array { /** * The link used to get the next page of operations. */ nextLink?: string; }