cloudmersive-convert-api-client 2.1.4 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -4
  3. data/docs/EditDocumentApi.md +165 -0
  4. data/docs/EditHtmlApi.md +478 -0
  5. data/docs/EditPdfApi.md +6 -2
  6. data/docs/GetMacrosResponse.md +9 -0
  7. data/docs/HtmlGetLanguageResult.md +9 -0
  8. data/docs/HtmlGetLinksResponse.md +9 -0
  9. data/docs/HtmlGetRelCanonicalUrlResult.md +9 -0
  10. data/docs/HtmlGetSitemapUrlResult.md +9 -0
  11. data/docs/HtmlHyperlink.md +9 -0
  12. data/docs/HtmlSsrfThreatCheckResult.md +10 -0
  13. data/docs/HtmlThreatLink.md +9 -0
  14. data/docs/MergeDocumentApi.md +134 -0
  15. data/docs/ValidateDocumentApi.md +110 -0
  16. data/docs/XxeThreatDetectionResult.md +9 -0
  17. data/docs/ZipArchiveApi.md +62 -0
  18. data/lib/cloudmersive-convert-api-client.rb +9 -0
  19. data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +165 -0
  20. data/lib/cloudmersive-convert-api-client/api/edit_html_api.rb +447 -0
  21. data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +3 -0
  22. data/lib/cloudmersive-convert-api-client/api/merge_document_api.rb +148 -0
  23. data/lib/cloudmersive-convert-api-client/api/validate_document_api.rb +110 -0
  24. data/lib/cloudmersive-convert-api-client/api/zip_archive_api.rb +63 -0
  25. data/lib/cloudmersive-convert-api-client/models/get_macros_response.rb +196 -0
  26. data/lib/cloudmersive-convert-api-client/models/html_get_language_result.rb +196 -0
  27. data/lib/cloudmersive-convert-api-client/models/html_get_links_response.rb +198 -0
  28. data/lib/cloudmersive-convert-api-client/models/html_get_rel_canonical_url_result.rb +196 -0
  29. data/lib/cloudmersive-convert-api-client/models/html_get_sitemap_url_result.rb +196 -0
  30. data/lib/cloudmersive-convert-api-client/models/html_hyperlink.rb +196 -0
  31. data/lib/cloudmersive-convert-api-client/models/html_ssrf_threat_check_result.rb +208 -0
  32. data/lib/cloudmersive-convert-api-client/models/html_threat_link.rb +196 -0
  33. data/lib/cloudmersive-convert-api-client/models/xxe_threat_detection_result.rb +196 -0
  34. data/lib/cloudmersive-convert-api-client/version.rb +1 -1
  35. data/spec/api/edit_document_api_spec.rb +36 -0
  36. data/spec/api/edit_html_api_spec.rb +109 -0
  37. data/spec/api/edit_pdf_api_spec.rb +1 -0
  38. data/spec/api/merge_document_api_spec.rb +34 -0
  39. data/spec/api/validate_document_api_spec.rb +24 -0
  40. data/spec/api/zip_archive_api_spec.rb +14 -0
  41. data/spec/models/get_macros_response_spec.rb +47 -0
  42. data/spec/models/html_get_language_result_spec.rb +47 -0
  43. data/spec/models/html_get_links_response_spec.rb +47 -0
  44. data/spec/models/html_get_rel_canonical_url_result_spec.rb +47 -0
  45. data/spec/models/html_get_sitemap_url_result_spec.rb +47 -0
  46. data/spec/models/html_hyperlink_spec.rb +47 -0
  47. data/spec/models/html_ssrf_threat_check_result_spec.rb +53 -0
  48. data/spec/models/html_threat_link_spec.rb +47 -0
  49. data/spec/models/xxe_threat_detection_result_spec.rb +47 -0
  50. metadata +29 -2
@@ -746,6 +746,7 @@ module CloudmersiveConvertApiClient
746
746
  # Reduces the file size and optimizes the content of a PDF to minimize its file size.
