cloudmersive-virus-scan-api-client 2.0.7 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,206 @@
1
+ =begin
2
+ #virusapi
3
+
4
+ #The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveVirusScanApiClient
16
+ # Additional non-threat content verification information
17
+ class AdditionalAdvancedScanInformation
18
+ # True if the input file contains JSON data, false otherwise; this is not a threat signal
19
+ attr_accessor :contains_json
20
+
21
+ # True if the input file contains XML data, false otherwise; this is not a threat signal
22
+ attr_accessor :contains_xml
23
+
24
+ # True if the input file contains an image
25
+ attr_accessor :contains_image
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'contains_json' => :'ContainsJSON',
31
+ :'contains_xml' => :'ContainsXML',
32
+ :'contains_image' => :'ContainsImage'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.swagger_types
38
+ {
39
+ :'contains_json' => :'BOOLEAN',
40
+ :'contains_xml' => :'BOOLEAN',
41
+ :'contains_image' => :'BOOLEAN'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'ContainsJSON')
54
+ self.contains_json = attributes[:'ContainsJSON']
55
+ end
56
+
57
+ if attributes.has_key?(:'ContainsXML')
58
+ self.contains_xml = attributes[:'ContainsXML']
59
+ end
60
+
61
+ if attributes.has_key?(:'ContainsImage')
62
+ self.contains_image = attributes[:'ContainsImage']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ contains_json == o.contains_json &&
85
+ contains_xml == o.contains_xml &&
86
+ contains_image == o.contains_image
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Fixnum] Hash code
97
+ def hash
98
+ [contains_json, contains_xml, contains_image].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.swagger_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :BOOLEAN
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ temp_model = CloudmersiveVirusScanApiClient.const_get(type).new
159
+ temp_model.build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ next if value.nil?
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ # Outputs non-array value in the form of hash
188
+ # For object, use to_hash. Otherwise, just return the value
189
+ # @param [Object] value Any valid value
190
+ # @return [Hash] Returns the value in the form of hash
191
+ def _to_hash(value)
192
+ if value.is_a?(Array)
193
+ value.compact.map { |v| _to_hash(v) }
194
+ elsif value.is_a?(Hash)
195
+ {}.tap do |hash|
196
+ value.each { |k, v| hash[k] = _to_hash(v) }
197
+ end
198
+ elsif value.respond_to? :to_hash
199
+ value.to_hash
200
+ else
201
+ value
202
+ end
203
+ end
204
+
205
+ end
206
+ end
@@ -51,6 +51,9 @@ module CloudmersiveVirusScanApiClient
51
51
  # Size in bytes of the file that was retrieved and scanned
52
52
  attr_accessor :file_size
53
53
 
54
+ # Contains additional non-threat content verification information
55
+ attr_accessor :content_information
56
+
54
57
  # Attribute mapping from ruby-style variable name to JSON key.
55
58
  def self.attribute_map
56
59
  {
@@ -65,7 +68,8 @@ module CloudmersiveVirusScanApiClient
65
68
  :'verified_file_format' => :'VerifiedFileFormat',
66
69
  :'found_viruses' => :'FoundViruses',
67
70
  :'error_detailed_description' => :'ErrorDetailedDescription',
68
- :'file_size' => :'FileSize'
71
+ :'file_size' => :'FileSize',
72
+ :'content_information' => :'ContentInformation'
69
73
  }
70
74
  end
71
75
 
@@ -83,7 +87,8 @@ module CloudmersiveVirusScanApiClient
83
87
  :'verified_file_format' => :'String',
84
88
  :'found_viruses' => :'Array<CloudStorageVirusFound>',
85
89
  :'error_detailed_description' => :'String',
86
- :'file_size' => :'Integer'
90
+ :'file_size' => :'Integer',
91
+ :'content_information' => :'AdditionalAdvancedScanInformation'
87
92
  }
88
93
  end
89
94
 
@@ -144,6 +149,10 @@ module CloudmersiveVirusScanApiClient
144
149
  if attributes.has_key?(:'FileSize')
145
150
  self.file_size = attributes[:'FileSize']
146
151
  end
152
+
153
+ if attributes.has_key?(:'ContentInformation')
154
+ self.content_information = attributes[:'ContentInformation']
155
+ end
147
156
  end
