cloudmersive-virus-scan-api-client 1.3.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +10 -5
  4. data/cloudmersive-virus-scan-api-client.gemspec +3 -3
  5. data/docs/CloudStorageVirusFound.md +9 -0
  6. data/docs/CloudStorageVirusScanResult.md +12 -0
  7. data/docs/ScanApi.md +9 -5
  8. data/docs/ScanCloudStorageApi.md +197 -0
  9. data/docs/VirusScanAdvancedResult.md +2 -0
  10. data/lib/cloudmersive-virus-scan-api-client.rb +4 -1
  11. data/lib/cloudmersive-virus-scan-api-client/api/scan_api.rb +21 -18
  12. data/lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb +244 -0
  13. data/lib/cloudmersive-virus-scan-api-client/api_client.rb +11 -9
  14. data/lib/cloudmersive-virus-scan-api-client/api_error.rb +1 -1
  15. data/lib/cloudmersive-virus-scan-api-client/configuration.rb +2 -2
  16. data/lib/cloudmersive-virus-scan-api-client/models/cloud_storage_virus_found.rb +196 -0
  17. data/lib/cloudmersive-virus-scan-api-client/models/cloud_storage_virus_scan_result.rb +228 -0
  18. data/lib/cloudmersive-virus-scan-api-client/models/virus_found.rb +7 -10
  19. data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result.rb +28 -11
  20. data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_result.rb +7 -10
  21. data/lib/cloudmersive-virus-scan-api-client/models/website_scan_request.rb +7 -10
  22. data/lib/cloudmersive-virus-scan-api-client/models/website_scan_result.rb +10 -12
  23. data/lib/cloudmersive-virus-scan-api-client/version.rb +2 -2
  24. data/spec/api/scan_api_spec.rb +7 -5
  25. data/spec/api/scan_cloud_storage_api_spec.rb +79 -0
  26. data/spec/api_client_spec.rb +52 -35
  27. data/spec/configuration_spec.rb +9 -9
  28. data/spec/models/cloud_storage_virus_found_spec.rb +47 -0
  29. data/spec/models/cloud_storage_virus_scan_result_spec.rb +65 -0
  30. data/spec/models/virus_found_spec.rb +3 -4
  31. data/spec/models/virus_scan_advanced_result_spec.rb +20 -9
  32. data/spec/models/virus_scan_result_spec.rb +3 -4
  33. data/spec/models/website_scan_request_spec.rb +2 -3
  34. data/spec/models/website_scan_result_spec.rb +9 -10
  35. data/spec/spec_helper.rb +1 -1
  36. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca19a52c01c34e9068692a74aadeee38a482c37cadcdbad41086f9e79662a63f
4
- data.tar.gz: 50e1f95f4b735d6b16b4b5993dbb1f1af75c470e1b21b3ee92cdde35201ba8f9
3
+ metadata.gz: 1bede92a24ae5a20f600c48d6123e4b6ff9bf6f89d0d9213acece8b844bc1a64
4
+ data.tar.gz: bdd0be405c767fb4b1b88a89b90696630b2772d342dc22f68ee7b679c25d55c2
5
5
  SHA512:
6
- metadata.gz: db10eb7300cee67c48aae8b53518be1e5ce6e10254e27e9710c467c0b05a1b86bc181586e861d810f192a4197dc912995699989a9312975a795588921d382335
7
- data.tar.gz: 3d8a86a049b86d2805393bf4eaf0affcf856fac21a8f30aa997fd27636d31188b8cb51429959ce2b5bbc9ed14a9f5bcf34b22ec16ee6e7f698409e34bb17b975
6
+ metadata.gz: 107a9cf60694ab146600c8367e5433261d8a708a4dcfdb4fa8744ffbd93b6967e674a80733deec7cac68acd0e67215deaef44b1276abc67a907e16bc3128e662
7
+ data.tar.gz: 61946d727cf0263c934b75506bbc6e38d1b7f0ff572866d21e7c93f9c314b61aa521168eb030efc8190141aab51190365416123ccab781c1334eb9eeb74ff5ac
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rake', '~> 12.0.0'
6
+ gem 'rake', '~> 12.3.3'
7
7
  end