747
747
  # @param input_file Input file to perform the operation on.
748
748
  # @param [Hash] opts the optional parameters
749
+ # @option opts [Float] :quality Quality level for the images in the PDF, ranging from 0.0 (low quality) to 1.0 (high quality); default is 0.3
749
750
  # @return [String]
750
751
  def edit_pdf_reduce_file_size(input_file, opts = {})
751
752
  data, _status_code, _headers = edit_pdf_reduce_file_size_with_http_info(input_file, opts)
@@ -756,6 +757,7 @@ module CloudmersiveConvertApiClient
756
757
  # Reduces the file size and optimizes the content of a PDF to minimize its file size.
757
758
  # @param input_file Input file to perform the operation on.
758
759
  # @param [Hash] opts the optional parameters
760
+ # @option opts [Float] :quality Quality level for the images in the PDF, ranging from 0.0 (low quality) to 1.0 (high quality); default is 0.3
759
761
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
760
762
  def edit_pdf_reduce_file_size_with_http_info(input_file, opts = {})
761
763
  if @api_client.config.debugging
@@ -777,6 +779,7 @@ module CloudmersiveConvertApiClient
777
779
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
778
780
  # HTTP header 'Content-Type'
779
781
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
782
+ header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
780
783
 
781
784
  # form parameters
782
785
  form_params = {}
@@ -167,6 +167,154 @@ module CloudmersiveConvertApiClient
167
167
  end
168
168
  return data, status_code, headers
169
169
  end
