Skip to content

Commit

Permalink
CodeGen from PR 11970 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 91b3ea33c66e90302829a257a51c9f0cc83d9572 into 7dddc4bf1e402b6e6737c132ecf05b74e2b53b08
  • Loading branch information
SDKAuto committed Dec 10, 2020
1 parent 6c6ce54 commit e6f756d
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 62 deletions.
9 changes: 4 additions & 5 deletions sdk/hybridcompute/arm-hybridcompute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 { 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) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/hybridcompute/arm-hybridcompute/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
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
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 @@ -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}`;
}
Expand All @@ -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;
}
}
Expand Down
35 changes: 25 additions & 10 deletions sdk/hybridcompute/arm-hybridcompute/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 @@ -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.**
*/
Expand All @@ -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 {
/**
Expand Down Expand Up @@ -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 {
/**
Expand Down Expand Up @@ -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.
*/
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
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/hybridcompute/arm-hybridcompute/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
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/hybridcompute/arm-hybridcompute/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
5 changes: 2 additions & 3 deletions sdk/hybridcompute/arm-hybridcompute/src/operations/index.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
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 @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -206,7 +205,7 @@ export class MachineExtensions {
* @param [options] The optional parameters
* @returns Promise<Models.MachineExtensionsListNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.MachineExtensionsListNextResponse>;
listNext(nextPageLink: string, options?: Models.MachineExtensionsListNextOptionalParams): Promise<Models.MachineExtensionsListNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
Expand All @@ -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<Models.MachineExtensionsListResult>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.MachineExtensionsListResult>, callback?: msRest.ServiceCallback<Models.MachineExtensionsListResult>): Promise<Models.MachineExtensionsListNextResponse> {
listNext(nextPageLink: string, options: Models.MachineExtensionsListNextOptionalParams, callback: msRest.ServiceCallback<Models.MachineExtensionsListResult>): void;
listNext(nextPageLink: string, options?: Models.MachineExtensionsListNextOptionalParams | msRest.ServiceCallback<Models.MachineExtensionsListResult>, callback?: msRest.ServiceCallback<Models.MachineExtensionsListResult>): Promise<Models.MachineExtensionsListNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
Expand Down Expand Up @@ -384,6 +383,10 @@ const listNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.expand,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand Down
23 changes: 12 additions & 11 deletions sdk/hybridcompute/arm-hybridcompute/src/operations/machines.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 @@ -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<Models.MachinesListByResourceGroupResponse>
Expand Down Expand Up @@ -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<Models.MachinesListBySubscriptionResponse>
*/
Expand All @@ -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<Models.MachinesListByResourceGroupNextResponse>
Expand Down Expand Up @@ -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<Models.MachinesListBySubscriptionNextResponse>
Expand Down Expand Up @@ -309,6 +304,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand All @@ -330,6 +328,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand Down
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

0 comments on commit e6f756d

Please sign in to comment.