UNPKG

ibmcloud-security-advisor-findings

Version:

JavaScript client library for the IBM Cloud Security Advisor Findings API

76 lines (62 loc) 2.04 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 NumericCardElement model module. * @module model/NumericCardElement */ /** * Constructs a new <code>NumericCardElement</code>. * A card element with a single numeric value * @alias module:model/NumericCardElement * @class * @param text {String} The text of this card element * @param valueType {module:model/NumericCardElementValueType} */ var exports = function(text, valueType) { var _this = this; _this['text'] = text; _this['value_type'] = valueType; }; /** * Constructs a <code>NumericCardElement</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/NumericCardElement} obj Optional instance to populate. * @return {module:model/NumericCardElement} The populated <code>NumericCardElement</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('value_type')) { obj['value_type'] = NumericCardElementValueType.constructFromObject(data['value_type']); } } return obj; } /** * The text of this card element * @member {String} text */ exports.prototype['text'] = undefined; /** * @member {module:model/NumericCardElementValueType} value_type */ exports.prototype['value_type'] = undefined; module.exports = exports;