UNPKG

cloudmersive-virus-api-client

Version:

The_Cloudmersive_Virus_Scan_API_lets_you_scan_files_and_content_for_viruses_and_identify_security_issues_with_content_

143 lines (122 loc) 4.33 kB
/** * 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/VirusFound'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./VirusFound')); } else { // Browser globals (root is window) if (!root.CloudmersiveVirusApiClient) { root.CloudmersiveVirusApiClient = {}; } root.CloudmersiveVirusApiClient.WebsiteScanResult = factory(root.CloudmersiveVirusApiClient.ApiClient, root.CloudmersiveVirusApiClient.VirusFound); } }(this, function(ApiClient, VirusFound) { 'use strict'; /** * The WebsiteScanResult model module. * @module model/WebsiteScanResult * @version 1.3.0 */ /** * Constructs a new <code>WebsiteScanResult</code>. * Result of running a website scan * @alias module:model/WebsiteScanResult * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>WebsiteScanResult</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/WebsiteScanResult} obj Optional instance to populate. * @return {module:model/WebsiteScanResult} The populated <code>WebsiteScanResult</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('CleanResult')) { obj['CleanResult'] = ApiClient.convertToType(data['CleanResult'], 'Boolean'); } if (data.hasOwnProperty('WebsiteThreatType')) { obj['WebsiteThreatType'] = ApiClient.convertToType(data['WebsiteThreatType'], 'String'); } if (data.hasOwnProperty('FoundViruses')) { obj['FoundViruses'] = ApiClient.convertToType(data['FoundViruses'], [VirusFound]); } if (data.hasOwnProperty('WebsiteHttpResponseCode')) { obj['WebsiteHttpResponseCode'] = ApiClient.convertToType(data['WebsiteHttpResponseCode'], 'Number'); } } return obj; } /** * True if the scan contained no threats, false otherwise * @member {Boolean} CleanResult */ exports.prototype['CleanResult'] = undefined; /** * Type of threat returned; can be None, Malware, ForcedDownload or Phishing * @member {module:model/WebsiteScanResult.WebsiteThreatTypeEnum} WebsiteThreatType */ exports.prototype['WebsiteThreatType'] = undefined; /** * Array of viruses found, if any * @member {Array.<module:model/VirusFound>} FoundViruses */ exports.prototype['FoundViruses'] = undefined; /** * The remote server URL HTTP reasponse code; useful for debugging issues with scanning; typically if the remote server returns a 200 or 300-series code this means a successful response, while a 400 or 500 series code would represent an error returned from the remote server for the provided URL. * @member {Number} WebsiteHttpResponseCode */ exports.prototype['WebsiteHttpResponseCode'] = undefined; /** * Allowed values for the <code>WebsiteThreatType</code> property. * @enum {String} * @readonly */ exports.WebsiteThreatTypeEnum = { /** * value: "None" * @const */ "None": "None", /** * value: "Malware" * @const */ "Malware": "Malware", /** * value: "Phishing" * @const */ "Phishing": "Phishing", /** * value: "ForcedDownload" * @const */ "ForcedDownload": "ForcedDownload", /** * value: "UnableToConnect" * @const */ "UnableToConnect": "UnableToConnect" }; return exports; }));