170
+ # Merge Two HTML (HTM) Files Together
171
+ # Combine two HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document.
172
+ # @param input_file1 First input file to perform the operation on.
173
+ # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
174
+ # @param [Hash] opts the optional parameters
175
+ # @return [String]
176
+ def merge_document_html(input_file1, input_file2, opts = {})
177
+ data, _status_code, _headers = merge_document_html_with_http_info(input_file1, input_file2, opts)
178
+ data
179
+ end
180
+
181
+ # Merge Two HTML (HTM) Files Together
182
+ # Combine two HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document.
183
+ # @param input_file1 First input file to perform the operation on.
184
+ # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
185
+ # @param [Hash] opts the optional parameters
186
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
187
+ def merge_document_html_with_http_info(input_file1, input_file2, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: MergeDocumentApi.merge_document_html ...'
190
+ end
191
+ # verify the required parameter 'input_file1' is set
192
+ if @api_client.config.client_side_validation && input_file1.nil?
193
+ fail ArgumentError, "Missing the required parameter 'input_file1' when calling MergeDocumentApi.merge_document_html"
194
+ end
195
+ # verify the required parameter 'input_file2' is set
196
+ if @api_client.config.client_side_validation && input_file2.nil?
197
+ fail ArgumentError, "Missing the required parameter 'input_file2' when calling MergeDocumentApi.merge_document_html"
198
+ end
199
+ # resource path
200
+ local_var_path = '/convert/merge/html'
201
+
202
+ # query parameters
203
+ query_params = {}
204
+
205
+ # header parameters
206
+ header_params = {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
209
+ # HTTP header 'Content-Type'
210
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
211
+
212
+ # form parameters
213
+ form_params = {}
214
+ form_params['inputFile1'] = input_file1
215
+ form_params['inputFile2'] = input_file2
216
+
217
+ # http body (model)
218
+ post_body = nil
219
+ auth_names = ['Apikey']
220
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
221
+ :header_params => header_params,
222
+ :query_params => query_params,
223
+ :form_params => form_params,
224
+ :body => post_body,
225
+ :auth_names => auth_names,
226
+ :return_type => 'String')
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug "API called: MergeDocumentApi#merge_document_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
229
+ end
230
+ return data, status_code, headers
231
+ end
232
+ # Merge Multple HTML (HTM) Files Together
233
+ # Combine multiple HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document.
234
+ # @param input_file1 First input file to perform the operation on.
235
+ # @param input_file2 Second input file to perform the operation on.
236
+ # @param [Hash] opts the optional parameters
237
+ # @option opts [File] :input_file3 Third input file to perform the operation on.
238
+ # @option opts [File] :input_file4 Fourth input file to perform the operation on.
239
+ # @option opts [File] :input_file5 Fifth input file to perform the operation on.
240
+ # @option opts [File] :input_file6 Sixth input file to perform the operation on.
241
+ # @option opts [File] :input_file7 Seventh input file to perform the operation on.
242
+ # @option opts [File] :input_file8 Eighth input file to perform the operation on.
243
+ # @option opts [File] :input_file9 Ninth input file to perform the operation on.
244
+ # @option opts [File] :input_file10 Tenth input file to perform the operation on.
245
+ # @return [String]
246
+ def merge_document_html_multi(input_file1, input_file2, opts = {})
247
+ data, _status_code, _headers = merge_document_html_multi_with_http_info(input_file1, input_file2, opts)
248
+ data
249
+ end
250
+
251
+ # Merge Multple HTML (HTM) Files Together
252
+ # Combine multiple HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document.
253
+ # @param input_file1 First input file to perform the operation on.
254
+ # @param input_file2 Second input file to perform the operation on.
255
+ # @param [Hash] opts the optional parameters
256
+ # @option opts [File] :input_file3 Third input file to perform the operation on.
257
+ # @option opts [File] :input_file4 Fourth input file to perform the operation on.
258
+ # @option opts [File] :input_file5 Fifth input file to perform the operation on.
259
+ # @option opts [File] :input_file6 Sixth input file to perform the operation on.
260
+ # @option opts [File] :input_file7 Seventh input file to perform the operation on.
261
+ # @option opts [File] :input_file8 Eighth input file to perform the operation on.
262
+ # @option opts [File] :input_file9 Ninth input file to perform the operation on.
263
+ # @option opts [File] :input_file10 Tenth input file to perform the operation on.
264
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
265
+ def merge_document_html_multi_with_http_info(input_file1, input_file2, opts = {})
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug 'Calling API: MergeDocumentApi.merge_document_html_multi ...'
268
+ end
269
+ # verify the required parameter 'input_file1' is set
270
+ if @api_client.config.client_side_validation && input_file1.nil?
271
+ fail ArgumentError, "Missing the required parameter 'input_file1' when calling MergeDocumentApi.merge_document_html_multi"
272
+ end
273
+ # verify the required parameter 'input_file2' is set
274
+ if @api_client.config.client_side_validation && input_file2.nil?
275
+ fail ArgumentError, "Missing the required parameter 'input_file2' when calling MergeDocumentApi.merge_document_html_multi"
276
+ end
277
+ # resource path
278
+ local_var_path = '/convert/merge/html/multi'
279
+
280
+ # query parameters
281
+ query_params = {}
282
+
283
+ # header parameters
284
+ header_params = {}
285
+ # HTTP header 'Accept' (if needed)
286
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
287
+ # HTTP header 'Content-Type'
288
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
289
+
290
+ # form parameters
291
+ form_params = {}
292
+ form_params['inputFile1'] = input_file1
293
+ form_params['inputFile2'] = input_file2
294
+ form_params['inputFile3'] = opts[:'input_file3'] if !opts[:'input_file3'].nil?
295
+ form_params['inputFile4'] = opts[:'input_file4'] if !opts[:'input_file4'].nil?
296
+ form_params['inputFile5'] = opts[:'input_file5'] if !opts[:'input_file5'].nil?
297
+ form_params['inputFile6'] = opts[:'input_file6'] if !opts[:'input_file6'].nil?
298
+ form_params['inputFile7'] = opts[:'input_file7'] if !opts[:'input_file7'].nil?
299
+ form_params['inputFile8'] = opts[:'input_file8'] if !opts[:'input_file8'].nil?
300
+ form_params['inputFile9'] = opts[:'input_file9'] if !opts[:'input_file9'].nil?
301
+ form_params['inputFile10'] = opts[:'input_file10'] if !opts[:'input_file10'].nil?
302
+
303
+ # http body (model)
304
+ post_body = nil
305
+ auth_names = ['Apikey']
306
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
307
+ :header_params => header_params,
308
+ :query_params => query_params,
309
+ :form_params => form_params,
310
+ :body => post_body,
311
+ :auth_names => auth_names,
312
+ :return_type => 'String')
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug "API called: MergeDocumentApi#merge_document_html_multi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
315
+ end
316
+ return data, status_code, headers
317
+ end
170
318
  # Merge Two PDF Files Together