148
157
 
149
158
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -175,7 +184,8 @@ module CloudmersiveVirusScanApiClient
175
184
  verified_file_format == o.verified_file_format &&
176
185
  found_viruses == o.found_viruses &&
177
186
  error_detailed_description == o.error_detailed_description &&
178
- file_size == o.file_size
187
+ file_size == o.file_size &&
188
+ content_information == o.content_information
179
189
  end
180
190
 
181
191
  # @see the `==` method
@@ -187,7 +197,7 @@ module CloudmersiveVirusScanApiClient
187
197
  # Calculates hash code according to all attributes.
188
198
  # @return [Fixnum] Hash code
189
199
  def hash
190
- [successful, clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, contains_macros, verified_file_format, found_viruses, error_detailed_description, file_size].hash
200
+ [successful, clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, contains_macros, verified_file_format, found_viruses, error_detailed_description, file_size, content_information].hash
191
201
  end
192
202
 
193
203
  # Builds the object from hash
@@ -30,6 +30,9 @@ module CloudmersiveVirusScanApiClient
30
30
  # Size in bytes of the file that was retrieved and scanned
31
31
  attr_accessor :file_size
32
32
 
33
+ # Set to true when using NSFW Content Moderation in the Cloudmersive Storage Protect product (disabled by default)
34
+ attr_accessor :contains_content_moderation_rejection
35
+
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
@@ -37,7 +40,8 @@ module CloudmersiveVirusScanApiClient
37
40
  :'clean_result' => :'CleanResult',
38
41
  :'found_viruses' => :'FoundViruses',
39
42
  :'error_detailed_description' => :'ErrorDetailedDescription',
40
- :'file_size' => :'FileSize'
43
+ :'file_size' => :'FileSize',
44
+ :'contains_content_moderation_rejection' => :'ContainsContentModerationRejection'
41
45
  }
42
46
  end
43
47
 
@@ -48,7 +52,8 @@ module CloudmersiveVirusScanApiClient
48
52
  :'clean_result' => :'BOOLEAN',
49
53
  :'found_viruses' => :'Array<CloudStorageVirusFound>',
50
54
  :'error_detailed_description' => :'String',
51
- :'file_size' => :'Integer'
55
+ :'file_size' => :'Integer',
56
+ :'contains_content_moderation_rejection' => :'BOOLEAN'
52
57
  }
53
58
  end
54
59
 
@@ -81,6 +86,10 @@ module CloudmersiveVirusScanApiClient
81
86
  if attributes.has_key?(:'FileSize')
82
87
  self.file_size = attributes[:'FileSize']
83
88
  end
89
+
90
+ if attributes.has_key?(:'ContainsContentModerationRejection')
91
+ self.contains_content_moderation_rejection = attributes[:'ContainsContentModerationRejection']
92
+ end
84
93
  end
85
94
 
86
95
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -105,7 +114,8 @@ module CloudmersiveVirusScanApiClient
105
114
  clean_result == o.clean_result &&
106
115
  found_viruses == o.found_viruses &&
107
116
  error_detailed_description == o.error_detailed_description &&
108
- file_size == o.file_size
117
+ file_size == o.file_size &&
118
+ contains_content_moderation_rejection == o.contains_content_moderation_rejection
109
119
  end
110
120
 
111
121
  # @see the `==` method
@@ -117,7 +127,7 @@ module CloudmersiveVirusScanApiClient
117
127
  # Calculates hash code according to all attributes.
118
128
  # @return [Fixnum] Hash code
119
129
  def hash
120
- [successful, clean_result, found_viruses, error_detailed_description, file_size].hash
130
+ [successful, clean_result, found_viruses, error_detailed_description, file_size, contains_content_moderation_rejection].hash
121
131
  end
122
132
 
123
133
  # Builds the object from hash
@@ -39,12 +39,21 @@ module CloudmersiveVirusScanApiClient
39
39
  # True if the uploaded file contains embedded XML External Entity threats of other embedded threats within the document, which can be a significant risk factor
40
40
  attr_accessor :contains_xml_external_entities
41
41
 
