Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-cognitiveservices] [Mirror] add clear-output-folder in resource-manager readme.typescript.md to f… #144

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class CognitiveServicesManagementClient extends CognitiveServicesManagementClien
accounts: operations.Accounts;
resourceSkus: operations.ResourceSkus;
operations: operations.Operations;
checkSkuAvailability: operations.CheckSkuAvailability;

/**
* Initializes a new instance of the CognitiveServicesManagementClient class.
Expand All @@ -34,7 +33,46 @@ class CognitiveServicesManagementClient extends CognitiveServicesManagementClien
this.accounts = new operations.Accounts(this);
this.resourceSkus = new operations.ResourceSkus(this);
this.operations = new operations.Operations(this);
this.checkSkuAvailability = new operations.CheckSkuAvailability(this);
}

/**
* Check available SKUs.
* @param location Resource location.
* @param skus The SKU of the resource.
* @param kind The Kind of the resource.
* @param type The Type of the resource.
* @param [options] The optional parameters
* @returns Promise<Models.CheckSkuAvailabilityResponse>
*/
checkSkuAvailability(location: string, skus: string[], kind: string, type: string, options?: msRest.RequestOptionsBase): Promise<Models.CheckSkuAvailabilityResponse>;
/**
* @param location Resource location.
* @param skus The SKU of the resource.
* @param kind The Kind of the resource.
* @param type The Type of the resource.
* @param callback The callback
*/
checkSkuAvailability(location: string, skus: string[], kind: string, type: string, callback: msRest.ServiceCallback<Models.CheckSkuAvailabilityResultList>): void;
/**
* @param location Resource location.
* @param skus The SKU of the resource.
* @param kind The Kind of the resource.
* @param type The Type of the resource.
* @param options The optional parameters
* @param callback The callback
*/
checkSkuAvailability(location: string, skus: string[], kind: string, type: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CheckSkuAvailabilityResultList>): void;
checkSkuAvailability(location: string, skus: string[], kind: string, type: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CheckSkuAvailabilityResultList>, callback?: msRest.ServiceCallback<Models.CheckSkuAvailabilityResultList>): Promise<Models.CheckSkuAvailabilityResponse> {
return this.sendOperationRequest(
{
location,
skus,
kind,
type,
options
},
checkSkuAvailabilityOperationSpec,
callback) as Promise<Models.CheckSkuAvailabilityResponse>;
}

