UNPKG

ibmcloud-security-advisor-findings

Version:

JavaScript client library for the IBM Cloud Security Advisor Findings API

87 lines (72 loc) 2.5 kB
/** * Findings API * The Findings API * * OpenAPI spec version: 1.0.0 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.7 * * Do not edit the class manually. * */ var ApiClient = require('../ApiClient'); var NumericCardElementValueType = require('./NumericCardElementValueType'); /** * The TimeSeriesCardElement model module. * @module model/TimeSeriesCardElement */ /** * Constructs a new <code>TimeSeriesCardElement</code>. * A card element with a time series chart * @alias module:model/TimeSeriesCardElement * @class * @param text {String} The text of this card element * @param valueTypes {Array.<module:model/NumericCardElementValueType>} the value types associated to this card element */ var exports = function(text, valueTypes) { var _this = this; _this['text'] = text; _this['value_types'] = valueTypes; }; /** * Constructs a <code>TimeSeriesCardElement</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/TimeSeriesCardElement} obj Optional instance to populate. * @return {module:model/TimeSeriesCardElement} The populated <code>TimeSeriesCardElement</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('text')) { obj['text'] = ApiClient.convertToType(data['text'], 'String'); } if (data.hasOwnProperty('default_interval')) { obj['default_interval'] = ApiClient.convertToType(data['default_interval'], 'String'); } if (data.hasOwnProperty('value_types')) { obj['value_types'] = ApiClient.convertToType(data['value_types'], [NumericCardElementValueType]); } } return obj; } /** * The text of this card element * @member {String} text */ exports.prototype['text'] = undefined; /** * The default interval of the time series * @member {String} default_interval * @default 'd' */ exports.prototype['default_interval'] = 'd'; /** * the value types associated to this card element * @member {Array.<module:model/NumericCardElementValueType>} value_types */ exports.prototype['value_types'] = undefined; module.exports = exports;