UNPKG

ibmcloud-security-advisor-findings

Version:

JavaScript client library for the IBM Cloud Security Advisor Findings API

86 lines (71 loc) 2.45 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 BreakdownCardElement model module. * @module model/BreakdownCardElement */ /** * Constructs a new <code>BreakdownCardElement</code>. * A card element with a breakdown of values * @alias module:model/BreakdownCardElement * @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>BreakdownCardElement</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/BreakdownCardElement} obj Optional instance to populate. * @return {module:model/BreakdownCardElement} The populated <code>BreakdownCardElement</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('direction')) { obj['direction'] = ApiClient.convertToType(data['direction'], '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 direction of this breakdown card element * @member {String} direction */ exports.prototype['direction'] = undefined; /** * the value types associated to this card element * @member {Array.<module:model/NumericCardElementValueType>} value_types */ exports.prototype['value_types'] = undefined; module.exports = exports;