Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR machinelearning/resource-manager] Fix machinelearning generation for Node.js #4320

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 AzureMLCommitmentPlansManagementClient extends AzureServiceClient {
export default class AzureMLCommitmentPlansManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the AzureMLCommitmentPlansManagementClient class.
* @constructor
Expand All @@ -33,11 +34,11 @@ declare class AzureMLCommitmentPlansManagementClient 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);
Expand All @@ -55,9 +56,10 @@ declare class AzureMLCommitmentPlansManagementClient extends AzureServiceClient
generateClientRequestId: boolean;

// Operation groups
skus: operations.Skus;
commitmentAssociations: operations.CommitmentAssociations;
commitmentPlans: operations.CommitmentPlans;
usageHistory: operations.UsageHistory;
}

export = AzureMLCommitmentPlansManagementClient;
export { AzureMLCommitmentPlansManagementClient, models as AzureMLCommitmentPlansManagementModels };
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class AzureMLCommitmentPlansManagementClient 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) {
Expand Down Expand Up @@ -72,6 +72,7 @@ class AzureMLCommitmentPlansManagementClient extends ServiceClient {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.skus = new operations.Skus(this);
this.commitmentAssociations = new operations.CommitmentAssociations(this);
this.commitmentPlans = new operations.CommitmentPlans(this);
this.usageHistory = new operations.UsageHistory(this);
Expand All @@ -82,3 +83,6 @@ class AzureMLCommitmentPlansManagementClient extends ServiceClient {
}

module.exports = AzureMLCommitmentPlansManagementClient;
module.exports['default'] = AzureMLCommitmentPlansManagementClient;
module.exports.AzureMLCommitmentPlansManagementClient = AzureMLCommitmentPlansManagementClient;
module.exports.AzureMLCommitmentPlansManagementModels = models;
156 changes: 156 additions & 0 deletions lib/services/machinelearning/lib/commitmentPlan/models/catalogSku.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
/*
* 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.
*/

'use strict';

/**
* Details of a commitment plan SKU.
*
*/
class CatalogSku {
/**
* Create a CatalogSku.
* @property {string} [resourceType] Resource type name
* @property {string} [name] SKU name
* @property {string} [tier] SKU tier
* @property {array} [locations] Regions where the SKU is available.
* @property {object} [capacity] SKU scaling information
* @property {number} [capacity.minimum] The minimum capacity.
* @property {number} [capacity.maximum] The maximum capacity that can be
* set.
* @property {number} [capacity.default] The default capacity.
* @property {string} [capacity.scaleType] The scale type applicable to the
* sku. Possible values include: 'Automatic', 'Manual', 'None'
* @property {array} [capabilities] The capability information for the
* specified SKU.
* @property {array} [costs] The cost information for the specified SKU.
* @property {array} [restrictions] Restrictions which would prevent a SKU
* from being used. This is empty if there are no restrictions.
*/
constructor() {
}

/**
* Defines the metadata of CatalogSku
*
* @returns {object} metadata of CatalogSku
*
*/
mapper() {
return {
required: false,
serializedName: 'CatalogSku',
type: {
name: 'Composite',
className: 'CatalogSku',
modelProperties: {
resourceType: {
required: false,
readOnly: true,
serializedName: 'resourceType',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
tier: {
required: false,
readOnly: true,
serializedName: 'tier',
type: {
name: 'String'
}
},
locations: {
required: false,
readOnly: true,
serializedName: 'locations',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
capacity: {
required: false,
readOnly: true,
serializedName: 'capacity',
type: {
name: 'Composite',
className: 'SkuCapacity'
}
},
capabilities: {
required: false,
readOnly: true,
serializedName: 'capabilities',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'SkuCapabilityElementType',
type: {
name: 'Composite',
className: 'SkuCapability'
}
}
}
},
costs: {
required: false,
readOnly: true,
serializedName: 'costs',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'SkuCostElementType',
type: {
name: 'Composite',
className: 'SkuCost'
}
}
}
},
restrictions: {
required: false,
readOnly: true,
serializedName: 'restrictions',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'SkuRestrictionsElementType',
type: {
name: 'Composite',
className: 'SkuRestrictions'
}
}
}
}
}
}
};
}
}

