ibmcloud-security-advisor-findings
Version:
JavaScript client library for the IBM Cloud Security Advisor Findings API
144 lines (125 loc) • 4.2 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 InlineResponse2001FindingDataTransferred = require('./InlineResponse2001FindingDataTransferred');
var InlineResponse2001FindingNetworkConnection = require('./InlineResponse2001FindingNetworkConnection');
var InlineResponse200FindingNextSteps = require('./InlineResponse200FindingNextSteps');
/**
* The InlineResponse2001Finding model module.
* @module model/InlineResponse2001Finding
*/
/**
* Constructs a new <code>InlineResponse2001Finding</code>.
* Finding provides details about a finding occurrence.
* @alias module:model/InlineResponse2001Finding
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>InlineResponse2001Finding</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/InlineResponse2001Finding} obj Optional instance to populate.
* @return {module:model/InlineResponse2001Finding} The populated <code>InlineResponse2001Finding</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('certainty')) {
obj['certainty'] = ApiClient.convertToType(data['certainty'], 'String');
}
if (data.hasOwnProperty('next_steps')) {
obj['next_steps'] = ApiClient.convertToType(data['next_steps'], [InlineResponse200FindingNextSteps]);
}
if (data.hasOwnProperty('network_connection')) {
obj['network_connection'] = InlineResponse2001FindingNetworkConnection.constructFromObject(data['network_connection']);
}
if (data.hasOwnProperty('data_transferred')) {
obj['data_transferred'] = InlineResponse2001FindingDataTransferred.constructFromObject(data['data_transferred']);
}
}
return obj;
}
/**
* Note provider-assigned severity/impact ranking - LOW: Low Impact - MEDIUM: Medium Impact - HIGH: High Impact
* @member {module:model/InlineResponse2001Finding.SeverityEnum} severity
*/
exports.prototype['severity'] = undefined;
/**
* Note provider-assigned confidence on the validity of an occurrence - LOW: Low Certainty - MEDIUM: Medium Certainty - HIGH: High Certainty
* @member {module:model/InlineResponse2001Finding.CertaintyEnum} certainty
*/
exports.prototype['certainty'] = undefined;
/**
* Remediation steps for the issues reported in this finding. They override the note's next steps.
* @member {Array.<module:model/InlineResponse200FindingNextSteps>} next_steps
*/
exports.prototype['next_steps'] = undefined;
/**
* @member {module:model/InlineResponse2001FindingNetworkConnection} network_connection
*/
exports.prototype['network_connection'] = undefined;
/**
* @member {module:model/InlineResponse2001FindingDataTransferred} data_transferred
*/
exports.prototype['data_transferred'] = 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" };
/**
* Allowed values for the <code>certainty</code> property.
* @enum {String}
* @readonly
*/
exports.CertaintyEnum = {
/**
* value: "LOW"
* @const
*/
"LOW": "LOW",
/**
* value: "MEDIUM"
* @const
*/
"MEDIUM": "MEDIUM",
/**
* value: "HIGH"
* @const
*/
"HIGH": "HIGH" };
module.exports = exports;