UNPKG

azure-arm-insights

Version:

Microsoft Azure Insights Management Client Library for node

92 lines (87 loc) 2.44 kB
/* * 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'; /** * @class * Initializes a new instance of the ScaleAction class. * @constructor * The parameters for the scaling action. * * @member {string} direction the scale direction. Whether the scaling action * increases or decreases the number of instances. Possible values include: * 'None', 'Increase', 'Decrease' * * @member {string} type the type of action that should occur when the scale * rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', * 'ExactCount' * * @member {string} [value] the number of instances that are involved in the * scaling action. This value must be 1 or greater. The default value is 1. * Default value: '1' . * * @member {moment.duration} cooldown the amount of time to wait since the last * scaling action before this action occurs. It must be between 1 week and 1 * minute in ISO 8601 format. * */ class ScaleAction { constructor() { } /** * Defines the metadata of ScaleAction * * @returns {object} metadata of ScaleAction * */ mapper() { return { required: false, serializedName: 'ScaleAction', type: { name: 'Composite', className: 'ScaleAction', modelProperties: { direction: { required: true, serializedName: 'direction', type: { name: 'Enum', allowedValues: [ 'None', 'Increase', 'Decrease' ] } }, type: { required: true, serializedName: 'type', type: { name: 'Enum', allowedValues: [ 'ChangeCount', 'PercentChangeCount', 'ExactCount' ] } }, value: { required: false, serializedName: 'value', defaultValue: '1', type: { name: 'String' } }, cooldown: { required: true, serializedName: 'cooldown', type: { name: 'TimeSpan' } } } } }; } } module.exports = ScaleAction;