diff --git a/packages/@azure/arm-commitmentplans/LICENSE.txt b/packages/@azure/arm-commitmentplans/LICENSE.txt index a70e8cf66038..8f3d856145c5 100644 --- a/packages/@azure/arm-commitmentplans/LICENSE.txt +++ b/packages/@azure/arm-commitmentplans/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 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 -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-commitmentplans/README.md b/packages/@azure/arm-commitmentplans/README.md index fe17b3309feb..7794a44f5377 100644 --- a/packages/@azure/arm-commitmentplans/README.md +++ b/packages/@azure/arm-commitmentplans/README.md @@ -1,99 +1,96 @@ -## Azure AzureMLCommitmentPlansManagementClient SDK for JavaScript - -This package contains an isomorphic SDK for AzureMLCommitmentPlansManagementClient. - -### Currently supported environments - -- Node.js version 6.x.x or higher -- Browser JavaScript - -### How to Install - -``` -npm install @azure/arm-commitmentplans -``` - -### How to use - -#### nodejs - Authentication, client creation and list skus as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -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 { AzureMLCommitmentPlansManagementClient, AzureMLCommitmentPlansManagementModels, AzureMLCommitmentPlansManagementMappers } from "@azure/arm-commitmentplans"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new AzureMLCommitmentPlansManagementClient(creds, subscriptionId); - client.skus.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); -``` - -#### browser - Authentication, client creation and list skus as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-commitmentplans sample - - - - - - - - -``` - -## 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%2Fpackages%2F%40azure%2Farm-commitmentplans%2FREADME.png) +## Azure AzureMLCommitmentPlansManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for AzureMLCommitmentPlansManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-commitmentplans +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```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 { AzureMLCommitmentPlansManagementClient, AzureMLCommitmentPlansManagementModels, AzureMLCommitmentPlansManagementMappers } from "@azure/arm-commitmentplans"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new AzureMLCommitmentPlansManagementClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-commitmentplans sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClient.ts b/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClient.ts index a1fc34d00224..1cac73685914 100644 --- a/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClient.ts +++ b/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClient.ts @@ -17,6 +17,7 @@ import { AzureMLCommitmentPlansManagementClientContext } from "./azureMLCommitme class AzureMLCommitmentPlansManagementClient extends AzureMLCommitmentPlansManagementClientContext { // Operation groups + operations: operations.Operations; skus: operations.Skus; commitmentAssociations: operations.CommitmentAssociations; commitmentPlans: operations.CommitmentPlans; @@ -30,6 +31,7 @@ class AzureMLCommitmentPlansManagementClient extends AzureMLCommitmentPlansManag */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMLCommitmentPlansManagementClientOptions) { super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); this.skus = new operations.Skus(this); this.commitmentAssociations = new operations.CommitmentAssociations(this); this.commitmentPlans = new operations.CommitmentPlans(this); diff --git a/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClientContext.ts b/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClientContext.ts index 3293f19add9d..98133a105fb8 100644 --- a/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClientContext.ts +++ b/packages/@azure/arm-commitmentplans/lib/azureMLCommitmentPlansManagementClientContext.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-commitmentplans"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class AzureMLCommitmentPlansManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/packages/@azure/arm-commitmentplans/lib/models/index.ts b/packages/@azure/arm-commitmentplans/lib/models/index.ts index 743d98989904..4622e7ce4b5d 100644 --- a/packages/@azure/arm-commitmentplans/lib/models/index.ts +++ b/packages/@azure/arm-commitmentplans/lib/models/index.ts @@ -51,7 +51,7 @@ export interface SkuCapacity { /** * @interface * An interface representing SkuCapability. - * Describes The SKU capabilites object. + * Describes The SKU capabilities object. * */ export interface SkuCapability { @@ -524,6 +524,60 @@ export interface PlanUsageHistory { usageDate?: Date; } +/** + * @interface + * An interface representing OperationDisplayInfo. + * The API operation info. + * + */ +export interface OperationDisplayInfo { + /** + * @member {string} [description] The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: 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.** + */ + readonly operation?: string; + /** + * @member {string} [provider] The service provider. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provider?: string; + /** + * @member {string} [resource] The 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; +} + +/** + * @interface + * An interface representing OperationEntity. + * An API operation. + * + */ +export interface OperationEntity { + /** + * @member {string} [name] Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {OperationDisplayInfo} [display] The API operation info. + */ + display?: OperationDisplayInfo; +} + /** * @interface * An interface representing CommitmentAssociationsListOptionalParams. @@ -593,6 +647,16 @@ export interface AzureMLCommitmentPlansManagementClientOptions extends AzureServ } +/** + * @interface + * An interface representing the OperationEntityListResult. + * The list of REST API operations. + * + * @extends Array + */ +export interface OperationEntityListResult extends Array { +} + /** * @interface * An interface representing the SkuListResult. @@ -669,6 +733,25 @@ export type ResourceSkuRestrictionsType = 'location' | 'zone'; */ export type ResourceSkuRestrictionsReasonCode = 'QuotaId' | 'NotAvailableForSubscription'; +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationEntityListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationEntityListResult; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/packages/@azure/arm-commitmentplans/lib/models/mappers.ts b/packages/@azure/arm-commitmentplans/lib/models/mappers.ts index 544de96c3b7a..03a52b449e65 100644 --- a/packages/@azure/arm-commitmentplans/lib/models/mappers.ts +++ b/packages/@azure/arm-commitmentplans/lib/models/mappers.ts @@ -647,6 +647,91 @@ export const PlanUsageHistory: msRest.CompositeMapper = { } }; +export const OperationDisplayInfo: msRest.CompositeMapper = { + serializedName: "OperationDisplayInfo", + type: { + name: "Composite", + className: "OperationDisplayInfo", + modelProperties: { + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + } + } + } +}; + +export const OperationEntity: msRest.CompositeMapper = { + serializedName: "OperationEntity", + type: { + name: "Composite", + className: "OperationEntity", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplayInfo" + } + } + } + } +}; + +export const OperationEntityListResult: msRest.CompositeMapper = { + serializedName: "OperationEntityListResult", + type: { + name: "Composite", + className: "OperationEntityListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationEntity" + } + } + } + } + } + } +}; + export const SkuListResult: msRest.CompositeMapper = { serializedName: "SkuListResult", type: { diff --git a/packages/@azure/arm-commitmentplans/lib/models/operationsMappers.ts b/packages/@azure/arm-commitmentplans/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..aba5d8bf047b --- /dev/null +++ b/packages/@azure/arm-commitmentplans/lib/models/operationsMappers.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * 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. + */ + +export { + OperationEntityListResult, + OperationEntity, + OperationDisplayInfo, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-commitmentplans/lib/operations/index.ts b/packages/@azure/arm-commitmentplans/lib/operations/index.ts index 6ff850f6f24b..3ae74d27ac6d 100644 --- a/packages/@azure/arm-commitmentplans/lib/operations/index.ts +++ b/packages/@azure/arm-commitmentplans/lib/operations/index.ts @@ -8,6 +8,7 @@ * regenerated. */ +export * from "./operations"; export * from "./skus"; export * from "./commitmentAssociations"; export * from "./commitmentPlans"; diff --git a/packages/@azure/arm-commitmentplans/lib/operations/operations.ts b/packages/@azure/arm-commitmentplans/lib/operations/operations.ts new file mode 100644 index 000000000000..17ee14c124dd --- /dev/null +++ b/packages/@azure/arm-commitmentplans/lib/operations/operations.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMLCommitmentPlansManagementClientContext } from "../azureMLCommitmentPlansManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: AzureMLCommitmentPlansManagementClientContext; + + /** + * Create a Operations. + * @param {AzureMLCommitmentPlansManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureMLCommitmentPlansManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available Azure Machine Learning Studio Commitment Plan RP REST API operations. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.MachineLearning/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationEntityListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-commitmentplans/package.json b/packages/@azure/arm-commitmentplans/package.json index c311ffb9105e..dd3196364dd2 100644 --- a/packages/@azure/arm-commitmentplans/package.json +++ b/packages/@azure/arm-commitmentplans/package.json @@ -4,8 +4,8 @@ "description": "AzureMLCommitmentPlansManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "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/packages/@azure/arm-commitmentplans", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-commitmentplans.js.map'\" -o ./dist/arm-commitmentplans.min.js ./dist/arm-commitmentplans.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-commitmentplans/rollup.config.js b/packages/@azure/arm-commitmentplans/rollup.config.js index 226323b9807f..94b7254deb15 100644 --- a/packages/@azure/arm-commitmentplans/rollup.config.js +++ b/packages/@azure/arm-commitmentplans/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/azureMLCommitmentPlansManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/azureMLCommitmentPlansManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-commitmentplans.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/packages/@azure/arm-webservices/LICENSE.txt b/packages/@azure/arm-webservices/LICENSE.txt index a70e8cf66038..8f3d856145c5 100644 --- a/packages/@azure/arm-webservices/LICENSE.txt +++ b/packages/@azure/arm-webservices/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 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 -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-webservices/README.md b/packages/@azure/arm-webservices/README.md index 01d45fe918c5..ed2f28148df5 100644 --- a/packages/@azure/arm-webservices/README.md +++ b/packages/@azure/arm-webservices/README.md @@ -1,99 +1,96 @@ -## Azure AzureMLWebServicesManagementClient SDK for JavaScript - -This package contains an isomorphic SDK for AzureMLWebServicesManagementClient. - -### Currently supported environments - -- Node.js version 6.x.x or higher -- Browser JavaScript - -### How to Install - -``` -npm install @azure/arm-webservices -``` - -### How to use - -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -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 { AzureMLWebServicesManagementClient, AzureMLWebServicesManagementModels, AzureMLWebServicesManagementMappers } from "@azure/arm-webservices"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new AzureMLWebServicesManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); -``` - -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-webservices sample - - - - - - - - -``` - -## 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%2Fpackages%2F%40azure%2Farm-webservices%2FREADME.png) +## Azure AzureMLWebServicesManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for AzureMLWebServicesManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-webservices +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```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 { AzureMLWebServicesManagementClient, AzureMLWebServicesManagementModels, AzureMLWebServicesManagementMappers } from "@azure/arm-webservices"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new AzureMLWebServicesManagementClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-webservices sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-webservices/lib/models/index.ts b/packages/@azure/arm-webservices/lib/models/index.ts index 10498bb1304a..7a38233ac3ff 100644 --- a/packages/@azure/arm-webservices/lib/models/index.ts +++ b/packages/@azure/arm-webservices/lib/models/index.ts @@ -51,6 +51,45 @@ export interface Resource extends BaseResource { tags?: { [propertyName: string]: string }; } +/** + * @interface + * An interface representing PatchedResource. + * Azure resource. + * + * @extends BaseResource + */ +export interface PatchedResource extends BaseResource { + /** + * @member {string} [id] Specifies the resource ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Specifies the name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [location] Specifies the location of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly location?: string; + /** + * @member {string} [type] Specifies the type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Contains resource tags + * defined as key/value pairs. + */ + tags?: { [propertyName: string]: string }; +} + /** * @interface * An interface representing WebServiceKeys. @@ -576,7 +615,7 @@ export interface WebServiceProperties { payloadsInBlobStorage?: boolean; /** * @member {BlobLocation} [payloadsLocation] The URI of the payload blob. - * This paramater contains a value only if the payloadsInBlobStorage + * This parameter contains a value only if the payloadsInBlobStorage * parameter is set to true. Otherwise is set to null. */ payloadsLocation?: BlobLocation; @@ -597,6 +636,21 @@ export interface WebService extends Resource { properties: WebServicePropertiesUnion; } +/** + * @interface + * An interface representing PatchedWebService. + * Instance of an Patched Azure ML web service resource. + * + * @extends PatchedResource + */ +export interface PatchedWebService extends PatchedResource { + /** + * @member {WebServicePropertiesUnion} [properties] Contains the property + * payload that describes the web service. + */ + properties?: WebServicePropertiesUnion; +} + /** * @interface * An interface representing GraphNode. @@ -866,7 +920,7 @@ export interface WebServicePropertiesForGraph { payloadsInBlobStorage?: boolean; /** * @member {BlobLocation} [payloadsLocation] The URI of the payload blob. - * This paramater contains a value only if the payloadsInBlobStorage + * This parameter contains a value only if the payloadsInBlobStorage * parameter is set to true. Otherwise is set to null. */ payloadsLocation?: BlobLocation; diff --git a/packages/@azure/arm-webservices/lib/models/mappers.ts b/packages/@azure/arm-webservices/lib/models/mappers.ts index 0a16b3dc5540..f24bae76f1aa 100644 --- a/packages/@azure/arm-webservices/lib/models/mappers.ts +++ b/packages/@azure/arm-webservices/lib/models/mappers.ts @@ -63,6 +63,55 @@ export const Resource: msRest.CompositeMapper = { } }; +export const PatchedResource: msRest.CompositeMapper = { + serializedName: "PatchedResource", + type: { + name: "Composite", + className: "PatchedResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const WebServiceKeys: msRest.CompositeMapper = { serializedName: "WebServiceKeys", type: { @@ -782,6 +831,24 @@ export const WebService: msRest.CompositeMapper = { } }; +export const PatchedWebService: msRest.CompositeMapper = { + serializedName: "PatchedWebService", + type: { + name: "Composite", + className: "PatchedWebService", + modelProperties: { + ...PatchedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "WebServiceProperties" + } + } + } + } +}; + export const GraphNode: msRest.CompositeMapper = { serializedName: "GraphNode", type: { diff --git a/packages/@azure/arm-webservices/lib/models/webServicesMappers.ts b/packages/@azure/arm-webservices/lib/models/webServicesMappers.ts index e72764b2cc2b..ce960a7d1c5c 100644 --- a/packages/@azure/arm-webservices/lib/models/webServicesMappers.ts +++ b/packages/@azure/arm-webservices/lib/models/webServicesMappers.ts @@ -32,6 +32,8 @@ export { ModeValueInfo, WebServiceParameter, CloudError, + PatchedWebService, + PatchedResource, AsyncOperationStatus, AsyncOperationErrorInfo, PaginatedWebServicesList, diff --git a/packages/@azure/arm-webservices/lib/operations/webServices.ts b/packages/@azure/arm-webservices/lib/operations/webServices.ts index 6d961d7f23c0..cd0ebab2e9a5 100644 --- a/packages/@azure/arm-webservices/lib/operations/webServices.ts +++ b/packages/@azure/arm-webservices/lib/operations/webServices.ts @@ -85,7 +85,7 @@ export class WebServices { * @param [options] The optional parameters * @returns Promise */ - patch(resourceGroupName: string, webServiceName: string, patchPayload: Models.WebService, options?: msRest.RequestOptionsBase): Promise { + patch(resourceGroupName: string, webServiceName: string, patchPayload: Models.PatchedWebService, options?: msRest.RequestOptionsBase): Promise { return this.beginPatch(resourceGroupName,webServiceName,patchPayload,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -234,7 +234,7 @@ export class WebServices { * @param [options] The optional parameters * @returns Promise */ - beginPatch(resourceGroupName: string, webServiceName: string, patchPayload: Models.WebService, options?: msRest.RequestOptionsBase): Promise { + beginPatch(resourceGroupName: string, webServiceName: string, patchPayload: Models.PatchedWebService, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -499,7 +499,7 @@ const beginPatchOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "patchPayload", mapper: { - ...Mappers.WebService, + ...Mappers.PatchedWebService, required: true } }, diff --git a/packages/@azure/arm-webservices/package.json b/packages/@azure/arm-webservices/package.json index 9dc7801bfabc..58d3916ba3ed 100644 --- a/packages/@azure/arm-webservices/package.json +++ b/packages/@azure/arm-webservices/package.json @@ -4,8 +4,8 @@ "description": "AzureMLWebServicesManagementClient Library with typescript type definitions for node.js and browser.", "version": "0.1.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "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/packages/@azure/arm-webservices", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-webservices.js.map'\" -o ./dist/arm-webservices.min.js ./dist/arm-webservices.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-webservices/rollup.config.js b/packages/@azure/arm-webservices/rollup.config.js index fca84a1233db..75f4ce4913d5 100644 --- a/packages/@azure/arm-webservices/rollup.config.js +++ b/packages/@azure/arm-webservices/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/azureMLWebServicesManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/azureMLWebServicesManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-webservices.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/packages/@azure/arm-workspaces/LICENSE.txt b/packages/@azure/arm-workspaces/LICENSE.txt index a70e8cf66038..8f3d856145c5 100644 --- a/packages/@azure/arm-workspaces/LICENSE.txt +++ b/packages/@azure/arm-workspaces/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 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 -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-workspaces/README.md b/packages/@azure/arm-workspaces/README.md index 571b3e2322c0..478542978e15 100644 --- a/packages/@azure/arm-workspaces/README.md +++ b/packages/@azure/arm-workspaces/README.md @@ -1,99 +1,96 @@ -## Azure MachineLearningWorkspacesManagementClient SDK for JavaScript - -This package contains an isomorphic SDK for MachineLearningWorkspacesManagementClient. - -### Currently supported environments - -- Node.js version 6.x.x or higher -- Browser JavaScript - -### How to Install - -``` -npm install @azure/arm-workspaces -``` - -### How to use - -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -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 { MachineLearningWorkspacesManagementClient, MachineLearningWorkspacesManagementModels, MachineLearningWorkspacesManagementMappers } from "@azure/arm-workspaces"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MachineLearningWorkspacesManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); -``` - -#### browser - Authentication, client creation and list operations as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-workspaces sample - - - - - - - - -``` - -## 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%2Fpackages%2F%40azure%2Farm-workspaces%2FREADME.png) +## Azure MachineLearningWorkspacesManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for MachineLearningWorkspacesManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-workspaces +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```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 { MachineLearningWorkspacesManagementClient, MachineLearningWorkspacesManagementModels, MachineLearningWorkspacesManagementMappers } from "@azure/arm-workspaces"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new MachineLearningWorkspacesManagementClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-workspaces sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-workspaces/package.json b/packages/@azure/arm-workspaces/package.json index 49bc089e6ef6..961f542c31f9 100644 --- a/packages/@azure/arm-workspaces/package.json +++ b/packages/@azure/arm-workspaces/package.json @@ -4,8 +4,8 @@ "description": "MachineLearningWorkspacesManagementClient Library with typescript type definitions for node.js and browser.", "version": "0.1.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "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/packages/@azure/arm-workspaces", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-workspaces.js.map'\" -o ./dist/arm-workspaces.min.js ./dist/arm-workspaces.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-workspaces/rollup.config.js b/packages/@azure/arm-workspaces/rollup.config.js index 026f43803d48..12a7a7616fe8 100644 --- a/packages/@azure/arm-workspaces/rollup.config.js +++ b/packages/@azure/arm-workspaces/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/machineLearningWorkspacesManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/machineLearningWorkspacesManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-workspaces.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;