171
319
  # Combine two PDF files (pdf) into a single PDF document, preserving the order of the input documents in the combined document
172
320
  # @param input_file1 First input file to perform the operation on.
@@ -349,6 +349,61 @@ module CloudmersiveConvertApiClient
349
349
  end
350
350
  return data, status_code, headers
351
351
  end
352
+ # Validate an HTML file and checks for SSRF threats
353
+ # Validate an HTML document file and checks for SSRF (Server-side Request Forgery) threats in the file; if the document is not valid, identifies the errors in the document
354
+ # @param input_file Input file to perform the operation on.
355
+ # @param [Hash] opts the optional parameters
356
+ # @return [HtmlSsrfThreatCheckResult]
357
+ def validate_document_html_ssrf_validation(input_file, opts = {})
358
+ data, _status_code, _headers = validate_document_html_ssrf_validation_with_http_info(input_file, opts)
359
+ data
360
+ end
361
+
362
+ # Validate an HTML file and checks for SSRF threats
363
+ # Validate an HTML document file and checks for SSRF (Server-side Request Forgery) threats in the file; if the document is not valid, identifies the errors in the document
364
+ # @param input_file Input file to perform the operation on.
365
+ # @param [Hash] opts the optional parameters
366
+ # @return [Array<(HtmlSsrfThreatCheckResult, Fixnum, Hash)>] HtmlSsrfThreatCheckResult data, response status code and response headers
367
+ def validate_document_html_ssrf_validation_with_http_info(input_file, opts = {})
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug 'Calling API: ValidateDocumentApi.validate_document_html_ssrf_validation ...'
370
+ end
371
+ # verify the required parameter 'input_file' is set
372
+ if @api_client.config.client_side_validation && input_file.nil?
373
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_html_ssrf_validation"
374
+ end
375
+ # resource path
376
+ local_var_path = '/convert/validate/html/ssrf-threat-check'
377
+
378
+ # query parameters
379
+ query_params = {}
380
+
381
+ # header parameters
382
+ header_params = {}
383
+ # HTTP header 'Accept' (if needed)
384
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
385
+ # HTTP header 'Content-Type'
386
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
387
+
388
+ # form parameters
389
+ form_params = {}
390
+ form_params['inputFile'] = input_file
391
+
392
+ # http body (model)
393
+ post_body = nil
394
+ auth_names = ['Apikey']
395
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
396
+ :header_params => header_params,
397
+ :query_params => query_params,
398
+ :form_params => form_params,
399
+ :body => post_body,
400
+ :auth_names => auth_names,
401
+ :return_type => 'HtmlSsrfThreatCheckResult')
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_html_ssrf_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
404
+ end
405
+ return data, status_code, headers
406
+ end
352
407
  # Validate an HTML file
353
408
  # Validate an HTML document file; if the document is not valid, identifies the errors in the document
354
409
  # @param input_file Input file to perform the operation on.
@@ -1064,6 +1119,61 @@ module CloudmersiveConvertApiClient
1064
1119
  end
1065
1120
  return data, status_code, headers
1066
1121
  end
