aspose_pdf_cloud 1.0.2 → 18.2.0

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.
Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +42 -0
  3. data/.swagger-codegen-ignore +58 -0
  4. data/.swagger-codegen/VERSION +1 -0
  5. data/LICENSE +21 -22
  6. data/README.md +51 -43
  7. data/aspose_pdf_cloud.gemspec +32 -8
  8. data/lib/aspose_pdf_cloud.rb +93 -58
  9. data/lib/aspose_pdf_cloud/api/pdf_api.rb +2624 -1916
  10. data/lib/aspose_pdf_cloud/api_client.rb +280 -92
  11. data/lib/aspose_pdf_cloud/api_error.rb +29 -6
  12. data/lib/aspose_pdf_cloud/configuration.rb +86 -63
  13. data/lib/aspose_pdf_cloud/models/annotation.rb +218 -45
  14. data/lib/aspose_pdf_cloud/models/annotation_response.rb +195 -34
  15. data/lib/aspose_pdf_cloud/models/annotations.rb +187 -25
  16. data/lib/aspose_pdf_cloud/models/annotations_response.rb +195 -34
  17. data/lib/aspose_pdf_cloud/models/append_document.rb +198 -23
  18. data/lib/aspose_pdf_cloud/models/attachment.rb +224 -49
  19. data/lib/aspose_pdf_cloud/models/attachment_response.rb +195 -34
  20. data/lib/aspose_pdf_cloud/models/attachments.rb +187 -25
  21. data/lib/aspose_pdf_cloud/models/attachments_response.rb +195 -34
  22. data/lib/aspose_pdf_cloud/models/bookmarks.rb +187 -25
  23. data/lib/aspose_pdf_cloud/models/bookmarks_response.rb +195 -34
  24. data/lib/aspose_pdf_cloud/models/color.rb +214 -31
  25. data/lib/aspose_pdf_cloud/models/document.rb +194 -29
  26. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +195 -34
  27. data/lib/aspose_pdf_cloud/models/document_properties.rb +187 -25
  28. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +195 -34
  29. data/lib/aspose_pdf_cloud/models/document_property.rb +197 -33
  30. data/lib/aspose_pdf_cloud/models/document_property_response.rb +195 -34
  31. data/lib/aspose_pdf_cloud/models/document_response.rb +206 -34
  32. data/lib/aspose_pdf_cloud/models/document_text_replace_response.rb +203 -41
  33. data/lib/aspose_pdf_cloud/models/field.rb +213 -42
  34. data/lib/aspose_pdf_cloud/models/field_response.rb +195 -34
  35. data/lib/aspose_pdf_cloud/models/field_type.rb +44 -0
  36. data/lib/aspose_pdf_cloud/models/fields.rb +187 -25
  37. data/lib/aspose_pdf_cloud/models/fields_response.rb +195 -34
  38. data/lib/aspose_pdf_cloud/models/font_styles.rb +43 -0
  39. data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +44 -0
  40. data/lib/aspose_pdf_cloud/models/http_status_code.rb +87 -0
  41. data/lib/aspose_pdf_cloud/models/image.rb +194 -29
  42. data/lib/aspose_pdf_cloud/models/image_response.rb +195 -34
  43. data/lib/aspose_pdf_cloud/models/images.rb +187 -25
  44. data/lib/aspose_pdf_cloud/models/images_list_request.rb +205 -0
  45. data/lib/aspose_pdf_cloud/models/images_response.rb +195 -34
  46. data/lib/aspose_pdf_cloud/models/line_spacing.rb +43 -0
  47. data/lib/aspose_pdf_cloud/models/link.rb +194 -27
  48. data/lib/aspose_pdf_cloud/models/link_action_type.rb +46 -0
  49. data/lib/aspose_pdf_cloud/models/link_annotation.rb +204 -39
  50. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +195 -34
  51. data/lib/aspose_pdf_cloud/models/link_annotations.rb +187 -25
  52. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +195 -34
  53. data/lib/aspose_pdf_cloud/models/link_element.rb +175 -14
  54. data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +45 -0
  55. data/lib/aspose_pdf_cloud/models/merge_documents.rb +175 -14
  56. data/lib/aspose_pdf_cloud/models/optimize_options.rb +293 -0
  57. data/lib/aspose_pdf_cloud/models/page.rb +198 -33
  58. data/lib/aspose_pdf_cloud/models/page_text_replace_response.rb +203 -41
  59. data/lib/aspose_pdf_cloud/models/page_word_count.rb +192 -19
  60. data/lib/aspose_pdf_cloud/models/pages.rb +187 -25
  61. data/lib/aspose_pdf_cloud/models/paragraph.rb +303 -0
  62. data/lib/aspose_pdf_cloud/models/rectangle.rb +210 -27
  63. data/lib/aspose_pdf_cloud/models/rotation.rb +44 -0
  64. data/lib/aspose_pdf_cloud/models/saa_spose_response.rb +213 -0
  65. data/lib/aspose_pdf_cloud/models/segment.rb +206 -0
  66. data/lib/aspose_pdf_cloud/models/signature.rb +278 -54
  67. data/lib/aspose_pdf_cloud/models/signature_type.rb +42 -0
  68. data/lib/aspose_pdf_cloud/models/split_result.rb +175 -14
  69. data/lib/aspose_pdf_cloud/models/split_result_document.rb +206 -37
  70. data/lib/aspose_pdf_cloud/models/split_result_response.rb +196 -34
  71. data/lib/aspose_pdf_cloud/models/stamp.rb +312 -104
  72. data/lib/aspose_pdf_cloud/models/stamp_type.rb +44 -0
  73. data/lib/aspose_pdf_cloud/models/text_format.rb +197 -33
  74. data/lib/aspose_pdf_cloud/models/text_format_response.rb +195 -34
  75. data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +47 -0
  76. data/lib/aspose_pdf_cloud/models/text_item.rb +192 -29
  77. data/lib/aspose_pdf_cloud/models/text_item_response.rb +195 -34
  78. data/lib/aspose_pdf_cloud/models/text_items.rb +187 -25
  79. data/lib/aspose_pdf_cloud/models/text_items_response.rb +195 -34
  80. data/lib/aspose_pdf_cloud/models/text_line.rb +210 -0
  81. data/lib/aspose_pdf_cloud/models/text_rect.rb +220 -0
  82. data/lib/aspose_pdf_cloud/models/text_rects.rb +199 -0
  83. data/lib/aspose_pdf_cloud/models/text_rects_response.rb +222 -0
  84. data/lib/aspose_pdf_cloud/models/text_replace.rb +225 -25
  85. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +209 -16
  86. data/lib/aspose_pdf_cloud/models/text_replace_request.rb +262 -0
  87. data/lib/aspose_pdf_cloud/models/text_replace_response.rb +222 -0
  88. data/lib/aspose_pdf_cloud/models/text_state.rb +211 -32
  89. data/lib/aspose_pdf_cloud/models/tiff_export_options.rb +266 -75
  90. data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +45 -0
  91. data/lib/aspose_pdf_cloud/models/word_count.rb +174 -14
  92. data/lib/aspose_pdf_cloud/models/word_count_response.rb +196 -34
  93. data/lib/aspose_pdf_cloud/models/wrap_mode.rb +44 -0
  94. data/lib/aspose_pdf_cloud/version.rb +23 -2
  95. data/test/pdf_tests.rb +1268 -623
  96. data/test_data/33539.jpg +0 -0
  97. data/test_data/44781.jpg +0 -0
  98. data/test_data/4pages.pdf +0 -0
  99. data/test_data/BlankWithSignature.pdf +0 -0
  100. data/test_data/Hello_world.pdf +0 -0
  101. data/test_data/HtmlExample1.html +27 -0
  102. data/test_data/Koala.jpg +0 -0
  103. data/test_data/PdfWithAcroForm.pdf +321 -0
  104. data/test_data/PdfWithAnnotations.pdf +720 -1
  105. data/test_data/PdfWithBookmarks.pdf +0 -0
  106. data/test_data/PdfWithEmbeddedFiles.pdf +0 -0
  107. data/test_data/PdfWithImages2.pdf +0 -0
  108. data/test_data/PdfWithLinks.pdf +0 -0
  109. data/test_data/Penguins.jpg +0 -0
  110. data/test_data/butterfly.jpg +0 -0
  111. data/test_data/marketing.pdf +0 -0
  112. data/test_data/rusdoc.pdf +0 -0
  113. data/test_data/test1234.pfx +0 -0
  114. metadata +54 -13
  115. data/lib/aspose_pdf_cloud/models/barcode_response_list.rb +0 -45
  116. data/lib/aspose_pdf_cloud/models/base_object.rb +0 -86
  117. data/lib/aspose_pdf_cloud/models/base_response.rb +0 -61
  118. data/lib/aspose_pdf_cloud/models/page_response.rb +0 -61