data/README.md CHANGED
@@ -7,7 +7,7 @@ The Cloudmersive Virus Scan API lets you scan files and content for viruses and
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 1.3.3
10
+ - Package version: 2.0.4
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-virus-scan-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-virus-scan-api-client-1.3.3.gem
26
+ gem install ./cloudmersive-virus-scan-api-client-2.0.4.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-1.3.3.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.0.4.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-virus-scan-api-client', '~> 1.3.3'
34
+ gem 'cloudmersive-virus-scan-api-client', '~> 2.0.4'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -64,7 +64,7 @@ end
64
64
 
65
65
  api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
66
66
 
67
- input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
67
+ input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
68
68
 
69
69
 
70
70
  begin
@@ -86,10 +86,15 @@ Class | Method | HTTP request | Description
86
86
  *CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file**](docs/ScanApi.md#scan_file) | **POST** /virus/scan/file | Scan a file for viruses
87
87
  *CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file_advanced**](docs/ScanApi.md#scan_file_advanced) | **POST** /virus/scan/file/advanced | Advanced Scan a file for viruses
88
88
  *CloudmersiveVirusScanApiClient::ScanApi* | [**scan_website**](docs/ScanApi.md#scan_website) | **POST** /virus/scan/website | Scan a website for malicious content and threats
89
+ *CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_aws_s3_file**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_aws_s3_file) | **POST** /virus/scan/cloud-storage/aws-s3/single | Scan an AWS S3 file for viruses
90
+ *CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_azure_blob**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_azure_blob) | **POST** /virus/scan/cloud-storage/azure-blob/single | Scan an Azure Blob for viruses
91
+ *CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_gcp_storage_file**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_gcp_storage_file) | **POST** /virus/scan/cloud-storage/gcp-storage/single | Scan an Google Cloud Platform (GCP) Storage file for viruses
89
92
 
90
93
 
91
94
  ## Documentation for Models
92
95
 
96
+ - [CloudmersiveVirusScanApiClient::CloudStorageVirusFound](docs/CloudStorageVirusFound.md)
97
+ - [CloudmersiveVirusScanApiClient::CloudStorageVirusScanResult](docs/CloudStorageVirusScanResult.md)
93
98
  - [CloudmersiveVirusScanApiClient::VirusFound](docs/VirusFound.md)
94
99
  - [CloudmersiveVirusScanApiClient::VirusScanAdvancedResult](docs/VirusScanAdvancedResult.md)
95
100
  - [CloudmersiveVirusScanApiClient::VirusScanResult](docs/VirusScanResult.md)
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- #
2
+
3
3
  =begin
4
4
  #virusapi
5
5
 
@@ -8,7 +8,7 @@
8
8
  OpenAPI spec version: v1
9
9
 
10
10
  Generated by: https://github.com/swagger-api/swagger-codegen.git
11
- Swagger Codegen version: 2.3.1
11
+ Swagger Codegen version: 2.4.14
12
12
 
13
13
  =end
14
14
 
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.homepage = "https://www.cloudmersive.com/virus-api"
25
25
  s.summary = "Scan files and content for viruses."
26
26
  s.description = "Virus API lets you scan files and content for viruses and identify security issues with content."
27
- s.license = "Apache 2.0"
27
+ s.license = 'Apache 2.0'
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
30
30
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
@@ -0,0 +1,9 @@
1
+ # CloudmersiveVirusScanApiClient::CloudStorageVirusFound
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **file_name** | **String** | Name of the file containing the virus | [optional]
7
+ **virus_name** | **String** | Name of the virus that was found | [optional]
8
+
9
+
@@ -0,0 +1,12 @@
1
+ # CloudmersiveVirusScanApiClient::CloudStorageVirusScanResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | 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. | [optional]
7
+ **clean_result** | **BOOLEAN** | True if the scan contained no viruses, false otherwise | [optional]
8
+ **found_viruses** | [**Array<CloudStorageVirusFound>**](CloudStorageVirusFound.md) | Array of viruses found, if any | [optional]
9
+ **error_detailed_description** | **String** | Detailed error message if the operation was not successful | [optional]
10
+ **file_size** | **Integer** | Size in bytes of the file that was retrieved and scanned | [optional]
11
+
12
+
data/docs/ScanApi.md CHANGED
@@ -30,7 +30,7 @@ end
30
30
 
31
31
  api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
32
32
 
33
- input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
33
+ input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
34
34
 
35
35
 
36
36
  begin
