ibmcloud-security-advisor-findings
Version:
JavaScript client library for the IBM Cloud Security Advisor Findings API
93 lines (79 loc) • 2.39 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 ValueType model module.
* @module model/ValueType
*/
/**
* Constructs a new <code>ValueType</code>.
* the value type of a card element
* @alias module:model/ValueType
* @class
* @param kind {module:model/ValueType.KindEnum} Kind of element - KPI: Kind of value derived from a KPI occurrence - FINDING_COUNT: Kind of value derived from a count of finding occurrences
* @param text {String} The text of this element type
*/
var exports = function(kind, text) {
var _this = this;
_this['kind'] = kind;
_this['text'] = text;
};
/**
* Constructs a <code>ValueType</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/ValueType} obj Optional instance to populate.
* @return {module:model/ValueType} The populated <code>ValueType</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('kind')) {
obj['kind'] = ApiClient.convertToType(data['kind'], 'String');
}
if (data.hasOwnProperty('text')) {
obj['text'] = ApiClient.convertToType(data['text'], 'String');
}
}
return obj;
}
/**
* Kind of element - KPI: Kind of value derived from a KPI occurrence - FINDING_COUNT: Kind of value derived from a count of finding occurrences
* @member {module:model/ValueType.KindEnum} kind
*/
exports.prototype['kind'] = undefined;
/**
* The text of this element type
* @member {String} text
* @default ''
*/
exports.prototype['text'] = '';
/**
* Allowed values for the <code>kind</code> property.
* @enum {String}
* @readonly
*/
exports.KindEnum = {
/**
* value: "KPI"
* @const
*/
"KPI": "KPI",
/**
* value: "FINDING"
* @const
*/
"FINDING": "FINDING" };
module.exports = exports;