module.exports = CatalogSku;
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ const models = require('./index');
class CommitmentAssociation extends models['Resource'] {
/**
* Create a CommitmentAssociation.
* @member {string} [etag] An entity tag used to enforce optimistic
* @property {string} [etag] An entity tag used to enforce optimistic
* concurrency.
* @member {object} [properties] The properties of the commitment association
* resource.
* @member {string} [properties.associatedResourceId] The ID of the resource
* this association points to, such as the ARM ID of an Azure ML web service.
* @member {string} [properties.commitmentPlanId] The ARM ID of the parent
* @property {object} [properties] The properties of the commitment
* association resource.
* @property {string} [properties.associatedResourceId] The ID of the
* resource this association points to, such as the ARM ID of an Azure ML web
* service.
* @property {string} [properties.commitmentPlanId] The ARM ID of the parent
* Azure ML commitment plan.
* @member {date} [properties.creationDate] The date at which this commitment
* association was created, in ISO 8601 format.
* @property {date} [properties.creationDate] The date at which this
* commitment association was created, in ISO 8601 format.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class CommitmentAssociationListResult extends Array {
/**
* Create a CommitmentAssociationListResult.
* @member {string} [nextLink] A URI to retrieve the next page of results.
* @property {string} [nextLink] A URI to retrieve the next page of results.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
class CommitmentAssociationProperties {
/**
* Create a CommitmentAssociationProperties.
* @member {string} [associatedResourceId] The ID of the resource this
* @property {string} [associatedResourceId] The ID of the resource this
* association points to, such as the ARM ID of an Azure ML web service.
* @member {string} [commitmentPlanId] The ARM ID of the parent Azure ML
* @property {string} [commitmentPlanId] The ARM ID of the parent Azure ML
* commitment plan.
* @member {date} [creationDate] The date at which this commitment
* @property {date} [creationDate] The date at which this commitment
* association was created, in ISO 8601 format.
*/
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,37 @@ const models = require('./index');
class CommitmentPlan extends models['Resource'] {
/**
* Create a CommitmentPlan.
* @member {string} [etag] An entity tag used to enforce optimistic
* @property {string} [etag] An entity tag used to enforce optimistic
* concurrency.
* @member {object} [properties] The commitment plan properties.
* @member {boolean} [properties.chargeForOverage] Indicates whether usage
* @property {object} [properties] The commitment plan properties.
* @property {boolean} [properties.chargeForOverage] Indicates whether usage
* beyond the commitment plan's included quantities will be charged.
* @member {boolean} [properties.chargeForPlan] Indicates whether the
* @property {boolean} [properties.chargeForPlan] Indicates whether the
* commitment plan will incur a charge.
* @member {date} [properties.creationDate] The date at which this commitment
* plan was created, in ISO 8601 format.
* @member {object} [properties.includedQuantities] The included resource
* @property {date} [properties.creationDate] The date at which this
* commitment plan was created, in ISO 8601 format.
* @property {object} [properties.includedQuantities] The included resource
* quantities this plan gives you.
* @member {number} [properties.maxAssociationLimit] The maximum number of
* @property {number} [properties.maxAssociationLimit] The maximum number of
* commitment associations that can be children of this commitment plan.
* @member {number} [properties.maxCapacityLimit] The maximum scale-out
* @property {number} [properties.maxCapacityLimit] The maximum scale-out
* capacity for this commitment plan.
* @member {number} [properties.minCapacityLimit] The minimum scale-out
* @property {number} [properties.minCapacityLimit] The minimum scale-out
* capacity for this commitment plan.
* @member {string} [properties.planMeter] The Azure meter which will be used
* to charge for this commitment plan.
* @member {number} [properties.refillFrequencyInDays] The frequency at which
* this commitment plan's included quantities are refilled.
* @member {boolean} [properties.suspendPlanOnOverage] Indicates whether this
* commitment plan will be moved into a suspended state if usage goes beyond
* the commitment plan's included quantities.
* @member {object} [sku] The commitment plan SKU.
* @member {number} [sku.capacity] The scale-out capacity of the resource. 1
* is 1x, 2 is 2x, etc. This impacts the quantities and cost of any
* @property {string} [properties.planMeter] The Azure meter which will be
* used to charge for this commitment plan.
* @property {number} [properties.refillFrequencyInDays] The frequency at
* which this commitment plan's included quantities are refilled.
* @property {boolean} [properties.suspendPlanOnOverage] Indicates whether
* this commitment plan will be moved into a suspended state if usage goes
* beyond the commitment plan's included quantities.
* @property {object} [sku] The commitment plan SKU.
* @property {number} [sku.capacity] The scale-out capacity of the resource.
* 1 is 1x, 2 is 2x, etc. This impacts the quantities and cost of any
* commitment plan resource.
* @member {string} [sku.name] The SKU name. Along with tier, uniquely
* @property {string} [sku.name] The SKU name. Along with tier, uniquely
* identifies the SKU.
* @member {string} [sku.tier] The SKU tier. Along with name, uniquely
* @property {string} [sku.tier] The SKU tier. Along with name, uniquely
* identifies the SKU.
*/
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class CommitmentPlanListResult extends Array {
/**
* Create a CommitmentPlanListResult.
* @member {string} [nextLink] A URI to retrieve the next page of results.
* @property {string} [nextLink] A URI to retrieve the next page of results.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,21 @@

'use strict';

const models = require('./index');

/**
* The properties of a commitment plan which may be updated via PATCH.
*
*/
class CommitmentPlanPatchPayload {
/**
* Create a CommitmentPlanPatchPayload.
* @member {object} [tags] User-defined tags for the commitment plan.
* @member {object} [sku] The commitment plan SKU.
* @member {number} [sku.capacity] The scale-out capacity of the resource. 1
* is 1x, 2 is 2x, etc. This impacts the quantities and cost of any
* @property {object} [tags] User-defined tags for the commitment plan.
* @property {object} [sku] The commitment plan SKU.
* @property {number} [sku.capacity] The scale-out capacity of the resource.
* 1 is 1x, 2 is 2x, etc. This impacts the quantities and cost of any
* commitment plan resource.
* @member {string} [sku.name] The SKU name. Along with tier, uniquely
* @property {string} [sku.name] The SKU name. Along with tier, uniquely
* identifies the SKU.
* @member {string} [sku.tier] The SKU tier. Along with name, uniquely
* @property {string} [sku.tier] The SKU tier. Along with name, uniquely
* identifies the SKU.
*/
constructor() {
Expand Down
Loading