diff --git a/lib/services/marketplaceorderingManagement/LICENSE.txt b/lib/services/marketplaceorderingManagement/LICENSE.txt index 0313a903d7..5431ba98b9 100644 --- a/lib/services/marketplaceorderingManagement/LICENSE.txt +++ b/lib/services/marketplaceorderingManagement/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2017 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. \ No newline at end of file +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. diff --git a/lib/services/marketplaceorderingManagement/README.md b/lib/services/marketplaceorderingManagement/README.md index e34cb7ce99..5eea7e0d3c 100644 --- a/lib/services/marketplaceorderingManagement/README.md +++ b/lib/services/marketplaceorderingManagement/README.md @@ -1,38 +1,44 @@ -# Microsoft Azure SDK for Node.js - MarketplaceOrderingAgreement - -This project provides a Node.js package for accessing the Azure PAS. Right now it supports: -- **Node.js version: 6.x.x or higher** - -## How to Install - -```bash -npm install azure-arm-marketplaceordering -``` - -## How to Use - -### Authentication, client creation and listing marketplaceAgreements as an example - - ```javascript - var msRestAzure = require('ms-rest-azure'); - var MarketplaceOrderingAgreementClient = require("azure-arm-marketplaceordering"); - - // Interactive Login - // It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful, - // the user will get a DeviceTokenCredentials object. - msRestAzure.interactiveLogin(function(err, credentials) { - let client = new MarketplaceOrderingAgreementClient(credentials, 'your-subscription-id'); - client.marketplaceAgreements.get('publisherId', 'offerId', 'planId').then((marketplaceAgreements) => { - console.log('List of marketplaceAgreements:'); - console.dir(marketplaceAgreements, {depth: null, colors: true}); - }); - }).catch((err) => { - console.log('An error ocurred'); - console.dir(err, {depth: null, colors: true}); - }); -}); -``` - -## Related projects - -- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) +--- +uid: azure-arm-marketplaceordering +summary: *content + +--- +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - MarketplaceOrderingAgreements +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +### Features + + +### How to Install + +```bash +npm install azure-arm-marketplaceordering +``` + +### How to use + +#### Authentication, client creation and get marketplaceAgreements as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const MarketplaceOrderingAgreements = require("azure-arm-marketplaceordering"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new MarketplaceOrderingAgreements(creds, subscriptionId); + const publisherId = "testpublisherId"; + const offerId = "testofferId"; + const planId = "testplanId"; + return client.marketplaceAgreements.get(publisherId, offerId, planId).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); + +### Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.d.ts b/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.d.ts index bd00363cc8..ff3103f7d8 100644 --- a/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.d.ts +++ b/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.d.ts @@ -10,9 +10,10 @@ import { ServiceClientCredentials } from 'ms-rest'; import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; +import * as models from "./models"; import * as operations from "./operations"; -declare class MarketplaceOrderingAgreements extends AzureServiceClient { +export default class MarketplaceOrderingAgreements extends AzureServiceClient { /** * Initializes a new instance of the MarketplaceOrderingAgreements class. * @constructor @@ -33,11 +34,11 @@ declare class MarketplaceOrderingAgreements extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); @@ -59,4 +60,4 @@ declare class MarketplaceOrderingAgreements extends AzureServiceClient { operations: operations.Operations; } -export = MarketplaceOrderingAgreements; +export { MarketplaceOrderingAgreements, models as MarketplaceOrderingAgreementsModels }; diff --git a/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.js b/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.js index 07fb1c577b..7896491206 100644 --- a/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.js +++ b/lib/services/marketplaceorderingManagement/lib/marketplaceOrderingAgreements.js @@ -34,9 +34,9 @@ class MarketplaceOrderingAgreements extends ServiceClient { * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { @@ -81,3 +81,6 @@ class MarketplaceOrderingAgreements extends ServiceClient { } module.exports = MarketplaceOrderingAgreements; +module.exports['default'] = MarketplaceOrderingAgreements; +module.exports.MarketplaceOrderingAgreements = MarketplaceOrderingAgreements; +module.exports.MarketplaceOrderingAgreementsModels = models; diff --git a/lib/services/marketplaceorderingManagement/lib/models/agreementTerms.js b/lib/services/marketplaceorderingManagement/lib/models/agreementTerms.js index 2714cb5e34..0a5eb86cf4 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/agreementTerms.js +++ b/lib/services/marketplaceorderingManagement/lib/models/agreementTerms.js @@ -20,19 +20,19 @@ const models = require('./index'); class AgreementTerms extends models['Resource'] { /** * Create a AgreementTerms. - * @member {string} [publisher] Publisher identifier string of image being + * @property {string} [publisher] Publisher identifier string of image being * deployed. - * @member {string} [product] Offer identifier string of image being + * @property {string} [product] Offer identifier string of image being * deployed. - * @member {string} [plan] Plan identifier string of image being deployed. - * @member {string} [licenseTextLink] Link to HTML with Microsoft and + * @property {string} [plan] Plan identifier string of image being deployed. + * @property {string} [licenseTextLink] Link to HTML with Microsoft and * Publisher terms. - * @member {string} [privacyPolicyLink] Link to the privacy policy of the + * @property {string} [privacyPolicyLink] Link to the privacy policy of the * publisher. - * @member {string} [retrieveDatetime] Date and time in UTC of when the terms - * were accepted. This is empty if Accepted is false. - * @member {string} [signature] Terms signature. - * @member {boolean} [accepted] If any version of the terms have been + * @property {string} [retrieveDatetime] Date and time in UTC of when the + * terms were accepted. This is empty if Accepted is false. + * @property {string} [signature] Terms signature. + * @property {boolean} [accepted] If any version of the terms have been * accepted, otherwise false. */ constructor() { diff --git a/lib/services/marketplaceorderingManagement/lib/models/errorResponse.js b/lib/services/marketplaceorderingManagement/lib/models/errorResponse.js index a6adc77aa5..aa3f3d4a58 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/errorResponse.js +++ b/lib/services/marketplaceorderingManagement/lib/models/errorResponse.js @@ -10,19 +10,18 @@ 'use strict'; -const models = require('./index'); - /** - * Error reponse indicates Microsoft.MarketplaceOrdering service is not able to - * process the incoming request. The reason is provided in the error message. + * Error response indicates Microsoft.MarketplaceOrdering service is not able + * to process the incoming request. The reason is provided in the error + * message. * */ class ErrorResponse { /** * Create a ErrorResponse. - * @member {object} [error] The details of the error. - * @member {string} [error.code] Error code. - * @member {string} [error.message] Error message indicating why the + * @property {object} [error] The details of the error. + * @property {string} [error.code] Error code. + * @property {string} [error.message] Error message indicating why the * operation failed. */ constructor() { diff --git a/lib/services/marketplaceorderingManagement/lib/models/errorResponseError.js b/lib/services/marketplaceorderingManagement/lib/models/errorResponseError.js index ee425b8598..e745ed6dcb 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/errorResponseError.js +++ b/lib/services/marketplaceorderingManagement/lib/models/errorResponseError.js @@ -17,8 +17,8 @@ class ErrorResponseError { /** * Create a ErrorResponseError. - * @member {string} [code] Error code. - * @member {string} [message] Error message indicating why the operation + * @property {string} [code] Error code. + * @property {string} [message] Error message indicating why the operation * failed. */ constructor() { diff --git a/lib/services/marketplaceorderingManagement/lib/models/index.d.ts b/lib/services/marketplaceorderingManagement/lib/models/index.d.ts index c001d58abe..b3246053d7 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/index.d.ts +++ b/lib/services/marketplaceorderingManagement/lib/models/index.d.ts @@ -1,148 +1,140 @@ /* * 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 } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the Resource class. - * @constructor * ARM resource. - * - * @member {string} [id] Resource ID. - * @member {string} [name] Resource name. - * @member {string} [type] Resource type. */ export interface Resource extends BaseResource { + /** + * Resource ID. + */ readonly id?: string; + /** + * Resource name. + */ readonly name?: string; + /** + * Resource type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the AgreementTerms class. - * @constructor * Terms properties for provided Publisher/Offer/Plan tuple - * - * @member {string} [publisher] Publisher identifier string of image being - * deployed. - * @member {string} [product] Offer identifier string of image being deployed. - * @member {string} [plan] Plan identifier string of image being deployed. - * @member {string} [licenseTextLink] Link to HTML with Microsoft and Publisher - * terms. - * @member {string} [privacyPolicyLink] Link to the privacy policy of the - * publisher. - * @member {string} [retrieveDatetime] Date and time in UTC of when the terms - * were accepted. This is empty if Accepted is false. - * @member {string} [signature] Terms signature. - * @member {boolean} [accepted] If any version of the terms have been accepted, - * otherwise false. */ export interface AgreementTerms extends Resource { + /** + * Publisher identifier string of image being deployed. + */ publisher?: string; + /** + * Offer identifier string of image being deployed. + */ product?: string; + /** + * Plan identifier string of image being deployed. + */ plan?: string; + /** + * Link to HTML with Microsoft and Publisher terms. + */ licenseTextLink?: string; + /** + * Link to the privacy policy of the publisher. + */ privacyPolicyLink?: string; + /** + * Date and time in UTC of when the terms were accepted. This is empty if Accepted is false. + */ retrieveDatetime?: string; + /** + * Terms signature. + */ signature?: string; + /** + * If any version of the terms have been accepted, otherwise false. + */ accepted?: boolean; } /** - * @class - * Initializes a new instance of the ErrorResponseError class. - * @constructor * The details of the error. - * - * @member {string} [code] Error code. - * @member {string} [message] Error message indicating why the operation - * failed. */ export interface ErrorResponseError { + /** + * Error code. + */ readonly code?: string; + /** + * Error message indicating why the operation failed. + */ readonly message?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor - * Error reponse indicates Microsoft.MarketplaceOrdering service is not able to - * process the incoming request. The reason is provided in the error message. - * - * @member {object} [error] The details of the error. - * @member {string} [error.code] Error code. - * @member {string} [error.message] Error message indicating why the operation - * failed. + * Error response indicates Microsoft.MarketplaceOrdering service is not able to process the + * incoming request. The reason is provided in the error message. */ export interface ErrorResponse { + /** + * The details of the error. + */ error?: ErrorResponseError; } /** - * @class - * Initializes a new instance of the OperationDisplay class. - * @constructor * The object that represents the operation. - * - * @member {string} [provider] Service provider: Microsoft.MarketplaceOrdering - * @member {string} [resource] Resource on which the operation is performed: - * Agreement, virtualmachine, etc. - * @member {string} [operation] Operation type: Get Agreement, Sign Agreement, - * Cancel Agreement etc. */ export interface OperationDisplay { + /** + * Service provider: Microsoft.MarketplaceOrdering + */ provider?: string; + /** + * Resource on which the operation is performed: Agreement, virtualmachine, etc. + */ resource?: string; + /** + * Operation type: Get Agreement, Sign Agreement, Cancel Agreement etc. + */ operation?: string; } /** - * @class - * Initializes a new instance of the Operation class. - * @constructor * Microsoft.MarketplaceOrdering REST API operation - * - * @member {string} [name] Operation name: {provider}/{resource}/{operation} - * @member {object} [display] The object that represents the operation. - * @member {string} [display.provider] Service provider: - * Microsoft.MarketplaceOrdering - * @member {string} [display.resource] Resource on which the operation is - * performed: Agreement, virtualmachine, etc. - * @member {string} [display.operation] Operation type: Get Agreement, Sign - * Agreement, Cancel Agreement etc. */ export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ name?: string; + /** + * The object that represents the operation. + */ display?: OperationDisplay; } - /** - * @class - * Initializes a new instance of the OperationListResult class. - * @constructor - * Result of the request to list MarketplaceOrdering operations. It contains a - * list of operations and a URL link to get the next set of results. - * - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. + * Result of the request to list MarketplaceOrdering operations. It contains a list of operations + * and a URL link to get the next set of results. */ export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + */ readonly nextLink?: string; } diff --git a/lib/services/marketplaceorderingManagement/lib/models/operation.js b/lib/services/marketplaceorderingManagement/lib/models/operation.js index fc661742f2..1a6e54b1c6 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/operation.js +++ b/lib/services/marketplaceorderingManagement/lib/models/operation.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Microsoft.MarketplaceOrdering REST API operation * @@ -19,13 +17,14 @@ const models = require('./index'); class Operation { /** * Create a Operation. - * @member {string} [name] Operation name: {provider}/{resource}/{operation} - * @member {object} [display] The object that represents the operation. - * @member {string} [display.provider] Service provider: + * @property {string} [name] Operation name: + * {provider}/{resource}/{operation} + * @property {object} [display] The object that represents the operation. + * @property {string} [display.provider] Service provider: * Microsoft.MarketplaceOrdering - * @member {string} [display.resource] Resource on which the operation is + * @property {string} [display.resource] Resource on which the operation is * performed: Agreement, virtualmachine, etc. - * @member {string} [display.operation] Operation type: Get Agreement, Sign + * @property {string} [display.operation] Operation type: Get Agreement, Sign * Agreement, Cancel Agreement etc. */ constructor() { diff --git a/lib/services/marketplaceorderingManagement/lib/models/operationDisplay.js b/lib/services/marketplaceorderingManagement/lib/models/operationDisplay.js index 330b024cad..b834f6764d 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/operationDisplay.js +++ b/lib/services/marketplaceorderingManagement/lib/models/operationDisplay.js @@ -17,11 +17,11 @@ class OperationDisplay { /** * Create a OperationDisplay. - * @member {string} [provider] Service provider: + * @property {string} [provider] Service provider: * Microsoft.MarketplaceOrdering - * @member {string} [resource] Resource on which the operation is performed: - * Agreement, virtualmachine, etc. - * @member {string} [operation] Operation type: Get Agreement, Sign + * @property {string} [resource] Resource on which the operation is + * performed: Agreement, virtualmachine, etc. + * @property {string} [operation] Operation type: Get Agreement, Sign * Agreement, Cancel Agreement etc. */ constructor() { diff --git a/lib/services/marketplaceorderingManagement/lib/models/operationListResult.js b/lib/services/marketplaceorderingManagement/lib/models/operationListResult.js index 8ee2f4156a..5414779ab5 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/operationListResult.js +++ b/lib/services/marketplaceorderingManagement/lib/models/operationListResult.js @@ -17,7 +17,7 @@ class OperationListResult extends Array { /** * Create a OperationListResult. - * @member {string} [nextLink] URL to get the next set of operation list + * @property {string} [nextLink] URL to get the next set of operation list * results if there are any. */ constructor() { diff --git a/lib/services/marketplaceorderingManagement/lib/models/resource.js b/lib/services/marketplaceorderingManagement/lib/models/resource.js index 57088e37e3..9ccac357d1 100644 --- a/lib/services/marketplaceorderingManagement/lib/models/resource.js +++ b/lib/services/marketplaceorderingManagement/lib/models/resource.js @@ -20,9 +20,9 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] Resource ID. - * @member {string} [name] Resource name. - * @member {string} [type] Resource type. + * @property {string} [id] Resource ID. + * @property {string} [name] Resource name. + * @property {string} [type] Resource type. */ constructor() { super(); diff --git a/lib/services/marketplaceorderingManagement/package.json b/lib/services/marketplaceorderingManagement/package.json index 797e8b144d..26ede7f57e 100644 --- a/lib/services/marketplaceorderingManagement/package.json +++ b/lib/services/marketplaceorderingManagement/package.json @@ -1,35 +1,25 @@ { "name": "azure-arm-marketplaceordering", "author": "Microsoft Corporation", - "contributors": [ - "Zavery, Amar " - ], + "description": "MarketplaceOrderingAgreements Library with typescript type definitions for node", "version": "1.2.0-preview", - "description": "Microsoft Azure Consumption Management Client Library for node", - "tags": [ - "azure", - "sdk" - ], + "dependencies": { + "ms-rest": "^2.3.3", + "ms-rest-azure": "^2.5.5" + }, "keywords": [ "node", "azure" ], + "license": "MIT", "main": "./lib/marketplaceOrderingAgreements.js", "types": "./lib/marketplaceOrderingAgreements.d.ts", - "license": "MIT", - "dependencies": { - "ms-rest": "^2.3.1", - "ms-rest-azure": "^2.5.4" - }, - "homepage": "http://github.com/Azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/marketplaceorderingManagement", "repository": { "type": "git", - "url": "git@github.com:Azure/azure-sdk-for-node.git" + "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" - }, - "scripts": { - "test": "npm -s run-script jshint" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}