ibmcloud-security-advisor-findings
Version:
JavaScript client library for the IBM Cloud Security Advisor Findings API
97 lines (82 loc) • 2.74 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');
var InlineResponse200FindingNextSteps = require('./InlineResponse200FindingNextSteps');
/**
* The InlineResponse200Finding model module.
* @module model/InlineResponse200Finding
*/
/**
* Constructs a new <code>InlineResponse200Finding</code>.
* FindingType provides details about a finding note.
* @alias module:model/InlineResponse200Finding
* @class
* @param severity {module:model/InlineResponse200Finding.SeverityEnum} Note provider-assigned severity/impact ranking - LOW: Low Impact - MEDIUM: Medium Impact - HIGH: High Impact
*/
var exports = function(severity) {
var _this = this;
_this['severity'] = severity;
};
/**
* Constructs a <code>InlineResponse200Finding</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/InlineResponse200Finding} obj Optional instance to populate.
* @return {module:model/InlineResponse200Finding} The populated <code>InlineResponse200Finding</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('severity')) {
obj['severity'] = ApiClient.convertToType(data['severity'], 'String');
}
if (data.hasOwnProperty('next_steps')) {
obj['next_steps'] = ApiClient.convertToType(data['next_steps'], [InlineResponse200FindingNextSteps]);
}
}
return obj;
}
/**
* Note provider-assigned severity/impact ranking - LOW: Low Impact - MEDIUM: Medium Impact - HIGH: High Impact
* @member {module:model/InlineResponse200Finding.SeverityEnum} severity
*/
exports.prototype['severity'] = undefined;
/**
* Common remediation steps for the finding of this type
* @member {Array.<module:model/InlineResponse200FindingNextSteps>} next_steps
*/
exports.prototype['next_steps'] = undefined;
/**
* Allowed values for the <code>severity</code> property.
* @enum {String}
* @readonly
*/
exports.SeverityEnum = {
/**
* value: "LOW"
* @const
*/
"LOW": "LOW",
/**
* value: "MEDIUM"
* @const
*/
"MEDIUM": "MEDIUM",
/**
* value: "HIGH"
* @const
*/
"HIGH": "HIGH" };
module.exports = exports;