groupdocs_comparison_cloud 24.2 → 25.2
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.
- checksums.yaml +4 -4
- data/lib/groupdocs_comparison_cloud/api/compare_api.rb +4 -4
- data/lib/groupdocs_comparison_cloud/api/file_api.rb +6 -6
- data/lib/groupdocs_comparison_cloud/api/folder_api.rb +6 -6
- data/lib/groupdocs_comparison_cloud/api/info_api.rb +2 -2
- data/lib/groupdocs_comparison_cloud/api/license_api.rb +1 -1
- data/lib/groupdocs_comparison_cloud/api/preview_api.rb +217 -0
- data/lib/groupdocs_comparison_cloud/api/review_api.rb +3 -3
- data/lib/groupdocs_comparison_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_comparison_cloud/api_client.rb +1 -1
- data/lib/groupdocs_comparison_cloud/api_client_error.rb +1 -1
- data/lib/groupdocs_comparison_cloud/configuration.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/apply_revisions_options.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/change_info.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/comparison_options.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/consumption_result.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/diagram_master_setting.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/error.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/file_info.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/format.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/info_result.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/items_style.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/link.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/metadata.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/page_info.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/preview_options.rb +319 -0
- data/lib/groupdocs_comparison_cloud/models/rectangle.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/revision_info.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/settings.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/size.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/style_change_info.rb +1 -1
- data/lib/groupdocs_comparison_cloud/models/updates_options.rb +1 -1
- data/lib/groupdocs_comparison_cloud/version.rb +2 -2
- data/lib/groupdocs_comparison_cloud.rb +3 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa5e474ec76265cfb0cb1c50ee8ccb4a14a7caf7d0dc325d81e238c6c8e1e19c
|
4
|
+
data.tar.gz: ed9652e762ad50a75dc3152d9454f32f758755f674d8e63e0bcc9ce4bd234201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a36f23c7c99737ce3267ec3a6b9c11ebc9fd7f4d01c5aab8b587f43c5d3c9eae73713b0e46f51ae1ba36536c04fc21b94c6725d4eacb2644f45109c4cd053f5c
|
7
|
+
data.tar.gz: f56ffa9065df94e55a177703d8fdd42e9e09ae82b6dee180496e8890289cb25898a368b5dba2ae5f399e37e0ca4b579b44696bfaa41ac5a576338f533bd05070
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="compare.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -277,7 +277,7 @@ end
|
|
277
277
|
#
|
278
278
|
# --------------------------------------------------------------------------------------------------------------------
|
279
279
|
# <copyright company="Aspose Pty Ltd" file="comparisons_request.rb">
|
280
|
-
# Copyright (c)
|
280
|
+
# Copyright (c) Aspose Pty Ltd
|
281
281
|
# </copyright>
|
282
282
|
# <summary>
|
283
283
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -322,7 +322,7 @@ end
|
|
322
322
|
#
|
323
323
|
# --------------------------------------------------------------------------------------------------------------------
|
324
324
|
# <copyright company="Aspose Pty Ltd" file="post_changes_request.rb">
|
325
|
-
# Copyright (c)
|
325
|
+
# Copyright (c) Aspose Pty Ltd
|
326
326
|
# </copyright>
|
327
327
|
# <summary>
|
328
328
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -367,7 +367,7 @@ end
|
|
367
367
|
#
|
368
368
|
# --------------------------------------------------------------------------------------------------------------------
|
369
369
|
# <copyright company="Aspose Pty Ltd" file="put_changes_document_request.rb">
|
370
|
-
# Copyright (c)
|
370
|
+
# Copyright (c) Aspose Pty Ltd
|
371
371
|
# </copyright>
|
372
372
|
# <summary>
|
373
373
|
# 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="file.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 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)
|
452
|
+
# Copyright (c) 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)
|
513
|
+
# Copyright (c) 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)
|
566
|
+
# Copyright (c) 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)
|
619
|
+
# Copyright (c) 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)
|
680
|
+
# Copyright (c) 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)
|
3
|
+
# Copyright (c) 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)
|
433
|
+
# Copyright (c) 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)
|
490
|
+
# Copyright (c) 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)
|
539
|
+
# Copyright (c) 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)
|
592
|
+
# Copyright (c) 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)
|
641
|
+
# Copyright (c) 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)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -222,7 +222,7 @@ end
|
|
222
222
|
#
|
223
223
|
# --------------------------------------------------------------------------------------------------------------------
|
224
224
|
# <copyright company="Aspose Pty Ltd" file="get_document_info_request.rb">
|
225
|
-
# Copyright (c)
|
225
|
+
# Copyright (c) Aspose Pty Ltd
|
226
226
|
# </copyright>
|
227
227
|
# <summary>
|
228
228
|
# 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="license.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 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,217 @@
|
|
1
|
+
# -----------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose Pty Ltd" file="preview.rb">
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
14
|
+
# copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
# SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# -----------------------------------------------------------------------------------
|
25
|
+
|
26
|
+
require 'uri'
|
27
|
+
require 'date'
|
28
|
+
|
29
|
+
module GroupDocsComparisonCloud
|
30
|
+
#
|
31
|
+
# GroupDocs.Comparison Cloud API
|
32
|
+
#
|
33
|
+
class PreviewApi
|
34
|
+
attr_accessor :config
|
35
|
+
|
36
|
+
#make PreviewApi.new private
|
37
|
+
private_class_method :new
|
38
|
+
|
39
|
+
# Initializes new instance of PreviewApi
|
40
|
+
#
|
41
|
+
# @param [config] Configuration
|
42
|
+
# @return [PreviewApi] New instance of PreviewApi
|
43
|
+
def initialize(config)
|
44
|
+
@config = config
|
45
|
+
@api_client = ApiClient.new(config)
|
46
|
+
@access_token = nil
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes new instance of PreviewApi
|
50
|
+
#
|
51
|
+
# @param [app_sid] Application identifier (App SID)
|
52
|
+
# @param [app_key] Application private key (App Key)
|
53
|
+
# @return [PreviewApi] New instance of PreviewApi
|
54
|
+
def self.from_keys(app_sid, app_key)
|
55
|
+
config = Configuration.new(app_sid, app_key)
|
56
|
+
return new(config)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes new instance of PreviewApi
|
60
|
+
#
|
61
|
+
# @param [config] Configuration
|
62
|
+
# @return [PreviewApi] New instance of PreviewApi
|
63
|
+
def self.from_config(config)
|
64
|
+
return new(config)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Creates a preview images of document pages and returns an array of links to saved result
|
68
|
+
#
|
69
|
+
# @param request preview_request
|
70
|
+
# @return [Array<Link>]
|
71
|
+
def preview(request)
|
72
|
+
data, _status_code, _headers = preview_with_http_info(request)
|
73
|
+
data
|
74
|
+
end
|
75
|
+
|
76
|
+
# Creates a preview images of document pages and returns an array of links to saved result
|
77
|
+
#
|
78
|
+
# @param request preview_request
|
79
|
+
# @return [Array<(Array<Link>, Fixnum, Hash)>]
|
80
|
+
# Array<Link> data, response status code and response headers
|
81
|
+
def preview_with_http_info(request)
|
82
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PreviewRequest
|
83
|
+
|
84
|
+
@api_client.config.logger.debug 'Calling API: PreviewApi.preview ...' if @api_client.config.debugging
|
85
|
+
# verify the required parameter 'preview_options' is set
|
86
|
+
raise ArgumentError, 'Missing the required parameter preview_options when calling PreviewApi.preview' if @api_client.config.client_side_validation && request.preview_options.nil?
|
87
|
+
# resource path
|
88
|
+
local_var_path = '/comparison/preview'
|
89
|
+
|
90
|
+
# query parameters
|
91
|
+
query_params = {}
|
92
|
+
|
93
|
+
# header parameters
|
94
|
+
header_params = {}
|
95
|
+
# HTTP header 'Accept' (if needed)
|
96
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
97
|
+
# HTTP header 'Content-Type'
|
98
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
99
|
+
|
100
|
+
# form parameters
|
101
|
+
form_params = {}
|
102
|
+
|
103
|
+
# http body (model)
|
104
|
+
post_body = @api_client.object_to_http_body(request.preview_options)
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
106
|
+
header_params: header_params,
|
107
|
+
query_params: query_params,
|
108
|
+
form_params: form_params,
|
109
|
+
body: post_body,
|
110
|
+
access_token: get_access_token,
|
111
|
+
return_type: 'Array<Link>')
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug "API called:
|
114
|
+
PreviewApi#preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
115
|
+
end
|
116
|
+
[data, status_code, headers]
|
117
|
+
end
|
118
|
+
|
119
|
+
#
|
120
|
+
# Helper method to convert first letter to downcase
|
121
|
+
#
|
122
|
+
private def downcase_first_letter(str)
|
123
|
+
value = str[0].downcase + str[1..-1]
|
124
|
+
value
|
125
|
+
end
|
126
|
+
|
127
|
+
#
|
128
|
+
# Retrieves access token
|
129
|
+
#
|
130
|
+
private def get_access_token
|
131
|
+
if @access_token.nil? then
|
132
|
+
request_access_token
|
133
|
+
end
|
134
|
+
|
135
|
+
@access_token
|
136
|
+
end
|
137
|
+
|
138
|
+
#
|
139
|
+
# Gets a access token from server
|
140
|
+
#
|
141
|
+
private def request_access_token
|
142
|
+
auth_config = Configuration.new(@config.app_sid, @config.app_key)
|
143
|
+
auth_config.api_base_url = @config.api_base_url
|
144
|
+
auth_config.debugging = @config.debugging
|
145
|
+
auth_config.logger = @config.logger
|
146
|
+
auth_config.temp_folder_path = @config.temp_folder_path
|
147
|
+
auth_config.client_side_validation = @config.client_side_validation
|
148
|
+
auth_config.api_version = ''
|
149
|
+
|
150
|
+
auth_api_client = ApiClient.new(auth_config)
|
151
|
+
|
152
|
+
request_url = "/connect/token"
|
153
|
+
post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
|
154
|
+
|
155
|
+
data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
|
156
|
+
|
157
|
+
@access_token = data[:access_token]
|
158
|
+
|
159
|
+
expires_in_seconds = data[:expires_in].to_i - 5 * 60
|
160
|
+
expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
|
161
|
+
@access_token_expires_at = DateTime.now + expires_in_days
|
162
|
+
end
|
163
|
+
|
164
|
+
# requires all files inside a directory from current dir
|
165
|
+
# @param _dir can be relative path like '/lib' or "../lib"
|
166
|
+
private def require_all(_dir)
|
167
|
+
Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
|
168
|
+
require file
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
#
|
174
|
+
# --------------------------------------------------------------------------------------------------------------------
|
175
|
+
# <copyright company="Aspose Pty Ltd" file="preview_request.rb">
|
176
|
+
# Copyright (c) Aspose Pty Ltd
|
177
|
+
# </copyright>
|
178
|
+
# <summary>
|
179
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
180
|
+
# of this software and associated documentation files (the "Software"), to deal
|
181
|
+
# in the Software without restriction, including without limitation the rights
|
182
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
183
|
+
# copies of the Software, and to permit persons to whom the Software is
|
184
|
+
# furnished to do so, subject to the following conditions:
|
185
|
+
#
|
186
|
+
# The above copyright notice and this permission notice shall be included in all
|
187
|
+
# copies or substantial portions of the Software.
|
188
|
+
#
|
189
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
190
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
191
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
192
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
193
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
194
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
195
|
+
# SOFTWARE.
|
196
|
+
# </summary>
|
197
|
+
# --------------------------------------------------------------------------------------------------------------------
|
198
|
+
#
|
199
|
+
|
200
|
+
module GroupDocsComparisonCloud
|
201
|
+
|
202
|
+
#
|
203
|
+
# Request model for preview operation.
|
204
|
+
#
|
205
|
+
class PreviewRequest
|
206
|
+
|
207
|
+
# Preview options
|
208
|
+
attr_accessor :preview_options
|
209
|
+
|
210
|
+
#
|
211
|
+
# Initializes a new instance.
|
212
|
+
# @param preview_options Preview options
|
213
|
+
def initialize(preview_options)
|
214
|
+
self.preview_options = preview_options
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="review.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -225,7 +225,7 @@ end
|
|
225
225
|
#
|
226
226
|
# --------------------------------------------------------------------------------------------------------------------
|
227
227
|
# <copyright company="Aspose Pty Ltd" file="apply_revisions_request.rb">
|
228
|
-
# Copyright (c)
|
228
|
+
# Copyright (c) Aspose Pty Ltd
|
229
229
|
# </copyright>
|
230
230
|
# <summary>
|
231
231
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -270,7 +270,7 @@ end
|
|
270
270
|
#
|
271
271
|
# --------------------------------------------------------------------------------------------------------------------
|
272
272
|
# <copyright company="Aspose Pty Ltd" file="get_revisions_request.rb">
|
273
|
-
# Copyright (c)
|
273
|
+
# Copyright (c) Aspose Pty Ltd
|
274
274
|
# </copyright>
|
275
275
|
# <summary>
|
276
276
|
# 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="storage.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 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)
|
353
|
+
# Copyright (c) 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)
|
398
|
+
# Copyright (c) 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)
|
447
|
+
# Copyright (c) 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)
|
500
|
+
# Copyright (c) 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)
|
3
|
+
# Copyright (c) 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)
|
3
|
+
# Copyright (c) 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)
|
3
|
+
# Copyright (c) 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,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="apply_revisions_options.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="change_info.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="comparison_options.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="consumption_result.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="diagram_master_setting.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="disc_usage.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="error.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="error_details.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="file_info.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="file_version.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="file_versions.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="files_list.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="files_upload_result.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="format.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="formats_result.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="info_result.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="items_style.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="link.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="metadata.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="object_exist.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="page_info.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -0,0 +1,319 @@
|
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="preview_options.rb">
|
4
|
+
# Copyright (c) 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 GroupDocsComparisonCloud
|
31
|
+
# Defines preview options
|
32
|
+
class PreviewOptions
|
33
|
+
|
34
|
+
# Input file info
|
35
|
+
attr_accessor :file_info
|
36
|
+
|
37
|
+
# Preview image format
|
38
|
+
attr_accessor :format
|
39
|
+
|
40
|
+
# Path to folder with preview results
|
41
|
+
attr_accessor :output_folder
|
42
|
+
|
43
|
+
# Preview width
|
44
|
+
attr_accessor :width
|
45
|
+
|
46
|
+
# Preview height
|
47
|
+
attr_accessor :height
|
48
|
+
|
49
|
+
# Page numbers that will be previewed.
|
50
|
+
attr_accessor :page_numbers
|
51
|
+
class EnumAttributeValidator
|
52
|
+
attr_reader :datatype
|
53
|
+
attr_reader :allowable_values
|
54
|
+
|
55
|
+
def initialize(datatype, allowable_values)
|
56
|
+
@allowable_values = allowable_values.map do |value|
|
57
|
+
case datatype.to_s
|
58
|
+
when /Integer/i
|
59
|
+
value.to_i
|
60
|
+
when /Float/i
|
61
|
+
value.to_f
|
62
|
+
else
|
63
|
+
value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def valid?(value)
|
69
|
+
!value || allowable_values.include?(value)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
74
|
+
def self.attribute_map
|
75
|
+
{
|
76
|
+
:'file_info' => :'FileInfo',
|
77
|
+
:'format' => :'Format',
|
78
|
+
:'output_folder' => :'OutputFolder',
|
79
|
+
:'width' => :'Width',
|
80
|
+
:'height' => :'Height',
|
81
|
+
:'page_numbers' => :'PageNumbers'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# Attribute type mapping.
|
86
|
+
def self.swagger_types
|
87
|
+
{
|
88
|
+
:'file_info' => :'FileInfo',
|
89
|
+
:'format' => :'String',
|
90
|
+
:'output_folder' => :'String',
|
91
|
+
:'width' => :'Integer',
|
92
|
+
:'height' => :'Integer',
|
93
|
+
:'page_numbers' => :'Array<Integer>'
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
return unless attributes.is_a?(Hash)
|
101
|
+
|
102
|
+
# convert string to symbol for hash key
|
103
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
104
|
+
|
105
|
+
if attributes.key?(:'FileInfo')
|
106
|
+
self.file_info = attributes[:'FileInfo']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'Format')
|
110
|
+
self.format = attributes[:'Format']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'OutputFolder')
|
114
|
+
self.output_folder = attributes[:'OutputFolder']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'Width')
|
118
|
+
self.width = attributes[:'Width']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'Height')
|
122
|
+
self.height = attributes[:'Height']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'PageNumbers')
|
126
|
+
if (value = attributes[:'PageNumbers']).is_a?(Array)
|
127
|
+
self.page_numbers = value
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
end
|
132
|
+
|
133
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
134
|
+
# @return Array for valid properies with the reasons
|
135
|
+
def list_invalid_properties
|
136
|
+
invalid_properties = []
|
137
|
+
if @format.nil?
|
138
|
+
invalid_properties.push("invalid value for 'format', format cannot be nil.")
|
139
|
+
end
|
140
|
+
|
141
|
+
if @width.nil?
|
142
|
+
invalid_properties.push("invalid value for 'width', width cannot be nil.")
|
143
|
+
end
|
144
|
+
|
145
|
+
if @height.nil?
|
146
|
+
invalid_properties.push("invalid value for 'height', height cannot be nil.")
|
147
|
+
end
|
148
|
+
|
149
|
+
return invalid_properties
|
150
|
+
end
|
151
|
+
|
152
|
+
# Check to see if the all the properties in the model are valid
|
153
|
+
# @return true if the model is valid
|
154
|
+
def valid?
|
155
|
+
return false if @format.nil?
|
156
|
+
format_validator = EnumAttributeValidator.new('String', ["Jpeg", "Png", "Bmp"])
|
157
|
+
return false unless format_validator.valid?(@format)
|
158
|
+
return false if @width.nil?
|
159
|
+
return false if @height.nil?
|
160
|
+
return true
|
161
|
+
end
|
162
|
+
|
163
|
+
# Custom attribute writer method checking allowed values (enum).
|
164
|
+
# @param [Object] format Object to be assigned
|
165
|
+
def format=(format)
|
166
|
+
validator = EnumAttributeValidator.new('String', ["Jpeg", "Png", "Bmp"])
|
167
|
+
if format.to_i == 0
|
168
|
+
unless validator.valid?(format)
|
169
|
+
# raise ArgumentError, "invalid value for 'format', must be one of #{validator.allowable_values}."
|
170
|
+
@format = validator.allowable_values[format.to_i]
|
171
|
+
end
|
172
|
+
@format = format
|
173
|
+
else
|
174
|
+
@format = validator.allowable_values[format.to_i]
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Checks equality by comparing each attribute.
|
179
|
+
# @param [Object] Object to be compared
|
180
|
+
def ==(other)
|
181
|
+
return true if self.equal?(other)
|
182
|
+
self.class == other.class &&
|
183
|
+
file_info == other.file_info &&
|
184
|
+
format == other.format &&
|
185
|
+
output_folder == other.output_folder &&
|
186
|
+
width == other.width &&
|
187
|
+
height == other.height &&
|
188
|
+
page_numbers == other.page_numbers
|
189
|
+
end
|
190
|
+
|
191
|
+
# @see the `==` method
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def eql?(other)
|
194
|
+
self == other
|
195
|
+
end
|
196
|
+
|
197
|
+
# Calculates hash code according to all attributes.
|
198
|
+
# @return [Fixnum] Hash code
|
199
|
+
def hash
|
200
|
+
[file_info, format, output_folder, width, height, page_numbers].hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Downcases first letter.
|
204
|
+
# @return downcased string
|
205
|
+
def uncap(str)
|
206
|
+
str[0, 1].downcase + str[1..-1]
|
207
|
+
end
|
208
|
+
|
209
|
+
# Builds the object from hash
|
210
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
211
|
+
# @return [Object] Returns the model itself
|
212
|
+
def build_from_hash(attributes)
|
213
|
+
return nil unless attributes.is_a?(Hash)
|
214
|
+
self.class.swagger_types.each_pair do |key, type|
|
215
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
216
|
+
value = attributes[pname]
|
217
|
+
if type =~ /\AArray<(.*)>/i
|
218
|
+
# check to ensure the input is an array given that the the attribute
|
219
|
+
# is documented as an array but the input is not
|
220
|
+
if value.is_a?(Array)
|
221
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
222
|
+
end
|
223
|
+
elsif !value.nil?
|
224
|
+
self.send("#{key}=", _deserialize(type, value))
|
225
|
+
end
|
226
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
227
|
+
end
|
228
|
+
|
229
|
+
self
|
230
|
+
end
|
231
|
+
|
232
|
+
# Deserializes the data based on type
|
233
|
+
# @param string type Data type
|
234
|
+
# @param string value Value to be deserialized
|
235
|
+
# @return [Object] Deserialized data
|
236
|
+
def _deserialize(type, value)
|
237
|
+
case type.to_sym
|
238
|
+
when :DateTime
|
239
|
+
Date.parse value
|
240
|
+
when :Date
|
241
|
+
Date.parse value
|
242
|
+
when :String
|
243
|
+
value.to_s
|
244
|
+
when :Integer
|
245
|
+
value.to_i
|
246
|
+
when :Float
|
247
|
+
value.to_f
|
248
|
+
when :BOOLEAN
|
249
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
250
|
+
true
|
251
|
+
else
|
252
|
+
false
|
253
|
+
end
|
254
|
+
when :Object
|
255
|
+
# generic object (usually a Hash), return directly
|
256
|
+
value
|
257
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
258
|
+
inner_type = Regexp.last_match[:inner_type]
|
259
|
+
value.map { |v| _deserialize(inner_type, v) }
|
260
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
261
|
+
k_type = Regexp.last_match[:k_type]
|
262
|
+
v_type = Regexp.last_match[:v_type]
|
263
|
+
{}.tap do |hash|
|
264
|
+
value.each do |k, v|
|
265
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
else
|
269
|
+
# model
|
270
|
+
temp_model = GroupDocsComparisonCloud.const_get(type).new
|
271
|
+
temp_model.build_from_hash(value)
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the string representation of the object
|
276
|
+
# @return [String] String presentation of the object
|
277
|
+
def to_s
|
278
|
+
to_hash.to_s
|
279
|
+
end
|
280
|
+
|
281
|
+
# to_body is an alias to to_hash (backward compatibility)
|
282
|
+
# @return [Hash] Returns the object in the form of hash
|
283
|
+
def to_body
|
284
|
+
to_hash
|
285
|
+
end
|
286
|
+
|
287
|
+
# Returns the object in the form of hash
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
289
|
+
def to_hash
|
290
|
+
hash = {}
|
291
|
+
self.class.attribute_map.each_pair do |attr, param|
|
292
|
+
value = self.send(attr)
|
293
|
+
next if value.nil?
|
294
|
+
hash[param] = _to_hash(value)
|
295
|
+
end
|
296
|
+
hash
|
297
|
+
end
|
298
|
+
|
299
|
+
# Outputs non-array value in the form of hash
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
301
|
+
# @param [Object] value Any valid value
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
303
|
+
def _to_hash(value)
|
304
|
+
if value.is_a?(Array)
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
306
|
+
elsif value.is_a?(Hash)
|
307
|
+
{}.tap do |hash|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
309
|
+
end
|
310
|
+
elsif value.respond_to? :to_hash
|
311
|
+
value.to_hash
|
312
|
+
else
|
313
|
+
value
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
end
|
318
|
+
|
319
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="rectangle.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="revision_info.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="settings.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="size.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="storage_exist.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="storage_file.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="style_change_info.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="updates_options.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="version.rb">
|
4
|
-
# Copyright (c)
|
4
|
+
# Copyright (c) Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -25,5 +25,5 @@
|
|
25
25
|
# --------------------------------------------------------------------------------------------------------------------
|
26
26
|
#
|
27
27
|
module GroupDocsComparisonCloud
|
28
|
-
VERSION = "
|
28
|
+
VERSION = "25.2".freeze
|
29
29
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ------------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="groupdocs_comparison_cloud.rb">
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -50,6 +50,7 @@ require_relative 'groupdocs_comparison_cloud/models/link'
|
|
50
50
|
require_relative 'groupdocs_comparison_cloud/models/metadata'
|
51
51
|
require_relative 'groupdocs_comparison_cloud/models/object_exist'
|
52
52
|
require_relative 'groupdocs_comparison_cloud/models/page_info'
|
53
|
+
require_relative 'groupdocs_comparison_cloud/models/preview_options'
|
53
54
|
require_relative 'groupdocs_comparison_cloud/models/rectangle'
|
54
55
|
require_relative 'groupdocs_comparison_cloud/models/revision_info'
|
55
56
|
require_relative 'groupdocs_comparison_cloud/models/settings'
|
@@ -66,5 +67,6 @@ require_relative 'groupdocs_comparison_cloud/api/file_api'
|
|
66
67
|
require_relative 'groupdocs_comparison_cloud/api/folder_api'
|
67
68
|
require_relative 'groupdocs_comparison_cloud/api/info_api'
|
68
69
|
require_relative 'groupdocs_comparison_cloud/api/license_api'
|
70
|
+
require_relative 'groupdocs_comparison_cloud/api/preview_api'
|
69
71
|
require_relative 'groupdocs_comparison_cloud/api/review_api'
|
70
72
|
require_relative 'groupdocs_comparison_cloud/api/storage_api'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groupdocs_comparison_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '25.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GroupDocs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/groupdocs_comparison_cloud/api/folder_api.rb
|
77
77
|
- lib/groupdocs_comparison_cloud/api/info_api.rb
|
78
78
|
- lib/groupdocs_comparison_cloud/api/license_api.rb
|
79
|
+
- lib/groupdocs_comparison_cloud/api/preview_api.rb
|
79
80
|
- lib/groupdocs_comparison_cloud/api/review_api.rb
|
80
81
|
- lib/groupdocs_comparison_cloud/api/storage_api.rb
|
81
82
|
- lib/groupdocs_comparison_cloud/api_client.rb
|
@@ -102,6 +103,7 @@ files:
|
|
102
103
|
- lib/groupdocs_comparison_cloud/models/metadata.rb
|
103
104
|
- lib/groupdocs_comparison_cloud/models/object_exist.rb
|
104
105
|
- lib/groupdocs_comparison_cloud/models/page_info.rb
|
106
|
+
- lib/groupdocs_comparison_cloud/models/preview_options.rb
|
105
107
|
- lib/groupdocs_comparison_cloud/models/rectangle.rb
|
106
108
|
- lib/groupdocs_comparison_cloud/models/revision_info.rb
|
107
109
|
- lib/groupdocs_comparison_cloud/models/settings.rb
|