@@ -1,63 +1,101 @@
1
- module AsposePDFCloud
2
- #
3
- class TiffExportOptions < BaseObject
4
- attr_accessor :brightness, :compression, :color_depth, :left_margin, :right_margin, :top_margin, :bottom_margin, :orientation, :skip_blank_pages, :width, :height, :x_resolution, :y_resolution, :page_index, :page_count, :result_file
5
- # attribute mapping from ruby-style variable name to JSON key
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 Aspose.Pdf for Cloud
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
19
+ --------------------------------------------------------------------------------------------------------------------
20
+ =end
21
+
22
+ require 'date'
23
+
24
+ module AsposePdfCloud
25
+ # Used for tiff export options setting.
26
+ class TiffExportOptions
27
+ # Image brightness.
28
+ attr_accessor :brightness
29
+
30
+ # Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None.
31
+ attr_accessor :compression
32
+
33
+ # Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp.
34
+ attr_accessor :color_depth
35
+
36
+ # Left image margin.
37
+ attr_accessor :left_margin
38
+
39
+ # Right image margin.
40
+ attr_accessor :right_margin
41
+
42
+ # Top image margin.
43
+ attr_accessor :top_margin
44
+
45
+ # Bottom image margin.
46
+ attr_accessor :bottom_margin
47
+
48
+ # Image orientation. Possible values are: None, Landscape, Portait.
49
+ attr_accessor :orientation
50
+
51
+ # Skip blank pages flag.
52
+ attr_accessor :skip_blank_pages
53
+
54
+ # Image width.
55
+ attr_accessor :width
56
+
57
+ # Image height.
58
+ attr_accessor :height
59
+
60
+ # Horizontal resolution.
61
+ attr_accessor :x_resolution
62
+
63
+ # Vertical resolution.
64
+ attr_accessor :y_resolution
65
+
66
+ # Start page to export.
67
+ attr_accessor :page_index
68
+
69
+ # Number of pages to export.
70
+ attr_accessor :page_count
71
+
72
+ # Resulting image file.
73
+ attr_accessor :result_file
74
+
75
+
76
+ # Attribute mapping from ruby-style variable name to JSON key.
6
77
  def self.attribute_map