1122
+ # Validate an XML file for XML External Entity (XXE) threats
1123
+ # Validate an XML document file for XML External Entity (XXE) threats; if the document is not valid, identifies the errors in the document. XXE threats are a type of threat that exploits vulnerabilities in the XML standard relating to external or local entity URIs in XML documents.
1124
+ # @param input_file Input file to perform the operation on.
1125
+ # @param [Hash] opts the optional parameters
1126
+ # @return [XxeThreatDetectionResult]
1127
+ def validate_document_xml_xxe_threat_validation(input_file, opts = {})
1128
+ data, _status_code, _headers = validate_document_xml_xxe_threat_validation_with_http_info(input_file, opts)
1129
+ data
1130
+ end
1131
+
1132
+ # Validate an XML file for XML External Entity (XXE) threats
1133
+ # Validate an XML document file for XML External Entity (XXE) threats; if the document is not valid, identifies the errors in the document. XXE threats are a type of threat that exploits vulnerabilities in the XML standard relating to external or local entity URIs in XML documents.
1134
+ # @param input_file Input file to perform the operation on.
1135
+ # @param [Hash] opts the optional parameters
1136
+ # @return [Array<(XxeThreatDetectionResult, Fixnum, Hash)>] XxeThreatDetectionResult data, response status code and response headers
1137
+ def validate_document_xml_xxe_threat_validation_with_http_info(input_file, opts = {})
1138
+ if @api_client.config.debugging
1139
+ @api_client.config.logger.debug 'Calling API: ValidateDocumentApi.validate_document_xml_xxe_threat_validation ...'
1140
+ end
1141
+ # verify the required parameter 'input_file' is set
1142
+ if @api_client.config.client_side_validation && input_file.nil?
1143
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_xml_xxe_threat_validation"
1144
+ end
1145
+ # resource path
1146
+ local_var_path = '/convert/validate/xml/xxe-threats'
1147
+
1148
+ # query parameters
1149
+ query_params = {}
1150
+
1151
+ # header parameters
1152
+ header_params = {}
1153
+ # HTTP header 'Accept' (if needed)
1154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
1155
+ # HTTP header 'Content-Type'
1156
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1157
+
1158
+ # form parameters
1159
+ form_params = {}
1160
+ form_params['inputFile'] = input_file
1161
+
1162
+ # http body (model)
1163
+ post_body = nil
1164
+ auth_names = ['Apikey']
1165
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1166
+ :header_params => header_params,
1167
+ :query_params => query_params,
1168
+ :form_params => form_params,
1169
+ :body => post_body,
1170
+ :auth_names => auth_names,
1171
+ :return_type => 'XxeThreatDetectionResult')
1172
+ if @api_client.config.debugging
1173
+ @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_xml_xxe_threat_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1174
+ end
1175
+ return data, status_code, headers
1176
+ end
1067
1177
  # Validate a Zip Archive file (zip)
1068
1178
  # Validate a Zip archive file (ZIP)
1069
1179
  # @param input_file Input file to perform the operation on.
@@ -247,6 +247,69 @@ module CloudmersiveConvertApiClient
247
247
  end
248
248
  return data, status_code, headers
249
249
  end
