azure-arm-insights
Version:
Microsoft Azure Insights Management Client Library for node
163 lines (157 loc) • 4.36 kB
JavaScript
/*
* 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';
const models = require('./index');
/**
* @class
* Initializes a new instance of the AutoscaleSettingResource class.
* @constructor
* The autoscale setting resource.
*
* @member {array} profiles the collection of automatic scaling profiles that
* specify different scaling parameters for different time periods. A maximum
* of 20 profiles can be specified.
*
* @member {array} [notifications] the collection of notifications.
*
* @member {boolean} [enabled] the enabled flag. Specifies whether automatic
* scaling is enabled for the resource. The default value is 'true'. Default
* value: true .
*
* @member {string} autoscaleSettingResourceName the name of the autoscale
* setting.
*
* @member {string} [targetResourceUri] the resource identifier of the resource
* that the autoscale setting should be added to.
*
*/
class AutoscaleSettingResource extends models['Resource'] {
constructor() {
super();
}
/**
* Defines the metadata of AutoscaleSettingResource
*
* @returns {object} metadata of AutoscaleSettingResource
*
*/
mapper() {
return {
required: false,
serializedName: 'AutoscaleSettingResource',
type: {
name: 'Composite',
className: 'AutoscaleSettingResource',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
profiles: {
required: true,
serializedName: 'properties.profiles',
constraints: {
MaxItems: 20
},
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AutoscaleProfileElementType',
type: {
name: 'Composite',
className: 'AutoscaleProfile'
}
}
}
},
notifications: {
required: false,
serializedName: 'properties.notifications',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AutoscaleNotificationElementType',
type: {
name: 'Composite',
className: 'AutoscaleNotification'
}
}
}
},
enabled: {
required: false,
serializedName: 'properties.enabled',
defaultValue: true,
type: {
name: 'Boolean'
}
},
autoscaleSettingResourceName: {
required: true,
serializedName: 'properties.name',
type: {
name: 'String'
}
},
targetResourceUri: {
required: false,
serializedName: 'properties.targetResourceUri',
type: {
name: 'String'
}
}
}
}
};
}
}
module.exports = AutoscaleSettingResource;