From a00be428f74315af898ea1ab5d688ab965e37f08 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 19 May 2021 18:20:53 +0000 Subject: [PATCH] CodeGen from PR 14390 in Azure/azure-rest-api-specs Merge bf15c40fb3a47c869dbac5534d421cdcbd024d01 into d2c9a00f64387ac417831818b4cdb880663a3acc --- .../arm-subscriptions/LICENSE.txt | 2 +- sdk/subscription/arm-subscriptions/README.md | 9 ++--- .../arm-subscriptions/rollup.config.js | 4 +- .../src/models/aliasMappers.ts | 4 +- .../arm-subscriptions/src/models/index.ts | 4 +- .../arm-subscriptions/src/models/mappers.ts | 4 +- .../src/models/operationsMappers.ts | 4 +- .../src/models/parameters.ts | 5 +-- .../models/subscriptionOperationsMappers.ts | 4 +- .../src/models/subscriptionsMappers.ts | 4 +- .../src/models/tenantsMappers.ts | 4 +- .../arm-subscriptions/src/operations/alias.ts | 37 +++++++++++++------ .../arm-subscriptions/src/operations/index.ts | 5 +-- .../src/operations/operations.ts | 5 +-- .../src/operations/subscriptionOperations.ts | 5 +-- .../src/operations/subscriptions.ts | 8 ++-- .../src/operations/tenants.ts | 8 ++-- .../src/subscriptionClient.ts | 5 +-- .../src/subscriptionClientContext.ts | 5 +-- 19 files changed, 69 insertions(+), 57 deletions(-) diff --git a/sdk/subscription/arm-subscriptions/LICENSE.txt b/sdk/subscription/arm-subscriptions/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/subscription/arm-subscriptions/LICENSE.txt +++ b/sdk/subscription/arm-subscriptions/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/subscription/arm-subscriptions/README.md b/sdk/subscription/arm-subscriptions/README.md index e57ebc12be19..b076ad00c073 100644 --- a/sdk/subscription/arm-subscriptions/README.md +++ b/sdk/subscription/arm-subscriptions/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-subscriptions ### How to use -#### nodejs - Authentication, client creation and listLocations subscriptions as an example written in TypeScript. +#### nodejs - client creation and listLocations subscriptions 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 { SubscriptionClient, SubscriptionModels, SubscriptionMappers } from "@azure/arm-subscriptions"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { SubscriptionClient } = require("@azure/arm-subscriptions"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/subscription/arm-subscriptions/rollup.config.js b/sdk/subscription/arm-subscriptions/rollup.config.js index 31cf8990d22c..62ae6eada406 100644 --- a/sdk/subscription/arm-subscriptions/rollup.config.js +++ b/sdk/subscription/arm-subscriptions/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/subscription/arm-subscriptions/src/models/aliasMappers.ts b/sdk/subscription/arm-subscriptions/src/models/aliasMappers.ts index ecda8fcc7595..6a94774fbf0e 100644 --- a/sdk/subscription/arm-subscriptions/src/models/aliasMappers.ts +++ b/sdk/subscription/arm-subscriptions/src/models/aliasMappers.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. diff --git a/sdk/subscription/arm-subscriptions/src/models/index.ts b/sdk/subscription/arm-subscriptions/src/models/index.ts index 91d12eedaaf2..af4b02890f6e 100644 --- a/sdk/subscription/arm-subscriptions/src/models/index.ts +++ b/sdk/subscription/arm-subscriptions/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. diff --git a/sdk/subscription/arm-subscriptions/src/models/mappers.ts b/sdk/subscription/arm-subscriptions/src/models/mappers.ts index cbf65acfac67..a7a625769d7c 100644 --- a/sdk/subscription/arm-subscriptions/src/models/mappers.ts +++ b/sdk/subscription/arm-subscriptions/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. diff --git a/sdk/subscription/arm-subscriptions/src/models/operationsMappers.ts b/sdk/subscription/arm-subscriptions/src/models/operationsMappers.ts index b8de8606cf9d..3e8e33c6f2bd 100644 --- a/sdk/subscription/arm-subscriptions/src/models/operationsMappers.ts +++ b/sdk/subscription/arm-subscriptions/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. diff --git a/sdk/subscription/arm-subscriptions/src/models/parameters.ts b/sdk/subscription/arm-subscriptions/src/models/parameters.ts index eb9a9a83971a..0ef9f6175744 100644 --- a/sdk/subscription/arm-subscriptions/src/models/parameters.ts +++ b/sdk/subscription/arm-subscriptions/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/subscription/arm-subscriptions/src/models/subscriptionOperationsMappers.ts b/sdk/subscription/arm-subscriptions/src/models/subscriptionOperationsMappers.ts index 3e331654cb51..43cb4efc961e 100644 --- a/sdk/subscription/arm-subscriptions/src/models/subscriptionOperationsMappers.ts +++ b/sdk/subscription/arm-subscriptions/src/models/subscriptionOperationsMappers.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. diff --git a/sdk/subscription/arm-subscriptions/src/models/subscriptionsMappers.ts b/sdk/subscription/arm-subscriptions/src/models/subscriptionsMappers.ts index 496058988f35..7dccaaef34d5 100644 --- a/sdk/subscription/arm-subscriptions/src/models/subscriptionsMappers.ts +++ b/sdk/subscription/arm-subscriptions/src/models/subscriptionsMappers.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. diff --git a/sdk/subscription/arm-subscriptions/src/models/tenantsMappers.ts b/sdk/subscription/arm-subscriptions/src/models/tenantsMappers.ts index 3bb2cb4ae153..8aee234fd72e 100644 --- a/sdk/subscription/arm-subscriptions/src/models/tenantsMappers.ts +++ b/sdk/subscription/arm-subscriptions/src/models/tenantsMappers.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. diff --git a/sdk/subscription/arm-subscriptions/src/operations/alias.ts b/sdk/subscription/arm-subscriptions/src/operations/alias.ts index d05c98805c1f..28644fbc03d8 100644 --- a/sdk/subscription/arm-subscriptions/src/operations/alias.ts +++ b/sdk/subscription/arm-subscriptions/src/operations/alias.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 @@ -29,7 +28,9 @@ export class Alias { /** * Create Alias Subscription. - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param body * @param [options] The optional parameters * @returns Promise @@ -41,18 +42,24 @@ export class Alias { /** * Get Alias Subscription. - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param [options] The optional parameters * @returns Promise */ get(aliasName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param callback The callback */ get(aliasName: string, callback: msRest.ServiceCallback): void; /** - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param options The optional parameters * @param callback The callback */ @@ -69,18 +76,24 @@ export class Alias { /** * Delete Alias. - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param [options] The optional parameters * @returns Promise */ deleteMethod(aliasName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param callback The callback */ deleteMethod(aliasName: string, callback: msRest.ServiceCallback): void; /** - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param options The optional parameters * @param callback The callback */ @@ -121,7 +134,9 @@ export class Alias { /** * Create Alias Subscription. - * @param aliasName Alias Name + * @param aliasName AliasName is the name for the subscription creation request. Note that this is + * not the same as subscription name and this doesn’t have any other lifecycle need beyond the + * request for subscription creation. * @param body * @param [options] The optional parameters * @returns Promise diff --git a/sdk/subscription/arm-subscriptions/src/operations/index.ts b/sdk/subscription/arm-subscriptions/src/operations/index.ts index c08f9c29d393..1c189f48ece6 100644 --- a/sdk/subscription/arm-subscriptions/src/operations/index.ts +++ b/sdk/subscription/arm-subscriptions/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/subscription/arm-subscriptions/src/operations/operations.ts b/sdk/subscription/arm-subscriptions/src/operations/operations.ts index a3eb16df3104..44eb1258cbd2 100644 --- a/sdk/subscription/arm-subscriptions/src/operations/operations.ts +++ b/sdk/subscription/arm-subscriptions/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 diff --git a/sdk/subscription/arm-subscriptions/src/operations/subscriptionOperations.ts b/sdk/subscription/arm-subscriptions/src/operations/subscriptionOperations.ts index 324515769845..80c05f88ddb9 100644 --- a/sdk/subscription/arm-subscriptions/src/operations/subscriptionOperations.ts +++ b/sdk/subscription/arm-subscriptions/src/operations/subscriptionOperations.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/subscription/arm-subscriptions/src/operations/subscriptions.ts b/sdk/subscription/arm-subscriptions/src/operations/subscriptions.ts index bc8b22a21b5d..762fe00f8fc4 100644 --- a/sdk/subscription/arm-subscriptions/src/operations/subscriptions.ts +++ b/sdk/subscription/arm-subscriptions/src/operations/subscriptions.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 @@ -212,6 +211,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/subscription/arm-subscriptions/src/operations/tenants.ts b/sdk/subscription/arm-subscriptions/src/operations/tenants.ts index 2c8fe0e433ec..d3a17e1e2522 100644 --- a/sdk/subscription/arm-subscriptions/src/operations/tenants.ts +++ b/sdk/subscription/arm-subscriptions/src/operations/tenants.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 @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/subscription/arm-subscriptions/src/subscriptionClient.ts b/sdk/subscription/arm-subscriptions/src/subscriptionClient.ts index e09ea265f1f4..70e8378b13ad 100644 --- a/sdk/subscription/arm-subscriptions/src/subscriptionClient.ts +++ b/sdk/subscription/arm-subscriptions/src/subscriptionClient.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/subscription/arm-subscriptions/src/subscriptionClientContext.ts b/sdk/subscription/arm-subscriptions/src/subscriptionClientContext.ts index e04e4ea0027c..58e760990fbb 100644 --- a/sdk/subscription/arm-subscriptions/src/subscriptionClientContext.ts +++ b/sdk/subscription/arm-subscriptions/src/subscriptionClientContext.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