From e6f756d35ef71296640f95fe352e79cc33e5fb97 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 10 Dec 2020 05:37:11 +0000 Subject: [PATCH] CodeGen from PR 11970 in Azure/azure-rest-api-specs Merge 91b3ea33c66e90302829a257a51c9f0cc83d9572 into 7dddc4bf1e402b6e6737c132ecf05b74e2b53b08 --- sdk/hybridcompute/arm-hybridcompute/README.md | 9 +++-- .../arm-hybridcompute/rollup.config.js | 4 +-- .../src/hybridComputeManagementClient.ts | 5 ++- .../hybridComputeManagementClientContext.ts | 11 +++--- .../arm-hybridcompute/src/models/index.ts | 35 +++++++++++++------ .../src/models/machineExtensionsMappers.ts | 4 +-- .../src/models/machinesMappers.ts | 4 +-- .../arm-hybridcompute/src/models/mappers.ts | 4 +-- .../src/models/operationsMappers.ts | 4 +-- .../src/models/parameters.ts | 5 ++- .../arm-hybridcompute/src/operations/index.ts | 5 ++- .../src/operations/machineExtensions.ts | 19 +++++----- .../src/operations/machines.ts | 23 ++++++------ .../src/operations/operations.ts | 5 ++- 14 files changed, 75 insertions(+), 62 deletions(-) diff --git a/sdk/hybridcompute/arm-hybridcompute/README.md b/sdk/hybridcompute/arm-hybridcompute/README.md index 772bc400fa39..d2c0385f021b 100644 --- a/sdk/hybridcompute/arm-hybridcompute/README.md +++ b/sdk/hybridcompute/arm-hybridcompute/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-hybridcompute ### How to use -#### nodejs - Authentication, client creation and get machines as an example written in TypeScript. +#### nodejs - client creation and get machines 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 { HybridComputeManagementClient, HybridComputeManagementModels, HybridComputeManagementMappers } from "@azure/arm-hybridcompute"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { HybridComputeManagementClient } = require("@azure/arm-hybridcompute"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/hybridcompute/arm-hybridcompute/rollup.config.js b/sdk/hybridcompute/arm-hybridcompute/rollup.config.js index 0a36bcb3bae6..0f1c449cfbbb 100644 --- a/sdk/hybridcompute/arm-hybridcompute/rollup.config.js +++ b/sdk/hybridcompute/arm-hybridcompute/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/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index 1dff14273cc3..00f728bfde53 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.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/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts index 40de94b329c4..feb626167734 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.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 @@ -38,7 +37,7 @@ export class HybridComputeManagementClientContext extends msRestAzure.AzureServi if (!options) { options = {}; } - if (!options.userAgent) { + if(!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -53,10 +52,10 @@ export class HybridComputeManagementClientContext extends msRestAzure.AzureServi this.credentials = credentials; this.subscriptionId = subscriptionId; - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts index 993b7c5dabbc..060a656d1902 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/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. @@ -321,11 +321,12 @@ export interface MachineIdentity extends Identity { } /** - * An interface representing Resource. + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ export interface Resource extends BaseResource { /** - * Fully qualified resource Id for the resource. Ex - + * Fully qualified resource ID for the resource. Ex - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ @@ -336,15 +337,17 @@ export interface Resource extends BaseResource { */ readonly name?: string; /** - * The type of the resource. Ex- Microsoft.Compute/virtualMachines or - * Microsoft.Storage/storageAccounts. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * The resource model definition for a ARM tracked top level resource + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource */ export interface TrackedResource extends Resource { /** @@ -672,14 +675,16 @@ export interface MachineExtensionUpdatePropertiesModel { } /** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource */ export interface ProxyResource extends Resource { } /** - * The resource model definition for a Azure Resource Manager resource with an etag. + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource */ export interface AzureEntityResource extends Resource { /** @@ -709,6 +714,16 @@ export interface MachineExtensionsListOptionalParams extends msRest.RequestOptio expand?: string; } +/** + * Optional Parameters. + */ +export interface MachineExtensionsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The expand expression to apply on the operation. + */ + expand?: string; +} + /** * An interface representing HybridComputeManagementClientOptions. */ diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts index 67663c9ee0f5..607288d15372 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.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/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts index c4d65dc1db0f..8e35705e3116 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.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/hybridcompute/arm-hybridcompute/src/models/mappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts index 43cd6ada7615..55a393507b01 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/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/hybridcompute/arm-hybridcompute/src/models/operationsMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/operationsMappers.ts index 17e27c67ba9f..3e8ee0932558 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/operationsMappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/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/hybridcompute/arm-hybridcompute/src/models/parameters.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts index 8d12a0909808..72e907ad560f 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/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/hybridcompute/arm-hybridcompute/src/operations/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index 35660def86a6..d33b0b991ef1 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/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/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts index af98d27e6aa0..f5c2c7acc0b3 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machineExtensions.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 @@ -42,7 +41,7 @@ export class MachineExtensions { } /** - * The operation to create or update the extension. + * The operation to update the extension. * @param resourceGroupName The name of the resource group. * @param name The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -159,7 +158,7 @@ export class MachineExtensions { } /** - * The operation to create or update the extension. + * The operation to update the extension. * @param resourceGroupName The name of the resource group. * @param name The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -206,7 +205,7 @@ export class MachineExtensions { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.MachineExtensionsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -217,8 +216,8 @@ export class MachineExtensions { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.MachineExtensionsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.MachineExtensionsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -384,6 +383,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.expand, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts index 8d580f932635..0cfaa6cd17e8 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/machines.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 @@ -91,8 +90,7 @@ export class Machines { } /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the - * response to get the next page of hybrid machines. + * Lists all the hybrid machines in the specified resource group. * @param resourceGroupName The name of the resource group. * @param [options] The optional parameters * @returns Promise @@ -120,8 +118,7 @@ export class Machines { } /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the - * response to get the next page of hybrid machines. + * Lists all the hybrid machines in the specified subscription. * @param [options] The optional parameters * @returns Promise */ @@ -145,8 +142,7 @@ export class Machines { } /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the - * response to get the next page of hybrid machines. + * Lists all the hybrid machines in the specified resource group. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -174,8 +170,7 @@ export class Machines { } /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the - * response to get the next page of hybrid machines. + * Lists all the hybrid machines in the specified subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -309,6 +304,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -330,6 +328,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/operations.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/operations.ts index 38d79ddce65b..b90281d1491c 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/operations.ts +++ b/sdk/hybridcompute/arm-hybridcompute/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