Skip to content

Commit a9fb3f8

Browse files
author
SDKAuto
committed
CodeGen from PR 14161 in Azure/azure-rest-api-specs
Merge 8ae3f9bc38d1e80ca62ea55dc52d1156c2c790ab into dad4abaabaf043b347551523185925fac5b72543
1 parent 643a962 commit a9fb3f8

17 files changed

+1893
-566
lines changed

sdk/maps/arm-maps/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/maps/arm-maps/README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Azure MapsManagementClient SDK for JavaScript
1+
## Azure AzureMapsManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK for MapsManagementClient.
3+
This package contains an isomorphic SDK for AzureMapsManagementClient.
44

55
### Currently supported environments
66

@@ -9,31 +9,31 @@ This package contains an isomorphic SDK for MapsManagementClient.
99

1010
### How to Install
1111

12-
```
12+
```bash
1313
npm install @azure/arm-maps
1414
```
1515

1616
### How to use
1717

18-
#### nodejs - Authentication, client creation and get accounts as an example written in TypeScript.
18+
#### nodejs - client creation and get accounts as an example written in TypeScript.
1919

2020
##### Install @azure/ms-rest-nodeauth
2121

22-
```
23-
npm install @azure/ms-rest-nodeauth
22+
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23+
```bash
24+
npm install @azure/ms-rest-nodeauth@"^3.0.0"
2425
```
2526

2627
##### Sample code
2728

28-
```ts
29-
import * as msRest from "@azure/ms-rest-js";
30-
import * as msRestAzure from "@azure/ms-rest-azure-js";
31-
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
32-
import { MapsManagementClient, MapsManagementModels, MapsManagementMappers } from "@azure/arm-maps";
29+
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
30+
```typescript
31+
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
32+
const { AzureMapsManagementClient } = require("@azure/arm-maps");
3333
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3434

