Skip to content

Commit 6aec408

Browse files
author
SDKAuto
committed
CodeGen from PR 12571 in Azure/azure-rest-api-specs
Merge e87290f512c8c17de25c89286364c502fa8b01d9 into a35bddecf81df1a1a3030dbaee0b73c777aeb0db
1 parent 40b027d commit 6aec408

17 files changed

+955
-942
lines changed

sdk/managedapplications/arm-managedapplications/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) 2019 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/managedapplications/arm-managedapplications/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Azure ManagedApplicationClient SDK for JavaScript
1+
## Azure ApplicationClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK for ManagedApplicationClient.
3+
This package contains an isomorphic SDK for ApplicationClient.
44

55
### Currently supported environments
66

@@ -15,25 +15,25 @@ npm install @azure/arm-managedapplications
1515

1616
### How to use
1717

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

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

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

2627
##### Sample code
2728

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
2830
```typescript
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 { ManagedApplicationClient, ManagedApplicationModels, ManagedApplicationMappers } from "@azure/arm-managedapplications";
31+
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
32+
const { ApplicationClient } = require("@azure/arm-managedapplications");
3333
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3434

3535
msRestNodeAuth.interactiveLogin().then((creds) => {
36-
const client = new ManagedApplicationClient(creds, subscriptionId);
36+
const client = new ApplicationClient(creds, subscriptionId);
3737
client.listOperations().then((result) => {
3838
console.log("The result is:");
3939
console.log(result);
@@ -76,7 +76,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
7676
// may cause redirects
7777
authManager.login();
7878
}
79-
const client = new Azure.ArmManagedapplications.ManagedApplicationClient(res.creds, subscriptionId);
79+
const client = new Azure.ArmManagedapplications.ApplicationClient(res.creds, subscriptionId);
8080
client.listOperations().then((result) => {
8181
console.log("The result is:");
8282
console.log(result);
@@ -95,4 +95,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
9595

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

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

sdk/managedapplications/arm-managedapplications/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@azure/arm-managedapplications",
33
"author": "Microsoft Corporation",
4-
"description": "ManagedApplicationClient Library with typescript type definitions for node.js and browser.",
4+
"description": "ApplicationClient Library with typescript type definitions for node.js and browser.",
55
"version": "1.0.2",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.3.2",
8-
"@azure/ms-rest-js": "^1.8.1",
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,14 +17,14 @@
1717
],
1818
"license": "MIT",
1919
"main": "./dist/arm-managedapplications.js",
20-
"module": "./esm/managedApplicationClient.js",
21-
"types": "./esm/managedApplicationClient.d.ts",
20+
"module": "./esm/applicationClient.js",
21+
"types": "./esm/applicationClient.d.ts",
2222
"devDependencies": {
23-
"typescript": "^3.1.1",
24-
"rollup": "^0.66.2",
25-
"rollup-plugin-node-resolve": "^3.4.0",
23+
"typescript": "^3.5.3",
24+
"rollup": "^1.18.0",
25+
"rollup-plugin-node-resolve": "^5.2.0",
2626
"rollup-plugin-sourcemaps": "^0.4.2",
27-
"uglify-js": "^3.4.9"
27+
"uglify-js": "^3.6.0"
2828
},
2929
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/managedapplications/arm-managedapplications",
3030
"repository": {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps";
66
* @type {rollup.RollupFileOptions}
77
*/
88
const config = {
9-
input: "./esm/managedApplicationClient.js",
9+
input: "./esm/applicationClient.js",
1010
external: [
1111
"@azure/ms-rest-js",
1212
"@azure/ms-rest-azure-js"
@@ -21,15 +21,15 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2929
*/`
3030
},
3131
plugins: [
32-
nodeResolve({ module: true }),
32+
nodeResolve({ mainFields: ['module', 'main'] }),
3333
sourcemaps()
3434
]
3535
};

sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts renamed to sdk/managedapplications/arm-managedapplications/src/applicationClient.ts

Lines changed: 17 additions & 15 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,24 +12,24 @@ import * as Models from "./models";
1312
import * as Mappers from "./models/mappers";
1413
import * as Parameters from "./models/parameters";
1514
import * as operations from "./operations";
16-
import { ManagedApplicationClientContext } from "./managedApplicationClientContext";
15+
import { ApplicationClientContext } from "./applicationClientContext";
1716

