groupdocs_conversion_cloud 19.4
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 +7 -0
- data/lib/groupdocs_conversion_cloud.rb +205 -0
- data/lib/groupdocs_conversion_cloud/api/conversion_api.rb +336 -0
- data/lib/groupdocs_conversion_cloud/api/file_api.rb +729 -0
- data/lib/groupdocs_conversion_cloud/api/folder_api.rb +694 -0
- data/lib/groupdocs_conversion_cloud/api/storage_api.rb +541 -0
- data/lib/groupdocs_conversion_cloud/api_client.rb +380 -0
- data/lib/groupdocs_conversion_cloud/api_error.rb +58 -0
- data/lib/groupdocs_conversion_cloud/configuration.rb +95 -0
- data/lib/groupdocs_conversion_cloud/models/bmp_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/bmp_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/cad_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/cgm_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/convert_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/convert_settings.rb +312 -0
- data/lib/groupdocs_conversion_cloud/models/csv_load_options.rb +279 -0
- data/lib/groupdocs_conversion_cloud/models/dcm_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/dcm_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/dgn_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/diagram_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/disc_usage.rb +234 -0
- data/lib/groupdocs_conversion_cloud/models/djvu_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/dng_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/dng_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/doc_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/doc_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/docm_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/docm_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/docx_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/docx_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/dot_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/dot_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/dotm_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/dotm_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/dotx_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/dotx_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/dwf_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/dwg_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/dxf_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/email_load_options.rb +294 -0
- data/lib/groupdocs_conversion_cloud/models/emf_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/emf_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/eml_load_options.rb +294 -0
- data/lib/groupdocs_conversion_cloud/models/emlx_load_options.rb +294 -0
- data/lib/groupdocs_conversion_cloud/models/epub_convert_options.rb +386 -0
- data/lib/groupdocs_conversion_cloud/models/error.rb +244 -0
- data/lib/groupdocs_conversion_cloud/models/error_details.rb +229 -0
- data/lib/groupdocs_conversion_cloud/models/file_version.rb +289 -0
- data/lib/groupdocs_conversion_cloud/models/file_versions.rb +216 -0
- data/lib/groupdocs_conversion_cloud/models/files_list.rb +216 -0
- data/lib/groupdocs_conversion_cloud/models/files_upload_result.rb +228 -0
- data/lib/groupdocs_conversion_cloud/models/gif_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/gif_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/html_convert_options.rb +301 -0
- data/lib/groupdocs_conversion_cloud/models/ico_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/ico_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/ifc_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/igs_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/image_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/image_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/j2c_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/j2c_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/j2k_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/j2k_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/jp2_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/jp2_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/jpeg_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/jpeg_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/jpf_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/jpf_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/jpg_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/jpg_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/jpm_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/jpm_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/jpx_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/jpx_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/load_options.rb +204 -0
- data/lib/groupdocs_conversion_cloud/models/mht_load_options.rb +294 -0
- data/lib/groupdocs_conversion_cloud/models/mobi_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/msg_load_options.rb +294 -0
- data/lib/groupdocs_conversion_cloud/models/object_exist.rb +234 -0
- data/lib/groupdocs_conversion_cloud/models/odg_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/odg_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/odp_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/odp_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/ods_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/ods_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/odt_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/odt_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/one_load_options.rb +236 -0
- data/lib/groupdocs_conversion_cloud/models/ost_load_options.rb +294 -0
- data/lib/groupdocs_conversion_cloud/models/otp_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/otp_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/ots_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/ots_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/ott_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/ott_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb +863 -0
- data/lib/groupdocs_conversion_cloud/models/pdf_load_options.rb +259 -0
- data/lib/groupdocs_conversion_cloud/models/plt_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/png_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/png_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/potm_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/potm_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/potx_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/potx_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/pps_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/pps_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/ppsm_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/ppsm_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/ppsx_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/ppsx_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/ppt_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/ppt_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/pptm_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/pptm_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/pptx_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/pptx_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/presentation_convert_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/presentation_load_options.rb +266 -0
- data/lib/groupdocs_conversion_cloud/models/psd_convert_options.rb +489 -0
- data/lib/groupdocs_conversion_cloud/models/psd_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/pst_load_options.rb +294 -0
- data/lib/groupdocs_conversion_cloud/models/rtf_convert_options.rb +341 -0
- data/lib/groupdocs_conversion_cloud/models/spreadsheet_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/spreadsheet_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/stl_load_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/storage_exist.rb +219 -0
- data/lib/groupdocs_conversion_cloud/models/storage_file.rb +264 -0
- data/lib/groupdocs_conversion_cloud/models/stored_converted_result.rb +249 -0
- data/lib/groupdocs_conversion_cloud/models/supported_format.rb +226 -0
- data/lib/groupdocs_conversion_cloud/models/svg_convert_options.rb +331 -0
- data/lib/groupdocs_conversion_cloud/models/tif_convert_options.rb +408 -0
- data/lib/groupdocs_conversion_cloud/models/tif_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/tiff_convert_options.rb +408 -0
- data/lib/groupdocs_conversion_cloud/models/tiff_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/tsv_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/tsv_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/txt_convert_options.rb +246 -0
- data/lib/groupdocs_conversion_cloud/models/txt_load_options.rb +302 -0
- data/lib/groupdocs_conversion_cloud/models/vdw_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vdx_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vsd_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vsdm_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vsdx_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vss_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vssm_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vssx_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vst_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vstm_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vstx_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vsx_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/vtx_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/watermark_options.rb +364 -0
- data/lib/groupdocs_conversion_cloud/models/webp_convert_options.rb +376 -0
- data/lib/groupdocs_conversion_cloud/models/webp_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/wmf_convert_options.rb +361 -0
- data/lib/groupdocs_conversion_cloud/models/wmf_load_options.rb +214 -0
- data/lib/groupdocs_conversion_cloud/models/word_processing_convert_options.rb +326 -0
- data/lib/groupdocs_conversion_cloud/models/word_processing_load_options.rb +281 -0
- data/lib/groupdocs_conversion_cloud/models/xls2003_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/xls2003_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/xls_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/xls_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/xlsb_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/xlsb_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/xlsm_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/xlsm_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/xlsx_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/xlsx_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/xltm_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/xltm_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/xltx_convert_options.rb +296 -0
- data/lib/groupdocs_conversion_cloud/models/xltx_load_options.rb +321 -0
- data/lib/groupdocs_conversion_cloud/models/xml_load_options.rb +230 -0
- data/lib/groupdocs_conversion_cloud/models/xps_convert_options.rb +386 -0
- data/lib/groupdocs_conversion_cloud/version.rb +29 -0
- metadata +288 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
#
|
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="ott_load_options.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 GroupDocsConversionCloud
|
|
31
|
+
# Ott load options
|
|
32
|
+
class OttLoadOptions
|
|
33
|
+
|
|
34
|
+
# Default font for Words document. The following font will be used if a font is missing.
|
|
35
|
+
attr_accessor :default_font
|
|
36
|
+
|
|
37
|
+
# If AutoFontSubstitution is disabled, GroupDocs.Conversion uses the DefaultFont for the substitution of missing fonts. If AutoFontSubstitution is enabled, GroupDocs.Conversion evaluates all the related fields in FontInfo (Panose, Sig etc) for the missing font and finds the closest match among the available font sources. Note that font substitution mechanism will override the DefaultFont in cases when FontInfo for the missing font is available in the document. The default value is True.
|
|
38
|
+
attr_accessor :auto_font_substitution
|
|
39
|
+
|
|
40
|
+
# Substitute specific fonts when converting Words document.
|
|
41
|
+
attr_accessor :font_substitutes
|
|
42
|
+
|
|
43
|
+
# Set password to unprotect protected document
|
|
44
|
+
attr_accessor :password
|
|
45
|
+
|
|
46
|
+
# Hide markup and track changes for Word documents
|
|
47
|
+
attr_accessor :hide_word_tracked_changes
|
|
48
|
+
|
|
49
|
+
# Hide comments
|
|
50
|
+
attr_accessor :hide_comments
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'default_font' => :'DefaultFont',
|
|
56
|
+
:'auto_font_substitution' => :'AutoFontSubstitution',
|
|
57
|
+
:'font_substitutes' => :'FontSubstitutes',
|
|
58
|
+
:'password' => :'Password',
|
|
59
|
+
:'hide_word_tracked_changes' => :'HideWordTrackedChanges',
|
|
60
|
+
:'hide_comments' => :'HideComments'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute type mapping.
|
|
65
|
+
def self.swagger_types
|
|
66
|
+
{
|
|
67
|
+
:'default_font' => :'String',
|
|
68
|
+
:'auto_font_substitution' => :'BOOLEAN',
|
|
69
|
+
:'font_substitutes' => :'Hash<String, String>',
|
|
70
|
+
:'password' => :'String',
|
|
71
|
+
:'hide_word_tracked_changes' => :'BOOLEAN',
|
|
72
|
+
:'hide_comments' => :'BOOLEAN'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
return unless attributes.is_a?(Hash)
|
|
80
|
+
|
|
81
|
+
# convert string to symbol for hash key
|
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'DefaultFont')
|
|
85
|
+
self.default_font = attributes[:'DefaultFont']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'AutoFontSubstitution')
|
|
89
|
+
self.auto_font_substitution = attributes[:'AutoFontSubstitution']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'FontSubstitutes')
|
|
93
|
+
if (value = attributes[:'FontSubstitutes']).is_a?(Hash)
|
|
94
|
+
self.font_substitutes = value
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'Password')
|
|
99
|
+
self.password = attributes[:'Password']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'HideWordTrackedChanges')
|
|
103
|
+
self.hide_word_tracked_changes = attributes[:'HideWordTrackedChanges']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'HideComments')
|
|
107
|
+
self.hide_comments = attributes[:'HideComments']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properies with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
invalid_properties = []
|
|
116
|
+
if @auto_font_substitution.nil?
|
|
117
|
+
invalid_properties.push("invalid value for 'auto_font_substitution', auto_font_substitution cannot be nil.")
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @hide_word_tracked_changes.nil?
|
|
121
|
+
invalid_properties.push("invalid value for 'hide_word_tracked_changes', hide_word_tracked_changes cannot be nil.")
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @hide_comments.nil?
|
|
125
|
+
invalid_properties.push("invalid value for 'hide_comments', hide_comments cannot be nil.")
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
return invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
return false if @auto_font_substitution.nil?
|
|
135
|
+
return false if @hide_word_tracked_changes.nil?
|
|
136
|
+
return false if @hide_comments.nil?
|
|
137
|
+
return true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Checks equality by comparing each attribute.
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def ==(other)
|
|
143
|
+
return true if self.equal?(other)
|
|
144
|
+
self.class == other.class &&
|
|
145
|
+
default_font == other.default_font &&
|
|
146
|
+
auto_font_substitution == other.auto_font_substitution &&
|
|
147
|
+
font_substitutes == other.font_substitutes &&
|
|
148
|
+
password == other.password &&
|
|
149
|
+
hide_word_tracked_changes == other.hide_word_tracked_changes &&
|
|
150
|
+
hide_comments == other.hide_comments
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# @see the `==` method
|
|
154
|
+
# @param [Object] Object to be compared
|
|
155
|
+
def eql?(other)
|
|
156
|
+
self == other
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Calculates hash code according to all attributes.
|
|
160
|
+
# @return [Fixnum] Hash code
|
|
161
|
+
def hash
|
|
162
|
+
[default_font, auto_font_substitution, font_substitutes, password, hide_word_tracked_changes, hide_comments].hash
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Downcases first letter.
|
|
166
|
+
# @return downcased string
|
|
167
|
+
def uncap(str)
|
|
168
|
+
str[0, 1].downcase + str[1..-1]
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Builds the object from hash
|
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
173
|
+
# @return [Object] Returns the model itself
|
|
174
|
+
def build_from_hash(attributes)
|
|
175
|
+
return nil unless attributes.is_a?(Hash)
|
|
176
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
177
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
|
178
|
+
value = attributes[pname]
|
|
179
|
+
if type =~ /\AArray<(.*)>/i
|
|
180
|
+
# check to ensure the input is an array given that the the attribute
|
|
181
|
+
# is documented as an array but the input is not
|
|
182
|
+
if value.is_a?(Array)
|
|
183
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
|
184
|
+
end
|
|
185
|
+
elsif !value.nil?
|
|
186
|
+
self.send("#{key}=", _deserialize(type, value))
|
|
187
|
+
end
|
|
188
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
self
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Deserializes the data based on type
|
|
195
|
+
# @param string type Data type
|
|
196
|
+
# @param string value Value to be deserialized
|
|
197
|
+
# @return [Object] Deserialized data
|
|
198
|
+
def _deserialize(type, value)
|
|
199
|
+
case type.to_sym
|
|
200
|
+
when :DateTime
|
|
201
|
+
Date.parse value
|
|
202
|
+
when :Date
|
|
203
|
+
Date.parse value
|
|
204
|
+
when :String
|
|
205
|
+
value.to_s
|
|
206
|
+
when :Integer
|
|
207
|
+
value.to_i
|
|
208
|
+
when :Float
|
|
209
|
+
value.to_f
|
|
210
|
+
when :BOOLEAN
|
|
211
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
212
|
+
true
|
|
213
|
+
else
|
|
214
|
+
false
|
|
215
|
+
end
|
|
216
|
+
when :Object
|
|
217
|
+
# generic object (usually a Hash), return directly
|
|
218
|
+
value
|
|
219
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
220
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
221
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
222
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
223
|
+
k_type = Regexp.last_match[:k_type]
|
|
224
|
+
v_type = Regexp.last_match[:v_type]
|
|
225
|
+
{}.tap do |hash|
|
|
226
|
+
value.each do |k, v|
|
|
227
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
else
|
|
231
|
+
# model
|
|
232
|
+
temp_model = GroupDocsConversionCloud.const_get(type).new
|
|
233
|
+
temp_model.build_from_hash(value)
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Returns the string representation of the object
|
|
238
|
+
# @return [String] String presentation of the object
|
|
239
|
+
def to_s
|
|
240
|
+
to_hash.to_s
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
244
|
+
# @return [Hash] Returns the object in the form of hash
|
|
245
|
+
def to_body
|
|
246
|
+
to_hash
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Returns the object in the form of hash
|
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
|
251
|
+
def to_hash
|
|
252
|
+
hash = {}
|
|
253
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
254
|
+
value = self.send(attr)
|
|
255
|
+
next if value.nil?
|
|
256
|
+
hash[param] = _to_hash(value)
|
|
257
|
+
end
|
|
258
|
+
hash
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Outputs non-array value in the form of hash
|
|
262
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
263
|
+
# @param [Object] value Any valid value
|
|
264
|
+
# @return [Hash] Returns the value in the form of hash
|
|
265
|
+
def _to_hash(value)
|
|
266
|
+
if value.is_a?(Array)
|
|
267
|
+
value.compact.map { |v| _to_hash(v) }
|
|
268
|
+
elsif value.is_a?(Hash)
|
|
269
|
+
{}.tap do |hash|
|
|
270
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
271
|
+
end
|
|
272
|
+
elsif value.respond_to? :to_hash
|
|
273
|
+
value.to_hash
|
|
274
|
+
else
|
|
275
|
+
value
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
end
|
|
@@ -0,0 +1,863 @@
|
|
|
1
|
+
#
|
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="pdf_convert_options.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 GroupDocsConversionCloud
|
|
31
|
+
# Options for to PDF conversion
|
|
32
|
+
class PdfConvertOptions
|
|
33
|
+
|
|
34
|
+
# Start conversion from FromPage page
|
|
35
|
+
attr_accessor :from_page
|
|
36
|
+
|
|
37
|
+
# Number of pages to convert
|
|
38
|
+
attr_accessor :pages_count
|
|
39
|
+
|
|
40
|
+
# Convert specific pages. The list contains the page indexes of the pages to be converted
|
|
41
|
+
attr_accessor :pages
|
|
42
|
+
|
|
43
|
+
# Desired page width in pixels after conversion
|
|
44
|
+
attr_accessor :width
|
|
45
|
+
|
|
46
|
+
# Desired page height in pixels after conversion
|
|
47
|
+
attr_accessor :height
|
|
48
|
+
|
|
49
|
+
# Desired page DPI after conversion. The default resolution is: 96dpi
|
|
50
|
+
attr_accessor :dpi
|
|
51
|
+
|
|
52
|
+
# Set this property if you want to protect the converted document with a password
|
|
53
|
+
attr_accessor :password
|
|
54
|
+
|
|
55
|
+
# Desired page top margin in pixels after conversion
|
|
56
|
+
attr_accessor :margin_top
|
|
57
|
+
|
|
58
|
+
# Desired page bottom margin in pixels after conversion
|
|
59
|
+
attr_accessor :margin_bottom
|
|
60
|
+
|
|
61
|
+
# Desired page left margin in pixels after conversion
|
|
62
|
+
attr_accessor :margin_left
|
|
63
|
+
|
|
64
|
+
# Desired page right margin in pixels after conversion
|
|
65
|
+
attr_accessor :margin_right
|
|
66
|
+
|
|
67
|
+
# Set the pdf format of the converted document.
|
|
68
|
+
attr_accessor :pdf_format
|
|
69
|
+
|
|
70
|
+
# Remove Pdf-A Compliance
|
|
71
|
+
attr_accessor :remove_pdfa_compliance
|
|
72
|
+
|
|
73
|
+
# Specifies the zoom level in percentage. Default is 100.
|
|
74
|
+
attr_accessor :zoom
|
|
75
|
+
|
|
76
|
+
# Linearize PDF Document for the Web
|
|
77
|
+
attr_accessor :linearize
|
|
78
|
+
|
|
79
|
+
# Link duplicate streams
|
|
80
|
+
attr_accessor :link_duplicate_streams
|
|
81
|
+
|
|
82
|
+
# Remove unused objects
|
|
83
|
+
attr_accessor :remove_unused_objects
|
|
84
|
+
|
|
85
|
+
# Remove unused streams
|
|
86
|
+
attr_accessor :remove_unused_streams
|
|
87
|
+
|
|
88
|
+
# If CompressImages set to true, all images in the document are recompressed. The compression is defined by the ImageQuality property.
|
|
89
|
+
attr_accessor :compress_images
|
|
90
|
+
|
|
91
|
+
# Value in percent where 100% is unchanged quality and image size. To decrease the image size, use ImageQuality less than 100
|
|
92
|
+
attr_accessor :image_quality
|
|
93
|
+
|
|
94
|
+
# Make fonts not embedded if set to true
|
|
95
|
+
attr_accessor :unembed_fonts
|
|
96
|
+
|
|
97
|
+
# Convert a PDF from RGB colorspace to Grayscale
|
|
98
|
+
attr_accessor :grayscale
|
|
99
|
+
|
|
100
|
+
# Specify whether position of the document's window will be centered on the screen. Default: false.
|
|
101
|
+
attr_accessor :center_window
|
|
102
|
+
|
|
103
|
+
# Sets reading order of text: L2R (left to right) or R2L (right to left). Default: L2R.
|
|
104
|
+
attr_accessor :direction
|
|
105
|
+
|
|
106
|
+
# Specifying whether document's window title bar should display document title. Default: false.
|
|
107
|
+
attr_accessor :display_doc_title
|
|
108
|
+
|
|
109
|
+
# Specify whether document window must be resized to fit the first displayed page. Default: false.
|
|
110
|
+
attr_accessor :fit_window
|
|
111
|
+
|
|
112
|
+
# Specify whether menu bar should be hidden when document is active. Default: false.
|
|
113
|
+
attr_accessor :hide_menubar
|
|
114
|
+
|
|
115
|
+
# Specifying whether toolbar should be hidden when document is active. Default: false.
|
|
116
|
+
attr_accessor :hide_tool_bar
|
|
117
|
+
|
|
118
|
+
# Specify whether user interface elements should be hidden when document is active. Default: false.
|
|
119
|
+
attr_accessor :hide_window_ui
|
|
120
|
+
|
|
121
|
+
# Sets page mode, specifying how to display the document on exiting full-screen mode.
|
|
122
|
+
attr_accessor :non_full_screen_page_mode
|
|
123
|
+
|
|
124
|
+
# Sets page layout which shall be used when the document is opened.
|
|
125
|
+
attr_accessor :page_layout
|
|
126
|
+
|
|
127
|
+
# Sets page mode, specifying how document should be displayed when opened.
|
|
128
|
+
attr_accessor :page_mode
|
|
129
|
+
|
|
130
|
+
# Specifies the default level in the document outline at which to display Word bookmarks. Default is 0. Valid range is 0 to 9.
|
|
131
|
+
attr_accessor :bookmarks_outline_level
|
|
132
|
+
|
|
133
|
+
# Specifies how many levels of headings (paragraphs formatted with the Heading styles) to include in the document outline. Default is 0. Valid range is 0 to 9.
|
|
134
|
+
attr_accessor :headings_outline_levels
|
|
135
|
+
|
|
136
|
+
# Specifies how many levels in the document outline to show expanded when the file is viewed. Default is 0. Valid range is 0 to 9. Note that this options will not work when saving to XPS.
|
|
137
|
+
attr_accessor :expanded_outline_levels
|
|
138
|
+
|
|
139
|
+
# Rotate page
|
|
140
|
+
attr_accessor :rotate
|
|
141
|
+
|
|
142
|
+
# Watermark specific options
|
|
143
|
+
attr_accessor :watermark_options
|
|
144
|
+
class EnumAttributeValidator
|
|
145
|
+
attr_reader :datatype
|
|
146
|
+
attr_reader :allowable_values
|
|
147
|
+
|
|
148
|
+
def initialize(datatype, allowable_values)
|
|
149
|
+
@allowable_values = allowable_values.map do |value|
|
|
150
|
+
case datatype.to_s
|
|
151
|
+
when /Integer/i
|
|
152
|
+
value.to_i
|
|
153
|
+
when /Float/i
|
|
154
|
+
value.to_f
|
|
155
|
+
else
|
|
156
|
+
value
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def valid?(value)
|
|
162
|
+
!value || allowable_values.include?(value)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
167
|
+
def self.attribute_map
|
|
168
|
+
{
|
|
169
|
+
:'from_page' => :'FromPage',
|
|
170
|
+
:'pages_count' => :'PagesCount',
|
|
171
|
+
:'pages' => :'Pages',
|
|
172
|
+
:'width' => :'Width',
|
|
173
|
+
:'height' => :'Height',
|
|
174
|
+
:'dpi' => :'Dpi',
|
|
175
|
+
:'password' => :'Password',
|
|
176
|
+
:'margin_top' => :'MarginTop',
|
|
177
|
+
:'margin_bottom' => :'MarginBottom',
|
|
178
|
+
:'margin_left' => :'MarginLeft',
|
|
179
|
+
:'margin_right' => :'MarginRight',
|
|
180
|
+
:'pdf_format' => :'PdfFormat',
|
|
181
|
+
:'remove_pdfa_compliance' => :'RemovePdfaCompliance',
|
|
182
|
+
:'zoom' => :'Zoom',
|
|
183
|
+
:'linearize' => :'Linearize',
|
|
184
|
+
:'link_duplicate_streams' => :'LinkDuplicateStreams',
|
|
185
|
+
:'remove_unused_objects' => :'RemoveUnusedObjects',
|
|
186
|
+
:'remove_unused_streams' => :'RemoveUnusedStreams',
|
|
187
|
+
:'compress_images' => :'CompressImages',
|
|
188
|
+
:'image_quality' => :'ImageQuality',
|
|
189
|
+
:'unembed_fonts' => :'UnembedFonts',
|
|
190
|
+
:'grayscale' => :'Grayscale',
|
|
191
|
+
:'center_window' => :'CenterWindow',
|
|
192
|
+
:'direction' => :'Direction',
|
|
193
|
+
:'display_doc_title' => :'DisplayDocTitle',
|
|
194
|
+
:'fit_window' => :'FitWindow',
|
|
195
|
+
:'hide_menubar' => :'HideMenubar',
|
|
196
|
+
:'hide_tool_bar' => :'HideToolBar',
|
|
197
|
+
:'hide_window_ui' => :'HideWindowUI',
|
|
198
|
+
:'non_full_screen_page_mode' => :'NonFullScreenPageMode',
|
|
199
|
+
:'page_layout' => :'PageLayout',
|
|
200
|
+
:'page_mode' => :'PageMode',
|
|
201
|
+
:'bookmarks_outline_level' => :'BookmarksOutlineLevel',
|
|
202
|
+
:'headings_outline_levels' => :'HeadingsOutlineLevels',
|
|
203
|
+
:'expanded_outline_levels' => :'ExpandedOutlineLevels',
|
|
204
|
+
:'rotate' => :'Rotate',
|
|
205
|
+
:'watermark_options' => :'WatermarkOptions'
|
|
206
|
+
}
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Attribute type mapping.
|
|
210
|
+
def self.swagger_types
|
|
211
|
+
{
|
|
212
|
+
:'from_page' => :'Integer',
|
|
213
|
+
:'pages_count' => :'Integer',
|
|
214
|
+
:'pages' => :'Array<Integer>',
|
|
215
|
+
:'width' => :'Integer',
|
|
216
|
+
:'height' => :'Integer',
|
|
217
|
+
:'dpi' => :'Float',
|
|
218
|
+
:'password' => :'String',
|
|
219
|
+
:'margin_top' => :'Integer',
|
|
220
|
+
:'margin_bottom' => :'Integer',
|
|
221
|
+
:'margin_left' => :'Integer',
|
|
222
|
+
:'margin_right' => :'Integer',
|
|
223
|
+
:'pdf_format' => :'String',
|
|
224
|
+
:'remove_pdfa_compliance' => :'BOOLEAN',
|
|
225
|
+
:'zoom' => :'Integer',
|
|
226
|
+
:'linearize' => :'BOOLEAN',
|
|
227
|
+
:'link_duplicate_streams' => :'BOOLEAN',
|
|
228
|
+
:'remove_unused_objects' => :'BOOLEAN',
|
|
229
|
+
:'remove_unused_streams' => :'BOOLEAN',
|
|
230
|
+
:'compress_images' => :'BOOLEAN',
|
|
231
|
+
:'image_quality' => :'Integer',
|
|
232
|
+
:'unembed_fonts' => :'BOOLEAN',
|
|
233
|
+
:'grayscale' => :'BOOLEAN',
|
|
234
|
+
:'center_window' => :'BOOLEAN',
|
|
235
|
+
:'direction' => :'String',
|
|
236
|
+
:'display_doc_title' => :'BOOLEAN',
|
|
237
|
+
:'fit_window' => :'BOOLEAN',
|
|
238
|
+
:'hide_menubar' => :'BOOLEAN',
|
|
239
|
+
:'hide_tool_bar' => :'BOOLEAN',
|
|
240
|
+
:'hide_window_ui' => :'BOOLEAN',
|
|
241
|
+
:'non_full_screen_page_mode' => :'String',
|
|
242
|
+
:'page_layout' => :'String',
|
|
243
|
+
:'page_mode' => :'String',
|
|
244
|
+
:'bookmarks_outline_level' => :'Integer',
|
|
245
|
+
:'headings_outline_levels' => :'Integer',
|
|
246
|
+
:'expanded_outline_levels' => :'Integer',
|
|
247
|
+
:'rotate' => :'String',
|
|
248
|
+
:'watermark_options' => :'WatermarkOptions'
|
|
249
|
+
}
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Initializes the object
|
|
253
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
254
|
+
def initialize(attributes = {})
|
|
255
|
+
return unless attributes.is_a?(Hash)
|
|
256
|
+
|
|
257
|
+
# convert string to symbol for hash key
|
|
258
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
259
|
+
|
|
260
|
+
if attributes.key?(:'FromPage')
|
|
261
|
+
self.from_page = attributes[:'FromPage']
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if attributes.key?(:'PagesCount')
|
|
265
|
+
self.pages_count = attributes[:'PagesCount']
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if attributes.key?(:'Pages')
|
|
269
|
+
if (value = attributes[:'Pages']).is_a?(Array)
|
|
270
|
+
self.pages = value
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if attributes.key?(:'Width')
|
|
275
|
+
self.width = attributes[:'Width']
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if attributes.key?(:'Height')
|
|
279
|
+
self.height = attributes[:'Height']
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if attributes.key?(:'Dpi')
|
|
283
|
+
self.dpi = attributes[:'Dpi']
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if attributes.key?(:'Password')
|
|
287
|
+
self.password = attributes[:'Password']
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if attributes.key?(:'MarginTop')
|
|
291
|
+
self.margin_top = attributes[:'MarginTop']
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
if attributes.key?(:'MarginBottom')
|
|
295
|
+
self.margin_bottom = attributes[:'MarginBottom']
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if attributes.key?(:'MarginLeft')
|
|
299
|
+
self.margin_left = attributes[:'MarginLeft']
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
if attributes.key?(:'MarginRight')
|
|
303
|
+
self.margin_right = attributes[:'MarginRight']
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
if attributes.key?(:'PdfFormat')
|
|
307
|
+
self.pdf_format = attributes[:'PdfFormat']
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
if attributes.key?(:'RemovePdfaCompliance')
|
|
311
|
+
self.remove_pdfa_compliance = attributes[:'RemovePdfaCompliance']
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
if attributes.key?(:'Zoom')
|
|
315
|
+
self.zoom = attributes[:'Zoom']
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
if attributes.key?(:'Linearize')
|
|
319
|
+
self.linearize = attributes[:'Linearize']
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
if attributes.key?(:'LinkDuplicateStreams')
|
|
323
|
+
self.link_duplicate_streams = attributes[:'LinkDuplicateStreams']
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if attributes.key?(:'RemoveUnusedObjects')
|
|
327
|
+
self.remove_unused_objects = attributes[:'RemoveUnusedObjects']
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if attributes.key?(:'RemoveUnusedStreams')
|
|
331
|
+
self.remove_unused_streams = attributes[:'RemoveUnusedStreams']
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
if attributes.key?(:'CompressImages')
|
|
335
|
+
self.compress_images = attributes[:'CompressImages']
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
if attributes.key?(:'ImageQuality')
|
|
339
|
+
self.image_quality = attributes[:'ImageQuality']
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if attributes.key?(:'UnembedFonts')
|
|
343
|
+
self.unembed_fonts = attributes[:'UnembedFonts']
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if attributes.key?(:'Grayscale')
|
|
347
|
+
self.grayscale = attributes[:'Grayscale']
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
if attributes.key?(:'CenterWindow')
|
|
351
|
+
self.center_window = attributes[:'CenterWindow']
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
if attributes.key?(:'Direction')
|
|
355
|
+
self.direction = attributes[:'Direction']
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if attributes.key?(:'DisplayDocTitle')
|
|
359
|
+
self.display_doc_title = attributes[:'DisplayDocTitle']
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if attributes.key?(:'FitWindow')
|
|
363
|
+
self.fit_window = attributes[:'FitWindow']
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if attributes.key?(:'HideMenubar')
|
|
367
|
+
self.hide_menubar = attributes[:'HideMenubar']
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
if attributes.key?(:'HideToolBar')
|
|
371
|
+
self.hide_tool_bar = attributes[:'HideToolBar']
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
if attributes.key?(:'HideWindowUI')
|
|
375
|
+
self.hide_window_ui = attributes[:'HideWindowUI']
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
if attributes.key?(:'NonFullScreenPageMode')
|
|
379
|
+
self.non_full_screen_page_mode = attributes[:'NonFullScreenPageMode']
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
if attributes.key?(:'PageLayout')
|
|
383
|
+
self.page_layout = attributes[:'PageLayout']
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
if attributes.key?(:'PageMode')
|
|
387
|
+
self.page_mode = attributes[:'PageMode']
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
if attributes.key?(:'BookmarksOutlineLevel')
|
|
391
|
+
self.bookmarks_outline_level = attributes[:'BookmarksOutlineLevel']
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
if attributes.key?(:'HeadingsOutlineLevels')
|
|
395
|
+
self.headings_outline_levels = attributes[:'HeadingsOutlineLevels']
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
if attributes.key?(:'ExpandedOutlineLevels')
|
|
399
|
+
self.expanded_outline_levels = attributes[:'ExpandedOutlineLevels']
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
if attributes.key?(:'Rotate')
|
|
403
|
+
self.rotate = attributes[:'Rotate']
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
if attributes.key?(:'WatermarkOptions')
|
|
407
|
+
self.watermark_options = attributes[:'WatermarkOptions']
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
413
|
+
# @return Array for valid properies with the reasons
|
|
414
|
+
def list_invalid_properties
|
|
415
|
+
invalid_properties = []
|
|
416
|
+
if @from_page.nil?
|
|
417
|
+
invalid_properties.push("invalid value for 'from_page', from_page cannot be nil.")
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
if @pages_count.nil?
|
|
421
|
+
invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.")
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
if @width.nil?
|
|
425
|
+
invalid_properties.push("invalid value for 'width', width cannot be nil.")
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
if @height.nil?
|
|
429
|
+
invalid_properties.push("invalid value for 'height', height cannot be nil.")
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
if @dpi.nil?
|
|
433
|
+
invalid_properties.push("invalid value for 'dpi', dpi cannot be nil.")
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
if @margin_top.nil?
|
|
437
|
+
invalid_properties.push("invalid value for 'margin_top', margin_top cannot be nil.")
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
if @margin_bottom.nil?
|
|
441
|
+
invalid_properties.push("invalid value for 'margin_bottom', margin_bottom cannot be nil.")
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
if @margin_left.nil?
|
|
445
|
+
invalid_properties.push("invalid value for 'margin_left', margin_left cannot be nil.")
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
if @margin_right.nil?
|
|
449
|
+
invalid_properties.push("invalid value for 'margin_right', margin_right cannot be nil.")
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
if @pdf_format.nil?
|
|
453
|
+
invalid_properties.push("invalid value for 'pdf_format', pdf_format cannot be nil.")
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
if @remove_pdfa_compliance.nil?
|
|
457
|
+
invalid_properties.push("invalid value for 'remove_pdfa_compliance', remove_pdfa_compliance cannot be nil.")
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
if @zoom.nil?
|
|
461
|
+
invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
if @linearize.nil?
|
|
465
|
+
invalid_properties.push("invalid value for 'linearize', linearize cannot be nil.")
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
if @link_duplicate_streams.nil?
|
|
469
|
+
invalid_properties.push("invalid value for 'link_duplicate_streams', link_duplicate_streams cannot be nil.")
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
if @remove_unused_objects.nil?
|
|
473
|
+
invalid_properties.push("invalid value for 'remove_unused_objects', remove_unused_objects cannot be nil.")
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
if @remove_unused_streams.nil?
|
|
477
|
+
invalid_properties.push("invalid value for 'remove_unused_streams', remove_unused_streams cannot be nil.")
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
if @compress_images.nil?
|
|
481
|
+
invalid_properties.push("invalid value for 'compress_images', compress_images cannot be nil.")
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
if @image_quality.nil?
|
|
485
|
+
invalid_properties.push("invalid value for 'image_quality', image_quality cannot be nil.")
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
if @unembed_fonts.nil?
|
|
489
|
+
invalid_properties.push("invalid value for 'unembed_fonts', unembed_fonts cannot be nil.")
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
if @grayscale.nil?
|
|
493
|
+
invalid_properties.push("invalid value for 'grayscale', grayscale cannot be nil.")
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
if @center_window.nil?
|
|
497
|
+
invalid_properties.push("invalid value for 'center_window', center_window cannot be nil.")
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
if @direction.nil?
|
|
501
|
+
invalid_properties.push("invalid value for 'direction', direction cannot be nil.")
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
if @display_doc_title.nil?
|
|
505
|
+
invalid_properties.push("invalid value for 'display_doc_title', display_doc_title cannot be nil.")
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
if @fit_window.nil?
|
|
509
|
+
invalid_properties.push("invalid value for 'fit_window', fit_window cannot be nil.")
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
if @hide_menubar.nil?
|
|
513
|
+
invalid_properties.push("invalid value for 'hide_menubar', hide_menubar cannot be nil.")
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
if @hide_tool_bar.nil?
|
|
517
|
+
invalid_properties.push("invalid value for 'hide_tool_bar', hide_tool_bar cannot be nil.")
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
if @hide_window_ui.nil?
|
|
521
|
+
invalid_properties.push("invalid value for 'hide_window_ui', hide_window_ui cannot be nil.")
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
if @non_full_screen_page_mode.nil?
|
|
525
|
+
invalid_properties.push("invalid value for 'non_full_screen_page_mode', non_full_screen_page_mode cannot be nil.")
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
if @page_layout.nil?
|
|
529
|
+
invalid_properties.push("invalid value for 'page_layout', page_layout cannot be nil.")
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
if @page_mode.nil?
|
|
533
|
+
invalid_properties.push("invalid value for 'page_mode', page_mode cannot be nil.")
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
if @bookmarks_outline_level.nil?
|
|
537
|
+
invalid_properties.push("invalid value for 'bookmarks_outline_level', bookmarks_outline_level cannot be nil.")
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
if @headings_outline_levels.nil?
|
|
541
|
+
invalid_properties.push("invalid value for 'headings_outline_levels', headings_outline_levels cannot be nil.")
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
if @expanded_outline_levels.nil?
|
|
545
|
+
invalid_properties.push("invalid value for 'expanded_outline_levels', expanded_outline_levels cannot be nil.")
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
if @rotate.nil?
|
|
549
|
+
invalid_properties.push("invalid value for 'rotate', rotate cannot be nil.")
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
return invalid_properties
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
# Check to see if the all the properties in the model are valid
|
|
556
|
+
# @return true if the model is valid
|
|
557
|
+
def valid?
|
|
558
|
+
return false if @from_page.nil?
|
|
559
|
+
return false if @pages_count.nil?
|
|
560
|
+
return false if @width.nil?
|
|
561
|
+
return false if @height.nil?
|
|
562
|
+
return false if @dpi.nil?
|
|
563
|
+
return false if @margin_top.nil?
|
|
564
|
+
return false if @margin_bottom.nil?
|
|
565
|
+
return false if @margin_left.nil?
|
|
566
|
+
return false if @margin_right.nil?
|
|
567
|
+
return false if @pdf_format.nil?
|
|
568
|
+
pdf_format_validator = EnumAttributeValidator.new('String', ["Default", "PdfA_1A", "PdfA_1B", "PdfA_2A", "PdfA_3A", "PdfA_2B", "PdfA_2U", "PdfA_3B", "PdfA_3U", "v1_3", "v1_4", "v1_5", "v1_6", "v1_7", "PdfX_1A", "PdfX3"])
|
|
569
|
+
return false unless pdf_format_validator.valid?(@pdf_format)
|
|
570
|
+
return false if @remove_pdfa_compliance.nil?
|
|
571
|
+
return false if @zoom.nil?
|
|
572
|
+
return false if @linearize.nil?
|
|
573
|
+
return false if @link_duplicate_streams.nil?
|
|
574
|
+
return false if @remove_unused_objects.nil?
|
|
575
|
+
return false if @remove_unused_streams.nil?
|
|
576
|
+
return false if @compress_images.nil?
|
|
577
|
+
return false if @image_quality.nil?
|
|
578
|
+
return false if @unembed_fonts.nil?
|
|
579
|
+
return false if @grayscale.nil?
|
|
580
|
+
return false if @center_window.nil?
|
|
581
|
+
return false if @direction.nil?
|
|
582
|
+
direction_validator = EnumAttributeValidator.new('String', ["L2R", "R2L"])
|
|
583
|
+
return false unless direction_validator.valid?(@direction)
|
|
584
|
+
return false if @display_doc_title.nil?
|
|
585
|
+
return false if @fit_window.nil?
|
|
586
|
+
return false if @hide_menubar.nil?
|
|
587
|
+
return false if @hide_tool_bar.nil?
|
|
588
|
+
return false if @hide_window_ui.nil?
|
|
589
|
+
return false if @non_full_screen_page_mode.nil?
|
|
590
|
+
non_full_screen_page_mode_validator = EnumAttributeValidator.new('String', ["UseNone", "UseOutlines", "UseThumbs", "FullScreen", "UseOC", "UseAttachments"])
|
|
591
|
+
return false unless non_full_screen_page_mode_validator.valid?(@non_full_screen_page_mode)
|
|
592
|
+
return false if @page_layout.nil?
|
|
593
|
+
page_layout_validator = EnumAttributeValidator.new('String', ["Default", "SinglePage", "OneColumn", "TwoColumnLeft", "TwoColumnRight", "TwoPageLeft", "TwoPageRight"])
|
|
594
|
+
return false unless page_layout_validator.valid?(@page_layout)
|
|
595
|
+
return false if @page_mode.nil?
|
|
596
|
+
page_mode_validator = EnumAttributeValidator.new('String', ["UseNone", "UseOutlines", "UseThumbs", "FullScreen", "UseOC", "UseAttachments"])
|
|
597
|
+
return false unless page_mode_validator.valid?(@page_mode)
|
|
598
|
+
return false if @bookmarks_outline_level.nil?
|
|
599
|
+
return false if @headings_outline_levels.nil?
|
|
600
|
+
return false if @expanded_outline_levels.nil?
|
|
601
|
+
return false if @rotate.nil?
|
|
602
|
+
rotate_validator = EnumAttributeValidator.new('String', ["None", "On90", "On180", "On270"])
|
|
603
|
+
return false unless rotate_validator.valid?(@rotate)
|
|
604
|
+
return true
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
608
|
+
# @param [Object] pdf_format Object to be assigned
|
|
609
|
+
def pdf_format=(pdf_format)
|
|
610
|
+
validator = EnumAttributeValidator.new('String', ["Default", "PdfA_1A", "PdfA_1B", "PdfA_2A", "PdfA_3A", "PdfA_2B", "PdfA_2U", "PdfA_3B", "PdfA_3U", "v1_3", "v1_4", "v1_5", "v1_6", "v1_7", "PdfX_1A", "PdfX3"])
|
|
611
|
+
if pdf_format.to_i == 0
|
|
612
|
+
unless validator.valid?(pdf_format)
|
|
613
|
+
raise ArgumentError, "invalid value for 'pdf_format', must be one of #{validator.allowable_values}."
|
|
614
|
+
end
|
|
615
|
+
@pdf_format = pdf_format
|
|
616
|
+
else
|
|
617
|
+
@pdf_format = validator.allowable_values[pdf_format.to_i]
|
|
618
|
+
end
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
622
|
+
# @param [Object] direction Object to be assigned
|
|
623
|
+
def direction=(direction)
|
|
624
|
+
validator = EnumAttributeValidator.new('String', ["L2R", "R2L"])
|
|
625
|
+
if direction.to_i == 0
|
|
626
|
+
unless validator.valid?(direction)
|
|
627
|
+
raise ArgumentError, "invalid value for 'direction', must be one of #{validator.allowable_values}."
|
|
628
|
+
end
|
|
629
|
+
@direction = direction
|
|
630
|
+
else
|
|
631
|
+
@direction = validator.allowable_values[direction.to_i]
|
|
632
|
+
end
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
636
|
+
# @param [Object] non_full_screen_page_mode Object to be assigned
|
|
637
|
+
def non_full_screen_page_mode=(non_full_screen_page_mode)
|
|
638
|
+
validator = EnumAttributeValidator.new('String', ["UseNone", "UseOutlines", "UseThumbs", "FullScreen", "UseOC", "UseAttachments"])
|
|
639
|
+
if non_full_screen_page_mode.to_i == 0
|
|
640
|
+
unless validator.valid?(non_full_screen_page_mode)
|
|
641
|
+
raise ArgumentError, "invalid value for 'non_full_screen_page_mode', must be one of #{validator.allowable_values}."
|
|
642
|
+
end
|
|
643
|
+
@non_full_screen_page_mode = non_full_screen_page_mode
|
|
644
|
+
else
|
|
645
|
+
@non_full_screen_page_mode = validator.allowable_values[non_full_screen_page_mode.to_i]
|
|
646
|
+
end
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
650
|
+
# @param [Object] page_layout Object to be assigned
|
|
651
|
+
def page_layout=(page_layout)
|
|
652
|
+
validator = EnumAttributeValidator.new('String', ["Default", "SinglePage", "OneColumn", "TwoColumnLeft", "TwoColumnRight", "TwoPageLeft", "TwoPageRight"])
|
|
653
|
+
if page_layout.to_i == 0
|
|
654
|
+
unless validator.valid?(page_layout)
|
|
655
|
+
raise ArgumentError, "invalid value for 'page_layout', must be one of #{validator.allowable_values}."
|
|
656
|
+
end
|
|
657
|
+
@page_layout = page_layout
|
|
658
|
+
else
|
|
659
|
+
@page_layout = validator.allowable_values[page_layout.to_i]
|
|
660
|
+
end
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
664
|
+
# @param [Object] page_mode Object to be assigned
|
|
665
|
+
def page_mode=(page_mode)
|
|
666
|
+
validator = EnumAttributeValidator.new('String', ["UseNone", "UseOutlines", "UseThumbs", "FullScreen", "UseOC", "UseAttachments"])
|
|
667
|
+
if page_mode.to_i == 0
|
|
668
|
+
unless validator.valid?(page_mode)
|
|
669
|
+
raise ArgumentError, "invalid value for 'page_mode', must be one of #{validator.allowable_values}."
|
|
670
|
+
end
|
|
671
|
+
@page_mode = page_mode
|
|
672
|
+
else
|
|
673
|
+
@page_mode = validator.allowable_values[page_mode.to_i]
|
|
674
|
+
end
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
678
|
+
# @param [Object] rotate Object to be assigned
|
|
679
|
+
def rotate=(rotate)
|
|
680
|
+
validator = EnumAttributeValidator.new('String', ["None", "On90", "On180", "On270"])
|
|
681
|
+
if rotate.to_i == 0
|
|
682
|
+
unless validator.valid?(rotate)
|
|
683
|
+
raise ArgumentError, "invalid value for 'rotate', must be one of #{validator.allowable_values}."
|
|
684
|
+
end
|
|
685
|
+
@rotate = rotate
|
|
686
|
+
else
|
|
687
|
+
@rotate = validator.allowable_values[rotate.to_i]
|
|
688
|
+
end
|
|
689
|
+
end
|
|
690
|
+
|
|
691
|
+
# Checks equality by comparing each attribute.
|
|
692
|
+
# @param [Object] Object to be compared
|
|
693
|
+
def ==(other)
|
|
694
|
+
return true if self.equal?(other)
|
|
695
|
+
self.class == other.class &&
|
|
696
|
+
from_page == other.from_page &&
|
|
697
|
+
pages_count == other.pages_count &&
|
|
698
|
+
pages == other.pages &&
|
|
699
|
+
width == other.width &&
|
|
700
|
+
height == other.height &&
|
|
701
|
+
dpi == other.dpi &&
|
|
702
|
+
password == other.password &&
|
|
703
|
+
margin_top == other.margin_top &&
|
|
704
|
+
margin_bottom == other.margin_bottom &&
|
|
705
|
+
margin_left == other.margin_left &&
|
|
706
|
+
margin_right == other.margin_right &&
|
|
707
|
+
pdf_format == other.pdf_format &&
|
|
708
|
+
remove_pdfa_compliance == other.remove_pdfa_compliance &&
|
|
709
|
+
zoom == other.zoom &&
|
|
710
|
+
linearize == other.linearize &&
|
|
711
|
+
link_duplicate_streams == other.link_duplicate_streams &&
|
|
712
|
+
remove_unused_objects == other.remove_unused_objects &&
|
|
713
|
+
remove_unused_streams == other.remove_unused_streams &&
|
|
714
|
+
compress_images == other.compress_images &&
|
|
715
|
+
image_quality == other.image_quality &&
|
|
716
|
+
unembed_fonts == other.unembed_fonts &&
|
|
717
|
+
grayscale == other.grayscale &&
|
|
718
|
+
center_window == other.center_window &&
|
|
719
|
+
direction == other.direction &&
|
|
720
|
+
display_doc_title == other.display_doc_title &&
|
|
721
|
+
fit_window == other.fit_window &&
|
|
722
|
+
hide_menubar == other.hide_menubar &&
|
|
723
|
+
hide_tool_bar == other.hide_tool_bar &&
|
|
724
|
+
hide_window_ui == other.hide_window_ui &&
|
|
725
|
+
non_full_screen_page_mode == other.non_full_screen_page_mode &&
|
|
726
|
+
page_layout == other.page_layout &&
|
|
727
|
+
page_mode == other.page_mode &&
|
|
728
|
+
bookmarks_outline_level == other.bookmarks_outline_level &&
|
|
729
|
+
headings_outline_levels == other.headings_outline_levels &&
|
|
730
|
+
expanded_outline_levels == other.expanded_outline_levels &&
|
|
731
|
+
rotate == other.rotate &&
|
|
732
|
+
watermark_options == other.watermark_options
|
|
733
|
+
end
|
|
734
|
+
|
|
735
|
+
# @see the `==` method
|
|
736
|
+
# @param [Object] Object to be compared
|
|
737
|
+
def eql?(other)
|
|
738
|
+
self == other
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
# Calculates hash code according to all attributes.
|
|
742
|
+
# @return [Fixnum] Hash code
|
|
743
|
+
def hash
|
|
744
|
+
[from_page, pages_count, pages, width, height, dpi, password, margin_top, margin_bottom, margin_left, margin_right, pdf_format, remove_pdfa_compliance, zoom, linearize, link_duplicate_streams, remove_unused_objects, remove_unused_streams, compress_images, image_quality, unembed_fonts, grayscale, center_window, direction, display_doc_title, fit_window, hide_menubar, hide_tool_bar, hide_window_ui, non_full_screen_page_mode, page_layout, page_mode, bookmarks_outline_level, headings_outline_levels, expanded_outline_levels, rotate, watermark_options].hash
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
# Downcases first letter.
|
|
748
|
+
# @return downcased string
|
|
749
|
+
def uncap(str)
|
|
750
|
+
str[0, 1].downcase + str[1..-1]
|
|
751
|
+
end
|
|
752
|
+
|
|
753
|
+
# Builds the object from hash
|
|
754
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
755
|
+
# @return [Object] Returns the model itself
|
|
756
|
+
def build_from_hash(attributes)
|
|
757
|
+
return nil unless attributes.is_a?(Hash)
|
|
758
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
759
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
|
760
|
+
value = attributes[pname]
|
|
761
|
+
if type =~ /\AArray<(.*)>/i
|
|
762
|
+
# check to ensure the input is an array given that the the attribute
|
|
763
|
+
# is documented as an array but the input is not
|
|
764
|
+
if value.is_a?(Array)
|
|
765
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
|
766
|
+
end
|
|
767
|
+
elsif !value.nil?
|
|
768
|
+
self.send("#{key}=", _deserialize(type, value))
|
|
769
|
+
end
|
|
770
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
771
|
+
end
|
|
772
|
+
|
|
773
|
+
self
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
# Deserializes the data based on type
|
|
777
|
+
# @param string type Data type
|
|
778
|
+
# @param string value Value to be deserialized
|
|
779
|
+
# @return [Object] Deserialized data
|
|
780
|
+
def _deserialize(type, value)
|
|
781
|
+
case type.to_sym
|
|
782
|
+
when :DateTime
|
|
783
|
+
Date.parse value
|
|
784
|
+
when :Date
|
|
785
|
+
Date.parse value
|
|
786
|
+
when :String
|
|
787
|
+
value.to_s
|
|
788
|
+
when :Integer
|
|
789
|
+
value.to_i
|
|
790
|
+
when :Float
|
|
791
|
+
value.to_f
|
|
792
|
+
when :BOOLEAN
|
|
793
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
794
|
+
true
|
|
795
|
+
else
|
|
796
|
+
false
|
|
797
|
+
end
|
|
798
|
+
when :Object
|
|
799
|
+
# generic object (usually a Hash), return directly
|
|
800
|
+
value
|
|
801
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
802
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
803
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
804
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
805
|
+
k_type = Regexp.last_match[:k_type]
|
|
806
|
+
v_type = Regexp.last_match[:v_type]
|
|
807
|
+
{}.tap do |hash|
|
|
808
|
+
value.each do |k, v|
|
|
809
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
810
|
+
end
|
|
811
|
+
end
|
|
812
|
+
else
|
|
813
|
+
# model
|
|
814
|
+
temp_model = GroupDocsConversionCloud.const_get(type).new
|
|
815
|
+
temp_model.build_from_hash(value)
|
|
816
|
+
end
|
|
817
|
+
end
|
|
818
|
+
|
|
819
|
+
# Returns the string representation of the object
|
|
820
|
+
# @return [String] String presentation of the object
|
|
821
|
+
def to_s
|
|
822
|
+
to_hash.to_s
|
|
823
|
+
end
|
|
824
|
+
|
|
825
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
826
|
+
# @return [Hash] Returns the object in the form of hash
|
|
827
|
+
def to_body
|
|
828
|
+
to_hash
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
# Returns the object in the form of hash
|
|
832
|
+
# @return [Hash] Returns the object in the form of hash
|
|
833
|
+
def to_hash
|
|
834
|
+
hash = {}
|
|
835
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
836
|
+
value = self.send(attr)
|
|
837
|
+
next if value.nil?
|
|
838
|
+
hash[param] = _to_hash(value)
|
|
839
|
+
end
|
|
840
|
+
hash
|
|
841
|
+
end
|
|
842
|
+
|
|
843
|
+
# Outputs non-array value in the form of hash
|
|
844
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
845
|
+
# @param [Object] value Any valid value
|
|
846
|
+
# @return [Hash] Returns the value in the form of hash
|
|
847
|
+
def _to_hash(value)
|
|
848
|
+
if value.is_a?(Array)
|
|
849
|
+
value.compact.map { |v| _to_hash(v) }
|
|
850
|
+
elsif value.is_a?(Hash)
|
|
851
|
+
{}.tap do |hash|
|
|
852
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
853
|
+
end
|
|
854
|
+
elsif value.respond_to? :to_hash
|
|
855
|
+
value.to_hash
|
|
856
|
+
else
|
|
857
|
+
value
|
|
858
|
+
end
|
|
859
|
+
end
|
|
860
|
+
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
end
|