/* * 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 { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; import * as models from '../models'; /** * @class * Accounts * __NOTE__: An instance of this class is automatically created for an * instance of the CognitiveServicesManagementClient. */ export interface Accounts { /** * 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. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} parameters The parameters to provide for the created * account. * * @param {object} parameters.sku Required. Gets or sets the SKU of the * resource. * * @param {string} parameters.sku.name Gets or sets the sku name. Required for * account creation, optional for update. * * @param {string} parameters.kind Required. Gets or sets the Kind of the * resource. * * @param {string} parameters.location 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. * * @param {object} [parameters.tags] 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. * * @param {object} parameters.properties Must exist in the request. Must be an * empty object. Must not be null. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ createWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.CognitiveServicesAccountCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * 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. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} parameters The parameters to provide for the created * account. * * @param {object} parameters.sku Required. Gets or sets the SKU of the * resource. * * @param {string} parameters.sku.name Gets or sets the sku name. Required for * account creation, optional for update. * * @param {string} parameters.kind Required. Gets or sets the Kind of the * resource. * * @param {string} parameters.location 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. * * @param {object} [parameters.tags] 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. * * @param {object} parameters.properties Must exist in the request. Must be an * empty object. Must not be null. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccount} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccount} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccount} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ create(resourceGroupName: string, accountName: string, parameters: models.CognitiveServicesAccountCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; create(resourceGroupName: string, accountName: string, parameters: models.CognitiveServicesAccountCreateParameters, callback: ServiceCallback): void; create(resourceGroupName: string, accountName: string, parameters: models.CognitiveServicesAccountCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Updates a Cognitive Services account * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.sku] Gets or sets the SKU of the resource. * * @param {string} options.sku.name Gets or sets the sku name. Required for * account creation, optional for update. * * @param {object} [options.tags] 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. * * @param {object} [options.properties] Additional properties for Account. Only * provided fields will be updated. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { sku? : models.Sku, tags? : { [propertyName: string]: string }, properties? : any, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates a Cognitive Services account * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.sku] Gets or sets the SKU of the resource. * * @param {string} options.sku.name Gets or sets the sku name. Required for * account creation, optional for update. * * @param {object} [options.tags] 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. * * @param {object} [options.properties] Additional properties for Account. Only * provided fields will be updated. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccount} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccount} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccount} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ update(resourceGroupName: string, accountName: string, options?: { sku? : models.Sku, tags? : { [propertyName: string]: string }, properties? : any, customHeaders? : { [headerName: string]: string; } }): Promise; update(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; update(resourceGroupName: string, accountName: string, options: { sku? : models.Sku, tags? : { [propertyName: string]: string }, properties? : any, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Deletes a Cognitive Services account from the resource group. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a Cognitive Services account from the resource group. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ deleteMethod(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; deleteMethod(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; deleteMethod(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Returns a Cognitive Services account specified by the parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getPropertiesWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Returns a Cognitive Services account specified by the parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccount} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccount} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccount} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ getProperties(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; getProperties(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; getProperties(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Returns all the resources of a particular type belonging to a resource group * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Returns all the resources of a particular type belonging to a resource group * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccountListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccountListResult} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccountListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Returns all the resources of a particular type belonging to a subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Returns all the resources of a particular type belonging to a subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccountListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccountListResult} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccountListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; list(callback: ServiceCallback): void; list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists the account keys for the specified Cognitive Services account. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listKeysWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists the account keys for the specified Cognitive Services account. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccountKeys} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccountKeys} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccountKeys} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listKeys(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listKeys(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; listKeys(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Regenerates the specified account key for the specified Cognitive Services * account. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {string} keyName key name to generate (Key1|Key2). Possible values * include: 'Key1', 'Key2' * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ regenerateKeyWithHttpOperationResponse(resourceGroupName: string, accountName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Regenerates the specified account key for the specified Cognitive Services * account. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {string} keyName key name to generate (Key1|Key2). Possible values * include: 'Key1', 'Key2' * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccountKeys} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccountKeys} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccountKeys} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ regenerateKey(resourceGroupName: string, accountName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; regenerateKey(resourceGroupName: string, accountName: string, keyName: string, callback: ServiceCallback): void; regenerateKey(resourceGroupName: string, accountName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * List available SKUs for the requested Cognitive Services account * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listSkusWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * List available SKUs for the requested Cognitive Services account * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccountEnumerateSkusResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccountEnumerateSkusResult} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccountEnumerateSkusResult} * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listSkus(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listSkus(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; listSkus(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Get usages for the requested Cognitive Services account * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] An OData filter expression that describes a * subset of usages to return. The supported parameter is name.value (name of * the metric, can have an or of multiple names). * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getUsagesWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get usages for the requested Cognitive Services account * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} accountName The name of Cognitive Services account. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] An OData filter expression that describes a * subset of usages to return. The supported parameter is name.value (name of * the metric, can have an or of multiple names). * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {UsagesResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {UsagesResult} [result] - The deserialized result object if an error did not occur. * See {@link UsagesResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ getUsages(resourceGroupName: string, accountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; getUsages(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; getUsages(resourceGroupName: string, accountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Returns all the resources of a particular type belonging to a resource group * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Returns all the resources of a particular type belonging to a resource group * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccountListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccountListResult} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccountListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Returns all the resources of a particular type belonging to a subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Returns all the resources of a particular type belonging to a subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CognitiveServicesAccountListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CognitiveServicesAccountListResult} [result] - The deserialized result object if an error did not occur. * See {@link CognitiveServicesAccountListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listNext(nextPageLink: string, callback: ServiceCallback): void; listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class * ResourceSkus * __NOTE__: An instance of this class is automatically created for an * instance of the CognitiveServicesManagementClient. */ export interface ResourceSkus { /** * Gets the list of Microsoft.CognitiveServices SKUs available for your * Subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the list of Microsoft.CognitiveServices SKUs available for your * Subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceSkusResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceSkusResult} [result] - The deserialized result object if an error did not occur. * See {@link ResourceSkusResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; list(callback: ServiceCallback): void; list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets the list of Microsoft.CognitiveServices SKUs available for your * Subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the list of Microsoft.CognitiveServices SKUs available for your * Subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceSkusResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceSkusResult} [result] - The deserialized result object if an error did not occur. * See {@link ResourceSkusResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listNext(nextPageLink: string, callback: ServiceCallback): void; listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class * Operations * __NOTE__: An instance of this class is automatically created for an * instance of the CognitiveServicesManagementClient. */ export interface Operations { /** * Lists all the available Cognitive Services account operations. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all the available Cognitive Services account operations. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {OperationEntityListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {OperationEntityListResult} [result] - The deserialized result object if an error did not occur. * See {@link OperationEntityListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; list(callback: ServiceCallback): void; list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists all the available Cognitive Services account operations. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all the available Cognitive Services account operations. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {OperationEntityListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {OperationEntityListResult} [result] - The deserialized result object if an error did not occur. * See {@link OperationEntityListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listNext(nextPageLink: string, callback: ServiceCallback): void; listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class * CheckSkuAvailability * __NOTE__: An instance of this class is automatically created for an * instance of the CognitiveServicesManagementClient. */ export interface CheckSkuAvailability { /** * Check available SKUs. * * @param {string} location Resource location. * * @param {array} skus The SKU of the resource. * * @param {string} kind The Kind of the resource. * * @param {string} type The Type of the resource. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listWithHttpOperationResponse(location: string, skus: string[], kind: string, type: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Check available SKUs. * * @param {string} location Resource location. * * @param {array} skus The SKU of the resource. * * @param {string} kind The Kind of the resource. * * @param {string} type The Type of the resource. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {CheckSkuAvailabilityResultList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {CheckSkuAvailabilityResultList} [result] - The deserialized result object if an error did not occur. * See {@link CheckSkuAvailabilityResultList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ list(location: string, skus: string[], kind: string, type: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; list(location: string, skus: string[], kind: string, type: string, callback: ServiceCallback): void; list(location: string, skus: string[], kind: string, type: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; }