3535
msRestNodeAuth.interactiveLogin().then((creds) => {
36-
const client = new MapsManagementClient(creds, subscriptionId);
36+
const client = new AzureMapsManagementClient(creds, subscriptionId);
3737
const resourceGroupName = "testresourceGroupName";
3838
const accountName = "testaccountName";
3939
client.accounts.get(resourceGroupName, accountName).then((result) => {
@@ -49,7 +49,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
4949

5050
##### Install @azure/ms-rest-browserauth
5151

52-
```
52+
```bash
5353
npm install @azure/ms-rest-browserauth
5454
```
5555

@@ -78,7 +78,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
7878
// may cause redirects
7979
authManager.login();
8080
}
81-
const client = new Azure.ArmMaps.MapsManagementClient(res.creds, subscriptionId);
81+
const client = new Azure.ArmMaps.AzureMapsManagementClient(res.creds, subscriptionId);
8282
const resourceGroupName = "testresourceGroupName";
8383
const accountName = "testaccountName";
8484
client.accounts.get(resourceGroupName, accountName).then((result) => {
@@ -99,5 +99,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
9999

100100
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
101101

102-
103-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmaps%2Farm-maps%2FREADME.png)
102+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/maps/arm-maps/README.png)

sdk/maps/arm-maps/package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@azure/arm-maps",
33
"author": "Microsoft Corporation",
4-
"description": "MapsManagementClient Library with typescript type definitions for node.js and browser.",
4+
"description": "AzureMapsManagementClient Library with typescript type definitions for node.js and browser.",
55
"version": "1.1.0",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.1.0",
8-
"@azure/ms-rest-js": "^1.1.0",
9-
"tslib": "^1.9.3"
7+
"@azure/ms-rest-azure-js": "^2.0.1",
8+
"@azure/ms-rest-js": "^2.0.4",
9+
"tslib": "^1.10.0"
1010
},
1111
"keywords": [
1212
"node",
@@ -17,21 +17,22 @@
1717
],
1818
"license": "MIT",
1919
"main": "./dist/arm-maps.js",
20-
"module": "./esm/mapsManagementClient.js",
21-
"types": "./esm/mapsManagementClient.d.ts",
20+
"module": "./esm/azureMapsManagementClient.js",
21+
"types": "./esm/azureMapsManagementClient.d.ts",
2222
"devDependencies": {
23-
"typescript": "^3.1.1",
24-
"rollup": "^0.66.2",
25-
"rollup-plugin-node-resolve": "^3.4.0",
26-
"uglify-js": "^3.4.9"
23+
"typescript": "^3.5.3",
24+
"rollup": "^1.18.0",
25+
"rollup-plugin-node-resolve": "^5.2.0",
26+
"rollup-plugin-sourcemaps": "^0.4.2",
27+
"uglify-js": "^3.6.0"
2728
},
28-
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/maps/arm-maps",
29+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/maps/arm-maps",
2930
"repository": {
3031
"type": "git",
31-
"url": "https://github.com/azure/azure-sdk-for-js.git"
32+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
3233
},
3334
"bugs": {
34-
"url": "https://github.com/azure/azure-sdk-for-js/issues"
35+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
3536
},
3637
"files": [
3738
"dist/**/*.js",
@@ -43,6 +44,7 @@
4344
"esm/**/*.d.ts",
4445
"esm/**/*.d.ts.map",
4546
"src/**/*.ts",
47+
"README.md",
4648
"rollup.config.js",
4749
"tsconfig.json"
4850
],

sdk/maps/arm-maps/rollup.config.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
import rollup from "rollup";
12
import nodeResolve from "rollup-plugin-node-resolve";
3+
import sourcemaps from "rollup-plugin-sourcemaps";
4+
25
/**
3-
* @type {import('rollup').RollupFileOptions}
6+
* @type {rollup.RollupFileOptions}
47
*/
58
const config = {
6-
input: './esm/mapsManagementClient.js',
7-
external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
9+
input: "./esm/azureMapsManagementClient.js",
10+
external: [
11+
"@azure/ms-rest-js",
12+
"@azure/ms-rest-azure-js"
13+
],
814
output: {
915
file: "./dist/arm-maps.js",
1016
format: "umd",
@@ -15,17 +21,17 @@ const config = {
1521
"@azure/ms-rest-azure-js": "msRestAzure"
1622
},
1723
banner: `/*
18-
* Copyright (c) Microsoft Corporation. All rights reserved.
19-
* Licensed under the MIT License. See License.txt in the project root for
20-
* license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2126
*
2227
* Code generated by Microsoft (R) AutoRest Code Generator.
23-
* Changes may cause incorrect behavior and will be lost if the code is
24-
* regenerated.
28+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2529
*/`
2630
},
2731
plugins: [
28-
nodeResolve({ module: true })
32+
nodeResolve({ mainFields: ['module', 'main'] }),
33+
sourcemaps()
2934
]
3035
};
36+
3137
export default config;
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -12,32 +11,35 @@ import * as msRest from "@azure/ms-rest-js";
1211
import * as Models from "./models";
1312
import * as Mappers from "./models/mappers";
1413
import * as operations from "./operations";
15-
import { MapsManagementClientContext } from "./mapsManagementClientContext";
14+
import { AzureMapsManagementClientContext } from "./azureMapsManagementClientContext";
1615

1716

18-
class MapsManagementClient extends MapsManagementClientContext {
17+
class AzureMapsManagementClient extends AzureMapsManagementClientContext {
1918
// Operation groups
2019
accounts: operations.Accounts;
20+
maps: operations.Maps;
21+
creators: operations.Creators;
2122

2223
/**
23-
* Initializes a new instance of the MapsManagementClient class.
24+
* Initializes a new instance of the AzureMapsManagementClient class.
2425
* @param credentials Credentials needed for the client to connect to Azure.
25-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
26-
* subscription. The subscription ID forms part of the URI for every service call.
26+
* @param subscriptionId The ID of the target subscription.
2727
* @param [options] The parameter options
2828
*/
29-
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MapsManagementClientOptions) {
29+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMapsManagementClientOptions) {
3030
super(credentials, subscriptionId, options);
3131
this.accounts = new operations.Accounts(this);
32+
this.maps = new operations.Maps(this);
33+
this.creators = new operations.Creators(this);
3234
}
3335
}
3436

3537
// Operation Specifications
3638

3739
export {
38-
MapsManagementClient,
39-
MapsManagementClientContext,
40-
Models as MapsManagementModels,
41-
Mappers as MapsManagementMappers
40+
AzureMapsManagementClient,
41+
AzureMapsManagementClientContext,
42+
Models as AzureMapsManagementModels,
43+
Mappers as AzureMapsManagementMappers
4244
};
4345
export * from "./operations";

sdk/maps/arm-maps/src/mapsManagementClientContext.ts renamed to sdk/maps/arm-maps/src/azureMapsManagementClientContext.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -13,21 +12,20 @@ import * as msRest from "@azure/ms-rest-js";
1312
import * as msRestAzure from "@azure/ms-rest-azure-js";
1413

1514
const packageName = "@azure/arm-maps";
16-
const packageVersion = "0.1.0";
15+
const packageVersion = "1.1.0";
1716

18-
export class MapsManagementClientContext extends msRestAzure.AzureServiceClient {
17+
export class AzureMapsManagementClientContext extends msRestAzure.AzureServiceClient {
1918
credentials: msRest.ServiceClientCredentials;
2019
subscriptionId: string;
2120
apiVersion?: string;
2221

2322
/**
24-
* Initializes a new instance of the MapsManagementClient class.
23+
* Initializes a new instance of the AzureMapsManagementClient class.
2524
* @param credentials Credentials needed for the client to connect to Azure.
26-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
27-
* subscription. The subscription ID forms part of the URI for every service call.
25+
* @param subscriptionId The ID of the target subscription.
2826
* @param [options] The parameter options
2927
*/
30-
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MapsManagementClientOptions) {
28+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMapsManagementClientOptions) {
3129
if (credentials == undefined) {
3230
throw new Error('\'credentials\' cannot be null.');
3331
}
@@ -45,7 +43,7 @@ export class MapsManagementClientContext extends msRestAzure.AzureServiceClient
4543

4644
super(credentials, options);
4745

48-
this.apiVersion = '2018-05-01';
46+
this.apiVersion = '2021-02-01';
4947
this.acceptLanguage = 'en-US';
5048
this.longRunningOperationRetryTimeout = 30;
5149
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
7-
* Changes may cause incorrect behavior and will be lost if the code is
8-
* regenerated.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
97
*/
108

119
export {
12-
MapsAccountCreateParameters,
13-
Sku,
14-
MapsAccount,
15-
Resource,
10+
AzureEntityResource,
1611
BaseResource,
17-
ErrorModel,
18-
ErrorDetailsItem,
19-
MapsAccountUpdateParameters,
20-
MapsAccounts,
21-
MapsAccountsMoveRequest,
12+
Creator,
13+
CreatorProperties,
14+
ErrorAdditionalInfo,
15+
ErrorDetail,
16+
ErrorResponse,
17+
MapsAccount,
2218
MapsAccountKeys,
19+
MapsAccountProperties,
20+
MapsAccounts,
21+
MapsAccountUpdateParameters,
2322
MapsKeySpecification,
24-
MapsOperations,
25-
MapsOperationsValueItem,
26-
MapsOperationsValueItemDisplay
23+
ProxyResource,
24+
Resource,
25+
Sku,
26+
SystemData,
27+
TrackedResource
2728
} from "../models/mappers";
28-
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
AzureEntityResource,
11+
BaseResource,
12+
Creator,
13+
CreatorList,
14+
CreatorProperties,
15+
CreatorUpdateParameters,
16+
ErrorAdditionalInfo,
17+
ErrorDetail,
18+
ErrorResponse,
19+
MapsAccount,
20+
MapsAccountProperties,
21+
ProxyResource,
22+
Resource,
23+
Sku,
24+
SystemData,
25+
TrackedResource
26+
} from "../models/mappers";

0 commit comments

Comments
 (0)