7
78
  {
8
-
9
- #
10
79
  :'brightness' => :'Brightness',
11
-
12
- #
13
80
  :'compression' => :'Compression',
14
-
15
- #
16
81
  :'color_depth' => :'ColorDepth',
17
-
18
- #
19
82
  :'left_margin' => :'LeftMargin',
20
-
21
- #
22
83
  :'right_margin' => :'RightMargin',
23
-
24
- #
25
84
  :'top_margin' => :'TopMargin',
26
-
27
- #
28
85
  :'bottom_margin' => :'BottomMargin',
29
-
30
- #
31
86
  :'orientation' => :'Orientation',
32
-
33
- #
34
87
  :'skip_blank_pages' => :'SkipBlankPages',
35
-
36
- #
37
88
  :'width' => :'Width',
38
-
39
- #
40
89
  :'height' => :'Height',
41
-
42
- #
43
90
  :'x_resolution' => :'XResolution',
44
-
45
- #
46
91
  :'y_resolution' => :'YResolution',
47
-
48
- #
49
92
  :'page_index' => :'PageIndex',
50
-
51
- #
52
93
  :'page_count' => :'PageCount',
53
-
54
- #
55
94
  :'result_file' => :'ResultFile'
56
-
57
95
  }
58
96
  end
59
97
 
60
- # attribute type
98
+ # Attribute type mapping.
61
99
  def self.swagger_types
62
100
  {
63
101
  :'brightness' => :'Float',
@@ -76,82 +114,235 @@ module AsposePDFCloud
76
114
  :'page_index' => :'Integer',
77
115
  :'page_count' => :'Integer',
78
116
  :'result_file' => :'String'
79
-
80
117
  }
81
118
  end
82
119
 
120
+ # Initializes the object
121
+ # @param [Hash] attributes Model attributes in the form of hash
83
122
  def initialize(attributes = {})
84
- return if !attributes.is_a?(Hash) || attributes.empty?
123
+ return unless attributes.is_a?(Hash)
85
124
 
86
125
  # convert string to symbol for hash key
87
- attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
126
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
88
127
 
89
-
90
- if attributes[:'Brightness']
128
+ if attributes.has_key?(:'Brightness')
91
129
  self.brightness = attributes[:'Brightness']
92
130
  end
93
-
94
- if attributes[:'Compression']
131
+
132
+ if attributes.has_key?(:'Compression')
95
133
  self.compression = attributes[:'Compression']
