groupdocs_comparison_cloud 20.5 → 21.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_comparison_cloud.rb +4 -1
  3. data/lib/groupdocs_comparison_cloud/api/compare_api.rb +4 -4
  4. data/lib/groupdocs_comparison_cloud/api/file_api.rb +6 -6
  5. data/lib/groupdocs_comparison_cloud/api/folder_api.rb +6 -6
  6. data/lib/groupdocs_comparison_cloud/api/info_api.rb +2 -2
  7. data/lib/groupdocs_comparison_cloud/api/review_api.rb +314 -0
  8. data/lib/groupdocs_comparison_cloud/api/storage_api.rb +5 -5
  9. data/lib/groupdocs_comparison_cloud/api_client.rb +1 -1
  10. data/lib/groupdocs_comparison_cloud/api_error.rb +16 -6
  11. data/lib/groupdocs_comparison_cloud/configuration.rb +1 -1
  12. data/lib/groupdocs_comparison_cloud/models/apply_revisions_options.rb +266 -0
  13. data/lib/groupdocs_comparison_cloud/models/change_info.rb +1 -1
  14. data/lib/groupdocs_comparison_cloud/models/comparison_options.rb +1 -1
  15. data/lib/groupdocs_comparison_cloud/models/diagram_master_setting.rb +1 -1
  16. data/lib/groupdocs_comparison_cloud/models/disc_usage.rb +1 -1
  17. data/lib/groupdocs_comparison_cloud/models/error.rb +1 -1
  18. data/lib/groupdocs_comparison_cloud/models/error_details.rb +1 -1
  19. data/lib/groupdocs_comparison_cloud/models/file_info.rb +1 -1
  20. data/lib/groupdocs_comparison_cloud/models/file_version.rb +1 -1
  21. data/lib/groupdocs_comparison_cloud/models/file_versions.rb +1 -1
  22. data/lib/groupdocs_comparison_cloud/models/files_list.rb +1 -1
  23. data/lib/groupdocs_comparison_cloud/models/files_upload_result.rb +1 -1
  24. data/lib/groupdocs_comparison_cloud/models/format.rb +1 -1
  25. data/lib/groupdocs_comparison_cloud/models/formats_result.rb +1 -1
  26. data/lib/groupdocs_comparison_cloud/models/info_result.rb +1 -1
  27. data/lib/groupdocs_comparison_cloud/models/items_style.rb +1 -1
  28. data/lib/groupdocs_comparison_cloud/models/link.rb +1 -1
  29. data/lib/groupdocs_comparison_cloud/models/metadata.rb +1 -1
  30. data/lib/groupdocs_comparison_cloud/models/object_exist.rb +1 -1
  31. data/lib/groupdocs_comparison_cloud/models/page_info.rb +1 -1
  32. data/lib/groupdocs_comparison_cloud/models/rectangle.rb +1 -1
  33. data/lib/groupdocs_comparison_cloud/models/revision_info.rb +322 -0
  34. data/lib/groupdocs_comparison_cloud/models/settings.rb +1 -1
  35. data/lib/groupdocs_comparison_cloud/models/size.rb +1 -1
  36. data/lib/groupdocs_comparison_cloud/models/storage_exist.rb +1 -1
  37. data/lib/groupdocs_comparison_cloud/models/storage_file.rb +1 -1
  38. data/lib/groupdocs_comparison_cloud/models/style_change_info.rb +1 -1
  39. data/lib/groupdocs_comparison_cloud/models/updates_options.rb +1 -1
  40. data/lib/groupdocs_comparison_cloud/version.rb +2 -2
  41. metadata +5 -16
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="files_list.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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="rectangle.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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,322 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="revision_info.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 GroupDocsComparisonCloud
31
+ # Provides information about one revision.
32
+ class RevisionInfo
33
+
34
+ # Id of revision
35
+ attr_accessor :id
36
+
37
+ # Action (accept or reject). This field allows you to influence the display of the revision.
38
+ attr_accessor :action
39
+
40
+ # The text that is in revision.
41
+ attr_accessor :text
42
+
43
+ # Author.
44
+ attr_accessor :author
45
+
46
+ # RevisionHandler type, depending on the type the Action (accept or reject) logic changes.
47
+ attr_accessor :type
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'id' => :'Id',
74
+ :'action' => :'Action',
75
+ :'text' => :'Text',
76
+ :'author' => :'Author',
77
+ :'type' => :'Type'
78
+ }
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.swagger_types
83
+ {
84
+ :'id' => :'Integer',
85
+ :'action' => :'String',
86
+ :'text' => :'String',
87
+ :'author' => :'String',
88
+ :'type' => :'String'
89
+ }
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ return unless attributes.is_a?(Hash)
96
+
97
+ # convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
99
+
100
+ if attributes.key?(:'Id')
101
+ self.id = attributes[:'Id']
102
+ end
103
+
104
+ if attributes.key?(:'Action')
105
+ self.action = attributes[:'Action']
106
+ end
107
+
108
+ if attributes.key?(:'Text')
109
+ self.text = attributes[:'Text']
110
+ end
111
+
112
+ if attributes.key?(:'Author')
113
+ self.author = attributes[:'Author']
114
+ end
115
+
116
+ if attributes.key?(:'Type')
117
+ self.type = attributes[:'Type']
118
+ end
119
+
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properies with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = []
126
+ if @id.nil?
127
+ invalid_properties.push("invalid value for 'id', id cannot be nil.")
128
+ end
129
+
130
+ if @action.nil?
131
+ invalid_properties.push("invalid value for 'action', action cannot be nil.")
132
+ end
133
+
134
+ if @type.nil?
135
+ invalid_properties.push("invalid value for 'type', type cannot be nil.")
136
+ end
137
+
138
+ return invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ return false if @id.nil?
145
+ return false if @action.nil?
146
+ action_validator = EnumAttributeValidator.new('String', ["None", "Accept", "Reject"])
147
+ return false unless action_validator.valid?(@action)
148
+ return false if @type.nil?
149
+ type_validator = EnumAttributeValidator.new('String', ["Insertion", "Deletion", "FormatChange", "StyleDefinitionChange", "Moving"])
150
+ return false unless type_validator.valid?(@type)
151
+ return true
152
+ end
153
+
154
+ # Custom attribute writer method checking allowed values (enum).
155
+ # @param [Object] action Object to be assigned
156
+ def action=(action)
157
+ validator = EnumAttributeValidator.new('String', ["None", "Accept", "Reject"])
158
+ if action.to_i == 0
159
+ unless validator.valid?(action)
160
+ raise ArgumentError, "invalid value for 'action', must be one of #{validator.allowable_values}."
161
+ end
162
+ @action = action
163
+ else
164
+ @action = validator.allowable_values[action.to_i]
165
+ end
166
+ end
167
+
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] type Object to be assigned
170
+ def type=(type)
171
+ validator = EnumAttributeValidator.new('String', ["Insertion", "Deletion", "FormatChange", "StyleDefinitionChange", "Moving"])
172
+ if type.to_i == 0
173
+ unless validator.valid?(type)
174
+ raise ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
175
+ end
176
+ @type = type
177
+ else
178
+ @type = validator.allowable_values[type.to_i]
179
+ end
180
+ end
181
+
182
+ # Checks equality by comparing each attribute.
183
+ # @param [Object] Object to be compared
184
+ def ==(other)
185
+ return true if self.equal?(other)
186
+ self.class == other.class &&
187
+ id == other.id &&
188
+ action == other.action &&
189
+ text == other.text &&
190
+ author == other.author &&
191
+ type == other.type
192
+ end
193
+
194
+ # @see the `==` method
195
+ # @param [Object] Object to be compared
196
+ def eql?(other)
197
+ self == other
198
+ end
199
+
200
+ # Calculates hash code according to all attributes.
201
+ # @return [Fixnum] Hash code
202
+ def hash
203
+ [id, action, text, author, type].hash
204
+ end
205
+
206
+ # Downcases first letter.
207
+ # @return downcased string
208
+ def uncap(str)
209
+ str[0, 1].downcase + str[1..-1]
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ self.class.swagger_types.each_pair do |key, type|
218
+ pname = uncap(self.class.attribute_map[key]).intern
219
+ value = attributes[pname]
220
+ if type =~ /\AArray<(.*)>/i
221
+ # check to ensure the input is an array given that the the attribute
222
+ # is documented as an array but the input is not
223
+ if value.is_a?(Array)
224
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
225
+ end
226
+ elsif !value.nil?
227
+ self.send("#{key}=", _deserialize(type, value))
228
+ end
229
+ # or else data not found in attributes(hash), not an issue as the data can be optional
230
+ end
231
+
232
+ self
233
+ end
234
+
235
+ # Deserializes the data based on type
236
+ # @param string type Data type
237
+ # @param string value Value to be deserialized
238
+ # @return [Object] Deserialized data
239
+ def _deserialize(type, value)
240
+ case type.to_sym
241
+ when :DateTime
242
+ Date.parse value
243
+ when :Date
244
+ Date.parse value
245
+ when :String
246
+ value.to_s
247
+ when :Integer
248
+ value.to_i
249
+ when :Float
250
+ value.to_f
251
+ when :BOOLEAN
252
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
+ true
254
+ else
255
+ false
256
+ end
257
+ when :Object
258
+ # generic object (usually a Hash), return directly
259
+ value
260
+ when /\AArray<(?<inner_type>.+)>\z/
261
+ inner_type = Regexp.last_match[:inner_type]
262
+ value.map { |v| _deserialize(inner_type, v) }
263
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
+ k_type = Regexp.last_match[:k_type]
265
+ v_type = Regexp.last_match[:v_type]
266
+ {}.tap do |hash|
267
+ value.each do |k, v|
268
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
269
+ end
270
+ end
271
+ else
272
+ # model
273
+ temp_model = GroupDocsComparisonCloud.const_get(type).new
274
+ temp_model.build_from_hash(value)
275
+ end
276
+ end
277
+
278
+ # Returns the string representation of the object
279
+ # @return [String] String presentation of the object
280
+ def to_s
281
+ to_hash.to_s
282
+ end
283
+
284
+ # to_body is an alias to to_hash (backward compatibility)
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_body
287
+ to_hash
288
+ end
289
+
290
+ # Returns the object in the form of hash
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_hash
293
+ hash = {}
294
+ self.class.attribute_map.each_pair do |attr, param|
295
+ value = self.send(attr)
296
+ next if value.nil?
297
+ hash[param] = _to_hash(value)
298
+ end
299
+ hash
300
+ end
301
+
302
+ # Outputs non-array value in the form of hash
303
+ # For object, use to_hash. Otherwise, just return the value
304
+ # @param [Object] value Any valid value
305
+ # @return [Hash] Returns the value in the form of hash
306
+ def _to_hash(value)
307
+ if value.is_a?(Array)
308
+ value.compact.map { |v| _to_hash(v) }
309
+ elsif value.is_a?(Hash)
310
+ {}.tap do |hash|
311
+ value.each { |k, v| hash[k] = _to_hash(v) }
312
+ end
313
+ elsif value.respond_to? :to_hash
314
+ value.to_hash
315
+ else
316
+ value
317
+ end
318
+ end
319
+
320
+ end
321
+
322
+ end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="settings.rb">
4
- # Copyright (c) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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) 2003-2020 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy