groupdocs_annotation_cloud 20.10 → 21.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/groupdocs_annotation_cloud.rb +5 -1
- data/lib/groupdocs_annotation_cloud/api/annotate_api.rb +109 -166
- data/lib/groupdocs_annotation_cloud/api/file_api.rb +6 -6
- data/lib/groupdocs_annotation_cloud/api/folder_api.rb +6 -6
- data/lib/groupdocs_annotation_cloud/api/info_api.rb +11 -22
- data/lib/groupdocs_annotation_cloud/api/preview_api.rb +23 -90
- data/lib/groupdocs_annotation_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_annotation_cloud/api_client.rb +1 -1
- data/lib/groupdocs_annotation_cloud/api_error.rb +1 -1
- data/lib/groupdocs_annotation_cloud/configuration.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/annotate_options.rb +281 -0
- data/lib/groupdocs_annotation_cloud/models/annotation_api_link.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/annotation_info.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/document_info.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/error.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/file_info.rb +244 -0
- data/lib/groupdocs_annotation_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/format.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/link.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/link_element.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/page_image.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/page_images.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/page_info.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/point.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/preview_options.rb +324 -0
- data/lib/groupdocs_annotation_cloud/models/rectangle.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/remove_options.rb +236 -0
- data/lib/groupdocs_annotation_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_annotation_cloud/version.rb +2 -2
- metadata +6 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="file.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -449,7 +449,7 @@ end
|
|
449
449
|
#
|
450
450
|
# --------------------------------------------------------------------------------------------------------------------
|
451
451
|
# <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
|
452
|
-
# Copyright (c) 2003-
|
452
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
453
453
|
# </copyright>
|
454
454
|
# <summary>
|
455
455
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -510,7 +510,7 @@ end
|
|
510
510
|
#
|
511
511
|
# --------------------------------------------------------------------------------------------------------------------
|
512
512
|
# <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
|
513
|
-
# Copyright (c) 2003-
|
513
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
514
514
|
# </copyright>
|
515
515
|
# <summary>
|
516
516
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -563,7 +563,7 @@ end
|
|
563
563
|
#
|
564
564
|
# --------------------------------------------------------------------------------------------------------------------
|
565
565
|
# <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
|
566
|
-
# Copyright (c) 2003-
|
566
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
567
567
|
# </copyright>
|
568
568
|
# <summary>
|
569
569
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -616,7 +616,7 @@ end
|
|
616
616
|
#
|
617
617
|
# --------------------------------------------------------------------------------------------------------------------
|
618
618
|
# <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
|
619
|
-
# Copyright (c) 2003-
|
619
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
620
620
|
# </copyright>
|
621
621
|
# <summary>
|
622
622
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -677,7 +677,7 @@ end
|
|
677
677
|
#
|
678
678
|
# --------------------------------------------------------------------------------------------------------------------
|
679
679
|
# <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
|
680
|
-
# Copyright (c) 2003-
|
680
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
681
681
|
# </copyright>
|
682
682
|
# <summary>
|
683
683
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="folder.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -430,7 +430,7 @@ end
|
|
430
430
|
#
|
431
431
|
# --------------------------------------------------------------------------------------------------------------------
|
432
432
|
# <copyright company="Aspose Pty Ltd" file="copy_folder_request.rb">
|
433
|
-
# Copyright (c) 2003-
|
433
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
434
434
|
# </copyright>
|
435
435
|
# <summary>
|
436
436
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -487,7 +487,7 @@ end
|
|
487
487
|
#
|
488
488
|
# --------------------------------------------------------------------------------------------------------------------
|
489
489
|
# <copyright company="Aspose Pty Ltd" file="create_folder_request.rb">
|
490
|
-
# Copyright (c) 2003-
|
490
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
491
491
|
# </copyright>
|
492
492
|
# <summary>
|
493
493
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -536,7 +536,7 @@ end
|
|
536
536
|
#
|
537
537
|
# --------------------------------------------------------------------------------------------------------------------
|
538
538
|
# <copyright company="Aspose Pty Ltd" file="delete_folder_request.rb">
|
539
|
-
# Copyright (c) 2003-
|
539
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
540
540
|
# </copyright>
|
541
541
|
# <summary>
|
542
542
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -589,7 +589,7 @@ end
|
|
589
589
|
#
|
590
590
|
# --------------------------------------------------------------------------------------------------------------------
|
591
591
|
# <copyright company="Aspose Pty Ltd" file="get_files_list_request.rb">
|
592
|
-
# Copyright (c) 2003-
|
592
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
593
593
|
# </copyright>
|
594
594
|
# <summary>
|
595
595
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -638,7 +638,7 @@ end
|
|
638
638
|
#
|
639
639
|
# --------------------------------------------------------------------------------------------------------------------
|
640
640
|
# <copyright company="Aspose Pty Ltd" file="move_folder_request.rb">
|
641
|
-
# Copyright (c) 2003-
|
641
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
642
642
|
# </copyright>
|
643
643
|
# <summary>
|
644
644
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="info.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -82,20 +82,13 @@ module GroupDocsAnnotationCloud
|
|
82
82
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetInfoRequest
|
83
83
|
|
84
84
|
@api_client.config.logger.debug 'Calling API: InfoApi.get_info ...' if @api_client.config.debugging
|
85
|
-
# verify the required parameter '
|
86
|
-
raise ArgumentError, 'Missing the required parameter
|
85
|
+
# verify the required parameter 'file_info' is set
|
86
|
+
raise ArgumentError, 'Missing the required parameter file_info when calling InfoApi.get_info' if @api_client.config.client_side_validation && request.file_info.nil?
|
87
87
|
# resource path
|
88
88
|
local_var_path = '/annotation/info'
|
89
89
|
|
90
90
|
# query parameters
|
91
91
|
query_params = {}
|
92
|
-
query_params[downcase_first_letter('filePath')] = request.file_path
|
93
|
-
|
94
|
-
if local_var_path.include? ('{' + downcase_first_letter('password') + '}')
|
95
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('password') + '}', request.password.to_s)
|
96
|
-
else
|
97
|
-
query_params[downcase_first_letter('password')] = request.password unless request.password.nil?
|
98
|
-
end
|
99
92
|
|
100
93
|
# header parameters
|
101
94
|
header_params = {}
|
@@ -108,8 +101,8 @@ module GroupDocsAnnotationCloud
|
|
108
101
|
form_params = {}
|
109
102
|
|
110
103
|
# http body (model)
|
111
|
-
post_body =
|
112
|
-
data, status_code, headers = @api_client.call_api(:
|
104
|
+
post_body = @api_client.object_to_http_body(request.file_info)
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
113
106
|
header_params: header_params,
|
114
107
|
query_params: query_params,
|
115
108
|
form_params: form_params,
|
@@ -229,7 +222,7 @@ end
|
|
229
222
|
#
|
230
223
|
# --------------------------------------------------------------------------------------------------------------------
|
231
224
|
# <copyright company="Aspose Pty Ltd" file="get_info_request.rb">
|
232
|
-
# Copyright (c) 2003-
|
225
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
233
226
|
# </copyright>
|
234
227
|
# <summary>
|
235
228
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -260,18 +253,14 @@ module GroupDocsAnnotationCloud
|
|
260
253
|
#
|
261
254
|
class GetInfoRequest
|
262
255
|
|
263
|
-
# Document path in storage
|
264
|
-
attr_accessor :
|
265
|
-
# Source document password
|
266
|
-
attr_accessor :password
|
256
|
+
# Document path in storage and password
|
257
|
+
attr_accessor :file_info
|
267
258
|
|
268
259
|
#
|
269
260
|
# Initializes a new instance.
|
270
|
-
# @param
|
271
|
-
|
272
|
-
|
273
|
-
self.file_path = file_path
|
274
|
-
self.password = password
|
261
|
+
# @param file_info Document path in storage and password
|
262
|
+
def initialize(file_info)
|
263
|
+
self.file_info = file_info
|
275
264
|
end
|
276
265
|
end
|
277
266
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="preview.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -82,15 +82,13 @@ module GroupDocsAnnotationCloud
|
|
82
82
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? DeletePagesRequest
|
83
83
|
|
84
84
|
@api_client.config.logger.debug 'Calling API: PreviewApi.delete_pages ...' if @api_client.config.debugging
|
85
|
-
# verify the required parameter '
|
86
|
-
raise ArgumentError, 'Missing the required parameter
|
85
|
+
# verify the required parameter 'file_info' is set
|
86
|
+
raise ArgumentError, 'Missing the required parameter file_info when calling PreviewApi.delete_pages' if @api_client.config.client_side_validation && request.file_info.nil?
|
87
87
|
# resource path
|
88
|
-
local_var_path = '/annotation/
|
88
|
+
local_var_path = '/annotation/preview/remove'
|
89
89
|
|
90
90
|
# query parameters
|
91
91
|
query_params = {}
|
92
|
-
query_params[downcase_first_letter('filePath')] = request.file_path
|
93
|
-
|
94
92
|
|
95
93
|
# header parameters
|
96
94
|
header_params = {}
|
@@ -103,8 +101,8 @@ module GroupDocsAnnotationCloud
|
|
103
101
|
form_params = {}
|
104
102
|
|
105
103
|
# http body (model)
|
106
|
-
post_body =
|
107
|
-
data, status_code, headers = @api_client.call_api(:
|
104
|
+
post_body = @api_client.object_to_http_body(request.file_info)
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
108
106
|
header_params: header_params,
|
109
107
|
query_params: query_params,
|
110
108
|
form_params: form_params,
|
@@ -135,50 +133,13 @@ module GroupDocsAnnotationCloud
|
|
135
133
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetPagesRequest
|
136
134
|
|
137
135
|
@api_client.config.logger.debug 'Calling API: PreviewApi.get_pages ...' if @api_client.config.debugging
|
138
|
-
# verify the required parameter '
|
139
|
-
raise ArgumentError, 'Missing the required parameter
|
136
|
+
# verify the required parameter 'options' is set
|
137
|
+
raise ArgumentError, 'Missing the required parameter options when calling PreviewApi.get_pages' if @api_client.config.client_side_validation && request.options.nil?
|
140
138
|
# resource path
|
141
|
-
local_var_path = '/annotation/
|
139
|
+
local_var_path = '/annotation/preview/create'
|
142
140
|
|
143
141
|
# query parameters
|
144
142
|
query_params = {}
|
145
|
-
query_params[downcase_first_letter('filePath')] = request.file_path
|
146
|
-
|
147
|
-
if local_var_path.include? ('{' + downcase_first_letter('pageNumbersToConvert') + '}')
|
148
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('pageNumbersToConvert') + '}', request.page_numbers_to_convert.to_s)
|
149
|
-
else
|
150
|
-
query_params[downcase_first_letter('pageNumbersToConvert')] = @api_client.build_collection_param(request.page_numbers_to_convert, :multi) unless request.page_numbers_to_convert.nil?
|
151
|
-
end
|
152
|
-
if local_var_path.include? ('{' + downcase_first_letter('format') + '}')
|
153
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('format') + '}', request.format.to_s)
|
154
|
-
else
|
155
|
-
query_params[downcase_first_letter('format')] = request.format unless request.format.nil?
|
156
|
-
end
|
157
|
-
if local_var_path.include? ('{' + downcase_first_letter('width') + '}')
|
158
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('width') + '}', request.width.to_s)
|
159
|
-
else
|
160
|
-
query_params[downcase_first_letter('width')] = request.width unless request.width.nil?
|
161
|
-
end
|
162
|
-
if local_var_path.include? ('{' + downcase_first_letter('height') + '}')
|
163
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('height') + '}', request.height.to_s)
|
164
|
-
else
|
165
|
-
query_params[downcase_first_letter('height')] = request.height unless request.height.nil?
|
166
|
-
end
|
167
|
-
if local_var_path.include? ('{' + downcase_first_letter('withoutAnnotations') + '}')
|
168
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('withoutAnnotations') + '}', request.without_annotations.to_s)
|
169
|
-
else
|
170
|
-
query_params[downcase_first_letter('withoutAnnotations')] = request.without_annotations unless request.without_annotations.nil?
|
171
|
-
end
|
172
|
-
if local_var_path.include? ('{' + downcase_first_letter('renderComments') + '}')
|
173
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('renderComments') + '}', request.render_comments.to_s)
|
174
|
-
else
|
175
|
-
query_params[downcase_first_letter('renderComments')] = request.render_comments unless request.render_comments.nil?
|
176
|
-
end
|
177
|
-
if local_var_path.include? ('{' + downcase_first_letter('password') + '}')
|
178
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('password') + '}', request.password.to_s)
|
179
|
-
else
|
180
|
-
query_params[downcase_first_letter('password')] = request.password unless request.password.nil?
|
181
|
-
end
|
182
143
|
|
183
144
|
# header parameters
|
184
145
|
header_params = {}
|
@@ -191,8 +152,8 @@ module GroupDocsAnnotationCloud
|
|
191
152
|
form_params = {}
|
192
153
|
|
193
154
|
# http body (model)
|
194
|
-
post_body =
|
195
|
-
data, status_code, headers = @api_client.call_api(:
|
155
|
+
post_body = @api_client.object_to_http_body(request.options)
|
156
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
196
157
|
header_params: header_params,
|
197
158
|
query_params: query_params,
|
198
159
|
form_params: form_params,
|
@@ -263,7 +224,7 @@ end
|
|
263
224
|
#
|
264
225
|
# --------------------------------------------------------------------------------------------------------------------
|
265
226
|
# <copyright company="Aspose Pty Ltd" file="delete_pages_request.rb">
|
266
|
-
# Copyright (c) 2003-
|
227
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
267
228
|
# </copyright>
|
268
229
|
# <summary>
|
269
230
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -294,21 +255,21 @@ module GroupDocsAnnotationCloud
|
|
294
255
|
#
|
295
256
|
class DeletePagesRequest
|
296
257
|
|
297
|
-
# Document
|
298
|
-
attr_accessor :
|
258
|
+
# Document info to remove preview
|
259
|
+
attr_accessor :file_info
|
299
260
|
|
300
261
|
#
|
301
262
|
# Initializes a new instance.
|
302
|
-
# @param
|
303
|
-
def initialize(
|
304
|
-
self.
|
263
|
+
# @param file_info Document info to remove preview
|
264
|
+
def initialize(file_info)
|
265
|
+
self.file_info = file_info
|
305
266
|
end
|
306
267
|
end
|
307
268
|
end
|
308
269
|
#
|
309
270
|
# --------------------------------------------------------------------------------------------------------------------
|
310
271
|
# <copyright company="Aspose Pty Ltd" file="get_pages_request.rb">
|
311
|
-
# Copyright (c) 2003-
|
272
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
312
273
|
# </copyright>
|
313
274
|
# <summary>
|
314
275
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -339,42 +300,14 @@ module GroupDocsAnnotationCloud
|
|
339
300
|
#
|
340
301
|
class GetPagesRequest
|
341
302
|
|
342
|
-
# Document
|
343
|
-
attr_accessor :
|
344
|
-
# The list of page numbers to convert
|
345
|
-
attr_accessor :page_numbers_to_convert
|
346
|
-
# Preview format: \"PNG\" (default), \"JPEG\", or \"BMP\"
|
347
|
-
attr_accessor :format
|
348
|
-
# Preview image width
|
349
|
-
attr_accessor :width
|
350
|
-
# Preview image height
|
351
|
-
attr_accessor :height
|
352
|
-
# If true returns specific pages without annotations
|
353
|
-
attr_accessor :without_annotations
|
354
|
-
# Render comments (false by default)
|
355
|
-
attr_accessor :render_comments
|
356
|
-
# Source document opening password
|
357
|
-
attr_accessor :password
|
303
|
+
# Document preview options
|
304
|
+
attr_accessor :options
|
358
305
|
|
359
306
|
#
|
360
307
|
# Initializes a new instance.
|
361
|
-
# @param
|
362
|
-
|
363
|
-
|
364
|
-
# @param width Preview image width
|
365
|
-
# @param height Preview image height
|
366
|
-
# @param without_annotations If true returns specific pages without annotations
|
367
|
-
# @param render_comments Render comments (false by default)
|
368
|
-
# @param password Source document opening password
|
369
|
-
def initialize(file_path, page_numbers_to_convert = nil, format = nil, width = nil, height = nil, without_annotations = nil, render_comments = nil, password = nil)
|
370
|
-
self.file_path = file_path
|
371
|
-
self.page_numbers_to_convert = page_numbers_to_convert
|
372
|
-
self.format = format
|
373
|
-
self.width = width
|
374
|
-
self.height = height
|
375
|
-
self.without_annotations = without_annotations
|
376
|
-
self.render_comments = render_comments
|
377
|
-
self.password = password
|
308
|
+
# @param options Document preview options
|
309
|
+
def initialize(options)
|
310
|
+
self.options = options
|
378
311
|
end
|
379
312
|
end
|
380
313
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="storage.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -350,7 +350,7 @@ end
|
|
350
350
|
#
|
351
351
|
# --------------------------------------------------------------------------------------------------------------------
|
352
352
|
# <copyright company="Aspose Pty Ltd" file="get_disc_usage_request.rb">
|
353
|
-
# Copyright (c) 2003-
|
353
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
354
354
|
# </copyright>
|
355
355
|
# <summary>
|
356
356
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -395,7 +395,7 @@ end
|
|
395
395
|
#
|
396
396
|
# --------------------------------------------------------------------------------------------------------------------
|
397
397
|
# <copyright company="Aspose Pty Ltd" file="get_file_versions_request.rb">
|
398
|
-
# Copyright (c) 2003-
|
398
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
399
399
|
# </copyright>
|
400
400
|
# <summary>
|
401
401
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -444,7 +444,7 @@ end
|
|
444
444
|
#
|
445
445
|
# --------------------------------------------------------------------------------------------------------------------
|
446
446
|
# <copyright company="Aspose Pty Ltd" file="object_exists_request.rb">
|
447
|
-
# Copyright (c) 2003-
|
447
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
448
448
|
# </copyright>
|
449
449
|
# <summary>
|
450
450
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -497,7 +497,7 @@ end
|
|
497
497
|
#
|
498
498
|
# --------------------------------------------------------------------------------------------------------------------
|
499
499
|
# <copyright company="Aspose Pty Ltd" file="storage_exists_request.rb">
|
500
|
-
# Copyright (c) 2003-
|
500
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
501
501
|
# </copyright>
|
502
502
|
# <summary>
|
503
503
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_client.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_error.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ------------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="configuration.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -0,0 +1,281 @@
|
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="annotate_options.rb">
|
4
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
5
|
+
# </copyright>
|
6
|
+
# <summary>
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
# </summary>
|
25
|
+
# --------------------------------------------------------------------------------------------------------------------
|
26
|
+
#
|
27
|
+
|
28
|
+
require 'date'
|
29
|
+
|
30
|
+
module GroupDocsAnnotationCloud
|
31
|
+
# Defines options for annotating documents
|
32
|
+
class AnnotateOptions
|
33
|
+
|
34
|
+
# Input document description
|
35
|
+
attr_accessor :file_info
|
36
|
+
|
37
|
+
# List of annotations to add to the document
|
38
|
+
attr_accessor :annotations
|
39
|
+
|
40
|
+
# First page number when saving page range
|
41
|
+
attr_accessor :first_page
|
42
|
+
|
43
|
+
# Last page number when saving page range
|
44
|
+
attr_accessor :last_page
|
45
|
+
|
46
|
+
# Indicates whether to save only annotated pages
|
47
|
+
attr_accessor :only_annotated_pages
|
48
|
+
|
49
|
+
# Path to output document in the cloud storage. Required for Add method. Not required if Annotate (with file result) method used.
|
50
|
+
attr_accessor :output_path
|
51
|
+
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
+
def self.attribute_map
|
54
|
+
{
|
55
|
+
:'file_info' => :'FileInfo',
|
56
|
+
:'annotations' => :'Annotations',
|
57
|
+
:'first_page' => :'FirstPage',
|
58
|
+
:'last_page' => :'LastPage',
|
59
|
+
:'only_annotated_pages' => :'OnlyAnnotatedPages',
|
60
|
+
:'output_path' => :'OutputPath'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.swagger_types
|
66
|
+
{
|
67
|
+
:'file_info' => :'FileInfo',
|
68
|
+
:'annotations' => :'Array<AnnotationInfo>',
|
69
|
+
:'first_page' => :'Integer',
|
70
|
+
:'last_page' => :'Integer',
|
71
|
+
:'only_annotated_pages' => :'BOOLEAN',
|
72
|
+
:'output_path' => :'String'
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
# Initializes the object
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
+
def initialize(attributes = {})
|
79
|
+
return unless attributes.is_a?(Hash)
|
80
|
+
|
81
|
+
# convert string to symbol for hash key
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
83
|
+
|
84
|
+
if attributes.key?(:'FileInfo')
|
85
|
+
self.file_info = attributes[:'FileInfo']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'Annotations')
|
89
|
+
if (value = attributes[:'Annotations']).is_a?(Array)
|
90
|
+
self.annotations = value
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'FirstPage')
|
95
|
+
self.first_page = attributes[:'FirstPage']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'LastPage')
|
99
|
+
self.last_page = attributes[:'LastPage']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'OnlyAnnotatedPages')
|
103
|
+
self.only_annotated_pages = attributes[:'OnlyAnnotatedPages']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'OutputPath')
|
107
|
+
self.output_path = attributes[:'OutputPath']
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
113
|
+
# @return Array for valid properies with the reasons
|
114
|
+
def list_invalid_properties
|
115
|
+
invalid_properties = []
|
116
|
+
if @first_page.nil?
|
117
|
+
invalid_properties.push("invalid value for 'first_page', first_page cannot be nil.")
|
118
|
+
end
|
119
|
+
|
120
|
+
if @last_page.nil?
|
121
|
+
invalid_properties.push("invalid value for 'last_page', last_page cannot be nil.")
|
122
|
+
end
|
123
|
+
|
124
|
+
if @only_annotated_pages.nil?
|
125
|
+
invalid_properties.push("invalid value for 'only_annotated_pages', only_annotated_pages cannot be nil.")
|
126
|
+
end
|
127
|
+
|
128
|
+
return invalid_properties
|
129
|
+
end
|
130
|
+
|
131
|
+
# Check to see if the all the properties in the model are valid
|
132
|
+
# @return true if the model is valid
|
133
|
+
def valid?
|
134
|
+
return false if @first_page.nil?
|
135
|
+
return false if @last_page.nil?
|
136
|
+
return false if @only_annotated_pages.nil?
|
137
|
+
return true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Checks equality by comparing each attribute.
|
141
|
+
# @param [Object] Object to be compared
|
142
|
+
def ==(other)
|
143
|
+
return true if self.equal?(other)
|
144
|
+
self.class == other.class &&
|
145
|
+
file_info == other.file_info &&
|
146
|
+
annotations == other.annotations &&
|
147
|
+
first_page == other.first_page &&
|
148
|
+
last_page == other.last_page &&
|
149
|
+
only_annotated_pages == other.only_annotated_pages &&
|
150
|
+
output_path == other.output_path
|
151
|
+
end
|
152
|
+
|
153
|
+
# @see the `==` method
|
154
|
+
# @param [Object] Object to be compared
|
155
|
+
def eql?(other)
|
156
|
+
self == other
|
157
|
+
end
|
158
|
+
|
159
|
+
# Calculates hash code according to all attributes.
|
160
|
+
# @return [Fixnum] Hash code
|
161
|
+
def hash
|
162
|
+
[file_info, annotations, first_page, last_page, only_annotated_pages, output_path].hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Downcases first letter.
|
166
|
+
# @return downcased string
|
167
|
+
def uncap(str)
|
168
|
+
str[0, 1].downcase + str[1..-1]
|
169
|
+
end
|
170
|
+
|
171
|
+
# Builds the object from hash
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
173
|
+
# @return [Object] Returns the model itself
|
174
|
+
def build_from_hash(attributes)
|
175
|
+
return nil unless attributes.is_a?(Hash)
|
176
|
+
self.class.swagger_types.each_pair do |key, type|
|
177
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
178
|
+
value = attributes[pname]
|
179
|
+
if type =~ /\AArray<(.*)>/i
|
180
|
+
# check to ensure the input is an array given that the the attribute
|
181
|
+
# is documented as an array but the input is not
|
182
|
+
if value.is_a?(Array)
|
183
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
184
|
+
end
|
185
|
+
elsif !value.nil?
|
186
|
+
self.send("#{key}=", _deserialize(type, value))
|
187
|
+
end
|
188
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
189
|
+
end
|
190
|
+
|
191
|
+
self
|
192
|
+
end
|
193
|
+
|
194
|
+
# Deserializes the data based on type
|
195
|
+
# @param string type Data type
|
196
|
+
# @param string value Value to be deserialized
|
197
|
+
# @return [Object] Deserialized data
|
198
|
+
def _deserialize(type, value)
|
199
|
+
case type.to_sym
|
200
|
+
when :DateTime
|
201
|
+
Date.parse value
|
202
|
+
when :Date
|
203
|
+
Date.parse value
|
204
|
+
when :String
|
205
|
+
value.to_s
|
206
|
+
when :Integer
|
207
|
+
value.to_i
|
208
|
+
when :Float
|
209
|
+
value.to_f
|
210
|
+
when :BOOLEAN
|
211
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
212
|
+
true
|
213
|
+
else
|
214
|
+
false
|
215
|
+
end
|
216
|
+
when :Object
|
217
|
+
# generic object (usually a Hash), return directly
|
218
|
+
value
|
219
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
220
|
+
inner_type = Regexp.last_match[:inner_type]
|
221
|
+
value.map { |v| _deserialize(inner_type, v) }
|
222
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
223
|
+
k_type = Regexp.last_match[:k_type]
|
224
|
+
v_type = Regexp.last_match[:v_type]
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each do |k, v|
|
227
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
else
|
231
|
+
# model
|
232
|
+
temp_model = GroupDocsAnnotationCloud.const_get(type).new
|
233
|
+
temp_model.build_from_hash(value)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
# Returns the string representation of the object
|
238
|
+
# @return [String] String presentation of the object
|
239
|
+
def to_s
|
240
|
+
to_hash.to_s
|
241
|
+
end
|
242
|
+
|
243
|
+
# to_body is an alias to to_hash (backward compatibility)
|
244
|
+
# @return [Hash] Returns the object in the form of hash
|
245
|
+
def to_body
|
246
|
+
to_hash
|
247
|
+
end
|
248
|
+
|
249
|
+
# Returns the object in the form of hash
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
251
|
+
def to_hash
|
252
|
+
hash = {}
|
253
|
+
self.class.attribute_map.each_pair do |attr, param|
|
254
|
+
value = self.send(attr)
|
255
|
+
next if value.nil?
|
256
|
+
hash[param] = _to_hash(value)
|
257
|
+
end
|
258
|
+
hash
|
259
|
+
end
|
260
|
+
|
261
|
+
# Outputs non-array value in the form of hash
|
262
|
+
# For object, use to_hash. Otherwise, just return the value
|
263
|
+
# @param [Object] value Any valid value
|
264
|
+
# @return [Hash] Returns the value in the form of hash
|
265
|
+
def _to_hash(value)
|
266
|
+
if value.is_a?(Array)
|
267
|
+
value.compact.map { |v| _to_hash(v) }
|
268
|
+
elsif value.is_a?(Hash)
|
269
|
+
{}.tap do |hash|
|
270
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
271
|
+
end
|
272
|
+
elsif value.respond_to? :to_hash
|
273
|
+
value.to_hash
|
274
|
+
else
|
275
|
+
value
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
end
|
280
|
+
|
281
|
+
end
|