42
+ # True if the uploaded file contains embedded Insecure Deserialization threats of other embedded threats within the document, which can be a significant risk factor
43
+ attr_accessor :contains_insecure_deserialization
44
+
45
+ # True if the uploaded file contains HTML, which can be a significant risk factor
46
+ attr_accessor :contains_html
47
+
42
48
  # For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null.
43
49
  attr_accessor :verified_file_format
44
50
 
45
51
  # Array of viruses found, if any
46
52
  attr_accessor :found_viruses
47
53
 
54
+ # Contains additional non-threat content verification information
55
+ attr_accessor :content_information
56
+
48
57
  # Attribute mapping from ruby-style variable name to JSON key.
49
58
  def self.attribute_map
50
59
  {
@@ -56,8 +65,11 @@ module CloudmersiveVirusScanApiClient
56
65
  :'contains_restricted_file_format' => :'ContainsRestrictedFileFormat',
57
66
  :'contains_macros' => :'ContainsMacros',
58
67
  :'contains_xml_external_entities' => :'ContainsXmlExternalEntities',
68
+ :'contains_insecure_deserialization' => :'ContainsInsecureDeserialization',
69
+ :'contains_html' => :'ContainsHtml',
59
70
  :'verified_file_format' => :'VerifiedFileFormat',
60
- :'found_viruses' => :'FoundViruses'
71
+ :'found_viruses' => :'FoundViruses',
72
+ :'content_information' => :'ContentInformation'
61
73
  }
62
74
  end
63
75
 
@@ -72,8 +84,11 @@ module CloudmersiveVirusScanApiClient
72
84
  :'contains_restricted_file_format' => :'BOOLEAN',
73
85
  :'contains_macros' => :'BOOLEAN',
74
86
  :'contains_xml_external_entities' => :'BOOLEAN',
87
+ :'contains_insecure_deserialization' => :'BOOLEAN',
88
+ :'contains_html' => :'BOOLEAN',
75
89
  :'verified_file_format' => :'String',
76
- :'found_viruses' => :'Array<VirusFound>'
90
+ :'found_viruses' => :'Array<VirusFound>',
91
+ :'content_information' => :'AdditionalAdvancedScanInformation'
77
92
  }
78
93
  end
79
94
 
@@ -117,6 +132,14 @@ module CloudmersiveVirusScanApiClient
117
132
  self.contains_xml_external_entities = attributes[:'ContainsXmlExternalEntities']
118
133
  end
119
134
 
135
+ if attributes.has_key?(:'ContainsInsecureDeserialization')
136
+ self.contains_insecure_deserialization = attributes[:'ContainsInsecureDeserialization']
137
+ end
138
+
139
+ if attributes.has_key?(:'ContainsHtml')
140
+ self.contains_html = attributes[:'ContainsHtml']
141
+ end
142
+
120
143
  if attributes.has_key?(:'VerifiedFileFormat')
121
144
  self.verified_file_format = attributes[:'VerifiedFileFormat']
122
145
  end
@@ -126,6 +149,10 @@ module CloudmersiveVirusScanApiClient
126
149
  self.found_viruses = value
127
150
  end
128
151
  end
152
+
153
+ if attributes.has_key?(:'ContentInformation')
154
+ self.content_information = attributes[:'ContentInformation']
155
+ end
129
156
  end
130
157
 
131
158
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -154,8 +181,11 @@ module CloudmersiveVirusScanApiClient
154
181
  contains_restricted_file_format == o.contains_restricted_file_format &&
155
182
  contains_macros == o.contains_macros &&
156
183
  contains_xml_external_entities == o.contains_xml_external_entities &&
184
+ contains_insecure_deserialization == o.contains_insecure_deserialization &&
185
+ contains_html == o.contains_html &&
157
186
  verified_file_format == o.verified_file_format &&
158
- found_viruses == o.found_viruses
187
+ found_viruses == o.found_viruses &&
188
+ content_information == o.content_information
159
189
  end
160
190
 
161
191
  # @see the `==` method
@@ -167,7 +197,7 @@ module CloudmersiveVirusScanApiClient
167
197
  # Calculates hash code according to all attributes.
168
198
  # @return [Fixnum] Hash code
169
199
  def hash