250
+ # Create an encrypted zip file to quarantine a dangerous file
251
+ # Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file.
252
+ # @param password Password to place on the Zip file; the longer the password, the more secure
253
+ # @param input_file1 First input file to perform the operation on.
254
+ # @param [Hash] opts the optional parameters
255
+ # @option opts [String] :encryption_algorithm Encryption algorithm to use; possible values are AES-256 (recommended), AES-128, and PK-Zip (not recommended; legacy, weak encryption algorithm). Default is AES-256.
256
+ # @return [Object]
257
+ def zip_archive_zip_create_quarantine(password, input_file1, opts = {})
258
+ data, _status_code, _headers = zip_archive_zip_create_quarantine_with_http_info(password, input_file1, opts)
259
+ data
260
+ end
261
+
262
+ # Create an encrypted zip file to quarantine a dangerous file
263
+ # Create a new zip archive by compressing input files, and also applies encryption and password protection to the zip, for the purposes of quarantining the underlyikng file.
264
+ # @param password Password to place on the Zip file; the longer the password, the more secure
265
+ # @param input_file1 First input file to perform the operation on.
266
+ # @param [Hash] opts the optional parameters
267
+ # @option opts [String] :encryption_algorithm Encryption algorithm to use; possible values are AES-256 (recommended), AES-128, and PK-Zip (not recommended; legacy, weak encryption algorithm). Default is AES-256.
268
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
269
+ def zip_archive_zip_create_quarantine_with_http_info(password, input_file1, opts = {})
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_create_quarantine ...'
272
+ end
273
+ # verify the required parameter 'password' is set
274
+ if @api_client.config.client_side_validation && password.nil?
275
+ fail ArgumentError, "Missing the required parameter 'password' when calling ZipArchiveApi.zip_archive_zip_create_quarantine"
276
+ end
277
+ # verify the required parameter 'input_file1' is set
278
+ if @api_client.config.client_side_validation && input_file1.nil?
279
+ fail ArgumentError, "Missing the required parameter 'input_file1' when calling ZipArchiveApi.zip_archive_zip_create_quarantine"
280
+ end
281
+ # resource path
282
+ local_var_path = '/convert/archive/zip/create/quarantine'
283
+
284
+ # query parameters
285
+ query_params = {}
286
+
287
+ # header parameters
288
+ header_params = {}
289
+ # HTTP header 'Accept' (if needed)
290
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
291
+ header_params[:'password'] = password
292
+ header_params[:'encryptionAlgorithm'] = opts[:'encryption_algorithm'] if !opts[:'encryption_algorithm'].nil?
293
+
294
+ # form parameters
295
+ form_params = {}
296
+ form_params['inputFile1'] = input_file1
297
+
298
+ # http body (model)
299
+ post_body = nil
300
+ auth_names = ['Apikey']
301
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
302
+ :header_params => header_params,
303
+ :query_params => query_params,
304
+ :form_params => form_params,
305
+ :body => post_body,
306
+ :auth_names => auth_names,
307
+ :return_type => 'Object')
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create_quarantine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
310
+ end
311
+ return data, status_code, headers
312
+ end
250
313
  # Decrypt and remove password protection on a zip file
251
314
  # Decrypts and removes password protection from an encrypted zip file with the specified password
252
315
  # @param input_file Input file to perform the operation on.
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
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 CloudmersiveConvertApiClient
16
+ # Result of running a Get Macro Information command
17
+ class GetMacrosResponse
18
+ # True if successful, false otherwise
19
+ attr_accessor :successful
20
+
21
+ # True if the document contains VBA macros, false otherwise
22
+ attr_accessor :contains_vba_macros
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'successful' => :'Successful',
28
+ :'contains_vba_macros' => :'ContainsVbaMacros'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'successful' => :'BOOLEAN',
36
+ :'contains_vba_macros' => :'BOOLEAN'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'Successful')
49
+ self.successful = attributes[:'Successful']
50
+ end
51
+
52
+ if attributes.has_key?(:'ContainsVbaMacros')
53
+ self.contains_vba_macros = attributes[:'ContainsVbaMacros']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ successful == o.successful &&
76
+ contains_vba_macros == o.contains_vba_macros
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [successful, contains_vba_macros].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+ self.class.swagger_types.each_pair do |key, type|
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
106
+ end
107
+
108
+ self
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def _deserialize(type, value)
116
+ case type.to_sym
117
+ when :DateTime
118
+ DateTime.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :BOOLEAN
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+ when :Object
134
+ # generic object (usually a Hash), return directly
135
+ value
136
+ when /\AArray<(?<inner_type>.+)>\z/
137
+ inner_type = Regexp.last_match[:inner_type]
138
+ value.map { |v| _deserialize(inner_type, v) }
139
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
+ k_type = Regexp.last_match[:k_type]
141
+ v_type = Regexp.last_match[:v_type]
142
+ {}.tap do |hash|
143
+ value.each do |k, v|
144
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ end
146
+ end
147
+ else # model
148
+ temp_model = CloudmersiveConvertApiClient.const_get(type).new
149
+ temp_model.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ next if value.nil?
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+
195
+ end
196
+ end