Skip to content

Commit

Permalink
CodeGen from PR 14562 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 3035e5507cd324831fd929303ef273221968431b into 119d0a9b2e51ce8b6540bf731512229e1a983069
  • Loading branch information
SDKAuto committed May 27, 2021
1 parent 72e3fc2 commit e2ae997
Show file tree
Hide file tree
Showing 17 changed files with 955 additions and 942 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 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
Expand Down
22 changes: 11 additions & 11 deletions sdk/managedapplications/arm-managedapplications/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Azure ManagedApplicationClient SDK for JavaScript
## Azure ApplicationClient SDK for JavaScript

This package contains an isomorphic SDK for ManagedApplicationClient.
This package contains an isomorphic SDK for ApplicationClient.

### Currently supported environments

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

### How to use

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

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

- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
npm install @azure/ms-rest-nodeauth
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 { ManagedApplicationClient, ManagedApplicationModels, ManagedApplicationMappers } from "@azure/arm-managedapplications";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { ApplicationClient } = require("@azure/arm-managedapplications");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new ManagedApplicationClient(creds, subscriptionId);
const client = new ApplicationClient(creds, subscriptionId);
client.listOperations().then((result) => {
console.log("The result is:");
console.log(result);
Expand Down Expand Up @@ -76,7 +76,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
// may cause redirects
authManager.login();
}
const client = new Azure.ArmManagedapplications.ManagedApplicationClient(res.creds, subscriptionId);
const client = new Azure.ArmManagedapplications.ApplicationClient(res.creds, subscriptionId);
client.listOperations().then((result) => {
console.log("The result is:");
console.log(result);
Expand All @@ -95,4 +95,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [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%2Fsdk%2Fmanagedapplications%2Farm-managedapplications%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/managedapplications/arm-managedapplications/README.png)
20 changes: 10 additions & 10 deletions sdk/managedapplications/arm-managedapplications/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@azure/arm-managedapplications",
"author": "Microsoft Corporation",
"description": "ManagedApplicationClient Library with typescript type definitions for node.js and browser.",
"description": "ApplicationClient Library with typescript type definitions for node.js and browser.",
"version": "1.0.2",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand All @@ -17,14 +17,14 @@
],
"license": "MIT",
"main": "./dist/arm-managedapplications.js",
"module": "./esm/managedApplicationClient.js",
"types": "./esm/managedApplicationClient.d.ts",
"module": "./esm/applicationClient.js",
"types": "./esm/applicationClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"typescript": "^3.5.3",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/managedapplications/arm-managedapplications",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps";
* @type {rollup.RollupFileOptions}
*/
const config = {
input: "./esm/managedApplicationClient.js",
input: "./esm/applicationClient.js",
external: [
"@azure/ms-rest-js",
"@azure/ms-rest-azure-js"
Expand All @@ -21,15 +21,15 @@ 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.
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
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 All @@ -13,24 +12,24 @@ import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as Parameters from "./models/parameters";
import * as operations from "./operations";
import { ManagedApplicationClientContext } from "./managedApplicationClientContext";
import { ApplicationClientContext } from "./applicationClientContext";


class ManagedApplicationClient extends ManagedApplicationClientContext {
class ApplicationClient extends ApplicationClientContext {
// Operation groups
appliances: operations.Appliances;
applianceDefinitions: operations.ApplianceDefinitions;
applications: operations.Applications;
applicationDefinitions: operations.ApplicationDefinitions;

/**
* Initializes a new instance of the ManagedApplicationClient class.
* Initializes a new instance of the ApplicationClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId The ID of the target subscription.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) {
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationClientOptions) {
super(credentials, subscriptionId, options);
this.appliances = new operations.Appliances(this);
this.applianceDefinitions = new operations.ApplianceDefinitions(this);
this.applications = new operations.Applications(this);
this.applicationDefinitions = new operations.ApplicationDefinitions(this);
}

/**
Expand Down Expand Up @@ -115,6 +114,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand All @@ -130,9 +132,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
};

export {
ManagedApplicationClient,
ManagedApplicationClientContext,
Models as ManagedApplicationModels,
Mappers as ManagedApplicationMappers
ApplicationClient,
ApplicationClientContext,
Models as ApplicationModels,
Mappers as ApplicationMappers
};
export * from "./operations";
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 All @@ -15,18 +14,18 @@ import * as msRestAzure from "@azure/ms-rest-azure-js";
const packageName = "@azure/arm-managedapplications";
const packageVersion = "1.0.2";

export class ManagedApplicationClientContext extends msRestAzure.AzureServiceClient {
export class ApplicationClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
apiVersion?: string;

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

super(credentials, options);

this.apiVersion = '2016-09-01-preview';
this.apiVersion = '2018-06-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* 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.
*/

export {
Appliance,
ApplianceArtifact,
ApplianceDefinition,
ApplianceListResult,
AppliancePatchable,
ApplianceProviderAuthorization,
Application,
ApplicationArtifact,
ApplicationDefinition,
ApplicationDefinitionListResult,
ApplicationPatchable,
ApplicationProviderAuthorization,
BaseResource,
ErrorResponse,
GenericResource,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* 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.
*/

export {
Application,
ApplicationArtifact,
ApplicationDefinition,
ApplicationListResult,
ApplicationPatchable,
ApplicationProviderAuthorization,
BaseResource,
ErrorResponse,
GenericResource,
Identity,
Plan,
PlanPatchable,
Resource,
Sku
} from "../models/mappers";
Loading

0 comments on commit e2ae997

Please sign in to comment.