cloudmersive-virus-api-client
Version:
The_Cloudmersive_Virus_Scan_API_lets_you_scan_files_and_content_for_viruses_and_identify_security_issues_with_content_
129 lines (107 loc) • 4.64 kB
JavaScript
/**
* virusapi
* The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
*
* OpenAPI spec version: v1
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.1
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/CloudStorageVirusFound'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./CloudStorageVirusFound'));
} else {
// Browser globals (root is window)
if (!root.CloudmersiveVirusApiClient) {
root.CloudmersiveVirusApiClient = {};
}
root.CloudmersiveVirusApiClient.CloudStorageVirusScanResult = factory(root.CloudmersiveVirusApiClient.ApiClient, root.CloudmersiveVirusApiClient.CloudStorageVirusFound);
}
}(this, function(ApiClient, CloudStorageVirusFound) {
'use strict';
/**
* The CloudStorageVirusScanResult model module.
* @module model/CloudStorageVirusScanResult
* @version 1.3.0
*/
/**
* Constructs a new <code>CloudStorageVirusScanResult</code>.
* Result of running a virus scan on cloud storage
* @alias module:model/CloudStorageVirusScanResult
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>CloudStorageVirusScanResult</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/CloudStorageVirusScanResult} obj Optional instance to populate.
* @return {module:model/CloudStorageVirusScanResult} The populated <code>CloudStorageVirusScanResult</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('Successful')) {
obj['Successful'] = ApiClient.convertToType(data['Successful'], 'Boolean');
}
if (data.hasOwnProperty('CleanResult')) {
obj['CleanResult'] = ApiClient.convertToType(data['CleanResult'], 'Boolean');
}
if (data.hasOwnProperty('FoundViruses')) {
obj['FoundViruses'] = ApiClient.convertToType(data['FoundViruses'], [CloudStorageVirusFound]);
}
if (data.hasOwnProperty('ErrorDetailedDescription')) {
obj['ErrorDetailedDescription'] = ApiClient.convertToType(data['ErrorDetailedDescription'], 'String');
}
if (data.hasOwnProperty('FileSize')) {
obj['FileSize'] = ApiClient.convertToType(data['FileSize'], 'Number');
}
if (data.hasOwnProperty('ContainsContentModerationRejection')) {
obj['ContainsContentModerationRejection'] = ApiClient.convertToType(data['ContainsContentModerationRejection'], 'Boolean');
}
}
return obj;
}
/**
* True if the operation of retrieving the file, and scanning it were successfully completed, false if the file could not be downloaded from cloud storage, or if the file could not be scanned. Note that successful completion does not mean the file is clean; for the output of the virus scanning operation itself, use the CleanResult and FoundViruses parameters.
* @member {Boolean} Successful
*/
exports.prototype['Successful'] = undefined;
/**
* True if the scan contained no viruses, false otherwise
* @member {Boolean} CleanResult
*/
exports.prototype['CleanResult'] = undefined;
/**
* Array of viruses found, if any
* @member {Array.<module:model/CloudStorageVirusFound>} FoundViruses
*/
exports.prototype['FoundViruses'] = undefined;
/**
* Detailed error message if the operation was not successful
* @member {String} ErrorDetailedDescription
*/
exports.prototype['ErrorDetailedDescription'] = undefined;
/**
* Size in bytes of the file that was retrieved and scanned
* @member {Number} FileSize
*/
exports.prototype['FileSize'] = undefined;
/**
* Set to true when using NSFW Content Moderation in the Cloudmersive Storage Protect product (disabled by default)
* @member {Boolean} ContainsContentModerationRejection
*/
exports.prototype['ContainsContentModerationRejection'] = undefined;
return exports;
}));