/**
Expand Down Expand Up @@ -72,9 +110,47 @@ class CognitiveServicesManagementClient extends CognitiveServicesManagementClien

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const checkSkuAvailabilityOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability",
urlParameters: [
Parameters.subscriptionId,
Parameters.location
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: {
skus: "skus",
kind: "kind",
type: "type"
},
mapper: {
...Mappers.CheckSkuAvailabilityParameter,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.CheckSkuAvailabilityResultList
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

const checkDomainAvailabilityOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "providers/Microsoft.CognitiveServices/checkDomainAvailability",
path: "subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability",
urlParameters: [
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
export {
BaseResource,
CognitiveServicesAccount,
CognitiveServicesAccountCreateParameters,
CognitiveServicesAccountApiProperties,
CognitiveServicesAccountEnumerateSkusResult,
CognitiveServicesAccountKeys,
CognitiveServicesAccountListResult,
CognitiveServicesAccountUpdateParameters,
CognitiveServicesAccountProperties,
CognitiveServicesResourceAndSku,
ErrorBody,
ErrorModel,
Expand Down

This file was deleted.

168 changes: 60 additions & 108 deletions sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,59 +27,6 @@ export interface Sku {
readonly tier?: SkuTier;
}

/**
* 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;
}

/**
* A rule governing the accessibility from a specific ip address or ip range.
*/
Expand Down Expand Up @@ -114,11 +61,6 @@ export interface VirtualNetworkRule {
* A set of rules governing the network accessibility.
*/
export interface NetworkRuleSet {
/**
* Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not
* specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None'
*/
bypass?: NetworkRuleBypassOptions;
/**
* The default action when no rule from ipRules and from virtualNetworkRules match. This is only
* used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny'
Expand All @@ -135,32 +77,31 @@ export interface NetworkRuleSet {
}

/**
* Cognitive Services Account is an Azure resource representing the provisioned account, its type,
* location and SKU.
* The api properties for special APIs.
*/
export interface CognitiveServicesAccount extends BaseResource {
export interface CognitiveServicesAccountApiProperties {
/**
* Entity Tag
* (QnAMaker Only) The runtime endpoint of QnAMaker.
*/
etag?: string;
qnaRuntimeEndpoint?: string;
/**
* The id of the created account
* **NOTE: This property will not be serialized. It can only be populated by the server.**
* (Bing Search Only) The flag to enable statistics of Bing Search.
*/
readonly id?: string;
statisticsEnabled?: boolean;
/**
* Type of cognitive service account.
* (Personalization Only) The flag to enable statistics of Bing Search.
*/
kind?: string;
eventHubConnectionString?: string;
/**
* The location of the resource
*/
location?: string;
/**
* The name of the created account
* **NOTE: This property will not be serialized. It can only be populated by the server.**
* (Personalization Only) The storage account connection string.
*/
readonly name?: string;
storageAccountConnectionString?: string;
}

/**
* Properties of Cognitive Services account.
*/
export interface CognitiveServicesAccountProperties {
/**
* Gets the status of the cognitive services account at the time the operation was called.
* Possible values include: 'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded',
Expand All @@ -170,12 +111,14 @@ export interface CognitiveServicesAccount extends BaseResource {
readonly provisioningState?: ProvisioningState;
/**
* Endpoint of the created account.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
endpoint?: string;
readonly endpoint?: string;
/**
* The internal identifier.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
internalId?: string;
readonly internalId?: string;
/**
* Optional subdomain name used for token-based authentication.
*/
Expand All @@ -184,6 +127,44 @@ export interface CognitiveServicesAccount extends BaseResource {
* A collection of rules governing the accessibility from specific network locations.
*/
networkAcls?: NetworkRuleSet;
/**
* The api properties for special APIs.
*/
apiProperties?: CognitiveServicesAccountApiProperties;
}

/**
* Cognitive Services Account is an Azure resource representing the provisioned account, its type,
* location and SKU.
*/
export interface CognitiveServicesAccount extends BaseResource {
/**
* Entity Tag
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly etag?: string;
/**
* The id of the created account
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly id?: string;
/**
* The Kind of the resource.
*/
kind?: string;
/**
* The location of the resource
*/
location?: string;
/**
* The name of the created account
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly name?: string;
/**
* Properties of Cognitive Services account.
*/
properties?: CognitiveServicesAccountProperties;
/**
* The SKU of Cognitive Services account.
*/
Expand Down Expand Up @@ -561,27 +542,6 @@ export interface ResourceSku {
readonly restrictions?: ResourceSkuRestrictions[];
}

/**
* Optional Parameters.
*/
export interface AccountsUpdateOptionalParams extends msRest.RequestOptionsBase {
/**
* 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;
}

/**
* Optional Parameters.
*/
Expand Down Expand Up @@ -652,14 +612,6 @@ export type SkuTier = 'Free' | 'Standard' | 'Premium';
*/
export type ProvisioningState = 'Creating' | 'ResolvingDNS' | 'Moving' | 'Deleting' | 'Succeeded' | 'Failed';

/**
* Defines values for NetworkRuleBypassOptions.
* Possible values include: 'AzureServices', 'None'
* @readonly
* @enum {string}
*/
export type NetworkRuleBypassOptions = 'AzureServices' | 'None';

/**
* Defines values for NetworkRuleAction.
* Possible values include: 'Allow', 'Deny'
Expand Down Expand Up @@ -1010,9 +962,9 @@ export type OperationsListNextResponse = OperationEntityListResult & {
};

/**
* Contains response data for the list operation.
* Contains response data for the checkSkuAvailability operation.
*/
export type CheckSkuAvailabilityListResponse = CheckSkuAvailabilityResultList & {
export type CheckSkuAvailabilityResponse = CheckSkuAvailabilityResultList & {
/**
* The underlying HTTP response.
*/
Expand Down
Loading