groupdocs_conversion_cloud 25.9 → 25.12
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_conversion_cloud/models/{tsv_convert_options.rb → cad_convert_options.rb} +74 -32
- data/lib/groupdocs_conversion_cloud/models/{pps_convert_options.rb → compression_convert_options.rb} +7 -22
- data/lib/groupdocs_conversion_cloud/models/compression_load_options.rb +224 -0
- data/lib/groupdocs_conversion_cloud/models/database_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/{odp_convert_options.rb → diagram_convert_options.rb} +14 -24
- data/lib/groupdocs_conversion_cloud/models/e_book_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/{ppt_convert_options.rb → email_convert_options.rb} +7 -32
- data/lib/groupdocs_conversion_cloud/models/{otp_convert_options.rb → finance_convert_options.rb} +7 -32
- data/lib/groupdocs_conversion_cloud/models/{ppsm_convert_options.rb → finance_load_options.rb} +11 -78
- data/lib/groupdocs_conversion_cloud/models/{potm_convert_options.rb → font_convert_options.rb} +7 -32
- data/lib/groupdocs_conversion_cloud/models/font_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/{txt_convert_options.rb → gis_convert_options.rb} +3 -3
- data/lib/groupdocs_conversion_cloud/models/gis_load_options.rb +244 -0
- data/lib/groupdocs_conversion_cloud/models/image_convert_options.rb +44 -4
- data/lib/groupdocs_conversion_cloud/models/jpg_convert_options.rb +1 -265
- data/lib/groupdocs_conversion_cloud/models/mbox_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/{one_load_options.rb → note_load_options.rb} +2 -2
- data/lib/groupdocs_conversion_cloud/models/olm_load_options.rb +224 -0
- data/lib/groupdocs_conversion_cloud/models/pdl_convert_options.rb +35 -5
- data/lib/groupdocs_conversion_cloud/models/pdl_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/project_management_convert_options.rb +256 -0
- data/lib/groupdocs_conversion_cloud/models/psd_convert_options.rb +1 -244
- data/lib/groupdocs_conversion_cloud/models/pub_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/rtf_convert_options.rb +1 -237
- data/lib/groupdocs_conversion_cloud/models/spreadsheet_convert_options.rb +4 -19
- data/lib/groupdocs_conversion_cloud/models/three_d_convert_options.rb +256 -0
- data/lib/groupdocs_conversion_cloud/models/three_d_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/tiff_convert_options.rb +1 -244
- data/lib/groupdocs_conversion_cloud/models/vcf_load_options.rb +224 -0
- data/lib/groupdocs_conversion_cloud/models/webp_convert_options.rb +1 -265
- data/lib/groupdocs_conversion_cloud/models/word_processing_convert_options.rb +14 -4
- data/lib/groupdocs_conversion_cloud/version.rb +1 -1
- data/lib/groupdocs_conversion_cloud.rb +27 -53
- metadata +24 -50
- data/lib/groupdocs_conversion_cloud/models/bmp_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/dcm_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/djvu_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/dng_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/doc_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/docm_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/docx_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/dot_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/dotm_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/dotx_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/emf_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/gif_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/ico_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/j2c_convert_options.rb +0 -483
- data/lib/groupdocs_conversion_cloud/models/j2k_convert_options.rb +0 -483
- data/lib/groupdocs_conversion_cloud/models/jp2_convert_options.rb +0 -483
- data/lib/groupdocs_conversion_cloud/models/jpeg_convert_options.rb +0 -483
- data/lib/groupdocs_conversion_cloud/models/jpf_convert_options.rb +0 -483
- data/lib/groupdocs_conversion_cloud/models/jpm_convert_options.rb +0 -483
- data/lib/groupdocs_conversion_cloud/models/jpx_convert_options.rb +0 -483
- data/lib/groupdocs_conversion_cloud/models/odg_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/ods_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/odt_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/ots_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/ott_convert_options.rb +0 -440
- data/lib/groupdocs_conversion_cloud/models/png_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/potx_convert_options.rb +0 -281
- data/lib/groupdocs_conversion_cloud/models/ppsx_convert_options.rb +0 -281
- data/lib/groupdocs_conversion_cloud/models/pptm_convert_options.rb +0 -281
- data/lib/groupdocs_conversion_cloud/models/pptx_convert_options.rb +0 -281
- data/lib/groupdocs_conversion_cloud/models/tif_convert_options.rb +0 -494
- data/lib/groupdocs_conversion_cloud/models/wmf_convert_options.rb +0 -468
- data/lib/groupdocs_conversion_cloud/models/xls2003_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/xls_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/xlsb_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/xlsm_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/xlsx_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/xltm_convert_options.rb +0 -296
- data/lib/groupdocs_conversion_cloud/models/xltx_convert_options.rb +0 -296
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
#
|
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="database_load_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 GroupDocsConversionCloud
|
|
31
|
+
# Options for loading Database documents
|
|
32
|
+
class DatabaseLoadOptions
|
|
33
|
+
|
|
34
|
+
# The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
|
|
35
|
+
attr_accessor :format
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'format' => :'Format'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.swagger_types
|
|
46
|
+
{
|
|
47
|
+
:'format' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
return unless attributes.is_a?(Hash)
|
|
55
|
+
|
|
56
|
+
# convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:'Format')
|
|
60
|
+
self.format = attributes[:'Format']
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
66
|
+
# @return Array for valid properies with the reasons
|
|
67
|
+
def list_invalid_properties
|
|
68
|
+
invalid_properties = []
|
|
69
|
+
return invalid_properties
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Check to see if the all the properties in the model are valid
|
|
73
|
+
# @return true if the model is valid
|
|
74
|
+
def valid?
|
|
75
|
+
return true
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Checks equality by comparing each attribute.
|
|
79
|
+
# @param [Object] Object to be compared
|
|
80
|
+
def ==(other)
|
|
81
|
+
return true if self.equal?(other)
|
|
82
|
+
self.class == other.class &&
|
|
83
|
+
format == other.format
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# @see the `==` method
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def eql?(other)
|
|
89
|
+
self == other
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Calculates hash code according to all attributes.
|
|
93
|
+
# @return [Fixnum] Hash code
|
|
94
|
+
def hash
|
|
95
|
+
[format].hash
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Downcases first letter.
|
|
99
|
+
# @return downcased string
|
|
100
|
+
def uncap(str)
|
|
101
|
+
str[0, 1].downcase + str[1..-1]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Builds the object from hash
|
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
+
# @return [Object] Returns the model itself
|
|
107
|
+
def build_from_hash(attributes)
|
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
|
109
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
110
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
|
111
|
+
value = attributes[pname]
|
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
|
113
|
+
# check to ensure the input is an array given that the the attribute
|
|
114
|
+
# is documented as an array but the input is not
|
|
115
|
+
if value.is_a?(Array)
|
|
116
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
|
117
|
+
end
|
|
118
|
+
elsif !value.nil?
|
|
119
|
+
self.send("#{key}=", _deserialize(type, value))
|
|
120
|
+
end
|
|
121
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
self
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Deserializes the data based on type
|
|
128
|
+
# @param string type Data type
|
|
129
|
+
# @param string value Value to be deserialized
|
|
130
|
+
# @return [Object] Deserialized data
|
|
131
|
+
def _deserialize(type, value)
|
|
132
|
+
case type.to_sym
|
|
133
|
+
when :DateTime
|
|
134
|
+
Date.parse value
|
|
135
|
+
when :Date
|
|
136
|
+
Date.parse value
|
|
137
|
+
when :String
|
|
138
|
+
value.to_s
|
|
139
|
+
when :Integer
|
|
140
|
+
value.to_i
|
|
141
|
+
when :Float
|
|
142
|
+
value.to_f
|
|
143
|
+
when :BOOLEAN
|
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
145
|
+
true
|
|
146
|
+
else
|
|
147
|
+
false
|
|
148
|
+
end
|
|
149
|
+
when :Object
|
|
150
|
+
# generic object (usually a Hash), return directly
|
|
151
|
+
value
|
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
|
158
|
+
{}.tap do |hash|
|
|
159
|
+
value.each do |k, v|
|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
else
|
|
164
|
+
# model
|
|
165
|
+
temp_model = GroupDocsConversionCloud.const_get(type).new
|
|
166
|
+
temp_model.build_from_hash(value)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Returns the string representation of the object
|
|
171
|
+
# @return [String] String presentation of the object
|
|
172
|
+
def to_s
|
|
173
|
+
to_hash.to_s
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_body
|
|
179
|
+
to_hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the object in the form of hash
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_hash
|
|
185
|
+
hash = {}
|
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
next if value.nil?
|
|
189
|
+
hash[param] = _to_hash(value)
|
|
190
|
+
end
|
|
191
|
+
hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Outputs non-array value in the form of hash
|
|
195
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
196
|
+
# @param [Object] value Any valid value
|
|
197
|
+
# @return [Hash] Returns the value in the form of hash
|
|
198
|
+
def _to_hash(value)
|
|
199
|
+
if value.is_a?(Array)
|
|
200
|
+
value.compact.map { |v| _to_hash(v) }
|
|
201
|
+
elsif value.is_a?(Hash)
|
|
202
|
+
{}.tap do |hash|
|
|
203
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
204
|
+
end
|
|
205
|
+
elsif value.respond_to? :to_hash
|
|
206
|
+
value.to_hash
|
|
207
|
+
else
|
|
208
|
+
value
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
end
|
data/lib/groupdocs_conversion_cloud/models/{odp_convert_options.rb → diagram_convert_options.rb}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="
|
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="diagram_convert_options.rb">
|
|
4
4
|
# Copyright (c) Aspose Pty Ltd
|
|
5
5
|
# </copyright>
|
|
6
6
|
# <summary>
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
require 'date'
|
|
29
29
|
|
|
30
30
|
module GroupDocsConversionCloud
|
|
31
|
-
#
|
|
32
|
-
class
|
|
31
|
+
# Options for to Diagram conversion
|
|
32
|
+
class DiagramConvertOptions
|
|
33
33
|
|
|
34
34
|
# Start conversion from FromPage page
|
|
35
35
|
attr_accessor :from_page
|
|
@@ -43,11 +43,8 @@ module GroupDocsConversionCloud
|
|
|
43
43
|
# Watermark specific options
|
|
44
44
|
attr_accessor :watermark_options
|
|
45
45
|
|
|
46
|
-
#
|
|
47
|
-
attr_accessor :
|
|
48
|
-
|
|
49
|
-
# Specifies the zoom level in percentage. Default is 100. Default zoom is supported till Microsoft Powerpoint 2010. Starting from Microsoft Powerpoint 2013 default zoom is no longer set to document, instead it appears to use the zoom factor of the last document that was opened.
|
|
50
|
-
attr_accessor :zoom
|
|
46
|
+
# Gets or sets a value indicating whether to enlarge the page to fit the drawing content.
|
|
47
|
+
attr_accessor :auto_fit_page_to_drawing_content
|
|
51
48
|
|
|
52
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
50
|
def self.attribute_map
|
|
@@ -56,8 +53,7 @@ module GroupDocsConversionCloud
|
|
|
56
53
|
:'pages_count' => :'PagesCount',
|
|
57
54
|
:'pages' => :'Pages',
|
|
58
55
|
:'watermark_options' => :'WatermarkOptions',
|
|
59
|
-
:'
|
|
60
|
-
:'zoom' => :'Zoom'
|
|
56
|
+
:'auto_fit_page_to_drawing_content' => :'AutoFitPageToDrawingContent'
|
|
61
57
|
}
|
|
62
58
|
end
|
|
63
59
|
|
|
@@ -68,8 +64,7 @@ module GroupDocsConversionCloud
|
|
|
68
64
|
:'pages_count' => :'Integer',
|
|
69
65
|
:'pages' => :'Array<Integer>',
|
|
70
66
|
:'watermark_options' => :'WatermarkOptions',
|
|
71
|
-
:'
|
|
72
|
-
:'zoom' => :'Integer'
|
|
67
|
+
:'auto_fit_page_to_drawing_content' => :'BOOLEAN'
|
|
73
68
|
}
|
|
74
69
|
end
|
|
75
70
|
|
|
@@ -99,12 +94,8 @@ module GroupDocsConversionCloud
|
|
|
99
94
|
self.watermark_options = attributes[:'WatermarkOptions']
|
|
100
95
|
end
|
|
101
96
|
|
|
102
|
-
if attributes.key?(:'
|
|
103
|
-
self.
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
if attributes.key?(:'Zoom')
|
|
107
|
-
self.zoom = attributes[:'Zoom']
|
|
97
|
+
if attributes.key?(:'AutoFitPageToDrawingContent')
|
|
98
|
+
self.auto_fit_page_to_drawing_content = attributes[:'AutoFitPageToDrawingContent']
|
|
108
99
|
end
|
|
109
100
|
|
|
110
101
|
end
|
|
@@ -121,8 +112,8 @@ module GroupDocsConversionCloud
|
|
|
121
112
|
invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.")
|
|
122
113
|
end
|
|
123
114
|
|
|
124
|
-
if @
|
|
125
|
-
invalid_properties.push("invalid value for '
|
|
115
|
+
if @auto_fit_page_to_drawing_content.nil?
|
|
116
|
+
invalid_properties.push("invalid value for 'auto_fit_page_to_drawing_content', auto_fit_page_to_drawing_content cannot be nil.")
|
|
126
117
|
end
|
|
127
118
|
|
|
128
119
|
return invalid_properties
|
|
@@ -133,7 +124,7 @@ module GroupDocsConversionCloud
|
|
|
133
124
|
def valid?
|
|
134
125
|
return false if @from_page.nil?
|
|
135
126
|
return false if @pages_count.nil?
|
|
136
|
-
return false if @
|
|
127
|
+
return false if @auto_fit_page_to_drawing_content.nil?
|
|
137
128
|
return true
|
|
138
129
|
end
|
|
139
130
|
|
|
@@ -146,8 +137,7 @@ module GroupDocsConversionCloud
|
|
|
146
137
|
pages_count == other.pages_count &&
|
|
147
138
|
pages == other.pages &&
|
|
148
139
|
watermark_options == other.watermark_options &&
|
|
149
|
-
|
|
150
|
-
zoom == other.zoom
|
|
140
|
+
auto_fit_page_to_drawing_content == other.auto_fit_page_to_drawing_content
|
|
151
141
|
end
|
|
152
142
|
|
|
153
143
|
# @see the `==` method
|
|
@@ -159,7 +149,7 @@ module GroupDocsConversionCloud
|
|
|
159
149
|
# Calculates hash code according to all attributes.
|
|
160
150
|
# @return [Fixnum] Hash code
|
|
161
151
|
def hash
|
|
162
|
-
[from_page, pages_count, pages, watermark_options,
|
|
152
|
+
[from_page, pages_count, pages, watermark_options, auto_fit_page_to_drawing_content].hash
|
|
163
153
|
end
|
|
164
154
|
|
|
165
155
|
# Downcases first letter.
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
#
|
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="e_book_load_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 GroupDocsConversionCloud
|
|
31
|
+
# Options for loading e-book documents
|
|
32
|
+
class EBookLoadOptions
|
|
33
|
+
|
|
34
|
+
# The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
|
|
35
|
+
attr_accessor :format
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'format' => :'Format'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.swagger_types
|
|
46
|
+
{
|
|
47
|
+
:'format' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
return unless attributes.is_a?(Hash)
|
|
55
|
+
|
|
56
|
+
# convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:'Format')
|
|
60
|
+
self.format = attributes[:'Format']
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
66
|
+
# @return Array for valid properies with the reasons
|
|
67
|
+
def list_invalid_properties
|
|
68
|
+
invalid_properties = []
|
|
69
|
+
return invalid_properties
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Check to see if the all the properties in the model are valid
|
|
73
|
+
# @return true if the model is valid
|
|
74
|
+
def valid?
|
|
75
|
+
return true
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Checks equality by comparing each attribute.
|
|
79
|
+
# @param [Object] Object to be compared
|
|
80
|
+
def ==(other)
|
|
81
|
+
return true if self.equal?(other)
|
|
82
|
+
self.class == other.class &&
|
|
83
|
+
format == other.format
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# @see the `==` method
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def eql?(other)
|
|
89
|
+
self == other
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Calculates hash code according to all attributes.
|
|
93
|
+
# @return [Fixnum] Hash code
|
|
94
|
+
def hash
|
|
95
|
+
[format].hash
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Downcases first letter.
|
|
99
|
+
# @return downcased string
|
|
100
|
+
def uncap(str)
|
|
101
|
+
str[0, 1].downcase + str[1..-1]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Builds the object from hash
|
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
+
# @return [Object] Returns the model itself
|
|
107
|
+
def build_from_hash(attributes)
|
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
|
109
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
110
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
|
111
|
+
value = attributes[pname]
|
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
|
113
|
+
# check to ensure the input is an array given that the the attribute
|
|
114
|
+
# is documented as an array but the input is not
|
|
115
|
+
if value.is_a?(Array)
|
|
116
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
|
117
|
+
end
|
|
118
|
+
elsif !value.nil?
|
|
119
|
+
self.send("#{key}=", _deserialize(type, value))
|
|
120
|
+
end
|
|
121
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
self
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Deserializes the data based on type
|
|
128
|
+
# @param string type Data type
|
|
129
|
+
# @param string value Value to be deserialized
|
|
130
|
+
# @return [Object] Deserialized data
|
|
131
|
+
def _deserialize(type, value)
|
|
132
|
+
case type.to_sym
|
|
133
|
+
when :DateTime
|
|
134
|
+
Date.parse value
|
|
135
|
+
when :Date
|
|
136
|
+
Date.parse value
|
|
137
|
+
when :String
|
|
138
|
+
value.to_s
|
|
139
|
+
when :Integer
|
|
140
|
+
value.to_i
|
|
141
|
+
when :Float
|
|
142
|
+
value.to_f
|
|
143
|
+
when :BOOLEAN
|
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
145
|
+
true
|
|
146
|
+
else
|
|
147
|
+
false
|
|
148
|
+
end
|
|
149
|
+
when :Object
|
|
150
|
+
# generic object (usually a Hash), return directly
|
|
151
|
+
value
|
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
|
158
|
+
{}.tap do |hash|
|
|
159
|
+
value.each do |k, v|
|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
else
|
|
164
|
+
# model
|
|
165
|
+
temp_model = GroupDocsConversionCloud.const_get(type).new
|
|
166
|
+
temp_model.build_from_hash(value)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Returns the string representation of the object
|
|
171
|
+
# @return [String] String presentation of the object
|
|
172
|
+
def to_s
|
|
173
|
+
to_hash.to_s
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_body
|
|
179
|
+
to_hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the object in the form of hash
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_hash
|
|
185
|
+
hash = {}
|
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
next if value.nil?
|
|
189
|
+
hash[param] = _to_hash(value)
|
|
190
|
+
end
|
|
191
|
+
hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Outputs non-array value in the form of hash
|
|
195
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
196
|
+
# @param [Object] value Any valid value
|
|
197
|
+
# @return [Hash] Returns the value in the form of hash
|
|
198
|
+
def _to_hash(value)
|
|
199
|
+
if value.is_a?(Array)
|
|
200
|
+
value.compact.map { |v| _to_hash(v) }
|
|
201
|
+
elsif value.is_a?(Hash)
|
|
202
|
+
{}.tap do |hash|
|
|
203
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
204
|
+
end
|
|
205
|
+
elsif value.respond_to? :to_hash
|
|
206
|
+
value.to_hash
|
|
207
|
+
else
|
|
208
|
+
value
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
end
|
data/lib/groupdocs_conversion_cloud/models/{ppt_convert_options.rb → email_convert_options.rb}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="
|
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="email_convert_options.rb">
|
|
4
4
|
# Copyright (c) Aspose Pty Ltd
|
|
5
5
|
# </copyright>
|
|
6
6
|
# <summary>
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
require 'date'
|
|
29
29
|
|
|
30
30
|
module GroupDocsConversionCloud
|
|
31
|
-
#
|
|
32
|
-
class
|
|
31
|
+
# Options for to Email conversion
|
|
32
|
+
class EmailConvertOptions
|
|
33
33
|
|
|
34
34
|
# Start conversion from FromPage page
|
|
35
35
|
attr_accessor :from_page
|
|
@@ -43,21 +43,13 @@ module GroupDocsConversionCloud
|
|
|
43
43
|
# Watermark specific options
|
|
44
44
|
attr_accessor :watermark_options
|
|
45
45
|
|
|
46
|
-
# Set this property if you want to protect the converted document with a password
|
|
47
|
-
attr_accessor :password
|
|
48
|
-
|
|
49
|
-
# Specifies the zoom level in percentage. Default is 100. Default zoom is supported till Microsoft Powerpoint 2010. Starting from Microsoft Powerpoint 2013 default zoom is no longer set to document, instead it appears to use the zoom factor of the last document that was opened.
|
|
50
|
-
attr_accessor :zoom
|
|
51
|
-
|
|
52
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
47
|
def self.attribute_map
|
|
54
48
|
{
|
|
55
49
|
:'from_page' => :'FromPage',
|
|
56
50
|
:'pages_count' => :'PagesCount',
|
|
57
51
|
:'pages' => :'Pages',
|
|
58
|
-
:'watermark_options' => :'WatermarkOptions'
|
|
59
|
-
:'password' => :'Password',
|
|
60
|
-
:'zoom' => :'Zoom'
|
|
52
|
+
:'watermark_options' => :'WatermarkOptions'
|
|
61
53
|
}
|
|
62
54
|
end
|
|
63
55
|
|
|
@@ -67,9 +59,7 @@ module GroupDocsConversionCloud
|
|
|
67
59
|
:'from_page' => :'Integer',
|
|
68
60
|
:'pages_count' => :'Integer',
|
|
69
61
|
:'pages' => :'Array<Integer>',
|
|
70
|
-
:'watermark_options' => :'WatermarkOptions'
|
|
71
|
-
:'password' => :'String',
|
|
72
|
-
:'zoom' => :'Integer'
|
|
62
|
+
:'watermark_options' => :'WatermarkOptions'
|
|
73
63
|
}
|
|
74
64
|
end
|
|
75
65
|
|
|
@@ -99,14 +89,6 @@ module GroupDocsConversionCloud
|
|
|
99
89
|
self.watermark_options = attributes[:'WatermarkOptions']
|
|
100
90
|
end
|
|
101
91
|
|
|
102
|
-
if attributes.key?(:'Password')
|
|
103
|
-
self.password = attributes[:'Password']
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
if attributes.key?(:'Zoom')
|
|
107
|
-
self.zoom = attributes[:'Zoom']
|
|
108
|
-
end
|
|
109
|
-
|
|
110
92
|
end
|
|
111
93
|
|
|
112
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -121,10 +103,6 @@ module GroupDocsConversionCloud
|
|
|
121
103
|
invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.")
|
|
122
104
|
end
|
|
123
105
|
|
|
124
|
-
if @zoom.nil?
|
|
125
|
-
invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
|
|
126
|
-
end
|
|
127
|
-
|
|
128
106
|
return invalid_properties
|
|
129
107
|
end
|
|
130
108
|
|
|
@@ -133,7 +111,6 @@ module GroupDocsConversionCloud
|
|
|
133
111
|
def valid?
|
|
134
112
|
return false if @from_page.nil?
|
|
135
113
|
return false if @pages_count.nil?
|
|
136
|
-
return false if @zoom.nil?
|
|
137
114
|
return true
|
|
138
115
|
end
|
|
139
116
|
|
|
@@ -145,9 +122,7 @@ module GroupDocsConversionCloud
|
|
|
145
122
|
from_page == other.from_page &&
|
|
146
123
|
pages_count == other.pages_count &&
|
|
147
124
|
pages == other.pages &&
|
|
148
|
-
watermark_options == other.watermark_options
|
|
149
|
-
password == other.password &&
|
|
150
|
-
zoom == other.zoom
|
|
125
|
+
watermark_options == other.watermark_options
|
|
151
126
|
end
|
|
152
127
|
|
|
153
128
|
# @see the `==` method
|
|
@@ -159,7 +134,7 @@ module GroupDocsConversionCloud
|
|
|
159
134
|
# Calculates hash code according to all attributes.
|
|
160
135
|
# @return [Fixnum] Hash code
|
|
161
136
|
def hash
|
|
162
|
-
[from_page, pages_count, pages, watermark_options
|
|
137
|
+
[from_page, pages_count, pages, watermark_options].hash
|
|
163
138
|
end
|
|
164
139
|
|
|
165
140
|
# Downcases first letter.
|