groupdocs_merger_cloud 24.11 → 25.5
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_merger_cloud/api/document_api.rb +102 -5
- data/lib/groupdocs_merger_cloud/api/file_api.rb +6 -6
- data/lib/groupdocs_merger_cloud/api/folder_api.rb +6 -6
- data/lib/groupdocs_merger_cloud/api/info_api.rb +2 -2
- data/lib/groupdocs_merger_cloud/api/license_api.rb +1 -1
- data/lib/groupdocs_merger_cloud/api/pages_api.rb +7 -7
- data/lib/groupdocs_merger_cloud/api/security_api.rb +5 -5
- data/lib/groupdocs_merger_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_merger_cloud/api_client.rb +1 -1
- data/lib/groupdocs_merger_cloud/api_client_error.rb +1 -1
- data/lib/groupdocs_merger_cloud/configuration.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/api_error.rb +244 -0
- data/lib/groupdocs_merger_cloud/models/api_error_response.rb +220 -0
- data/lib/groupdocs_merger_cloud/models/consumption_result.rb +20 -5
- data/lib/groupdocs_merger_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/document_result.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/error.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/extract_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/file_info.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/format.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/import_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/info_result.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/join_item.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/join_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/mix_pages_item.rb +231 -0
- data/lib/groupdocs_merger_cloud/models/mix_pages_options.rb +352 -0
- data/lib/groupdocs_merger_cloud/models/move_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/multi_document_result.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/orientation_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/page_info.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/page_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/password_result.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/preview_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/remove_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/rotate_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/split_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/swap_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/models/update_password_options.rb +1 -1
- data/lib/groupdocs_merger_cloud/version.rb +2 -2
- data/lib/groupdocs_merger_cloud.rb +5 -1
- metadata +6 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="join_item.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="join_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
|
@@ -0,0 +1,231 @@
|
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="mix_pages_item.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 GroupDocsMergerCloud
|
31
|
+
# Defines item options for documents MixPages method
|
32
|
+
class MixPagesItem
|
33
|
+
|
34
|
+
# Index of the file from MixPagesOptions.Files collection.
|
35
|
+
attr_accessor :file_index
|
36
|
+
|
37
|
+
# List of page numbers to use in a MixPages operation. NOTE: page numbering starts from 1.
|
38
|
+
attr_accessor :pages
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'file_index' => :'FileIndex',
|
44
|
+
:'pages' => :'Pages'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.swagger_types
|
50
|
+
{
|
51
|
+
:'file_index' => :'Integer',
|
52
|
+
:'pages' => :'Array<Integer>'
|
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?(:'FileIndex')
|
65
|
+
self.file_index = attributes[:'FileIndex']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'Pages')
|
69
|
+
if (value = attributes[:'Pages']).is_a?(Array)
|
70
|
+
self.pages = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properies with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
invalid_properties = []
|
80
|
+
if @file_index.nil?
|
81
|
+
invalid_properties.push("invalid value for 'file_index', file_index cannot be nil.")
|
82
|
+
end
|
83
|
+
|
84
|
+
return invalid_properties
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
return false if @file_index.nil?
|
91
|
+
return true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Checks equality by comparing each attribute.
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def ==(other)
|
97
|
+
return true if self.equal?(other)
|
98
|
+
self.class == other.class &&
|
99
|
+
file_index == other.file_index &&
|
100
|
+
pages == other.pages
|
101
|
+
end
|
102
|
+
|
103
|
+
# @see the `==` method
|
104
|
+
# @param [Object] Object to be compared
|
105
|
+
def eql?(other)
|
106
|
+
self == other
|
107
|
+
end
|
108
|
+
|
109
|
+
# Calculates hash code according to all attributes.
|
110
|
+
# @return [Fixnum] Hash code
|
111
|
+
def hash
|
112
|
+
[file_index, pages].hash
|
113
|
+
end
|
114
|
+
|
115
|
+
# Downcases first letter.
|
116
|
+
# @return downcased string
|
117
|
+
def uncap(str)
|
118
|
+
str[0, 1].downcase + str[1..-1]
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
self.class.swagger_types.each_pair do |key, type|
|
127
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
128
|
+
value = attributes[pname]
|
129
|
+
if type =~ /\AArray<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if value.is_a?(Array)
|
133
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
134
|
+
end
|
135
|
+
elsif !value.nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, value))
|
137
|
+
end
|
138
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
Date.parse value
|
152
|
+
when :Date
|
153
|
+
Date.parse value
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :BOOLEAN
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else
|
181
|
+
# model
|
182
|
+
temp_model = GroupDocsMergerCloud.const_get(type).new
|
183
|
+
temp_model.build_from_hash(value)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the object in the form of hash
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_hash
|
202
|
+
hash = {}
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
204
|
+
value = self.send(attr)
|
205
|
+
next if value.nil?
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
@@ -0,0 +1,352 @@
|
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="mix_pages_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 GroupDocsMergerCloud
|
31
|
+
# Defines options for documents JoinPages method
|
32
|
+
class MixPagesOptions
|
33
|
+
|
34
|
+
# Source documents for JoinPages operation
|
35
|
+
attr_accessor :files
|
36
|
+
|
37
|
+
# Page numbers for document indicies in Files collection.
|
38
|
+
attr_accessor :files_pages
|
39
|
+
|
40
|
+
# The output path
|
41
|
+
attr_accessor :output_path
|
42
|
+
|
43
|
+
# Allows to join word documents without empty space between documents.
|
44
|
+
attr_accessor :word_join_mode
|
45
|
+
|
46
|
+
# Compliance mode for the Word Ooxml format
|
47
|
+
attr_accessor :word_join_compliance
|
48
|
+
|
49
|
+
# Possible modes for the image joining.
|
50
|
+
attr_accessor :image_join_mode
|
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
|
+
:'files' => :'Files',
|
77
|
+
:'files_pages' => :'FilesPages',
|
78
|
+
:'output_path' => :'OutputPath',
|
79
|
+
:'word_join_mode' => :'WordJoinMode',
|
80
|
+
:'word_join_compliance' => :'WordJoinCompliance',
|
81
|
+
:'image_join_mode' => :'ImageJoinMode'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# Attribute type mapping.
|
86
|
+
def self.swagger_types
|
87
|
+
{
|
88
|
+
:'files' => :'Array<FileInfo>',
|
89
|
+
:'files_pages' => :'Array<MixPagesItem>',
|
90
|
+
:'output_path' => :'String',
|
91
|
+
:'word_join_mode' => :'String',
|
92
|
+
:'word_join_compliance' => :'String',
|
93
|
+
:'image_join_mode' => :'String'
|
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?(:'Files')
|
106
|
+
if (value = attributes[:'Files']).is_a?(Array)
|
107
|
+
self.files = value
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'FilesPages')
|
112
|
+
if (value = attributes[:'FilesPages']).is_a?(Array)
|
113
|
+
self.files_pages = value
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'OutputPath')
|
118
|
+
self.output_path = attributes[:'OutputPath']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'WordJoinMode')
|
122
|
+
self.word_join_mode = attributes[:'WordJoinMode']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'WordJoinCompliance')
|
126
|
+
self.word_join_compliance = attributes[:'WordJoinCompliance']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'ImageJoinMode')
|
130
|
+
self.image_join_mode = attributes[:'ImageJoinMode']
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
|
135
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
136
|
+
# @return Array for valid properies with the reasons
|
137
|
+
def list_invalid_properties
|
138
|
+
invalid_properties = []
|
139
|
+
if @word_join_mode.nil?
|
140
|
+
invalid_properties.push("invalid value for 'word_join_mode', word_join_mode cannot be nil.")
|
141
|
+
end
|
142
|
+
|
143
|
+
if @word_join_compliance.nil?
|
144
|
+
invalid_properties.push("invalid value for 'word_join_compliance', word_join_compliance cannot be nil.")
|
145
|
+
end
|
146
|
+
|
147
|
+
if @image_join_mode.nil?
|
148
|
+
invalid_properties.push("invalid value for 'image_join_mode', image_join_mode cannot be nil.")
|
149
|
+
end
|
150
|
+
|
151
|
+
return invalid_properties
|
152
|
+
end
|
153
|
+
|
154
|
+
# Check to see if the all the properties in the model are valid
|
155
|
+
# @return true if the model is valid
|
156
|
+
def valid?
|
157
|
+
return false if @word_join_mode.nil?
|
158
|
+
word_join_mode_validator = EnumAttributeValidator.new('String', ["Default", "Continuous"])
|
159
|
+
return false unless word_join_mode_validator.valid?(@word_join_mode)
|
160
|
+
return false if @word_join_compliance.nil?
|
161
|
+
word_join_compliance_validator = EnumAttributeValidator.new('String', ["Ecma376_2006", "Iso29500_2008_Transitional", "Iso29500_2008_Strict", "Auto"])
|
162
|
+
return false unless word_join_compliance_validator.valid?(@word_join_compliance)
|
163
|
+
return false if @image_join_mode.nil?
|
164
|
+
image_join_mode_validator = EnumAttributeValidator.new('String', ["Horizontal", "Vertical"])
|
165
|
+
return false unless image_join_mode_validator.valid?(@image_join_mode)
|
166
|
+
return true
|
167
|
+
end
|
168
|
+
|
169
|
+
# Custom attribute writer method checking allowed values (enum).
|
170
|
+
# @param [Object] word_join_mode Object to be assigned
|
171
|
+
def word_join_mode=(word_join_mode)
|
172
|
+
validator = EnumAttributeValidator.new('String', ["Default", "Continuous"])
|
173
|
+
if word_join_mode.to_i == 0
|
174
|
+
unless validator.valid?(word_join_mode)
|
175
|
+
raise ArgumentError, "invalid value for 'word_join_mode', must be one of #{validator.allowable_values}."
|
176
|
+
end
|
177
|
+
@word_join_mode = word_join_mode
|
178
|
+
else
|
179
|
+
@word_join_mode = validator.allowable_values[word_join_mode.to_i]
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Custom attribute writer method checking allowed values (enum).
|
184
|
+
# @param [Object] word_join_compliance Object to be assigned
|
185
|
+
def word_join_compliance=(word_join_compliance)
|
186
|
+
validator = EnumAttributeValidator.new('String', ["Ecma376_2006", "Iso29500_2008_Transitional", "Iso29500_2008_Strict", "Auto"])
|
187
|
+
if word_join_compliance.to_i == 0
|
188
|
+
unless validator.valid?(word_join_compliance)
|
189
|
+
raise ArgumentError, "invalid value for 'word_join_compliance', must be one of #{validator.allowable_values}."
|
190
|
+
end
|
191
|
+
@word_join_compliance = word_join_compliance
|
192
|
+
else
|
193
|
+
@word_join_compliance = validator.allowable_values[word_join_compliance.to_i]
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# Custom attribute writer method checking allowed values (enum).
|
198
|
+
# @param [Object] image_join_mode Object to be assigned
|
199
|
+
def image_join_mode=(image_join_mode)
|
200
|
+
validator = EnumAttributeValidator.new('String', ["Horizontal", "Vertical"])
|
201
|
+
if image_join_mode.to_i == 0
|
202
|
+
unless validator.valid?(image_join_mode)
|
203
|
+
raise ArgumentError, "invalid value for 'image_join_mode', must be one of #{validator.allowable_values}."
|
204
|
+
end
|
205
|
+
@image_join_mode = image_join_mode
|
206
|
+
else
|
207
|
+
@image_join_mode = validator.allowable_values[image_join_mode.to_i]
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Checks equality by comparing each attribute.
|
212
|
+
# @param [Object] Object to be compared
|
213
|
+
def ==(other)
|
214
|
+
return true if self.equal?(other)
|
215
|
+
self.class == other.class &&
|
216
|
+
files == other.files &&
|
217
|
+
files_pages == other.files_pages &&
|
218
|
+
output_path == other.output_path &&
|
219
|
+
word_join_mode == other.word_join_mode &&
|
220
|
+
word_join_compliance == other.word_join_compliance &&
|
221
|
+
image_join_mode == other.image_join_mode
|
222
|
+
end
|
223
|
+
|
224
|
+
# @see the `==` method
|
225
|
+
# @param [Object] Object to be compared
|
226
|
+
def eql?(other)
|
227
|
+
self == other
|
228
|
+
end
|
229
|
+
|
230
|
+
# Calculates hash code according to all attributes.
|
231
|
+
# @return [Fixnum] Hash code
|
232
|
+
def hash
|
233
|
+
[files, files_pages, output_path, word_join_mode, word_join_compliance, image_join_mode].hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Downcases first letter.
|
237
|
+
# @return downcased string
|
238
|
+
def uncap(str)
|
239
|
+
str[0, 1].downcase + str[1..-1]
|
240
|
+
end
|
241
|
+
|
242
|
+
# Builds the object from hash
|
243
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
244
|
+
# @return [Object] Returns the model itself
|
245
|
+
def build_from_hash(attributes)
|
246
|
+
return nil unless attributes.is_a?(Hash)
|
247
|
+
self.class.swagger_types.each_pair do |key, type|
|
248
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
249
|
+
value = attributes[pname]
|
250
|
+
if type =~ /\AArray<(.*)>/i
|
251
|
+
# check to ensure the input is an array given that the the attribute
|
252
|
+
# is documented as an array but the input is not
|
253
|
+
if value.is_a?(Array)
|
254
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
255
|
+
end
|
256
|
+
elsif !value.nil?
|
257
|
+
self.send("#{key}=", _deserialize(type, value))
|
258
|
+
end
|
259
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
260
|
+
end
|
261
|
+
|
262
|
+
self
|
263
|
+
end
|
264
|
+
|
265
|
+
# Deserializes the data based on type
|
266
|
+
# @param string type Data type
|
267
|
+
# @param string value Value to be deserialized
|
268
|
+
# @return [Object] Deserialized data
|
269
|
+
def _deserialize(type, value)
|
270
|
+
case type.to_sym
|
271
|
+
when :DateTime
|
272
|
+
Date.parse value
|
273
|
+
when :Date
|
274
|
+
Date.parse value
|
275
|
+
when :String
|
276
|
+
value.to_s
|
277
|
+
when :Integer
|
278
|
+
value.to_i
|
279
|
+
when :Float
|
280
|
+
value.to_f
|
281
|
+
when :BOOLEAN
|
282
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
283
|
+
true
|
284
|
+
else
|
285
|
+
false
|
286
|
+
end
|
287
|
+
when :Object
|
288
|
+
# generic object (usually a Hash), return directly
|
289
|
+
value
|
290
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
291
|
+
inner_type = Regexp.last_match[:inner_type]
|
292
|
+
value.map { |v| _deserialize(inner_type, v) }
|
293
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
294
|
+
k_type = Regexp.last_match[:k_type]
|
295
|
+
v_type = Regexp.last_match[:v_type]
|
296
|
+
{}.tap do |hash|
|
297
|
+
value.each do |k, v|
|
298
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
299
|
+
end
|
300
|
+
end
|
301
|
+
else
|
302
|
+
# model
|
303
|
+
temp_model = GroupDocsMergerCloud.const_get(type).new
|
304
|
+
temp_model.build_from_hash(value)
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
# Returns the string representation of the object
|
309
|
+
# @return [String] String presentation of the object
|
310
|
+
def to_s
|
311
|
+
to_hash.to_s
|
312
|
+
end
|
313
|
+
|
314
|
+
# to_body is an alias to to_hash (backward compatibility)
|
315
|
+
# @return [Hash] Returns the object in the form of hash
|
316
|
+
def to_body
|
317
|
+
to_hash
|
318
|
+
end
|
319
|
+
|
320
|
+
# Returns the object in the form of hash
|
321
|
+
# @return [Hash] Returns the object in the form of hash
|
322
|
+
def to_hash
|
323
|
+
hash = {}
|
324
|
+
self.class.attribute_map.each_pair do |attr, param|
|
325
|
+
value = self.send(attr)
|
326
|
+
next if value.nil?
|
327
|
+
hash[param] = _to_hash(value)
|
328
|
+
end
|
329
|
+
hash
|
330
|
+
end
|
331
|
+
|
332
|
+
# Outputs non-array value in the form of hash
|
333
|
+
# For object, use to_hash. Otherwise, just return the value
|
334
|
+
# @param [Object] value Any valid value
|
335
|
+
# @return [Hash] Returns the value in the form of hash
|
336
|
+
def _to_hash(value)
|
337
|
+
if value.is_a?(Array)
|
338
|
+
value.compact.map { |v| _to_hash(v) }
|
339
|
+
elsif value.is_a?(Hash)
|
340
|
+
{}.tap do |hash|
|
341
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
342
|
+
end
|
343
|
+
elsif value.respond_to? :to_hash
|
344
|
+
value.to_hash
|
345
|
+
else
|
346
|
+
value
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
350
|
+
end
|
351
|
+
|
352
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="move_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="multi_document_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="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="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="orientation_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="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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="page_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="password_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="preview_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
|