From 2d080d6872d2d7146e2ef1b2a3831dc228062d06 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 23 Feb 2021 21:32:16 +0000 Subject: [PATCH] CodeGen from PR 13121 in Azure/azure-rest-api-specs Merge 3b5f5242c1b5edd184dee4834ccd140bb8f0f048 into 3ae2e25456e7d9ec0b7825f5a33a93a963f89dd6 --- .../arm-cognitiveservices/LICENSE.txt | 2 +- .../arm-cognitiveservices/README.md | 9 +- .../arm-cognitiveservices/rollup.config.js | 4 +- .../src/cognitiveServicesManagementClient.ts | 9 +- ...ognitiveServicesManagementClientContext.ts | 11 +- .../src/models/accountsMappers.ts | 5 +- .../arm-cognitiveservices/src/models/index.ts | 132 +++++++++++++-- .../src/models/mappers.ts | 151 ++++++++++++++++-- .../src/models/operationsMappers.ts | 7 +- .../src/models/parameters.ts | 5 +- .../privateEndpointConnectionsMappers.ts | 9 +- .../src/models/privateLinkResourcesMappers.ts | 8 +- .../src/models/resourceSkusMappers.ts | 7 +- .../src/operations/accounts.ts | 11 +- .../src/operations/index.ts | 5 +- .../src/operations/operations.ts | 12 +- .../operations/privateEndpointConnections.ts | 68 +++++++- .../src/operations/privateLinkResources.ts | 7 +- .../src/operations/resourceSkus.ts | 12 +- 19 files changed, 388 insertions(+), 86 deletions(-) diff --git a/sdk/cognitiveservices/arm-cognitiveservices/LICENSE.txt b/sdk/cognitiveservices/arm-cognitiveservices/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/LICENSE.txt +++ b/sdk/cognitiveservices/arm-cognitiveservices/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cognitiveservices/arm-cognitiveservices/README.md b/sdk/cognitiveservices/arm-cognitiveservices/README.md index 2ad5ac202ed9..065771540cdd 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/README.md +++ b/sdk/cognitiveservices/arm-cognitiveservices/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-cognitiveservices ### How to use -#### nodejs - Authentication, client creation and getProperties accounts as an example written in TypeScript. +#### nodejs - client creation and getProperties accounts as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { CognitiveServicesManagementClient, CognitiveServicesManagementModels, CognitiveServicesManagementMappers } from "@azure/arm-cognitiveservices"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/rollup.config.js b/sdk/cognitiveservices/arm-cognitiveservices/rollup.config.js index cb319d0218f8..189fc7c46598 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/rollup.config.js +++ b/sdk/cognitiveservices/arm-cognitiveservices/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts index 7822fa149d26..43c1334c13c9 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -143,7 +142,7 @@ const checkSkuAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CheckSkuAvailabilityResultList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer @@ -176,7 +175,7 @@ const checkDomainAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CheckDomainAvailabilityResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts index 8c84330f67a7..63a1c7bae988 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -37,7 +36,7 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS if (!options) { options = {}; } - if (!options.userAgent) { + if(!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -52,10 +51,10 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS this.credentials = credentials; this.subscriptionId = subscriptionId; - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts index 3967c44a4a82..3d4e75fea2ae 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/accountsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -15,6 +15,7 @@ export { CognitiveServicesAccountKeys, CognitiveServicesAccountListResult, CognitiveServicesAccountProperties, + CognitiveServicesAccountSkuChangeInfo, CognitiveServicesResourceAndSku, Encryption, ErrorBody, diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts index 83037b1bc0fb..087e186e1661 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -21,7 +21,7 @@ export interface Sku { name: string; /** * Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard', - * 'Premium' + * 'Premium', 'Enterprise' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tier?: SkuTier; @@ -41,6 +41,27 @@ export interface SkuCapability { value?: string; } +/** + * Sku change info of account. + */ +export interface CognitiveServicesAccountSkuChangeInfo { + /** + * Gets the count of downgrades. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly countOfDowngrades?: number; + /** + * Gets the count of upgrades after downgrades. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly countOfUpgradesAfterDowngrades?: number; + /** + * Gets the last change date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastChangeDate?: string; +} + /** * A rule governing the accessibility from a specific ip address or ip range. */ @@ -161,7 +182,7 @@ export interface PrivateLinkServiceConnectionState { /** * A message indicating if changes on the service provider require any updates on the consumer. */ - actionRequired?: string; + actionsRequired?: string; } /** @@ -184,11 +205,12 @@ export interface PrivateEndpointConnectionProperties { } /** - * An interface representing Resource. + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ export interface Resource extends BaseResource { /** - * Fully qualified resource Id for the resource. Ex - + * Fully qualified resource ID for the resource. Ex - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ @@ -199,8 +221,8 @@ export interface Resource extends BaseResource { */ readonly name?: string; /** - * The type of the resource. Ex- Microsoft.Compute/virtualMachines or - * Microsoft.Storage/storageAccounts. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; @@ -214,6 +236,15 @@ export interface PrivateEndpointConnection extends Resource { * Resource properties. */ properties?: PrivateEndpointConnectionProperties; + /** + * Entity Tag + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; + /** + * The location of the private endpoint connection + */ + location?: string; } /** @@ -224,6 +255,14 @@ export interface CognitiveServicesAccountApiProperties { * (QnAMaker Only) The runtime endpoint of QnAMaker. */ qnaRuntimeEndpoint?: string; + /** + * (QnAMaker Only) The Azure Search endpoint key of QnAMaker. + */ + qnaAzureSearchEndpointKey?: string; + /** + * (QnAMaker Only) The Azure Search endpoint id of QnAMaker. + */ + qnaAzureSearchEndpointId?: string; /** * (Bing Search Only) The flag to enable statistics of Bing Search. */ @@ -236,6 +275,22 @@ export interface CognitiveServicesAccountApiProperties { * (Personalization Only) The storage account connection string. */ storageAccountConnectionString?: string; + /** + * (Metrics Advisor Only) The Azure AD Client Id (Application Id). + */ + aadClientId?: string; + /** + * (Metrics Advisor Only) The Azure AD Tenant Id. + */ + aadTenantId?: string; + /** + * (Metrics Advisor Only) The super user of Metrics Advisor. + */ + superUser?: string; + /** + * (Metrics Advisor Only) The website name of Metrics Advisor. + */ + websiteName?: string; } /** @@ -265,6 +320,16 @@ export interface CognitiveServicesAccountProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly capabilities?: SkuCapability[]; + /** + * If the resource is migrated from an existing key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isMigrated?: boolean; + /** + * Sku change info of account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuChangeInfo?: CognitiveServicesAccountSkuChangeInfo; /** * Optional subdomain name used for token-based authentication. */ @@ -294,6 +359,11 @@ export interface CognitiveServicesAccountProperties { * The api properties for special APIs. */ apiProperties?: CognitiveServicesAccountApiProperties; + /** + * Gets the date of cognitive services account creation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dateCreated?: string; } /** @@ -750,6 +820,16 @@ export interface ResourceSku { readonly restrictions?: ResourceSkuRestrictions[]; } +/** + * A list of private endpoint connections + */ +export interface PrivateEndpointConnectionListResult { + /** + * Array of private endpoint connections + */ + value?: PrivateEndpointConnection[]; +} + /** * Properties of a private link resource. */ @@ -796,14 +876,17 @@ export interface PrivateLinkResourceListResult { } /** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource */ export interface ProxyResource extends Resource { } /** - * The resource model definition for a ARM tracked top level resource + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource */ export interface TrackedResource extends Resource { /** @@ -817,7 +900,8 @@ export interface TrackedResource extends Resource { } /** - * The resource model definition for a Azure Resource Manager resource with an etag. + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource */ export interface AzureEntityResource extends Resource { /** @@ -883,11 +967,11 @@ export interface OperationEntityListResult extends Array { /** * Defines values for SkuTier. - * Possible values include: 'Free', 'Standard', 'Premium' + * Possible values include: 'Free', 'Standard', 'Premium', 'Enterprise' * @readonly * @enum {string} */ -export type SkuTier = 'Free' | 'Standard' | 'Premium'; +export type SkuTier = 'Free' | 'Standard' | 'Premium' | 'Enterprise'; /** * Defines values for ProvisioningState. @@ -1318,6 +1402,26 @@ export type CheckDomainAvailabilityResponse = CheckDomainAvailabilityResult & { }; }; +/** + * Contains response data for the list operation. + */ +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + /** * Contains response data for the get operation. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts index 9971f695d414..4b20e767cb3b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -29,12 +29,7 @@ export const Sku: msRest.CompositeMapper = { readOnly: true, serializedName: "tier", type: { - name: "Enum", - allowedValues: [ - "Free", - "Standard", - "Premium" - ] + name: "String" } } } @@ -63,6 +58,37 @@ export const SkuCapability: msRest.CompositeMapper = { } }; +export const CognitiveServicesAccountSkuChangeInfo: msRest.CompositeMapper = { + serializedName: "CognitiveServicesAccountSkuChangeInfo", + type: { + name: "Composite", + className: "CognitiveServicesAccountSkuChangeInfo", + modelProperties: { + countOfDowngrades: { + readOnly: true, + serializedName: "countOfDowngrades", + type: { + name: "Number" + } + }, + countOfUpgradesAfterDowngrades: { + readOnly: true, + serializedName: "countOfUpgradesAfterDowngrades", + type: { + name: "Number" + } + }, + lastChangeDate: { + readOnly: true, + serializedName: "lastChangeDate", + type: { + name: "String" + } + } + } + } +}; + export const IpRule: msRest.CompositeMapper = { serializedName: "IpRule", type: { @@ -252,8 +278,8 @@ export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { name: "String" } }, - actionRequired: { - serializedName: "actionRequired", + actionsRequired: { + serializedName: "actionsRequired", type: { name: "String" } @@ -342,6 +368,19 @@ export const PrivateEndpointConnection: msRest.CompositeMapper = { name: "Composite", className: "PrivateEndpointConnectionProperties" } + }, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } } } } @@ -359,6 +398,18 @@ export const CognitiveServicesAccountApiProperties: msRest.CompositeMapper = { name: "String" } }, + qnaAzureSearchEndpointKey: { + serializedName: "qnaAzureSearchEndpointKey", + type: { + name: "String" + } + }, + qnaAzureSearchEndpointId: { + serializedName: "qnaAzureSearchEndpointId", + type: { + name: "String" + } + }, statisticsEnabled: { serializedName: "statisticsEnabled", type: { @@ -384,6 +435,42 @@ export const CognitiveServicesAccountApiProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + aadClientId: { + serializedName: "aadClientId", + constraints: { + MaxLength: 500 + }, + type: { + name: "String" + } + }, + aadTenantId: { + serializedName: "aadTenantId", + constraints: { + MaxLength: 500 + }, + type: { + name: "String" + } + }, + superUser: { + serializedName: "superUser", + constraints: { + MaxLength: 500 + }, + type: { + name: "String" + } + }, + websiteName: { + serializedName: "websiteName", + constraints: { + MaxLength: 500 + }, + type: { + name: "String" + } } } } @@ -429,6 +516,21 @@ export const CognitiveServicesAccountProperties: msRest.CompositeMapper = { } } }, + isMigrated: { + readOnly: true, + serializedName: "isMigrated", + type: { + name: "Boolean" + } + }, + skuChangeInfo: { + readOnly: true, + serializedName: "skuChangeInfo", + type: { + name: "Composite", + className: "CognitiveServicesAccountSkuChangeInfo" + } + }, customSubDomainName: { serializedName: "customSubDomainName", type: { @@ -485,6 +587,13 @@ export const CognitiveServicesAccountProperties: msRest.CompositeMapper = { name: "Composite", className: "CognitiveServicesAccountApiProperties" } + }, + dateCreated: { + readOnly: true, + serializedName: "dateCreated", + type: { + name: "String" + } } } } @@ -1252,6 +1361,28 @@ export const ResourceSku: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + export const PrivateLinkResourceProperties: msRest.CompositeMapper = { serializedName: "PrivateLinkResourceProperties", type: { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/operationsMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/operationsMappers.ts index c83dbeabcc21..d6ee04e595ff 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/operationsMappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/operationsMappers.ts @@ -1,13 +1,14 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - CloudError, + ErrorBody, + ErrorModel, OperationDisplayInfo, OperationEntity, OperationEntityListResult diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts index 7865e981bfd7..164d62941896 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateEndpointConnectionsMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateEndpointConnectionsMappers.ts index a7458b249d23..bf16a2dc3d9e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateEndpointConnectionsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -9,17 +9,20 @@ export { AzureEntityResource, BaseResource, - CloudError, CognitiveServicesAccount, CognitiveServicesAccountApiProperties, CognitiveServicesAccountProperties, + CognitiveServicesAccountSkuChangeInfo, Encryption, + ErrorBody, + ErrorModel, Identity, IpRule, KeyVaultProperties, NetworkRuleSet, PrivateEndpoint, PrivateEndpointConnection, + PrivateEndpointConnectionListResult, PrivateEndpointConnectionProperties, PrivateLinkResource, PrivateLinkResourceProperties, diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateLinkResourcesMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateLinkResourcesMappers.ts index 9c23d80a285a..bdec501d28f4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateLinkResourcesMappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/privateLinkResourcesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -9,11 +9,13 @@ export { AzureEntityResource, BaseResource, - CloudError, CognitiveServicesAccount, CognitiveServicesAccountApiProperties, CognitiveServicesAccountProperties, + CognitiveServicesAccountSkuChangeInfo, Encryption, + ErrorBody, + ErrorModel, Identity, IpRule, KeyVaultProperties, diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/resourceSkusMappers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/resourceSkusMappers.ts index 441db000fd5b..415e5f9c0dfa 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/resourceSkusMappers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/resourceSkusMappers.ts @@ -1,13 +1,14 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - CloudError, + ErrorBody, + ErrorModel, ResourceSku, ResourceSkuRestrictionInfo, ResourceSkuRestrictions, diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts index a0b41d594d5e..e6aa3fa2884d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -693,6 +692,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -714,6 +716,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts index a463035550cd..04be259707bc 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts index 9e57c374363d..0e47a4c12d81 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -95,7 +94,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationEntityListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -116,7 +118,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationEntityListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts index c6e04ad142eb..973d4094cf9c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -26,6 +25,38 @@ export class PrivateEndpointConnections { this.client = client; } + /** + * Gets the private endpoint connections associated with the Cognitive Services account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of Cognitive Services account. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + /** * Gets the specified private endpoint connection associated with the Cognitive Services account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -152,6 +183,31 @@ export class PrivateEndpointConnections { // Operation Specifications const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; + const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", @@ -172,7 +228,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer @@ -205,7 +261,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer @@ -230,7 +286,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts index 7c3043b2d1d7..f6bc057f4d93 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -80,7 +79,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateLinkResourceListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts index b3bba5e8356d..54b4e0e57f1b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -98,7 +97,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ResourceSkusResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer @@ -111,6 +110,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -119,7 +121,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ResourceSkusResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorModel } }, serializer