ibmcloud-security-advisor-findings
Version:
JavaScript client library for the IBM Cloud Security Advisor Findings API
75 lines (60 loc) • 1.69 kB
JavaScript
/**
* 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');
/**
* The Kpi model module.
* @module model/Kpi
*/
/**
* Constructs a new <code>Kpi</code>.
* Kpi provides details about a KPI occurrence.
* @alias module:model/Kpi
* @class
* @param value {Number} The value of this KPI
*/
var exports = function(value) {
var _this = this;
_this['value'] = value;
};
/**
* Constructs a <code>Kpi</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/Kpi} obj Optional instance to populate.
* @return {module:model/Kpi} The populated <code>Kpi</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('value')) {
obj['value'] = ApiClient.convertToType(data['value'], 'Number');
}
if (data.hasOwnProperty('total')) {
obj['total'] = ApiClient.convertToType(data['total'], 'Number');
}
}
return obj;
}
/**
* The value of this KPI
* @member {Number} value
*/
exports.prototype['value'] = undefined;
/**
* The total value of this KPI
* @member {Number} total
*/
exports.prototype['total'] = undefined;
module.exports = exports;