@@ -84,13 +84,15 @@ end
84
84
 
85
85
  api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
86
86
 
87
- input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
87
+ input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
88
88
 
89
89
  opts = {
90
90
  allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
91
91
  allow_invalid_files: true, # BOOLEAN | 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).
92
- allow_scripts: true, # BOOLEAN | Set to false to block script files, such as a PHP files, Pythong 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).
93
- restrict_file_types: "restrict_file_types_example" # String | 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=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
92
+ allow_scripts: true, # BOOLEAN | 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).
93
+ allow_password_protected_files: true, # BOOLEAN | 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).
94
+ allow_macros: true, # BOOLEAN | 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).
95
+ restrict_file_types: 'restrict_file_types_example' # String | 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=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
94
96
  }
95
97
 
96
98
  begin
@@ -109,7 +111,9 @@ Name | Type | Description | Notes
109
111
  **input_file** | **File**| Input file to perform the operation on. |
110
112
  **allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
111
113
  **allow_invalid_files** | **BOOLEAN**| 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). | [optional]
112
- **allow_scripts** | **BOOLEAN**| Set to false to block script files, such as a PHP files, Pythong 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). | [optional]
114
+ **allow_scripts** | **BOOLEAN**| 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). | [optional]
115
+ **allow_password_protected_files** | **BOOLEAN**| 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). | [optional]
116
+ **allow_macros** | **BOOLEAN**| 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). | [optional]
113
117
  **restrict_file_types** | **String**| 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=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled. | [optional]
114
118
 
115
119
  ### Return type
