groupdocs_comparison_cloud 18.9 → 19.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/groupdocs_comparison_cloud.rb +28 -42
- data/lib/groupdocs_comparison_cloud/api/compare_api.rb +411 -0
- data/lib/groupdocs_comparison_cloud/api/file_api.rb +729 -0
- data/lib/groupdocs_comparison_cloud/api/folder_api.rb +694 -0
- data/lib/groupdocs_comparison_cloud/api/info_api.rb +169 -0
- data/lib/groupdocs_comparison_cloud/api/storage_api.rb +541 -0
- data/lib/groupdocs_comparison_cloud/api_client.rb +7 -17
- data/lib/groupdocs_comparison_cloud/api_error.rb +5 -3
- data/lib/groupdocs_comparison_cloud/configuration.rb +3 -3
- data/lib/groupdocs_comparison_cloud/models/{comparison_change.rb → change_info.rb} +57 -49
- data/lib/groupdocs_comparison_cloud/models/diagram_master_setting.rb +259 -0
- data/lib/groupdocs_comparison_cloud/models/disc_usage.rb +234 -0
- data/lib/groupdocs_comparison_cloud/models/error.rb +244 -0
- data/lib/groupdocs_comparison_cloud/models/{comparison_file_info.rb → error_details.rb} +39 -36
- data/lib/groupdocs_comparison_cloud/models/{style_settings_values.rb → file_info.rb} +51 -38
- data/lib/groupdocs_comparison_cloud/models/file_version.rb +289 -0
- data/lib/groupdocs_comparison_cloud/models/{value_type.rb → file_versions.rb} +33 -13
- data/lib/groupdocs_comparison_cloud/models/{comparison_changes_category_dto.rb → files_list.rb} +28 -30
- data/lib/groupdocs_comparison_cloud/models/files_upload_result.rb +228 -0
- data/lib/groupdocs_comparison_cloud/models/format.rb +224 -0
- data/lib/groupdocs_comparison_cloud/models/{comparison_style_change.rb → formats_result.rb} +29 -19
- data/lib/groupdocs_comparison_cloud/models/items_style.rb +289 -0
- data/lib/groupdocs_comparison_cloud/models/link.rb +16 -8
- data/lib/groupdocs_comparison_cloud/models/{comparison_metadata_values.rb → metadata.rb} +28 -20
- data/lib/groupdocs_comparison_cloud/models/object_exist.rb +234 -0
- data/lib/groupdocs_comparison_cloud/models/{comparison_request.rb → options.rb} +39 -33
- data/lib/groupdocs_comparison_cloud/models/original_size.rb +234 -0
- data/lib/groupdocs_comparison_cloud/models/{comparison_request_settings.rb → settings.rb} +98 -70
- data/lib/groupdocs_comparison_cloud/models/storage_exist.rb +219 -0
- data/lib/groupdocs_comparison_cloud/models/storage_file.rb +264 -0
- data/lib/groupdocs_comparison_cloud/models/style_change_info.rb +234 -0
- data/lib/groupdocs_comparison_cloud/models/updates_options.rb +258 -0
- data/lib/groupdocs_comparison_cloud/version.rb +2 -2
- metadata +29 -44
- data/lib/groupdocs_comparison_cloud/api/changes_api.rb +0 -470
- data/lib/groupdocs_comparison_cloud/api/comparison_api.rb +0 -365
- data/lib/groupdocs_comparison_cloud/models/color.rb +0 -1404
- data/lib/groupdocs_comparison_cloud/models/requests/comparison_images_request.rb +0 -49
- data/lib/groupdocs_comparison_cloud/models/requests/comparison_images_stream_request.rb +0 -45
- data/lib/groupdocs_comparison_cloud/models/requests/comparison_request.rb +0 -49
- data/lib/groupdocs_comparison_cloud/models/requests/comparison_stream_request.rb +0 -45
- data/lib/groupdocs_comparison_cloud/models/requests/post_categories_changes_request.rb +0 -49
- data/lib/groupdocs_comparison_cloud/models/requests/post_changes_request.rb +0 -45
- data/lib/groupdocs_comparison_cloud/models/requests/put_changes_document_request.rb +0 -49
- data/lib/groupdocs_comparison_cloud/models/requests/put_changes_document_stream_request.rb +0 -45
- data/lib/groupdocs_comparison_cloud/models/requests/put_changes_images_request.rb +0 -49
- data/lib/groupdocs_comparison_cloud/models/requests/put_changes_images_stream_request.rb +0 -45
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="link.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2019 Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -125,20 +125,28 @@ module GroupDocsComparisonCloud
|
|
125
125
|
[href, rel, type, title].hash
|
126
126
|
end
|
127
127
|
|
128
|
+
# Downcases first letter.
|
129
|
+
# @return downcased string
|
130
|
+
def uncap(str)
|
131
|
+
str[0, 1].downcase + str[1..-1]
|
132
|
+
end
|
133
|
+
|
128
134
|
# Builds the object from hash
|
129
135
|
# @param [Hash] attributes Model attributes in the form of hash
|
130
136
|
# @return [Object] Returns the model itself
|
131
137
|
def build_from_hash(attributes)
|
132
138
|
return nil unless attributes.is_a?(Hash)
|
133
139
|
self.class.swagger_types.each_pair do |key, type|
|
140
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
141
|
+
value = attributes[pname]
|
134
142
|
if type =~ /\AArray<(.*)>/i
|
135
143
|
# check to ensure the input is an array given that the the attribute
|
136
|
-
# is documented as an array but the input is not
|
137
|
-
if
|
138
|
-
self.send("#{key}=",
|
144
|
+
# is documented as an array but the input is not
|
145
|
+
if value.is_a?(Array)
|
146
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
139
147
|
end
|
140
|
-
elsif !
|
141
|
-
self.send("#{key}=", _deserialize(type,
|
148
|
+
elsif !value.nil?
|
149
|
+
self.send("#{key}=", _deserialize(type, value))
|
142
150
|
end
|
143
151
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
144
152
|
end
|
@@ -153,9 +161,9 @@ module GroupDocsComparisonCloud
|
|
153
161
|
def _deserialize(type, value)
|
154
162
|
case type.to_sym
|
155
163
|
when :DateTime
|
156
|
-
|
164
|
+
Date.parse value
|
157
165
|
when :Date
|
158
|
-
|
166
|
+
Date.parse value
|
159
167
|
when :String
|
160
168
|
value.to_s
|
161
169
|
when :Integer
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="
|
4
|
-
# Copyright (c) 2003-
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="metadata.rb">
|
4
|
+
# Copyright (c) 2003-2019 Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -28,16 +28,16 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsComparisonCloud
|
31
|
-
|
32
|
-
class
|
31
|
+
# MetaData Object fields
|
32
|
+
class Metadata
|
33
33
|
|
34
|
-
#
|
34
|
+
# Value of document Author
|
35
35
|
attr_accessor :author
|
36
36
|
|
37
|
-
#
|
37
|
+
# Value of last save by author of document
|
38
38
|
attr_accessor :last_save_by
|
39
39
|
|
40
|
-
#
|
40
|
+
# Value of Company of document
|
41
41
|
attr_accessor :company
|
42
42
|
|
43
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -66,16 +66,16 @@ module GroupDocsComparisonCloud
|
|
66
66
|
# convert string to symbol for hash key
|
67
67
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
68
|
|
69
|
-
if attributes.key?(:'
|
70
|
-
self.author = attributes[:'
|
69
|
+
if attributes.key?(:'Author')
|
70
|
+
self.author = attributes[:'Author']
|
71
71
|
end
|
72
72
|
|
73
|
-
if attributes.key?(:'
|
74
|
-
self.last_save_by = attributes[:'
|
73
|
+
if attributes.key?(:'LastSaveBy')
|
74
|
+
self.last_save_by = attributes[:'LastSaveBy']
|
75
75
|
end
|
76
76
|
|
77
|
-
if attributes.key?(:'
|
78
|
-
self.company = attributes[:'
|
77
|
+
if attributes.key?(:'Company')
|
78
|
+
self.company = attributes[:'Company']
|
79
79
|
end
|
80
80
|
|
81
81
|
end
|
@@ -115,20 +115,28 @@ module GroupDocsComparisonCloud
|
|
115
115
|
[author, last_save_by, company].hash
|
116
116
|
end
|
117
117
|
|
118
|
+
# Downcases first letter.
|
119
|
+
# @return downcased string
|
120
|
+
def uncap(str)
|
121
|
+
str[0, 1].downcase + str[1..-1]
|
122
|
+
end
|
123
|
+
|
118
124
|
# Builds the object from hash
|
119
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
120
126
|
# @return [Object] Returns the model itself
|
121
127
|
def build_from_hash(attributes)
|
122
128
|
return nil unless attributes.is_a?(Hash)
|
123
129
|
self.class.swagger_types.each_pair do |key, type|
|
130
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
131
|
+
value = attributes[pname]
|
124
132
|
if type =~ /\AArray<(.*)>/i
|
125
133
|
# check to ensure the input is an array given that the the attribute
|
126
|
-
# is documented as an array but the input is not
|
127
|
-
if
|
128
|
-
self.send("#{key}=",
|
134
|
+
# is documented as an array but the input is not
|
135
|
+
if value.is_a?(Array)
|
136
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
129
137
|
end
|
130
|
-
elsif !
|
131
|
-
self.send("#{key}=", _deserialize(type,
|
138
|
+
elsif !value.nil?
|
139
|
+
self.send("#{key}=", _deserialize(type, value))
|
132
140
|
end
|
133
141
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
134
142
|
end
|
@@ -143,9 +151,9 @@ module GroupDocsComparisonCloud
|
|
143
151
|
def _deserialize(type, value)
|
144
152
|
case type.to_sym
|
145
153
|
when :DateTime
|
146
|
-
|
154
|
+
Date.parse value
|
147
155
|
when :Date
|
148
|
-
|
156
|
+
Date.parse value
|
149
157
|
when :String
|
150
158
|
value.to_s
|
151
159
|
when :Integer
|
@@ -0,0 +1,234 @@
|
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="object_exist.rb">
|
4
|
+
# Copyright (c) 2003-2019 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
|
+
# Object exists
|
32
|
+
class ObjectExist
|
33
|
+
|
34
|
+
# Indicates that the file or folder exists.
|
35
|
+
attr_accessor :exists
|
36
|
+
|
37
|
+
# True if it is a folder, false if it is a file.
|
38
|
+
attr_accessor :is_folder
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'exists' => :'Exists',
|
44
|
+
:'is_folder' => :'IsFolder'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.swagger_types
|
50
|
+
{
|
51
|
+
:'exists' => :'BOOLEAN',
|
52
|
+
:'is_folder' => :'BOOLEAN'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
return unless attributes.is_a?(Hash)
|
60
|
+
|
61
|
+
# convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
|
+
|
64
|
+
if attributes.key?(:'Exists')
|
65
|
+
self.exists = attributes[:'Exists']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'IsFolder')
|
69
|
+
self.is_folder = attributes[:'IsFolder']
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properies with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = []
|
78
|
+
if @exists.nil?
|
79
|
+
invalid_properties.push("invalid value for 'exists', exists cannot be nil.")
|
80
|
+
end
|
81
|
+
|
82
|
+
if @is_folder.nil?
|
83
|
+
invalid_properties.push("invalid value for 'is_folder', is_folder cannot be nil.")
|
84
|
+
end
|
85
|
+
|
86
|
+
return invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if @exists.nil?
|
93
|
+
return false if @is_folder.nil?
|
94
|
+
return true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(other)
|
100
|
+
return true if self.equal?(other)
|
101
|
+
self.class == other.class &&
|
102
|
+
exists == other.exists &&
|
103
|
+
is_folder == other.is_folder
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(other)
|
109
|
+
self == other
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Fixnum] Hash code
|
114
|
+
def hash
|
115
|
+
[exists, is_folder].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Downcases first letter.
|
119
|
+
# @return downcased string
|
120
|
+
def uncap(str)
|
121
|
+
str[0, 1].downcase + str[1..-1]
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.swagger_types.each_pair do |key, type|
|
130
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
131
|
+
value = attributes[pname]
|
132
|
+
if type =~ /\AArray<(.*)>/i
|
133
|
+
# check to ensure the input is an array given that the the attribute
|
134
|
+
# is documented as an array but the input is not
|
135
|
+
if value.is_a?(Array)
|
136
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
137
|
+
end
|
138
|
+
elsif !value.nil?
|
139
|
+
self.send("#{key}=", _deserialize(type, value))
|
140
|
+
end
|
141
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
142
|
+
end
|
143
|
+
|
144
|
+
self
|
145
|
+
end
|
146
|
+
|
147
|
+
# Deserializes the data based on type
|
148
|
+
# @param string type Data type
|
149
|
+
# @param string value Value to be deserialized
|
150
|
+
# @return [Object] Deserialized data
|
151
|
+
def _deserialize(type, value)
|
152
|
+
case type.to_sym
|
153
|
+
when :DateTime
|
154
|
+
Date.parse value
|
155
|
+
when :Date
|
156
|
+
Date.parse value
|
157
|
+
when :String
|
158
|
+
value.to_s
|
159
|
+
when :Integer
|
160
|
+
value.to_i
|
161
|
+
when :Float
|
162
|
+
value.to_f
|
163
|
+
when :BOOLEAN
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
|
+
true
|
166
|
+
else
|
167
|
+
false
|
168
|
+
end
|
169
|
+
when :Object
|
170
|
+
# generic object (usually a Hash), return directly
|
171
|
+
value
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each do |k, v|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
else
|
184
|
+
# model
|
185
|
+
temp_model = GroupDocsComparisonCloud.const_get(type).new
|
186
|
+
temp_model.build_from_hash(value)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the string representation of the object
|
191
|
+
# @return [String] String presentation of the object
|
192
|
+
def to_s
|
193
|
+
to_hash.to_s
|
194
|
+
end
|
195
|
+
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_body
|
199
|
+
to_hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the object in the form of hash
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_hash
|
205
|
+
hash = {}
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
207
|
+
value = self.send(attr)
|
208
|
+
next if value.nil?
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Outputs non-array value in the form of hash
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
216
|
+
# @param [Object] value Any valid value
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
218
|
+
def _to_hash(value)
|
219
|
+
if value.is_a?(Array)
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
221
|
+
elsif value.is_a?(Hash)
|
222
|
+
{}.tap do |hash|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
224
|
+
end
|
225
|
+
elsif value.respond_to? :to_hash
|
226
|
+
value.to_hash
|
227
|
+
else
|
228
|
+
value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="
|
4
|
-
# Copyright (c) 2003-
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="options.rb">
|
4
|
+
# Copyright (c) 2003-2019 Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -28,20 +28,20 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsComparisonCloud
|
31
|
-
#
|
32
|
-
class
|
31
|
+
# Defines comparison options
|
32
|
+
class Options
|
33
33
|
|
34
|
-
#
|
34
|
+
# Information about source file
|
35
35
|
attr_accessor :source_file
|
36
36
|
|
37
|
-
#
|
37
|
+
# Information about target file(s)
|
38
38
|
attr_accessor :target_files
|
39
39
|
|
40
|
-
#
|
40
|
+
# Comparison settings
|
41
41
|
attr_accessor :settings
|
42
42
|
|
43
|
-
#
|
44
|
-
attr_accessor :
|
43
|
+
# Path to the resultant document (if not specified the document will not be saved)
|
44
|
+
attr_accessor :output_path
|
45
45
|
|
46
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
47
|
def self.attribute_map
|
@@ -49,17 +49,17 @@ module GroupDocsComparisonCloud
|
|
49
49
|
:'source_file' => :'SourceFile',
|
50
50
|
:'target_files' => :'TargetFiles',
|
51
51
|
:'settings' => :'Settings',
|
52
|
-
:'
|
52
|
+
:'output_path' => :'OutputPath'
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
56
56
|
# Attribute type mapping.
|
57
57
|
def self.swagger_types
|
58
58
|
{
|
59
|
-
:'source_file' => :'
|
60
|
-
:'target_files' => :'Array<
|
61
|
-
:'settings' => :'
|
62
|
-
:'
|
59
|
+
:'source_file' => :'FileInfo',
|
60
|
+
:'target_files' => :'Array<FileInfo>',
|
61
|
+
:'settings' => :'Settings',
|
62
|
+
:'output_path' => :'String'
|
63
63
|
}
|
64
64
|
end
|
65
65
|
|
@@ -71,24 +71,22 @@ module GroupDocsComparisonCloud
|
|
71
71
|
# convert string to symbol for hash key
|
72
72
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
73
73
|
|
74
|
-
if attributes.key?(:'
|
75
|
-
self.source_file = attributes[:'
|
74
|
+
if attributes.key?(:'SourceFile')
|
75
|
+
self.source_file = attributes[:'SourceFile']
|
76
76
|
end
|
77
77
|
|
78
|
-
if attributes.key?(:'
|
79
|
-
if (value = attributes[:'
|
78
|
+
if attributes.key?(:'TargetFiles')
|
79
|
+
if (value = attributes[:'TargetFiles']).is_a?(Array)
|
80
80
|
self.target_files = value
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
if attributes.key?(:'
|
85
|
-
self.settings = attributes[:'
|
84
|
+
if attributes.key?(:'Settings')
|
85
|
+
self.settings = attributes[:'Settings']
|
86
86
|
end
|
87
87
|
|
88
|
-
if attributes.key?(:'
|
89
|
-
|
90
|
-
self.changes = value
|
91
|
-
end
|
88
|
+
if attributes.key?(:'OutputPath')
|
89
|
+
self.output_path = attributes[:'OutputPath']
|
92
90
|
end
|
93
91
|
|
94
92
|
end
|
@@ -114,7 +112,7 @@ module GroupDocsComparisonCloud
|
|
114
112
|
source_file == other.source_file &&
|
115
113
|
target_files == other.target_files &&
|
116
114
|
settings == other.settings &&
|
117
|
-
|
115
|
+
output_path == other.output_path
|
118
116
|
end
|
119
117
|
|
120
118
|
# @see the `==` method
|
@@ -126,7 +124,13 @@ module GroupDocsComparisonCloud
|
|
126
124
|
# Calculates hash code according to all attributes.
|
127
125
|
# @return [Fixnum] Hash code
|
128
126
|
def hash
|
129
|
-
[source_file, target_files, settings,
|
127
|
+
[source_file, target_files, settings, output_path].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Downcases first letter.
|
131
|
+
# @return downcased string
|
132
|
+
def uncap(str)
|
133
|
+
str[0, 1].downcase + str[1..-1]
|
130
134
|
end
|
131
135
|
|
132
136
|
# Builds the object from hash
|
@@ -135,14 +139,16 @@ module GroupDocsComparisonCloud
|
|
135
139
|
def build_from_hash(attributes)
|
136
140
|
return nil unless attributes.is_a?(Hash)
|
137
141
|
self.class.swagger_types.each_pair do |key, type|
|
142
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
143
|
+
value = attributes[pname]
|
138
144
|
if type =~ /\AArray<(.*)>/i
|
139
145
|
# check to ensure the input is an array given that the the attribute
|
140
|
-
# is documented as an array but the input is not
|
141
|
-
if
|
142
|
-
self.send("#{key}=",
|
146
|
+
# is documented as an array but the input is not
|
147
|
+
if value.is_a?(Array)
|
148
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
143
149
|
end
|
144
|
-
elsif !
|
145
|
-
self.send("#{key}=", _deserialize(type,
|
150
|
+
elsif !value.nil?
|
151
|
+
self.send("#{key}=", _deserialize(type, value))
|
146
152
|
end
|
147
153
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
148
154
|
end
|
@@ -157,9 +163,9 @@ module GroupDocsComparisonCloud
|
|
157
163
|
def _deserialize(type, value)
|
158
164
|
case type.to_sym
|
159
165
|
when :DateTime
|
160
|
-
|
166
|
+
Date.parse value
|
161
167
|
when :Date
|
162
|
-
|
168
|
+
Date.parse value
|
163
169
|
when :String
|
164
170
|
value.to_s
|
165
171
|
when :Integer
|