96
134
  end
97
-
98
- if attributes[:'ColorDepth']
135
+
136
+ if attributes.has_key?(:'ColorDepth')
99
137
  self.color_depth = attributes[:'ColorDepth']
100
138
  end
101
-
102
- if attributes[:'LeftMargin']
139
+
140
+ if attributes.has_key?(:'LeftMargin')
103
141
  self.left_margin = attributes[:'LeftMargin']
104
142
  end
105
-
106
- if attributes[:'RightMargin']
143
+
144
+ if attributes.has_key?(:'RightMargin')
107
145
  self.right_margin = attributes[:'RightMargin']
108
146
  end
109
-
110
- if attributes[:'TopMargin']
147
+
148
+ if attributes.has_key?(:'TopMargin')
111
149
  self.top_margin = attributes[:'TopMargin']
112
150
  end
113
-
114
- if attributes[:'BottomMargin']
151
+
152
+ if attributes.has_key?(:'BottomMargin')
115
153
  self.bottom_margin = attributes[:'BottomMargin']
116
154
  end
117
-
118
- if attributes[:'Orientation']
155
+
156
+ if attributes.has_key?(:'Orientation')
119
157
  self.orientation = attributes[:'Orientation']
120
158
  end
121
-
122
- if attributes[:'SkipBlankPages']
159
+
160
+ if attributes.has_key?(:'SkipBlankPages')
123
161
  self.skip_blank_pages = attributes[:'SkipBlankPages']
124
162
  end
125
-
126
- if attributes[:'Width']
163
+
164
+ if attributes.has_key?(:'Width')
127
165
  self.width = attributes[:'Width']
128
166
  end
129
-
130
- if attributes[:'Height']
167
+
168
+ if attributes.has_key?(:'Height')
131
169
  self.height = attributes[:'Height']
132
170
  end
133
-
134
- if attributes[:'XResolution']
171
+
172
+ if attributes.has_key?(:'XResolution')
135
173
  self.x_resolution = attributes[:'XResolution']
136
174
  end
137
-
138
- if attributes[:'YResolution']
175
+
176
+ if attributes.has_key?(:'YResolution')
139
177
  self.y_resolution = attributes[:'YResolution']
140
178
  end
141
-
142
- if attributes[:'PageIndex']
179
+
180
+ if attributes.has_key?(:'PageIndex')
143
181
  self.page_index = attributes[:'PageIndex']
144
182
  end
145
-
146
- if attributes[:'PageCount']
183
+
184
+ if attributes.has_key?(:'PageCount')
147
185
  self.page_count = attributes[:'PageCount']
148
186
  end
149
-
150
- if attributes[:'ResultFile']
187
+
188
+ if attributes.has_key?(:'ResultFile')
151
189
  self.result_file = attributes[:'ResultFile']
152
190
  end
