From 312d5d863393973887065c955e3b33bc4664915b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 31 May 2019 09:58:13 -0700 Subject: [PATCH] Generated from e1e97cfa3a61edda45407dc94897493e28711cfa (#3334) chore: jsonfmt maps Ran `jsonfmt -w "specification/maps/**/*.json"` --- sdk/maps/arm-maps/LICENSE.txt | 2 +- sdk/maps/arm-maps/README.md | 11 +- sdk/maps/arm-maps/package.json | 10 +- sdk/maps/arm-maps/rollup.config.js | 22 +- .../src/mapsManagementClientContext.ts | 2 +- .../arm-maps/src/models/accountsMappers.ts | 24 +- sdk/maps/arm-maps/src/models/index.ts | 251 +++++++----------- sdk/maps/arm-maps/src/models/mappers.ts | 30 ++- 8 files changed, 156 insertions(+), 196 deletions(-) diff --git a/sdk/maps/arm-maps/LICENSE.txt b/sdk/maps/arm-maps/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/maps/arm-maps/LICENSE.txt +++ b/sdk/maps/arm-maps/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 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/maps/arm-maps/README.md b/sdk/maps/arm-maps/README.md index d31d25043d7b..1ad84ac440de 100644 --- a/sdk/maps/arm-maps/README.md +++ b/sdk/maps/arm-maps/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for MapsManagementClient. ### How to Install -``` +```bash npm install @azure/arm-maps ``` @@ -19,13 +19,13 @@ npm install @azure/arm-maps ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```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"; @@ -49,7 +49,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -98,6 +98,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/maps/arm-maps/README.png) diff --git a/sdk/maps/arm-maps/package.json b/sdk/maps/arm-maps/package.json index 0c75135b8ac2..a7dc2ee647fb 100644 --- a/sdk/maps/arm-maps/package.json +++ b/sdk/maps/arm-maps/package.json @@ -4,8 +4,8 @@ "description": "MapsManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/maps/arm-maps", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/maps/arm-maps/rollup.config.js b/sdk/maps/arm-maps/rollup.config.js index 4ea68c8f828a..bdfdbbc49a57 100644 --- a/sdk/maps/arm-maps/rollup.config.js +++ b/sdk/maps/arm-maps/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/mapsManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/mapsManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-maps.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/maps/arm-maps/src/mapsManagementClientContext.ts b/sdk/maps/arm-maps/src/mapsManagementClientContext.ts index 3e74ac3f6452..0924c21426b1 100644 --- a/sdk/maps/arm-maps/src/mapsManagementClientContext.ts +++ b/sdk/maps/arm-maps/src/mapsManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-maps"; -const packageVersion = "0.1.0"; +const packageVersion = "1.1.0"; export class MapsManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/maps/arm-maps/src/models/accountsMappers.ts b/sdk/maps/arm-maps/src/models/accountsMappers.ts index 13e80f28e397..8a1c87a2583c 100644 --- a/sdk/maps/arm-maps/src/models/accountsMappers.ts +++ b/sdk/maps/arm-maps/src/models/accountsMappers.ts @@ -1,28 +1,26 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - MapsAccountCreateParameters, - Sku, - MapsAccount, - Resource, BaseResource, - ErrorModel, ErrorDetailsItem, - MapsAccountUpdateParameters, + ErrorModel, + MapsAccount, + MapsAccountCreateParameters, + MapsAccountKeys, + MapsAccountProperties, MapsAccounts, MapsAccountsMoveRequest, - MapsAccountKeys, + MapsAccountUpdateParameters, MapsKeySpecification, MapsOperations, MapsOperationsValueItem, - MapsOperationsValueItemDisplay + MapsOperationsValueItemDisplay, + Resource, + Sku } from "../models/mappers"; - diff --git a/sdk/maps/arm-maps/src/models/index.ts b/sdk/maps/arm-maps/src/models/index.ts index 96226ea82da0..77892ccc5be9 100644 --- a/sdk/maps/arm-maps/src/models/index.ts +++ b/sdk/maps/arm-maps/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,338 +11,269 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface * An interface representing ErrorDetailsItem. */ export interface ErrorDetailsItem { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [message] If available, a human readable description of - * the error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * If available, a human readable description of the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; /** - * @member {string} [target] If available, the component generating the - * error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * If available, the component generating the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly target?: string; } /** - * @interface - * An interface representing ErrorModel. * This object is returned when an error occurs in the Maps API - * */ export interface ErrorModel { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [message] If available, a human readable description of - * the error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * If available, a human readable description of the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; /** - * @member {string} [target] If available, the component generating the - * error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * If available, the component generating the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly target?: string; /** - * @member {ErrorDetailsItem[]} [details] If available, a list of additional - * details about the error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * If available, a list of additional details about the error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly details?: ErrorDetailsItem[]; } /** - * @interface - * An interface representing Resource. * An Azure resource - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] The fully qualified Maps Account resource - * identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The fully qualified Maps Account resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the Maps Account, which is unique - * within a Resource Group. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the Maps Account, which is unique within a Resource Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Azure resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing Sku. * The SKU of the Maps Account. - * */ export interface Sku { /** - * @member {string} name The name of the SKU, in standard format (such as - * S0). + * The name of the SKU, in standard format (such as S0). */ name: string; /** - * @member {string} [tier] Gets the sku tier. This is based on the SKU name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Gets the sku tier. This is based on the SKU name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tier?: string; } /** - * @interface - * An interface representing MapsAccount. + * Additional Map account properties + */ +export interface MapsAccountProperties { + /** + * A unique identifier for the maps account + */ + xMsClientId?: string; +} + +/** * An Azure resource which represents access to a suite of Maps REST APIs. - * - * @extends Resource */ export interface MapsAccount extends Resource { /** - * @member {string} [location] The location of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The location of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly location?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Gets a list of key - * value pairs that describe the resource. These tags can be used in viewing - * and grouping this resource (across resource groups). A maximum of 15 tags - * can be provided for a resource. Each tag must have a key no greater than - * 128 characters and value no greater than 256 characters. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Gets a list of key value pairs that describe the resource. These tags can be used in viewing + * and grouping this resource (across resource groups). A maximum of 15 tags can be provided for + * a resource. Each tag must have a key no greater than 128 characters and value no greater than + * 256 characters. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: { [propertyName: string]: string }; /** - * @member {Sku} [sku] The SKU of this account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The SKU of this account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly sku?: Sku; + /** + * The map account properties. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: MapsAccountProperties; } /** - * @interface - * An interface representing MapsAccountCreateParameters. * Parameters used to create a new Maps Account. - * */ export interface MapsAccountCreateParameters { /** - * @member {string} location The location of the resource. + * The location of the resource. */ location: string; /** - * @member {{ [propertyName: string]: string }} [tags] Gets or sets a list of - * key value pairs that describe the resource. These tags can be used in - * viewing and grouping this resource (across resource groups). A maximum of - * 15 tags can be provided for a resource. Each tag must have a key no - * greater than 128 characters and value no greater than 256 characters. + * Gets or sets a list of key value pairs that describe the resource. These tags can be used in + * viewing and grouping this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key no greater than 128 characters and value no + * greater than 256 characters. */ tags?: { [propertyName: string]: string }; /** - * @member {Sku} sku The SKU of this account. + * The SKU of this account. */ sku: Sku; } /** - * @interface - * An interface representing MapsAccountUpdateParameters. * Parameters used to update an existing Maps Account. - * */ export interface MapsAccountUpdateParameters { /** - * @member {{ [propertyName: string]: string }} [tags] Gets or sets a list of - * key value pairs that describe the resource. These tags can be used in - * viewing and grouping this resource (across resource groups). A maximum of - * 15 tags can be provided for a resource. Each tag must have a key no - * greater than 128 characters and value no greater than 256 characters. + * Gets or sets a list of key value pairs that describe the resource. These tags can be used in + * viewing and grouping this resource (across resource groups). A maximum of 15 tags can be + * provided for a resource. Each tag must have a key no greater than 128 characters and value no + * greater than 256 characters. */ tags?: { [propertyName: string]: string }; /** - * @member {Sku} [sku] The SKU of this account. + * The SKU of this account. */ sku?: Sku; } /** - * @interface - * An interface representing MapsAccountsMoveRequest. * The description of what resources to move between resource groups. - * */ export interface MapsAccountsMoveRequest { /** - * @member {string} targetResourceGroup The name of the destination resource - * group. + * The name of the destination resource group. */ targetResourceGroup: string; /** - * @member {string[]} resourceIds A list of resource names to move from the - * source resource group. + * A list of resource names to move from the source resource group. */ resourceIds: string[]; } /** - * @interface - * An interface representing MapsKeySpecification. * Whether the operation refers to the primary or secondary key. - * */ export interface MapsKeySpecification { /** - * @member {KeyType} keyType Whether the operation refers to the primary or - * secondary key. Possible values include: 'primary', 'secondary' + * Whether the operation refers to the primary or secondary key. Possible values include: + * 'primary', 'secondary' */ keyType: KeyType; } /** - * @interface - * An interface representing MapsAccountKeys. - * The set of keys which can be used to access the Maps REST APIs. Two keys are - * provided for key rotation without interruption. - * + * The set of keys which can be used to access the Maps REST APIs. Two keys are provided for key + * rotation without interruption. */ export interface MapsAccountKeys { /** - * @member {string} [id] The full Azure resource identifier of the Maps - * Account. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The full Azure resource identifier of the Maps Account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [primaryKey] The primary key for accessing the Maps REST - * APIs. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The primary key for accessing the Maps REST APIs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly primaryKey?: string; /** - * @member {string} [secondaryKey] The secondary key for accessing the Maps - * REST APIs. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The secondary key for accessing the Maps REST APIs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly secondaryKey?: string; } /** - * @interface - * An interface representing MapsOperationsValueItemDisplay. * The human-readable description of the operation. - * */ export interface MapsOperationsValueItemDisplay { /** - * @member {string} [provider] Service provider: Microsoft Maps. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service provider: Microsoft Maps. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provider?: string; /** - * @member {string} [resource] Resource on which the operation is performed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource on which the operation is performed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resource?: string; /** - * @member {string} [operation] The action that users can perform, based on - * their permission level. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The action that users can perform, based on their permission level. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly operation?: string; /** - * @member {string} [description] The description of the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly description?: string; } /** - * @interface * An interface representing MapsOperationsValueItem. */ export interface MapsOperationsValueItem { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {MapsOperationsValueItemDisplay} [display] The human-readable - * description of the operation. + * The human-readable description of the operation. */ display?: MapsOperationsValueItemDisplay; /** - * @member {string} [origin] The origin of the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The origin of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly origin?: string; } /** - * @interface * An interface representing MapsManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface MapsManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the MapsAccounts. * A list of Maps Accounts. - * * @extends Array */ export interface MapsAccounts extends Array { @@ -352,9 +281,7 @@ export interface MapsAccounts extends Array { /** * @interface - * An interface representing the MapsOperations. * The set of operations available for Maps. - * * @extends Array */ export interface MapsOperations extends Array { @@ -380,6 +307,7 @@ export type AccountsCreateOrUpdateResponse = MapsAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -399,6 +327,7 @@ export type AccountsUpdateResponse = MapsAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -418,6 +347,7 @@ export type AccountsGetResponse = MapsAccount & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -437,6 +367,7 @@ export type AccountsListByResourceGroupResponse = MapsAccounts & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -456,6 +387,7 @@ export type AccountsListBySubscriptionResponse = MapsAccounts & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -475,6 +407,7 @@ export type AccountsListKeysResponse = MapsAccountKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -494,6 +427,7 @@ export type AccountsRegenerateKeysResponse = MapsAccountKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -513,6 +447,7 @@ export type AccountsListOperationsResponse = MapsOperations & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/maps/arm-maps/src/models/mappers.ts b/sdk/maps/arm-maps/src/models/mappers.ts index 906aaeab40a3..ba426a570910 100644 --- a/sdk/maps/arm-maps/src/models/mappers.ts +++ b/sdk/maps/arm-maps/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -144,6 +142,22 @@ export const Sku: msRest.CompositeMapper = { } }; +export const MapsAccountProperties: msRest.CompositeMapper = { + serializedName: "MapsAccountProperties", + type: { + name: "Composite", + className: "MapsAccountProperties", + modelProperties: { + xMsClientId: { + serializedName: "x-ms-client-id", + type: { + name: "String" + } + } + } + } +}; + export const MapsAccount: msRest.CompositeMapper = { serializedName: "MapsAccount", type: { @@ -177,6 +191,14 @@ export const MapsAccount: msRest.CompositeMapper = { name: "Composite", className: "Sku" } + }, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Composite", + className: "MapsAccountProperties" + } } } }