UNPKG

azure-arm-insights

Version:

Microsoft Azure Insights Management Client Library for node

173 lines (167 loc) 4.59 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'; const models = require('./index'); /** * @class * Initializes a new instance of the AlertRuleResource class. * @constructor * The alert rule resource. * * @member {string} alertRuleResourceName the name of the alert rule. * * @member {string} [description] the description of the alert rule that will * be included in the alert email. * * @member {boolean} isEnabled the flag that indicates whether the alert rule * is enabled. * * @member {object} [condition] the condition that results in the alert rule * being activated. * * @member {string} [condition.odatatype] Polymorphic Discriminator * * @member {array} [actions] the array of actions that are performed when the * alert rule becomes active, and when an alert condition is resolved. * * @member {date} [lastUpdatedTime] Last time the rule was updated in ISO8601 * format. * */ class AlertRuleResource extends models['Resource'] { constructor() { super(); } /** * Defines the metadata of AlertRuleResource * * @returns {object} metadata of AlertRuleResource * */ mapper() { return { required: false, serializedName: 'AlertRuleResource', type: { name: 'Composite', className: 'AlertRuleResource', 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' } } } }, alertRuleResourceName: { required: true, serializedName: 'properties.name', type: { name: 'String' } }, description: { required: false, serializedName: 'properties.description', type: { name: 'String' } }, isEnabled: { required: true, serializedName: 'properties.isEnabled', type: { name: 'Boolean' } }, condition: { required: false, serializedName: 'properties.condition', type: { name: 'Composite', polymorphicDiscriminator: { serializedName: 'odata.type', clientName: 'odatatype' }, uberParent: 'RuleCondition', className: 'RuleCondition' } }, actions: { required: false, serializedName: 'properties.actions', type: { name: 'Sequence', element: { required: false, serializedName: 'RuleActionElementType', type: { name: 'Composite', polymorphicDiscriminator: { serializedName: 'odata.type', clientName: 'odatatype' }, uberParent: 'RuleAction', className: 'RuleAction' } } } }, lastUpdatedTime: { required: false, readOnly: true, serializedName: 'properties.lastUpdatedTime', type: { name: 'DateTime' } } } } }; } } module.exports = AlertRuleResource;