153
-
191
+
192
+ end
193
+
194
+ # Show invalid properties with the reasons. Usually used together with valid?
195
+ # @return Array for valid properies with the reasons
196
+ def list_invalid_properties
197
+ invalid_properties = Array.new
198
+ return invalid_properties
199
+ end
200
+
201
+ # Check to see if the all the properties in the model are valid
202
+ # @return true if the model is valid
203
+ def valid?
204
+ return true
205
+ end
206
+
207
+ # Checks equality by comparing each attribute.
208
+ # @param [Object] Object to be compared
209
+ def ==(o)
210
+ return true if self.equal?(o)
211
+ self.class == o.class &&
212
+ brightness == o.brightness &&
213
+ compression == o.compression &&
214
+ color_depth == o.color_depth &&
215
+ left_margin == o.left_margin &&
216
+ right_margin == o.right_margin &&
217
+ top_margin == o.top_margin &&
218
+ bottom_margin == o.bottom_margin &&
219
+ orientation == o.orientation &&
220
+ skip_blank_pages == o.skip_blank_pages &&
221
+ width == o.width &&
222
+ height == o.height &&
223
+ x_resolution == o.x_resolution &&
224
+ y_resolution == o.y_resolution &&
225
+ page_index == o.page_index &&
226
+ page_count == o.page_count &&
227
+ result_file == o.result_file
228
+ end
229
+
230
+ # @see the `==` method
231
+ # @param [Object] Object to be compared
232
+ def eql?(o)
233
+ self == o
234
+ end
235
+
236
+ # Calculates hash code according to all attributes.
237
+ # @return [Fixnum] Hash code
238
+ def hash
239
+ [brightness, compression, color_depth, left_margin, right_margin, top_margin, bottom_margin, orientation, skip_blank_pages, width, height, x_resolution, y_resolution, page_index, page_count, result_file].hash
240
+ end
241
+
242
+ # Builds the object from hash
243
+ # @param [Hash] attributes Model attributes in the form of hash
244
+ # @return [Object] Returns the model itself
245
+ def build_from_hash(attributes)
246
+ return nil unless attributes.is_a?(Hash)
247
+ self.class.swagger_types.each_pair do |key, type|
248
+ if type =~ /\AArray<(.*)>/i
249
+ # check to ensure the input is an array given that the the attribute
250
+ # is documented as an array but the input is not
251
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
252
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
253
+ end
254
+ elsif !attributes[self.class.attribute_map[key]].nil?
255
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
256
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
257
+ end
258
+
259
+ self
260
+ end
261
+
262
+ # Deserializes the data based on type
263
+ # @param string type Data type
264
+ # @param string value Value to be deserialized
265
+ # @return [Object] Deserialized data
266
+ def _deserialize(type, value)
267
+ case type.to_sym
268
+ when :DateTime
269
+ DateTime.parse(value)
270
+ when :Date
271
+ Date.parse(value)
272
+ when :String
273
+ value.to_s
274
+ when :Integer
275
+ value.to_i
276
+ when :Float
277
+ value.to_f
278
+ when :BOOLEAN
279
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
280
+ true
281
+ else
282
+ false
283
+ end
284
+ when :Object
285
+ # generic object (usually a Hash), return directly
286
+ value
287
+ when /\AArray<(?<inner_type>.+)>\z/
288
+ inner_type = Regexp.last_match[:inner_type]
289
+ value.map { |v| _deserialize(inner_type, v) }
290
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
291
+ k_type = Regexp.last_match[:k_type]
292
+ v_type = Regexp.last_match[:v_type]
293
+ {}.tap do |hash|
294
+ value.each do |k, v|
295
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
296
+ end
297
+ end
298
+ else # model
299
+ temp_model = AsposePdfCloud.const_get(type).new
300
+ temp_model.build_from_hash(value)
301
+ end
302
+ end
303
+
304
+ # Returns the string representation of the object
305
+ # @return [String] String presentation of the object
306
+ def to_s
307
+ to_hash.to_s
308
+ end
309
+
310
+ # to_body is an alias to to_hash (backward compatibility)
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_body
313
+ to_hash
314
+ end
315
+
316
+ # Returns the object in the form of hash
317
+ # @return [Hash] Returns the object in the form of hash
318
+ def to_hash
319
+ hash = {}
320
+ self.class.attribute_map.each_pair do |attr, param|
321
+ value = self.send(attr)
322
+ next if value.nil?
323
+ hash[param] = _to_hash(value)
324
+ end
325
+ hash
326
+ end
327
+
328
+ # Outputs non-array value in the form of hash
329
+ # For object, use to_hash. Otherwise, just return the value
330
+ # @param [Object] value Any valid value
331
+ # @return [Hash] Returns the value in the form of hash
332
+ def _to_hash(value)
333
+ if value.is_a?(Array)
334
+ value.compact.map{ |v| _to_hash(v) }
335
+ elsif value.is_a?(Hash)
336
+ {}.tap do |hash|
337
+ value.each { |k, v| hash[k] = _to_hash(v) }
338
+ end
339
+ elsif value.respond_to? :to_hash
340
+ value.to_hash
341
+ else
342
+ value
343
+ end
154
344
  end
155
345
 
156
346
  end
347
+
157
348
  end
@@ -0,0 +1,45 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 Aspose.Pdf for Cloud
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
19
+ --------------------------------------------------------------------------------------------------------------------
20
+ =end
21
+
22
+ require 'date'
23
+
24
+ module AsposePdfCloud
25
+ class VerticalAlignment
26
+
27
+ NONE = "None".freeze
28
+ TOP = "Top".freeze
29
+ CENTER = "Center".freeze
30
+ BOTTOM = "Bottom".freeze
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
37
+ # consantValues = VerticalAlignment.constants.select{|c| c.to_s == value}
38
+ constantValues = VerticalAlignment.constants.select{ |const_name| VerticalAlignment.const_get(const_name) == value}
39
+
40
+ raise "Invalid ENUM value #{value} for class #VerticalAlignment" if constantValues.empty?
41
+ value
42
+ end
43
+ end
44
+
45
+ end