1817

19-
class ManagedApplicationClient extends ManagedApplicationClientContext {
18+
class ApplicationClient extends ApplicationClientContext {
2019
// Operation groups
21-
appliances: operations.Appliances;
22-
applianceDefinitions: operations.ApplianceDefinitions;
20+
applications: operations.Applications;
21+
applicationDefinitions: operations.ApplicationDefinitions;
2322

2423
/**
25-
* Initializes a new instance of the ManagedApplicationClient class.
24+
* Initializes a new instance of the ApplicationClient class.
2625
* @param credentials Credentials needed for the client to connect to Azure.
2726
* @param subscriptionId The ID of the target subscription.
2827
* @param [options] The parameter options
2928
*/
30-
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) {
29+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationClientOptions) {
3130
super(credentials, subscriptionId, options);
32-
this.appliances = new operations.Appliances(this);
33-
this.applianceDefinitions = new operations.ApplianceDefinitions(this);
31+
this.applications = new operations.Applications(this);
32+
this.applicationDefinitions = new operations.ApplicationDefinitions(this);
3433
}
3534

3635
/**
@@ -115,6 +114,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
115114
urlParameters: [
116115
Parameters.nextPageLink
117116
],
117+
queryParameters: [
118+
Parameters.apiVersion
119+
],
118120
headerParameters: [
119121
Parameters.acceptLanguage
120122
],
@@ -130,9 +132,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
130132
};
131133

132134
export {
133-
ManagedApplicationClient,
134-
ManagedApplicationClientContext,
135-
Models as ManagedApplicationModels,
136-
Mappers as ManagedApplicationMappers
135+
ApplicationClient,
136+
ApplicationClientContext,
137+
Models as ApplicationModels,
138+
Mappers as ApplicationMappers
137139
};
138140
export * from "./operations";
Lines changed: 6 additions & 7 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
@@ -15,18 +14,18 @@ import * as msRestAzure from "@azure/ms-rest-azure-js";
1514
const packageName = "@azure/arm-managedapplications";
1615
const packageVersion = "1.0.2";
1716

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

2322
/**
24-
* Initializes a new instance of the ManagedApplicationClient class.
23+
* Initializes a new instance of the ApplicationClient class.
2524
* @param credentials Credentials needed for the client to connect to Azure.
2625
* @param subscriptionId The ID of the target subscription.
2726
* @param [options] The parameter options
2827
*/
29-
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) {
28+
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationClientOptions) {
3029
if (credentials == undefined) {
3130
throw new Error('\'credentials\' cannot be null.');
3231
}
@@ -44,7 +43,7 @@ export class ManagedApplicationClientContext extends msRestAzure.AzureServiceCli
4443

4544
super(credentials, options);
4645

47-
this.apiVersion = '2016-09-01-preview';
46+
this.apiVersion = '2018-06-01';
4847
this.acceptLanguage = 'en-US';
4948
this.longRunningOperationRetryTimeout = 30;
5049
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/managedapplications/arm-managedapplications/src/models/applianceDefinitionsMappers.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

sdk/managedapplications/arm-managedapplications/src/models/appliancesMappers.ts renamed to sdk/managedapplications/arm-managedapplications/src/models/applicationDefinitionsMappers.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
88

99
export {
10-
Appliance,
11-
ApplianceArtifact,
12-
ApplianceDefinition,
13-
ApplianceListResult,
14-
AppliancePatchable,
15-
ApplianceProviderAuthorization,
10+
Application,
11+
ApplicationArtifact,
12+
ApplicationDefinition,
13+
ApplicationDefinitionListResult,
14+
ApplicationPatchable,
15+
ApplicationProviderAuthorization,
1616
BaseResource,
1717
ErrorResponse,
1818
GenericResource,
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
Application,
11+
ApplicationArtifact,
12+
ApplicationDefinition,
13+
ApplicationListResult,
14+
ApplicationPatchable,
15+
ApplicationProviderAuthorization,
16+
BaseResource,
17+
ErrorResponse,
18+
GenericResource,
19+
Identity,
20+
Plan,
21+
PlanPatchable,
22+
Resource,
23+
Sku
24+
} from "../models/mappers";

0 commit comments

Comments
 (0)