170
- [clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, contains_macros, contains_xml_external_entities, verified_file_format, found_viruses].hash
200
+ [clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, contains_macros, contains_xml_external_entities, contains_insecure_deserialization, contains_html, verified_file_format, found_viruses, content_information].hash
171
201
  end
172
202
 
173
203
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveVirusScanApiClient
14
- VERSION = '2.0.7'
14
+ VERSION = '2.1.0'
15
15
  end
@@ -17,6 +17,7 @@ require 'cloudmersive-virus-scan-api-client/version'
17
17
  require 'cloudmersive-virus-scan-api-client/configuration'
18
18
 
19
19
  # Models
20
+ require 'cloudmersive-virus-scan-api-client/models/additional_advanced_scan_information'
20
21
  require 'cloudmersive-virus-scan-api-client/models/cloud_storage_advanced_virus_scan_result'
21
22
  require 'cloudmersive-virus-scan-api-client/models/cloud_storage_virus_found'
22
23
  require 'cloudmersive-virus-scan-api-client/models/cloud_storage_virus_scan_result'
@@ -46,7 +46,7 @@ describe 'ScanApi' do
46
46
 
47
47
  # unit tests for scan_file_advanced
48
48
  # Advanced Scan a file for viruses
49
- # Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
49
+ # Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash, MSG, and a wide range of image file formats. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
50
50
  # @param input_file Input file to perform the operation on.
51
51
  # @param [Hash] opts the optional parameters
52
52
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
@@ -55,6 +55,8 @@ describe 'ScanApi' do
55
55
  # @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
56
56
  # @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
57
57
  # @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
58
+ # @option opts [BOOLEAN] :allow_insecure_deserialization Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
59
+ # @option opts [BOOLEAN] :allow_html Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].
58
60
  # @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
59
61
  # @return [VirusScanAdvancedResult]
60
62
  describe 'scan_file_advanced test' do
@@ -39,7 +39,7 @@ describe 'ScanCloudStorageApi' do
39
39
  # @param secret_key AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console
40
40
  # @param bucket_region Name of the region of the S3 bucket, such as &#39;US-East-1&#39;
41
41
  # @param bucket_name Name of the S3 bucket
42
- # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses
42
+ # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
43
43
  # @param [Hash] opts the optional parameters
44
44
  # @return [CloudStorageVirusScanResult]
45
45
  describe 'scan_cloud_storage_scan_aws_s3_file test' do
@@ -55,7 +55,7 @@ describe 'ScanCloudStorageApi' do
55
55
  # @param secret_key AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console
56
56
  # @param bucket_region Name of the region of the S3 bucket, such as &#39;US-East-1&#39;
57
57
  # @param bucket_name Name of the S3 bucket
58
- # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses
58
+ # @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
59
59
  # @param [Hash] opts the optional parameters
60
60
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
61
61
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
@@ -76,7 +76,7 @@ describe 'ScanCloudStorageApi' do
76
76
  # Scan the contents of a single Azure Blob and its content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
77
77
  # @param connection_string Connection string for the Azure Blob Storage Account; you can get this connection string from the Access Keys tab of the Storage Account blade in the Azure Portal.
78
78
  # @param container_name Name of the Blob container within the Azure Blob Storage account
79
- # @param blob_path Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;
79
+ # @param blob_path Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the blob path contains Unicode characters, you must base64 encode the blob path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
80
80
  # @param [Hash] opts the optional parameters
81
81
  # @return [CloudStorageVirusScanResult]
82
82
  describe 'scan_cloud_storage_scan_azure_blob test' do
@@ -90,7 +90,7 @@ describe 'ScanCloudStorageApi' do
90
90
  # Advanced Scan the contents of a single Azure Blob and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
91
91
  # @param connection_string Connection string for the Azure Blob Storage Account; you can get this connection string from the Access Keys tab of the Storage Account blade in the Azure Portal.
92
92
  # @param container_name Name of the Blob container within the Azure Blob Storage account
93
- # @param blob_path Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;
93
+ # @param blob_path Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the blob path contains Unicode characters, you must base64 encode the blob path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
94
94
  # @param [Hash] opts the optional parameters
