ibmcloud-security-advisor-findings
Version:
JavaScript client library for the IBM Cloud Security Advisor Findings API
91 lines (73 loc) • 2.49 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 InlineResponse2001FindingNetworkConnectionClient = require('./InlineResponse2001FindingNetworkConnectionClient');
/**
* The NetworkConnection model module.
* @module model/NetworkConnection
*/
/**
* Constructs a new <code>NetworkConnection</code>.
* It provides details about a network connection
* @alias module:model/NetworkConnection
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>NetworkConnection</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/NetworkConnection} obj Optional instance to populate.
* @return {module:model/NetworkConnection} The populated <code>NetworkConnection</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('direction')) {
obj['direction'] = ApiClient.convertToType(data['direction'], 'String');
}
if (data.hasOwnProperty('protocol')) {
obj['protocol'] = ApiClient.convertToType(data['protocol'], 'String');
}
if (data.hasOwnProperty('client')) {
obj['client'] = InlineResponse2001FindingNetworkConnectionClient.constructFromObject(data['client']);
}
if (data.hasOwnProperty('server')) {
obj['server'] = InlineResponse2001FindingNetworkConnectionClient.constructFromObject(data['server']);
}
}
return obj;
}
/**
* The direction of this network connection
* @member {String} direction
*/
exports.prototype['direction'] = undefined;
/**
* The protocol of this network connection
* @member {String} protocol
*/
exports.prototype['protocol'] = undefined;
/**
* @member {module:model/InlineResponse2001FindingNetworkConnectionClient} client
*/
exports.prototype['client'] = undefined;
/**
* @member {module:model/InlineResponse2001FindingNetworkConnectionClient} server
*/
exports.prototype['server'] = undefined;
module.exports = exports;