diff --git a/sdk/botservice/arm-botservice/LICENSE.txt b/sdk/botservice/arm-botservice/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/botservice/arm-botservice/LICENSE.txt +++ b/sdk/botservice/arm-botservice/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/botservice/arm-botservice/README.md b/sdk/botservice/arm-botservice/README.md index 0ee386505106..e9bf67944f86 100644 --- a/sdk/botservice/arm-botservice/README.md +++ b/sdk/botservice/arm-botservice/README.md @@ -1,11 +1,11 @@ ## Azure AzureBotService SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureBotService. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureBotService. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-botservice @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get bots as an example written in JavaScript. ##### Sample code @@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmBotservice.AzureBotService(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index b7a3d0fead4f..e68418ca9547 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/botservice/arm-botservice", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/botservice/arm-botservice", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/botservice/arm-botservice/rollup.config.js b/sdk/botservice/arm-botservice/rollup.config.js index b8625979d3b4..6543f70a0a0b 100644 --- a/sdk/botservice/arm-botservice/rollup.config.js +++ b/sdk/botservice/arm-botservice/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/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index 771e3e36fec4..2a5c221ed925 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.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 @@ -23,6 +22,10 @@ class AzureBotService extends AzureBotServiceContext { directLine: operations.DirectLine; operations: operations.Operations; botConnection: operations.BotConnection; + hostSettings: operations.HostSettings; + operationResults: operations.OperationResults; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; /** * Initializes a new instance of the AzureBotService class. @@ -42,6 +45,10 @@ class AzureBotService extends AzureBotServiceContext { this.directLine = new operations.DirectLine(this); this.operations = new operations.Operations(this); this.botConnection = new operations.BotConnection(this); + this.hostSettings = new operations.HostSettings(this); + this.operationResults = new operations.OperationResults(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); } } diff --git a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts index 3261b8039599..272bb5a77a51 100644 --- a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts +++ b/sdk/botservice/arm-botservice/src/azureBotServiceContext.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 @@ -10,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-botservice"; const packageVersion = "2.1.0"; @@ -50,7 +49,7 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2020-06-02'; + this.apiVersion = '2021-05-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts index 8fd5b0040848..fc3f814e9ba8 100644 --- a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.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. @@ -38,6 +38,11 @@ export { LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceBase, + PrivateLinkServiceConnectionState, Resource, ServiceProvider, ServiceProviderParameter, diff --git a/sdk/botservice/arm-botservice/src/models/botsMappers.ts b/sdk/botservice/arm-botservice/src/models/botsMappers.ts index 4e14c4629175..0e2a3685b359 100644 --- a/sdk/botservice/arm-botservice/src/models/botsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botsMappers.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. @@ -40,6 +40,11 @@ export { LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceBase, + PrivateLinkServiceConnectionState, Resource, Sku, SkypeChannel, diff --git a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts index 068826fddb11..93efba776c68 100644 --- a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/channelsMappers.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. @@ -38,6 +38,11 @@ export { LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceBase, + PrivateLinkServiceConnectionState, Resource, Sku, SkypeChannel, diff --git a/sdk/botservice/arm-botservice/src/models/directLineMappers.ts b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts index 68e686658063..38c0c3ad5ed2 100644 --- a/sdk/botservice/arm-botservice/src/models/directLineMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/directLineMappers.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. @@ -37,6 +37,11 @@ export { LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceBase, + PrivateLinkServiceConnectionState, Resource, SiteInfo, Sku, diff --git a/sdk/botservice/arm-botservice/src/models/hostSettingsMappers.ts b/sdk/botservice/arm-botservice/src/models/hostSettingsMappers.ts new file mode 100644 index 000000000000..95cf18592cd1 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/models/hostSettingsMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + discriminators, + ErrorBody, + ErrorModel, + HostSettingsResponse +} from "../models/mappers"; diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 191a2d329da5..7cd6bd457938 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/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. @@ -59,7 +59,7 @@ export interface Resource extends BaseResource { sku?: Sku; /** * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' + * 'bot', 'function', 'azurebot' */ kind?: Kind; /** @@ -127,6 +127,27 @@ export interface BotProperties { * The LUIS Key */ luisKey?: string; + /** + * Whether Cmek is enabled + */ + isCmekEnabled?: boolean; + /** + * The CMK Url + */ + cmekKeyVaultUrl?: string; + /** + * Whether the bot is in an isolated network + */ + isIsolated?: boolean; + /** + * Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for + * authentication. + */ + disableLocalAuth?: boolean; + /** + * The channel schema transformation version for the bot + */ + schemaTransformationVersion?: string; } /** @@ -214,7 +235,7 @@ export interface FacebookPage { * Facebook application access token. Value only returned through POST to the action Channel List * API, otherwise empty. */ - accessToken: string; + accessToken?: string; } /** @@ -239,7 +260,7 @@ export interface FacebookChannelProperties { * Facebook application secret. Value only returned through POST to the action Channel List API, * otherwise empty. */ - appSecret: string; + appSecret?: string; /** * Callback Url * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -277,7 +298,7 @@ export interface EmailChannelProperties { * The password for the email address. Value only returned through POST to the action Channel * List API, otherwise empty. */ - password: string; + password?: string; /** * Whether this channel is enabled for the bot */ @@ -397,7 +418,7 @@ export interface KikChannelProperties { /** * Kik API key. Value only returned through POST to the action Channel List API, otherwise empty. */ - apiKey: string; + apiKey?: string; /** * Whether this channel is validated for the bot */ @@ -564,7 +585,7 @@ export interface TelegramChannelProperties { * The Telegram access token. Value only returned through POST to the action Channel List API, * otherwise empty. */ - accessToken: string; + accessToken?: string; /** * Whether this channel is validated for the bot */ @@ -606,7 +627,7 @@ export interface SmsChannelProperties { * The Sms auth token. Value only returned through POST to the action Channel List API, otherwise * empty. */ - authToken: string; + authToken?: string; /** * Whether this channel is validated for the bot */ @@ -638,17 +659,21 @@ export interface SlackChannelProperties { /** * The Slack client id */ - clientId: string; + clientId?: string; /** * The Slack client secret. Value only returned through POST to the action Channel List API, * otherwise empty. */ - clientSecret: string; + clientSecret?: string; /** * The Slack verification token. Value only returned through POST to the action Channel List API, * otherwise empty. */ - verificationToken: string; + verificationToken?: string; + /** + * The Slack permission scopes. + */ + scopes?: string; /** * The Slack landing page Url */ @@ -755,9 +780,13 @@ export interface LineChannel { */ export interface DirectLineSpeechChannelProperties { /** - * The cognitive service subscription ID to use with this channel registration. + * The cognitive service region with this channel registration. + */ + cognitiveServiceRegion: string; + /** + * The cognitive service subscription key to use with this channel registration. */ - cognitiveServicesSubscriptionId: string; + cognitiveServiceSubscriptionKey: string; /** * Whether this channel is enabled or not. */ @@ -1069,6 +1098,177 @@ export interface CheckNameAvailabilityResponseBody { message?: string; } +/** + * The response body returned for a request to Bot Service Management to check per subscription + * hostSettings + */ +export interface HostSettingsResponse { + /** + * For in-conversation bot user authentication + */ + oAuthUrl?: string; + /** + * For verifying incoming tokens from the channels + */ + toBotFromChannelOpenIdMetadataUrl?: string; + /** + * For verifying incoming tokens from the channels + */ + toBotFromChannelTokenIssuer?: string; + /** + * For verifying incoming tokens from bot emulator + */ + toBotFromEmulatorOpenIdMetadataUrl?: string; + /** + * For getting access token to channels from bot host + */ + toChannelFromBotLoginUrl?: string; + /** + * For getting access token to channels from bot host + */ + toChannelFromBotOAuthScope?: string; + /** + * Per cloud OAuth setting on whether authority is validated + */ + validateAuthority?: boolean; + /** + * Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12 + */ + botOpenIdMetadata?: string; +} + +/** + * The properties indicating the operation result of an operation on a service. + */ +export interface OperationResultsDescription { + /** + * The ID of the operation returned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the operation result. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The status of the operation being performed. Possible values include: 'Canceled', 'Succeeded', + * 'Failed', 'Requested', 'Running' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: OperationResultStatus; + /** + * The time that the operation was started. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: Date; +} + +/** + * A collection of information about the state of the connection between service consumer and + * provider. + */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. Possible values include: 'Pending', 'Approved', 'Rejected' + */ + status?: PrivateEndpointServiceConnectionStatus; + /** + * The reason for approval/rejection of the connection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ + actionRequired?: string; +} + +/** + * The Private Endpoint resource. + */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * Common fields that are returned in the response for all BotService Private Link Resources + * @summary Private Link Resource Base + */ +export interface PrivateLinkResourceBase extends BaseResource { + /** + * 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.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * 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; +} + +/** + * The Private Endpoint Connection resource. + */ +export interface PrivateEndpointConnection extends PrivateLinkResourceBase { + /** + * The resource of private end point. + */ + privateEndpoint?: PrivateEndpoint; + /** + * A collection of information about the state of the connection between service consumer and + * provider. + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. Possible values include: + * 'Succeeded', 'Creating', 'Deleting', 'Failed' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends PrivateLinkResourceBase { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + +/** + * A list of private link resources + */ +export interface PrivateLinkResourceListResult { + /** + * Array of private link resources + */ + value?: PrivateLinkResource[]; +} + /** * Optional Parameters. */ @@ -1087,7 +1287,7 @@ export interface BotsUpdateOptionalParams extends msRest.RequestOptionsBase { sku?: Sku; /** * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' + * 'bot', 'function', 'azurebot' */ kind?: Kind; /** @@ -1118,7 +1318,7 @@ export interface ChannelsUpdateOptionalParams extends msRest.RequestOptionsBase sku?: Sku; /** * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' + * 'bot', 'function', 'azurebot' */ kind?: Kind; /** @@ -1186,6 +1386,14 @@ export interface ConnectionSettingResponseList extends Array nextLink?: string; } +/** + * @interface + * List of private endpoint connection associated with the specified storage account + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { +} + /** * Defines values for SkuName. * Possible values include: 'F0', 'S1' @@ -1204,11 +1412,11 @@ export type SkuTier = 'Free' | 'Standard'; /** * Defines values for Kind. - * Possible values include: 'sdk', 'designer', 'bot', 'function' + * Possible values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' * @readonly * @enum {string} */ -export type Kind = 'sdk' | 'designer' | 'bot' | 'function'; +export type Kind = 'sdk' | 'designer' | 'bot' | 'function' | 'azurebot'; /** * Defines values for Key. @@ -1218,6 +1426,30 @@ export type Kind = 'sdk' | 'designer' | 'bot' | 'function'; */ export type Key = 'key1' | 'key2'; +/** + * Defines values for OperationResultStatus. + * Possible values include: 'Canceled', 'Succeeded', 'Failed', 'Requested', 'Running' + * @readonly + * @enum {string} + */ +export type OperationResultStatus = 'Canceled' | 'Succeeded' | 'Failed' | 'Requested' | 'Running'; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Deleting' | 'Failed'; + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected' + * @readonly + * @enum {string} + */ +export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected'; + /** * Defines values for ChannelName. * Possible values include: 'AlexaChannel', 'FacebookChannel', 'EmailChannel', 'KikChannel', @@ -1715,3 +1947,143 @@ export type BotConnectionListByBotServiceNextResponse = ConnectionSettingRespons parsedBody: ConnectionSettingResponseList; }; }; + +/** + * Contains response data for the get operation. + */ +export type HostSettingsGetResponse = HostSettingsResponse & { + /** + * 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: HostSettingsResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationResultsGetResponse = OperationResultsDescription & { + /** + * 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: OperationResultsDescription; + }; +}; + +/** + * Contains response data for the beginGet operation. + */ +export type OperationResultsBeginGetResponse = OperationResultsDescription & { + /** + * 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: OperationResultsDescription; + }; +}; + +/** + * 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. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByBotResource operation. + */ +export type PrivateLinkResourcesListByBotResourceResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index 41feb438e31a..77e2f680dd07 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/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. @@ -207,6 +207,36 @@ export const BotProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + isCmekEnabled: { + serializedName: "isCmekEnabled", + type: { + name: "Boolean" + } + }, + cmekKeyVaultUrl: { + serializedName: "cmekKeyVaultUrl", + type: { + name: "String" + } + }, + isIsolated: { + serializedName: "isIsolated", + type: { + name: "Boolean" + } + }, + disableLocalAuth: { + serializedName: "disableLocalAuth", + type: { + name: "Boolean" + } + }, + schemaTransformationVersion: { + serializedName: "schemaTransformationVersion", + type: { + name: "String" + } } } } @@ -342,7 +372,6 @@ export const FacebookPage: msRest.CompositeMapper = { } }, accessToken: { - required: true, serializedName: "accessToken", type: { name: "String" @@ -385,7 +414,6 @@ export const FacebookChannelProperties: msRest.CompositeMapper = { } }, appSecret: { - required: true, serializedName: "appSecret", type: { name: "String" @@ -443,7 +471,6 @@ export const EmailChannelProperties: msRest.CompositeMapper = { } }, password: { - required: true, serializedName: "password", type: { name: "String" @@ -628,7 +655,6 @@ export const KikChannelProperties: msRest.CompositeMapper = { } }, apiKey: { - required: true, serializedName: "apiKey", type: { name: "String" @@ -897,7 +923,6 @@ export const TelegramChannelProperties: msRest.CompositeMapper = { className: "TelegramChannelProperties", modelProperties: { accessToken: { - required: true, serializedName: "accessToken", type: { name: "String" @@ -961,7 +986,6 @@ export const SmsChannelProperties: msRest.CompositeMapper = { } }, authToken: { - required: true, serializedName: "authToken", type: { name: "String" @@ -1011,26 +1035,29 @@ export const SlackChannelProperties: msRest.CompositeMapper = { className: "SlackChannelProperties", modelProperties: { clientId: { - required: true, serializedName: "clientId", type: { name: "String" } }, clientSecret: { - required: true, serializedName: "clientSecret", type: { name: "String" } }, verificationToken: { - required: true, serializedName: "verificationToken", type: { name: "String" } }, + scopes: { + serializedName: "scopes", + type: { + name: "String" + } + }, landingPageUrl: { serializedName: "landingPageUrl", type: { @@ -1194,9 +1221,16 @@ export const DirectLineSpeechChannelProperties: msRest.CompositeMapper = { name: "Composite", className: "DirectLineSpeechChannelProperties", modelProperties: { - cognitiveServicesSubscriptionId: { + cognitiveServiceRegion: { + required: true, + serializedName: "cognitiveServiceRegion", + type: { + name: "String" + } + }, + cognitiveServiceSubscriptionKey: { required: true, - serializedName: "cognitiveServicesSubscriptionId", + serializedName: "cognitiveServiceSubscriptionKey", type: { name: "String" } @@ -1702,6 +1736,273 @@ export const CheckNameAvailabilityResponseBody: msRest.CompositeMapper = { } }; +export const HostSettingsResponse: msRest.CompositeMapper = { + serializedName: "HostSettingsResponse", + type: { + name: "Composite", + className: "HostSettingsResponse", + modelProperties: { + oAuthUrl: { + serializedName: "OAuthUrl", + type: { + name: "String" + } + }, + toBotFromChannelOpenIdMetadataUrl: { + serializedName: "ToBotFromChannelOpenIdMetadataUrl", + type: { + name: "String" + } + }, + toBotFromChannelTokenIssuer: { + serializedName: "ToBotFromChannelTokenIssuer", + type: { + name: "String" + } + }, + toBotFromEmulatorOpenIdMetadataUrl: { + serializedName: "ToBotFromEmulatorOpenIdMetadataUrl", + type: { + name: "String" + } + }, + toChannelFromBotLoginUrl: { + serializedName: "ToChannelFromBotLoginUrl", + type: { + name: "String" + } + }, + toChannelFromBotOAuthScope: { + serializedName: "ToChannelFromBotOAuthScope", + type: { + name: "String" + } + }, + validateAuthority: { + serializedName: "ValidateAuthority", + type: { + name: "Boolean" + } + }, + botOpenIdMetadata: { + serializedName: "BotOpenIdMetadata", + type: { + name: "String" + } + } + } + } +}; + +export const OperationResultsDescription: msRest.CompositeMapper = { + serializedName: "OperationResultsDescription", + type: { + name: "Composite", + className: "OperationResultsDescription", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionRequired: { + serializedName: "actionRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceBase: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceBase", + type: { + name: "Composite", + className: "PrivateLinkResourceBase", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...PrivateLinkResourceBase.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...PrivateLinkResourceBase.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + export const BotResponseList: msRest.CompositeMapper = { serializedName: "BotResponseList", type: { @@ -1817,6 +2118,28 @@ export const ConnectionSettingResponseList: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + export const discriminators = { 'Channel' : Channel, 'Channel.AlexaChannel' : AlexaChannel, diff --git a/sdk/botservice/arm-botservice/src/models/operationResultsMappers.ts b/sdk/botservice/arm-botservice/src/models/operationResultsMappers.ts new file mode 100644 index 000000000000..98a557718abf --- /dev/null +++ b/sdk/botservice/arm-botservice/src/models/operationResultsMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + discriminators, + ErrorBody, + ErrorModel, + OperationResultsDescription +} from "../models/mappers"; diff --git a/sdk/botservice/arm-botservice/src/models/operationsMappers.ts b/sdk/botservice/arm-botservice/src/models/operationsMappers.ts index cafd02e8a5f7..a1e45fe4f853 100644 --- a/sdk/botservice/arm-botservice/src/models/operationsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/operationsMappers.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. @@ -8,7 +8,8 @@ export { discriminators, - CloudError, + ErrorBody, + ErrorModel, OperationDisplayInfo, OperationEntity, OperationEntityListResult diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts index e16378974344..0454992659c1 100644 --- a/sdk/botservice/arm-botservice/src/models/parameters.ts +++ b/sdk/botservice/arm-botservice/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 @@ -110,6 +109,26 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const operationResultId: msRest.OperationURLParameter = { + parameterPath: "operationResultId", + mapper: { + required: true, + serializedName: "operationResultId", + type: { + name: "String" + } + } +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/botservice/arm-botservice/src/models/privateEndpointConnectionsMappers.ts b/sdk/botservice/arm-botservice/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..6fac607c936d --- /dev/null +++ b/sdk/botservice/arm-botservice/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,59 @@ +/* + * 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 { + discriminators, + AlexaChannel, + AlexaChannelProperties, + BaseResource, + Bot, + BotChannel, + BotProperties, + Channel, + ConnectionSetting, + ConnectionSettingParameter, + ConnectionSettingProperties, + DirectLineChannel, + DirectLineChannelProperties, + DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, + EmailChannel, + EmailChannelProperties, + ErrorBody, + ErrorModel, + FacebookChannel, + FacebookChannelProperties, + FacebookPage, + KikChannel, + KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, + MsTeamsChannel, + MsTeamsChannelProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceBase, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SkypeChannel, + SkypeChannelProperties, + SlackChannel, + SlackChannelProperties, + SmsChannel, + SmsChannelProperties, + TelegramChannel, + TelegramChannelProperties, + WebChatChannel, + WebChatChannelProperties, + WebChatSite +} from "../models/mappers"; diff --git a/sdk/botservice/arm-botservice/src/models/privateLinkResourcesMappers.ts b/sdk/botservice/arm-botservice/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..9dee334e7d09 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,59 @@ +/* + * 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 { + discriminators, + AlexaChannel, + AlexaChannelProperties, + BaseResource, + Bot, + BotChannel, + BotProperties, + Channel, + ConnectionSetting, + ConnectionSettingParameter, + ConnectionSettingProperties, + DirectLineChannel, + DirectLineChannelProperties, + DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, + EmailChannel, + EmailChannelProperties, + ErrorBody, + ErrorModel, + FacebookChannel, + FacebookChannelProperties, + FacebookPage, + KikChannel, + KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, + MsTeamsChannel, + MsTeamsChannelProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceBase, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SkypeChannel, + SkypeChannelProperties, + SlackChannel, + SlackChannelProperties, + SmsChannel, + SmsChannelProperties, + TelegramChannel, + TelegramChannelProperties, + WebChatChannel, + WebChatChannelProperties, + WebChatSite +} from "../models/mappers"; diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts index b6baaf2edfc3..9f0dcdee121a 100644 --- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts +++ b/sdk/botservice/arm-botservice/src/operations/botConnection.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 @@ -326,7 +325,7 @@ const listServiceProvidersOperationSpec: msRest.OperationSpec = { const listWithSecretsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}/listWithSecrets", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}/listWithSecrets", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -352,7 +351,7 @@ const listWithSecretsOperationSpec: msRest.OperationSpec = { const createOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -388,7 +387,7 @@ const createOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -424,7 +423,7 @@ const updateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -450,7 +449,7 @@ const getOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.resourceName, @@ -505,6 +504,9 @@ const listByBotServiceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/bots.ts b/sdk/botservice/arm-botservice/src/operations/bots.ts index c16d188081f9..59813052e6a9 100644 --- a/sdk/botservice/arm-botservice/src/operations/bots.ts +++ b/sdk/botservice/arm-botservice/src/operations/bots.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 @@ -522,6 +521,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -543,6 +545,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts index f54e613f0a2b..566ccb3119c8 100644 --- a/sdk/botservice/arm-botservice/src/operations/channels.ts +++ b/sdk/botservice/arm-botservice/src/operations/channels.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 @@ -506,6 +505,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/directLine.ts b/sdk/botservice/arm-botservice/src/operations/directLine.ts index 324c434c7724..2b44cb9f82ca 100644 --- a/sdk/botservice/arm-botservice/src/operations/directLine.ts +++ b/sdk/botservice/arm-botservice/src/operations/directLine.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/botservice/arm-botservice/src/operations/hostSettings.ts b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts new file mode 100644 index 000000000000..7ddc6a14b292 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts @@ -0,0 +1,76 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/hostSettingsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotServiceContext } from "../azureBotServiceContext"; + +/** Class representing a HostSettings. */ +export class HostSettings { + private readonly client: AzureBotServiceContext; + + /** + * Create a HostSettings. + * @param {AzureBotServiceContext} client Reference to the service client. + */ + constructor(client: AzureBotServiceContext) { + this.client = client; + } + + /** + * Get per subscription settings needed to host bot in compute resource such as Azure App Service + * @param [options] The optional parameters + * @returns Promise + */ + get(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + get(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.BotService/hostSettings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HostSettingsResponse + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operations/index.ts b/sdk/botservice/arm-botservice/src/operations/index.ts index d4f8c52a2296..25c173ac190a 100644 --- a/sdk/botservice/arm-botservice/src/operations/index.ts +++ b/sdk/botservice/arm-botservice/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 @@ -13,3 +12,7 @@ export * from "./channels"; export * from "./directLine"; export * from "./operations"; export * from "./botConnection"; +export * from "./hostSettings"; +export * from "./operationResults"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/botservice/arm-botservice/src/operations/operationResults.ts b/sdk/botservice/arm-botservice/src/operations/operationResults.ts new file mode 100644 index 000000000000..1fd85f1fa1e9 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/operationResults.ts @@ -0,0 +1,82 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationResultsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotServiceContext } from "../azureBotServiceContext"; + +/** Class representing a OperationResults. */ +export class OperationResults { + private readonly client: AzureBotServiceContext; + + /** + * Create a OperationResults. + * @param {AzureBotServiceContext} client Reference to the service client. + */ + constructor(client: AzureBotServiceContext) { + this.client = client; + } + + /** + * Get the operation result for a long running operation. + * @param operationResultId The ID of the operation result to get. + * @param [options] The optional parameters + * @returns Promise + */ + get(operationResultId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginGet(operationResultId,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get the operation result for a long running operation. + * @param operationResultId The ID of the operation result to get. + * @param [options] The optional parameters + * @returns Promise + */ + beginGet(operationResultId: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + operationResultId, + options + }, + beginGetOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginGetOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.operationResultId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationResultsDescription + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operations/operations.ts b/sdk/botservice/arm-botservice/src/operations/operations.ts index 276bd6996cdd..ca90ce0113f8 100644 --- a/sdk/botservice/arm-botservice/src/operations/operations.ts +++ b/sdk/botservice/arm-botservice/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/botservice/arm-botservice/src/operations/privateEndpointConnections.ts b/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..db7fb12dd65d --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts @@ -0,0 +1,291 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotServiceContext } from "../azureBotServiceContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: AzureBotServiceContext; + + /** + * Create a PrivateEndpointConnections. + * @param {AzureBotServiceContext} client Reference to the service client. + */ + constructor(client: AzureBotServiceContext) { + this.client = client; + } + + /** + * List all the private endpoint connections associated with the Bot. + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified private endpoint connection associated with the Bot. + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the Bot. + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param callback The callback + */ + create(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + properties, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.resourceName, + 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.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts b/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..db73f7d782ce --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotServiceContext } from "../azureBotServiceContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: AzureBotServiceContext; + + /** + * Create a PrivateLinkResources. + * @param {AzureBotServiceContext} client Reference to the service client. + */ + constructor(client: AzureBotServiceContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a Bot. + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByBotResource(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param callback The callback + */ + listByBotResource(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param options The optional parameters + * @param callback The callback + */ + listByBotResource(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBotResource(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listByBotResourceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByBotResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +};