Skip to content

Commit

Permalink
CodeGen from PR 12433 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 3679452a5db7ceb6d19450e7679a700244ae668c into efdb4c9f31af01daa8c0051cb531a7b0103c9a12
  • Loading branch information
SDKAuto committed Jan 19, 2021
1 parent 81d37fa commit d3f6370
Show file tree
Hide file tree
Showing 19 changed files with 91 additions and 75 deletions.
2 changes: 1 addition & 1 deletion sdk/botservice/arm-botservice/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 4 additions & 5 deletions sdk/botservice/arm-botservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-botservice

### How to use

#### nodejs - Authentication, client creation and get bots as an example written in TypeScript.
#### nodejs - client creation and get bots as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -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 { AzureBotService, AzureBotServiceModels, AzureBotServiceMappers } from "@azure/arm-botservice";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { AzureBotService } = require("@azure/arm-botservice");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/botservice/arm-botservice/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 2 additions & 3 deletions sdk/botservice/arm-botservice/src/azureBotService.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 5 additions & 6 deletions sdk/botservice/arm-botservice/src/azureBotServiceContext.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -37,7 +36,7 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient {
if (!options) {
options = {};
}
if (!options.userAgent) {
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
Expand All @@ -52,10 +51,10 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient {
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;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions sdk/botservice/arm-botservice/src/models/botsMappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions sdk/botservice/arm-botservice/src/models/channelsMappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions sdk/botservice/arm-botservice/src/models/directLineMappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
30 changes: 19 additions & 11 deletions sdk/botservice/arm-botservice/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -127,6 +127,14 @@ export interface BotProperties {
* The LUIS Key
*/
luisKey?: string;
/**
* Whether Cmek is enabled
*/
isCmekEnabled?: boolean;
/**
* The CMK Url
*/
cmekKeyVaultUrl?: string;
}

/**
Expand Down Expand Up @@ -214,7 +222,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;
}

/**
Expand All @@ -239,7 +247,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.**
Expand Down Expand Up @@ -277,7 +285,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
*/
Expand Down Expand Up @@ -397,7 +405,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
*/
Expand Down Expand Up @@ -564,7 +572,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
*/
Expand Down Expand Up @@ -606,7 +614,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
*/
Expand Down Expand Up @@ -638,17 +646,17 @@ 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 landing page Url
*/
Expand Down
25 changes: 14 additions & 11 deletions sdk/botservice/arm-botservice/src/models/mappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -207,6 +207,18 @@ export const BotProperties: msRest.CompositeMapper = {
type: {
name: "String"
}
},
isCmekEnabled: {
serializedName: "isCmekEnabled",
type: {
name: "Boolean"
}
},
cmekKeyVaultUrl: {
serializedName: "cmekKeyVaultUrl",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -342,7 +354,6 @@ export const FacebookPage: msRest.CompositeMapper = {
}
},
accessToken: {
required: true,
serializedName: "accessToken",
type: {
name: "String"
Expand Down Expand Up @@ -385,7 +396,6 @@ export const FacebookChannelProperties: msRest.CompositeMapper = {
}
},
appSecret: {
required: true,
serializedName: "appSecret",
type: {
name: "String"
Expand Down Expand Up @@ -443,7 +453,6 @@ export const EmailChannelProperties: msRest.CompositeMapper = {
}
},
password: {
required: true,
serializedName: "password",
type: {
name: "String"
Expand Down Expand Up @@ -628,7 +637,6 @@ export const KikChannelProperties: msRest.CompositeMapper = {
}
},
apiKey: {
required: true,
serializedName: "apiKey",
type: {
name: "String"
Expand Down Expand Up @@ -897,7 +905,6 @@ export const TelegramChannelProperties: msRest.CompositeMapper = {
className: "TelegramChannelProperties",
modelProperties: {
accessToken: {
required: true,
serializedName: "accessToken",
type: {
name: "String"
Expand Down Expand Up @@ -961,7 +968,6 @@ export const SmsChannelProperties: msRest.CompositeMapper = {
}
},
authToken: {
required: true,
serializedName: "authToken",
type: {
name: "String"
Expand Down Expand Up @@ -1011,21 +1017,18 @@ 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"
Expand Down
4 changes: 2 additions & 2 deletions sdk/botservice/arm-botservice/src/models/operationsMappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 2 additions & 3 deletions sdk/botservice/arm-botservice/src/models/parameters.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit d3f6370

Please sign in to comment.