From d2252adc577dde64d15122f8b96d5f26c2fd2986 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 5 Feb 2021 02:02:31 +0000 Subject: [PATCH] CodeGen from PR 12866 in Azure/azure-rest-api-specs Merge 5ee69856fdcce74d40bfcb46eed9f27db82aecb6 into 7fd1f02a5ccdd088c6df561be0c36d2ff902a36d --- .../arm-powerbidedicated/LICENSE.txt | 2 +- .../arm-powerbidedicated/README.md | 9 ++-- .../arm-powerbidedicated/rollup.config.js | 4 +- .../src/models/capacitiesMappers.ts | 7 ++-- .../arm-powerbidedicated/src/models/index.ts | 28 +++++++++++-- .../src/models/mappers.ts | 41 ++++++++++++++++--- .../src/models/operationsMappers.ts | 5 ++- .../src/models/parameters.ts | 5 +-- .../src/operations/capacities.ts | 27 ++++++------ .../src/operations/index.ts | 5 +-- .../src/operations/operations.ts | 8 ++-- .../src/powerBIDedicatedManagementClient.ts | 5 +-- ...powerBIDedicatedManagementClientContext.ts | 5 +-- 13 files changed, 100 insertions(+), 51 deletions(-) diff --git a/sdk/powerbidedicated/arm-powerbidedicated/LICENSE.txt b/sdk/powerbidedicated/arm-powerbidedicated/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/LICENSE.txt +++ b/sdk/powerbidedicated/arm-powerbidedicated/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/powerbidedicated/arm-powerbidedicated/README.md b/sdk/powerbidedicated/arm-powerbidedicated/README.md index e213b7d8b506..97e11c6ccf2d 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/README.md +++ b/sdk/powerbidedicated/arm-powerbidedicated/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-powerbidedicated ### How to use -#### nodejs - Authentication, client creation and getDetails capacities as an example written in TypeScript. +#### nodejs - client creation and getDetails capacities 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 { PowerBIDedicatedManagementClient, PowerBIDedicatedManagementModels, PowerBIDedicatedManagementMappers } from "@azure/arm-powerbidedicated"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { PowerBIDedicatedManagementClient } = require("@azure/arm-powerbidedicated"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/powerbidedicated/arm-powerbidedicated/rollup.config.js b/sdk/powerbidedicated/arm-powerbidedicated/rollup.config.js index 0d8f15137d00..441dae3f4882 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/rollup.config.js +++ b/sdk/powerbidedicated/arm-powerbidedicated/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/powerbidedicated/arm-powerbidedicated/src/models/capacitiesMappers.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/models/capacitiesMappers.ts index ef2cac8815a4..3601cb29cde3 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/models/capacitiesMappers.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/src/models/capacitiesMappers.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. @@ -10,11 +10,12 @@ export { BaseResource, CheckCapacityNameAvailabilityParameters, CheckCapacityNameAvailabilityResult, - CloudError, DedicatedCapacities, DedicatedCapacity, DedicatedCapacityAdministrators, DedicatedCapacityUpdateParameters, + ErrorResponse, + ErrorResponseError, Resource, ResourceSku, SkuDetailsForExistingResource, diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/models/index.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/models/index.ts index 3aa64f0a6c40..946b3f195e1b 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/models/index.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/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. @@ -103,6 +103,11 @@ export interface DedicatedCapacity extends Resource { * A collection of Dedicated capacity administrators */ administration?: DedicatedCapacityAdministrators; + /** + * The capacity mode. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly mode?: string; /** * The current state of PowerBI Dedicated resource. The state is to indicate more states outside * of resource provisioning. Possible values include: 'Deleting', 'Succeeded', 'Failed', @@ -147,6 +152,11 @@ export interface DedicatedCapacityUpdateParameters { * A collection of Dedicated capacity administrators */ administration?: DedicatedCapacityAdministrators; + /** + * The capacity mode. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly mode?: string; } /** @@ -180,9 +190,9 @@ export interface SkuEnumerationForExistingResourceResult { } /** - * Describes the format of Error response. + * The error object */ -export interface ErrorResponse { +export interface ErrorResponseError { /** * Error code */ @@ -193,6 +203,16 @@ export interface ErrorResponse { message?: string; } +/** + * Describes the format of Error response. + */ +export interface ErrorResponse { + /** + * The error object + */ + error?: ErrorResponseError; +} + /** * Details of capacity name request body. */ diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/models/mappers.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/models/mappers.ts index ca7783976708..13fe5879b1a2 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/models/mappers.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/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. @@ -161,6 +161,13 @@ export const DedicatedCapacity: msRest.CompositeMapper = { className: "DedicatedCapacityAdministrators" } }, + mode: { + readOnly: true, + serializedName: "properties.mode", + type: { + name: "String" + } + }, state: { readOnly: true, serializedName: "properties.state", @@ -230,6 +237,13 @@ export const DedicatedCapacityUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "DedicatedCapacityAdministrators" } + }, + mode: { + readOnly: true, + serializedName: "properties.mode", + type: { + name: "String" + } } } } @@ -296,11 +310,11 @@ export const SkuEnumerationForExistingResourceResult: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const ErrorResponseError: msRest.CompositeMapper = { + serializedName: "ErrorResponse_error", type: { name: "Composite", - className: "ErrorResponse", + className: "ErrorResponseError", modelProperties: { code: { serializedName: "code", @@ -318,6 +332,23 @@ export const ErrorResponse: msRest.CompositeMapper = { } }; +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseError" + } + } + } + } +}; + export const CheckCapacityNameAvailabilityParameters: msRest.CompositeMapper = { serializedName: "CheckCapacityNameAvailabilityParameters", type: { diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/models/operationsMappers.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/models/operationsMappers.ts index b8de8606cf9d..ba8142bc9cac 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/models/operationsMappers.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/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,6 +8,7 @@ export { ErrorResponse, + ErrorResponseError, Operation, OperationDisplay, OperationListResult diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/models/parameters.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/models/parameters.ts index aab9f450d3c9..15441faac515 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/models/parameters.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/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/powerbidedicated/arm-powerbidedicated/src/operations/capacities.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/operations/capacities.ts index 6ee0c567a035..f54c427377ea 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/operations/capacities.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/src/operations/capacities.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 @@ -414,7 +413,7 @@ const getDetailsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DedicatedCapacity }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -438,7 +437,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DedicatedCapacities }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -461,7 +460,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DedicatedCapacities }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -484,7 +483,7 @@ const listSkusOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SkuEnumerationForNewResourceResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -509,7 +508,7 @@ const listSkusForCapacityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SkuEnumerationForExistingResourceResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -540,7 +539,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CheckCapacityNameAvailabilityResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -575,7 +574,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DedicatedCapacity }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -600,7 +599,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -635,7 +634,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.DedicatedCapacity }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -659,7 +658,7 @@ const beginSuspendOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -683,7 +682,7 @@ const beginResumeOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/operations/index.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/operations/index.ts index e7087b2e4304..42c3db9da266 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/operations/index.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/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/powerbidedicated/arm-powerbidedicated/src/operations/operations.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/operations/operations.ts index 0276fc881dc3..e59ae2b459ae 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/operations/operations.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/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 @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.ts index 33c72336bac6..9b28b91cb5f6 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClient.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/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.ts b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.ts index 8c2c324a10d1..f2a2a2fa2d25 100644 --- a/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.ts +++ b/sdk/powerbidedicated/arm-powerbidedicated/src/powerBIDedicatedManagementClientContext.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