@@ -0,0 +1,197 @@
1
+ # CloudmersiveVirusScanApiClient::ScanCloudStorageApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**scan_cloud_storage_scan_aws_s3_file**](ScanCloudStorageApi.md#scan_cloud_storage_scan_aws_s3_file) | **POST** /virus/scan/cloud-storage/aws-s3/single | Scan an AWS S3 file for viruses
8
+ [**scan_cloud_storage_scan_azure_blob**](ScanCloudStorageApi.md#scan_cloud_storage_scan_azure_blob) | **POST** /virus/scan/cloud-storage/azure-blob/single | Scan an Azure Blob for viruses
9
+ [**scan_cloud_storage_scan_gcp_storage_file**](ScanCloudStorageApi.md#scan_cloud_storage_scan_gcp_storage_file) | **POST** /virus/scan/cloud-storage/gcp-storage/single | Scan an Google Cloud Platform (GCP) Storage file for viruses
10
+
11
+
12
+ # **scan_cloud_storage_scan_aws_s3_file**
13
+ > CloudStorageVirusScanResult scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name)
14
+
15
+ Scan an AWS S3 file for viruses
16
+
17
+ Scan the contents of a single AWS S3 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.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'cloudmersive-virus-scan-api-client'
23
+ # setup authorization
24
+ CloudmersiveVirusScanApiClient.configure do |config|
25
+ # Configure API key authorization: Apikey
26
+ config.api_key['Apikey'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Apikey'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
32
+
33
+ access_key = 'access_key_example' # String | AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console
34
+
35
+ secret_key = 'secret_key_example' # String | AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console
36
+
37
+ bucket_region = 'bucket_region_example' # String | Name of the region of the S3 bucket, such as 'US-East-1'
38
+
39
+ bucket_name = 'bucket_name_example' # String | Name of the S3 bucket
40
+
41
+ key_name = 'key_name_example' # String | Key name (also called file name) of the file in S3 that you wish to scan for viruses
42
+
43
+
44
+ begin
45
+ #Scan an AWS S3 file for viruses
46
+ result = api_instance.scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name)
47
+ p result
48
+ rescue CloudmersiveVirusScanApiClient::ApiError => e
49
+ puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_aws_s3_file: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ Name | Type | Description | Notes
56
+ ------------- | ------------- | ------------- | -------------
57
+ **access_key** | **String**| AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console |
58
+ **secret_key** | **String**| AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console |
59
+ **bucket_region** | **String**| Name of the region of the S3 bucket, such as 'US-East-1' |
60
+ **bucket_name** | **String**| Name of the S3 bucket |
61
+ **key_name** | **String**| Key name (also called file name) of the file in S3 that you wish to scan for viruses |
62
+
63
+ ### Return type
64
+
65
+ [**CloudStorageVirusScanResult**](CloudStorageVirusScanResult.md)
66
+
67
+ ### Authorization
68
+
69
+ [Apikey](../README.md#Apikey)
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: multipart/form-data
74
+ - **Accept**: application/json, text/json, application/xml, text/xml
75
+
76
+
77
+
78
+ # **scan_cloud_storage_scan_azure_blob**
79
+ > CloudStorageVirusScanResult scan_cloud_storage_scan_azure_blob(connection_string, container_name, blob_path)
80
+
81
+ Scan an Azure Blob for viruses
82
+
83
+ 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.
84
+
85
+ ### Example
86
+ ```ruby
87
+ # load the gem
88
+ require 'cloudmersive-virus-scan-api-client'
89
+ # setup authorization
90
+ CloudmersiveVirusScanApiClient.configure do |config|
91
+ # Configure API key authorization: Apikey
92
+ config.api_key['Apikey'] = 'YOUR API KEY'
93
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
94
+ #config.api_key_prefix['Apikey'] = 'Bearer'
95
+ end
96
+
97
+ api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
98
+
99
+ connection_string = 'connection_string_example' # 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.
100
+
101
+ container_name = 'container_name_example' # String | Name of the Blob container within the Azure Blob Storage account
102
+
103
+ blob_path = 'blob_path_example' # String | Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
104
+
105
+
106
+ begin
107
+ #Scan an Azure Blob for viruses
108
+ result = api_instance.scan_cloud_storage_scan_azure_blob(connection_string, container_name, blob_path)
109
+ p result
110
+ rescue CloudmersiveVirusScanApiClient::ApiError => e
111
+ puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_azure_blob: #{e}"
112
+ end
113
+ ```
114
+
115
+ ### Parameters
116
+
117
+ Name | Type | Description | Notes
118
+ ------------- | ------------- | ------------- | -------------
119
+ **connection_string** | **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. |
120
+ **container_name** | **String**| Name of the Blob container within the Azure Blob Storage account |
121
+ **blob_path** | **String**| Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf' |
122
+
123
+ ### Return type
124
+
125
+ [**CloudStorageVirusScanResult**](CloudStorageVirusScanResult.md)
126
+
127
+ ### Authorization
128
+
129
+ [Apikey](../README.md#Apikey)
130
+
131
+ ### HTTP request headers
132
+
133
+ - **Content-Type**: multipart/form-data
134
+ - **Accept**: application/json, text/json, application/xml, text/xml
135
+
136
+
137
+
138
+ # **scan_cloud_storage_scan_gcp_storage_file**
139
+ > CloudStorageVirusScanResult scan_cloud_storage_scan_gcp_storage_file(bucket_name, object_name, json_credential_file)
140
+
141
+ Scan an Google Cloud Platform (GCP) Storage file for viruses
142
+
143
+ 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.
144
+
145
+ ### Example
146
+ ```ruby
147
+ # load the gem
148
+ require 'cloudmersive-virus-scan-api-client'
149
+ # setup authorization
150
+ CloudmersiveVirusScanApiClient.configure do |config|
151
+ # Configure API key authorization: Apikey
152
+ config.api_key['Apikey'] = 'YOUR API KEY'
153
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
154
+ #config.api_key_prefix['Apikey'] = 'Bearer'
155
+ end
156
+
157
+ api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
158
+
159
+ bucket_name = 'bucket_name_example' # String | Name of the bucket in Google Cloud Storage
160
+
161
+ object_name = 'object_name_example' # String | Name of the object or file in Google Cloud Storage
162
+
163
+ json_credential_file = File.new('/path/to/file.txt') # File | Service Account credential for Google Cloud stored in a JSON file.
164
+
165
+
166
+ begin
167
+ #Scan an Google Cloud Platform (GCP) Storage file for viruses
168
+ result = api_instance.scan_cloud_storage_scan_gcp_storage_file(bucket_name, object_name, json_credential_file)
169
+ p result
170
+ rescue CloudmersiveVirusScanApiClient::ApiError => e
171
+ puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_gcp_storage_file: #{e}"
172
+ end
173
+ ```
174
+
175
+ ### Parameters
176
+
177
+ Name | Type | Description | Notes
178
+ ------------- | ------------- | ------------- | -------------
179
+ **bucket_name** | **String**| Name of the bucket in Google Cloud Storage |
180
+ **object_name** | **String**| Name of the object or file in Google Cloud Storage |
181
+ **json_credential_file** | **File**| Service Account credential for Google Cloud stored in a JSON file. |
182
+
183
+ ### Return type
184
+
185
+ [**CloudStorageVirusScanResult**](CloudStorageVirusScanResult.md)
186
+
187
+ ### Authorization
188
+
189
+ [Apikey](../README.md#Apikey)
190
+
191
+ ### HTTP request headers
192
+
193
+ - **Content-Type**: multipart/form-data
194
+ - **Accept**: application/json, text/json, application/xml, text/xml
195
+
196
+
197
+
@@ -7,7 +7,9 @@ Name | Type | Description | Notes
7
7
  **contains_executable** | **BOOLEAN** | True if the scan contained an executable (application code), which can be a significant risk factor | [optional]
8
8
  **contains_invalid_file** | **BOOLEAN** | True if the scan contained an invalid file (such as a PDF that is not a valid PDF, Word Document that is not a valid Word Document, etc.), which can be a significant risk factor | [optional]
9
9
  **contains_script** | **BOOLEAN** | True if the scan contained a script (such as a PHP script, Python script, etc.) which can be a significant risk factor | [optional]
10
+ **contains_password_protected_file** | **BOOLEAN** | True if the scan contained a password protected or encrypted file, which can be a significant risk factor | [optional]
10
11
  **contains_restricted_file_format** | **BOOLEAN** | True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false | [optional]
12
+ **contains_macros** | **BOOLEAN** | True if the uploaded file contains embedded Macros of other embedded threats within the document, which can be a significant risk factor | [optional]
11
13
  **verified_file_format** | **String** | 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. | [optional]
12
14
  **found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
13
15
 
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -17,6 +17,8 @@ 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/cloud_storage_virus_found'
21
+ require 'cloudmersive-virus-scan-api-client/models/cloud_storage_virus_scan_result'
20
22
  require 'cloudmersive-virus-scan-api-client/models/virus_found'
21
23
  require 'cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result'
22
24
  require 'cloudmersive-virus-scan-api-client/models/virus_scan_result'
@@ -25,6 +27,7 @@ require 'cloudmersive-virus-scan-api-client/models/website_scan_result'
25
27
 
26
28
  # APIs
27
29
  require 'cloudmersive-virus-scan-api-client/api/scan_api'
30
+ require 'cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api'
28
31
 
29
32
  module CloudmersiveVirusScanApiClient
30
33
  class << self
@@ -6,11 +6,11 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module CloudmersiveVirusScanApiClient
16
16
  class ScanApi
@@ -19,7 +19,6 @@ module CloudmersiveVirusScanApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Scan a file for viruses
24
23
  # Scan files and 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.
25
24
  # @param input_file Input file to perform the operation on.
@@ -27,7 +26,7 @@ module CloudmersiveVirusScanApiClient
27
26
  # @return [VirusScanResult]
28
27
  def scan_file(input_file, opts = {})
29
28
  data, _status_code, _headers = scan_file_with_http_info(input_file, opts)
30
- return data
29
+ data
31
30
  end
32
31
 
33
32
  # Scan a file for viruses
@@ -37,14 +36,14 @@ module CloudmersiveVirusScanApiClient
37
36
  # @return [Array<(VirusScanResult, Fixnum, Hash)>] VirusScanResult data, response status code and response headers
38
37
  def scan_file_with_http_info(input_file, opts = {})
39
38
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: ScanApi.scan_file ..."
39
+ @api_client.config.logger.debug 'Calling API: ScanApi.scan_file ...'
41
40
  end
42
41
  # verify the required parameter 'input_file' is set
43
42
  if @api_client.config.client_side_validation && input_file.nil?
44
43
  fail ArgumentError, "Missing the required parameter 'input_file' when calling ScanApi.scan_file"
45
44
  end
46
45
  # resource path
47
- local_var_path = "/virus/scan/file"
46
+ local_var_path = '/virus/scan/file'
48
47
 
49
48
  # query parameters
50
49
  query_params = {}
@@ -58,7 +57,7 @@ module CloudmersiveVirusScanApiClient
58
57
 
59
58
  # form parameters
60
59
  form_params = {}
61
- form_params["inputFile"] = input_file
60
+ form_params['inputFile'] = input_file
62
61
 
63
62
  # http body (model)
64
63
  post_body = nil
@@ -75,19 +74,20 @@ module CloudmersiveVirusScanApiClient
75
74
  end
76
75
  return data, status_code, headers
77
76
  end
78
-
79
77
  # Advanced Scan a file for viruses
80
78
  # 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.
81
79
  # @param input_file Input file to perform the operation on.
82
80
  # @param [Hash] opts the optional parameters
83
81
  # @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).
84
82
  # @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).
85
- # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Pythong 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).
83
+ # @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).
84
+ # @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).
85
+ # @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).
86
86
  # @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.
87
87
  # @return [VirusScanAdvancedResult]
88
88
  def scan_file_advanced(input_file, opts = {})
89
89
  data, _status_code, _headers = scan_file_advanced_with_http_info(input_file, opts)
90
- return data
90
+ data
91
91
  end
92
92
 
93
93
  # Advanced Scan a file for viruses
@@ -96,19 +96,21 @@ module CloudmersiveVirusScanApiClient
96
96
  # @param [Hash] opts the optional parameters
97
97
  # @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).
98
98
  # @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).
99
- # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Pythong 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).
99
+ # @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).
100
+ # @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).
101
+ # @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).
100
102
  # @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.
101
103
  # @return [Array<(VirusScanAdvancedResult, Fixnum, Hash)>] VirusScanAdvancedResult data, response status code and response headers
102
104
  def scan_file_advanced_with_http_info(input_file, opts = {})
103
105
  if @api_client.config.debugging
104
- @api_client.config.logger.debug "Calling API: ScanApi.scan_file_advanced ..."
106
+ @api_client.config.logger.debug 'Calling API: ScanApi.scan_file_advanced ...'
105
107
  end
106
108
  # verify the required parameter 'input_file' is set
107
109
  if @api_client.config.client_side_validation && input_file.nil?
108
110
  fail ArgumentError, "Missing the required parameter 'input_file' when calling ScanApi.scan_file_advanced"
109
111
  end
110
112
  # resource path
111
- local_var_path = "/virus/scan/file/advanced"
113
+ local_var_path = '/virus/scan/file/advanced'
112
114
 
113
115
  # query parameters
114
116
  query_params = {}
@@ -122,11 +124,13 @@ module CloudmersiveVirusScanApiClient
122
124
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
123
125
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
124
126
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
127
+ header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
128
+ header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
125
129
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
126
130
 
127
131
  # form parameters
128
132
  form_params = {}
129
- form_params["inputFile"] = input_file
133
+ form_params['inputFile'] = input_file
130
134
 
131
135
  # http body (model)
132
136
  post_body = nil
@@ -143,7 +147,6 @@ module CloudmersiveVirusScanApiClient
143
147
  end
144
148
  return data, status_code, headers
145
149
  end
146
-
147
150
  # Scan a website for malicious content and threats
148
151
  # Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
149
152
  # @param input
@@ -151,7 +154,7 @@ module CloudmersiveVirusScanApiClient
151
154
  # @return [WebsiteScanResult]
152
155
  def scan_website(input, opts = {})
153
156
  data, _status_code, _headers = scan_website_with_http_info(input, opts)
154
- return data
157
+ data
155
158
  end
156
159
 
157
160
  # Scan a website for malicious content and threats
@@ -161,14 +164,14 @@ module CloudmersiveVirusScanApiClient
161
164
  # @return [Array<(WebsiteScanResult, Fixnum, Hash)>] WebsiteScanResult data, response status code and response headers
162
165
  def scan_website_with_http_info(input, opts = {})
163
166
  if @api_client.config.debugging
164
- @api_client.config.logger.debug "Calling API: ScanApi.scan_website ..."
167
+ @api_client.config.logger.debug 'Calling API: ScanApi.scan_website ...'
165
168
  end
166
169
  # verify the required parameter 'input' is set
167
170
  if @api_client.config.client_side_validation && input.nil?
168
171
  fail ArgumentError, "Missing the required parameter 'input' when calling ScanApi.scan_website"
169
172
  end
170
173
  # resource path
171
- local_var_path = "/virus/scan/website"
174
+ local_var_path = '/virus/scan/website'
172
175
 
173
176
  # query parameters
174
177
  query_params = {}