95
95
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
96
96
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
@@ -110,7 +110,7 @@ describe 'ScanCloudStorageApi' do
110
110
  # Scan an Google Cloud Platform (GCP) Storage file for viruses
111
111
  # Scan the contents of a single Google Cloud Platform (GCP) Storage file and its content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
112
112
  # @param bucket_name Name of the bucket in Google Cloud Storage
113
- # @param object_name Name of the object or file in Google Cloud Storage
113
+ # @param object_name Name of the object or file in Google Cloud Storage. If the object name contains Unicode characters, you must base64 encode the object name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
114
114
  # @param json_credential_file Service Account credential for Google Cloud stored in a JSON file.
115
115
  # @param [Hash] opts the optional parameters
116
116
  # @return [CloudStorageVirusScanResult]
@@ -124,7 +124,7 @@ describe 'ScanCloudStorageApi' do
124
124
  # Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
125
125
  # Advanced Scan the contents of a single Google Cloud Platform (GCP) Storage file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
126
126
  # @param bucket_name Name of the bucket in Google Cloud Storage
127
- # @param object_name Name of the object or file in Google Cloud Storage
127
+ # @param object_name Name of the object or file in Google Cloud Storage. If the object name contains Unicode characters, you must base64 encode the object name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
128
128
  # @param json_credential_file Service Account credential for Google Cloud stored in a JSON file.
129
129
  # @param [Hash] opts the optional parameters
130
130
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
@@ -148,9 +148,10 @@ describe 'ScanCloudStorageApi' do
148
148
  # @param client_secret Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal
149
149
  # @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
150
150
  # @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
151
- # @param file_path Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;
151
+ # @param file_path Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the file path contains Unicode characters, you must base64 encode the file path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
152
152
  # @param [Hash] opts the optional parameters
153
153
  # @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
154
+ # @option opts [String] :item_id SharePoint itemID, such as a DriveItem Id
154
155
  # @return [CloudStorageVirusScanResult]
155
156
  describe 'scan_cloud_storage_scan_share_point_online_file test' do
156
157
  it 'should work' do
@@ -165,9 +166,10 @@ describe 'ScanCloudStorageApi' do
165
166
  # @param client_secret Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal
166
167
  # @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
167
168
  # @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
168
- # @param file_path Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;
169
169
  # @param [Hash] opts the optional parameters
170
170
  # @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
171
+ # @option opts [String] :file_path Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the file path contains Unicode characters, you must base64 encode the file path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.
172
+ # @option opts [String] :item_id SharePoint itemID, such as a DriveItem Id
171
173
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
172
174
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
173
175
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #virusapi
3
+
4
+ #The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'AdditionalAdvancedScanInformation' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of AdditionalAdvancedScanInformation' do
31
+ it 'should create an instance of AdditionalAdvancedScanInformation' do
32
+ expect(@instance).to be_instance_of(CloudmersiveVirusScanApiClient::AdditionalAdvancedScanInformation)
33
+ end
34
+ end
35
+ describe 'test attribute "contains_json"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "contains_xml"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "contains_image"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -104,4 +104,10 @@ describe 'CloudStorageAdvancedVirusScanResult' do
104
104
  end
105
105
  end
106
106
 
107
+ describe 'test attribute "content_information"' do
108
+ it 'should work' do
109
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
110
+ end
111
+ end
112
+
107
113
  end
@@ -62,4 +62,10 @@ describe 'CloudStorageVirusScanResult' do
62
62
  end
63
63
  end
64
64
 
65
+ describe 'test attribute "contains_content_moderation_rejection"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
65
71
  end
@@ -80,6 +80,18 @@ describe 'VirusScanAdvancedResult' do
80
80
  end
81
81
  end
82
82
 
83
+ describe 'test attribute "contains_insecure_deserialization"' do
84
+ it 'should work' do
85
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ end
87
+ end
88
+
89
+ describe 'test attribute "contains_html"' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
83
95
  describe 'test attribute "verified_file_format"' do
84
96
  it 'should work' do
85
97
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -92,4 +104,10 @@ describe 'VirusScanAdvancedResult' do
92
104
  end
93
105
  end
94
106
 
107
+ describe 'test attribute "content_information"' do
108
+ it 'should work' do
109
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
110
+ end
111
+ end
112
+
95
113
  end