aspose_pdf_cloud 18.7.0 → 18.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/aspose_pdf_cloud.gemspec +53 -49
- data/lib/aspose_pdf_cloud.rb +150 -145
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +12907 -11705
- data/lib/aspose_pdf_cloud/api_client.rb +2 -2
- data/lib/aspose_pdf_cloud/api_error.rb +47 -47
- data/lib/aspose_pdf_cloud/configuration.rb +175 -185
- data/lib/aspose_pdf_cloud/models/annotation.rb +332 -260
- data/lib/aspose_pdf_cloud/models/annotation_flags.rb +52 -0
- data/lib/aspose_pdf_cloud/models/annotation_info.rb +342 -0
- data/lib/aspose_pdf_cloud/models/annotation_state.rb +49 -0
- data/lib/aspose_pdf_cloud/models/annotation_type.rb +69 -0
- data/lib/aspose_pdf_cloud/models/{annotations.rb → annotations_info.rb} +211 -211
- data/lib/aspose_pdf_cloud/models/{annotations_response.rb → annotations_info_response.rb} +222 -222
- data/lib/aspose_pdf_cloud/models/antialiasing_processing_type.rb +43 -43
- data/lib/aspose_pdf_cloud/models/append_document.rb +233 -228
- data/lib/aspose_pdf_cloud/models/{saa_spose_response.rb → aspose_response.rb} +213 -213
- data/lib/aspose_pdf_cloud/models/attachment.rb +270 -270
- data/lib/aspose_pdf_cloud/models/attachment_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/attachments.rb +211 -211
- data/lib/aspose_pdf_cloud/models/attachments_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/color.rb +244 -244
- data/lib/aspose_pdf_cloud/models/color_depth.rb +45 -45
- data/lib/aspose_pdf_cloud/models/compression_type.rb +46 -46
- data/lib/aspose_pdf_cloud/models/doc_format.rb +43 -43
- data/lib/aspose_pdf_cloud/models/doc_recognition_mode.rb +43 -43
- data/lib/aspose_pdf_cloud/models/document.rb +220 -220
- data/lib/aspose_pdf_cloud/models/{text_item_response.rb → document_page_response.rb} +222 -222
- data/lib/aspose_pdf_cloud/models/document_pages_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/document_privilege.rb +298 -298
- data/lib/aspose_pdf_cloud/models/document_properties.rb +211 -211
- data/lib/aspose_pdf_cloud/models/document_properties_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/document_property.rb +227 -227
- data/lib/aspose_pdf_cloud/models/document_property_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/document_response.rb +233 -233
- data/lib/aspose_pdf_cloud/models/epub_recognition_mode.rb +44 -44
- data/lib/aspose_pdf_cloud/models/field.rb +254 -254
- data/lib/aspose_pdf_cloud/models/field_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/field_type.rb +45 -44
- data/lib/aspose_pdf_cloud/models/fields.rb +211 -211
- data/lib/aspose_pdf_cloud/models/fields_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/font_encoding_rules.rb +43 -43
- data/lib/aspose_pdf_cloud/models/font_saving_modes.rb +45 -45
- data/lib/aspose_pdf_cloud/models/font_styles.rb +45 -43
- data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +382 -0
- data/lib/aspose_pdf_cloud/models/{annotation_response.rb → free_text_annotation_response.rb} +222 -222
- data/lib/aspose_pdf_cloud/models/{text_items.rb → free_text_annotations.rb} +211 -211
- data/lib/aspose_pdf_cloud/models/{text_items_response.rb → free_text_annotations_response.rb} +222 -222
- data/lib/aspose_pdf_cloud/models/free_text_intent.rb +44 -0
- data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +45 -44
- data/lib/aspose_pdf_cloud/models/html_document_type.rb +43 -43
- data/lib/aspose_pdf_cloud/models/html_markup_generation_modes.rb +43 -43
- data/lib/aspose_pdf_cloud/models/image.rb +250 -220
- data/lib/aspose_pdf_cloud/models/image_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/image_src_type.rb +43 -43
- data/lib/aspose_pdf_cloud/models/image_template.rb +281 -281
- data/lib/aspose_pdf_cloud/models/image_templates_request.rb +230 -230
- data/lib/aspose_pdf_cloud/models/images.rb +211 -211
- data/lib/aspose_pdf_cloud/models/images_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/justification.rb +44 -0
- data/lib/aspose_pdf_cloud/models/letters_positioning_methods.rb +43 -43
- data/lib/aspose_pdf_cloud/models/line_spacing.rb +43 -43
- data/lib/aspose_pdf_cloud/models/link.rb +228 -228
- data/lib/aspose_pdf_cloud/models/link_action_type.rb +47 -46
- data/lib/aspose_pdf_cloud/models/link_annotation.rb +254 -236
- data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/link_annotations.rb +211 -211
- data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/link_element.rb +200 -200
- data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +46 -45
- data/lib/aspose_pdf_cloud/models/margin_info.rb +244 -244
- data/lib/aspose_pdf_cloud/models/markup_annotation.rb +342 -0
- data/lib/aspose_pdf_cloud/models/merge_documents.rb +205 -200
- data/lib/aspose_pdf_cloud/models/optimize_options.rb +293 -293
- data/lib/aspose_pdf_cloud/models/page.rb +228 -228
- data/lib/aspose_pdf_cloud/models/page_word_count.rb +218 -218
- data/lib/aspose_pdf_cloud/models/pages.rb +211 -211
- data/lib/aspose_pdf_cloud/models/paragraph.rb +303 -303
- data/lib/aspose_pdf_cloud/models/parts_embedding_modes.rb +44 -44
- data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +43 -43
- data/lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb +44 -44
- data/lib/aspose_pdf_cloud/models/{document_text_replace_response.rb → rectangle_pdf.rb} +244 -231
- data/lib/aspose_pdf_cloud/models/rotation.rb +45 -44
- data/lib/aspose_pdf_cloud/models/segment.rb +211 -206
- data/lib/aspose_pdf_cloud/models/shape_type.rb +44 -44
- data/lib/aspose_pdf_cloud/models/signature.rb +338 -333
- data/lib/aspose_pdf_cloud/models/signature_type.rb +44 -42
- data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +223 -223
- data/lib/aspose_pdf_cloud/models/split_result.rb +200 -200
- data/lib/aspose_pdf_cloud/models/split_result_document.rb +238 -238
- data/lib/aspose_pdf_cloud/models/split_result_response.rb +223 -223
- data/lib/aspose_pdf_cloud/models/stamp.rb +413 -413
- data/lib/aspose_pdf_cloud/models/stamp_type.rb +45 -44
- data/lib/aspose_pdf_cloud/models/{tiff_export_options.rb → text_annotation.rb} +382 -348
- data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +222 -0
- data/lib/aspose_pdf_cloud/models/{text_item.rb → text_annotations.rb} +211 -218
- data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +222 -0
- data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +47 -47
- data/lib/aspose_pdf_cloud/models/text_icon.rb +52 -0
- data/lib/aspose_pdf_cloud/models/text_line.rb +215 -210
- data/lib/aspose_pdf_cloud/models/text_rect.rb +220 -220
- data/lib/aspose_pdf_cloud/models/text_rects.rb +199 -199
- data/lib/aspose_pdf_cloud/models/text_rects_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/text_replace.rb +253 -253
- data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +232 -232
- data/lib/aspose_pdf_cloud/models/text_replace_response.rb +222 -222
- data/lib/aspose_pdf_cloud/models/text_state.rb +248 -248
- data/lib/aspose_pdf_cloud/models/{text_format.rb → text_style.rb} +233 -227
- data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +45 -45
- data/lib/aspose_pdf_cloud/models/word_count.rb +199 -199
- data/lib/aspose_pdf_cloud/models/word_count_response.rb +223 -223
- data/lib/aspose_pdf_cloud/models/wrap_mode.rb +44 -44
- data/lib/aspose_pdf_cloud/version.rb +24 -24
- data/test/pdf_tests.rb +1496 -1325
- data/test_data/TexExample.tex +304 -304
- metadata +24 -21
- data/.gitignore +0 -46
- data/.swagger-codegen-ignore +0 -58
- data/lib/aspose_pdf_cloud/models/http_status_code.rb +0 -87
- data/lib/aspose_pdf_cloud/models/images_list_request.rb +0 -205
- data/lib/aspose_pdf_cloud/models/page_text_replace_response.rb +0 -231
- data/lib/aspose_pdf_cloud/models/rectangle.rb +0 -244
- data/lib/aspose_pdf_cloud/models/text_format_response.rb +0 -222
- data/lib/aspose_pdf_cloud/models/text_replace_request.rb +0 -262
@@ -1,43 +1,43 @@
|
|
1
|
-
=begin
|
2
|
-
--------------------------------------------------------------------------------------------------------------------
|
3
|
-
Copyright (c) 2018 Aspose.PDF 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 AntialiasingProcessingType
|
26
|
-
|
27
|
-
NO_ADDITIONAL_PROCESSING = "NoAdditionalProcessing".freeze
|
28
|
-
TRY_CORRECT_RESULT_HTML = "TryCorrectResultHtml".freeze
|
29
|
-
|
30
|
-
# Builds the enum from string
|
31
|
-
# @param [String] The enum value in the form of the string
|
32
|
-
# @return [String] The enum value
|
33
|
-
def build_from_hash(value)
|
34
|
-
# resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
|
35
|
-
# consantValues = AntialiasingProcessingType.constants.select{|c| c.to_s == value}
|
36
|
-
constantValues = AntialiasingProcessingType.constants.select{ |const_name| AntialiasingProcessingType.const_get(const_name) == value}
|
37
|
-
|
38
|
-
raise "Invalid ENUM value #{value} for class #AntialiasingProcessingType" if constantValues.empty?
|
39
|
-
value
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
Copyright (c) 2018 Aspose.PDF 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 AntialiasingProcessingType
|
26
|
+
|
27
|
+
NO_ADDITIONAL_PROCESSING = "NoAdditionalProcessing".freeze
|
28
|
+
TRY_CORRECT_RESULT_HTML = "TryCorrectResultHtml".freeze
|
29
|
+
|
30
|
+
# Builds the enum from string
|
31
|
+
# @param [String] The enum value in the form of the string
|
32
|
+
# @return [String] The enum value
|
33
|
+
def build_from_hash(value)
|
34
|
+
# resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
|
35
|
+
# consantValues = AntialiasingProcessingType.constants.select{|c| c.to_s == value}
|
36
|
+
constantValues = AntialiasingProcessingType.constants.select{ |const_name| AntialiasingProcessingType.const_get(const_name) == value}
|
37
|
+
|
38
|
+
raise "Invalid ENUM value #{value} for class #AntialiasingProcessingType" if constantValues.empty?
|
39
|
+
value
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -1,228 +1,233 @@
|
|
1
|
-
=begin
|
2
|
-
--------------------------------------------------------------------------------------------------------------------
|
3
|
-
Copyright (c) 2018 Aspose.PDF 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 for appendDocument service request building.
|
26
|
-
class AppendDocument
|
27
|
-
# Document to append (server path).
|
28
|
-
attr_accessor :document
|
29
|
-
|
30
|
-
# Appending start page.
|
31
|
-
attr_accessor :start_page
|
32
|
-
|
33
|
-
# Appending end page.
|
34
|
-
attr_accessor :end_page
|
35
|
-
|
36
|
-
|
37
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
-
def self.attribute_map
|
39
|
-
{
|
40
|
-
:'document' => :'Document',
|
41
|
-
:'start_page' => :'StartPage',
|
42
|
-
:'end_page' => :'EndPage'
|
43
|
-
}
|
44
|
-
end
|
45
|
-
|
46
|
-
# Attribute type mapping.
|
47
|
-
def self.swagger_types
|
48
|
-
{
|
49
|
-
:'document' => :'String',
|
50
|
-
:'start_page' => :'Integer',
|
51
|
-
:'end_page' => :'Integer'
|
52
|
-
}
|
53
|
-
end
|
54
|
-
|
55
|
-
# Initializes the object
|
56
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
-
def initialize(attributes = {})
|
58
|
-
return unless attributes.is_a?(Hash)
|
59
|
-
|
60
|
-
# convert string to symbol for hash key
|
61
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
|
-
|
63
|
-
if attributes.has_key?(:'Document')
|
64
|
-
self.document = attributes[:'Document']
|
65
|
-
end
|
66
|
-
|
67
|
-
if attributes.has_key?(:'StartPage')
|
68
|
-
self.start_page = attributes[:'StartPage']
|
69
|
-
end
|
70
|
-
|
71
|
-
if attributes.has_key?(:'EndPage')
|
72
|
-
self.end_page = attributes[:'EndPage']
|
73
|
-
end
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
-
# @return Array for valid properies with the reasons
|
79
|
-
def list_invalid_properties
|
80
|
-
invalid_properties = Array.new
|
81
|
-
if @
|
82
|
-
invalid_properties.push("invalid value for '
|
83
|
-
end
|
84
|
-
|
85
|
-
if @
|
86
|
-
invalid_properties.push("invalid value for '
|
87
|
-
end
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
#
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
#
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
#
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
# Returns the object in the form of hash
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
end
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
Copyright (c) 2018 Aspose.PDF 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 for appendDocument service request building.
|
26
|
+
class AppendDocument
|
27
|
+
# Document to append (server path).
|
28
|
+
attr_accessor :document
|
29
|
+
|
30
|
+
# Appending start page.
|
31
|
+
attr_accessor :start_page
|
32
|
+
|
33
|
+
# Appending end page.
|
34
|
+
attr_accessor :end_page
|
35
|
+
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'document' => :'Document',
|
41
|
+
:'start_page' => :'StartPage',
|
42
|
+
:'end_page' => :'EndPage'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.swagger_types
|
48
|
+
{
|
49
|
+
:'document' => :'String',
|
50
|
+
:'start_page' => :'Integer',
|
51
|
+
:'end_page' => :'Integer'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
|
+
|
63
|
+
if attributes.has_key?(:'Document')
|
64
|
+
self.document = attributes[:'Document']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'StartPage')
|
68
|
+
self.start_page = attributes[:'StartPage']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'EndPage')
|
72
|
+
self.end_page = attributes[:'EndPage']
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properies with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
if @document.nil?
|
82
|
+
invalid_properties.push("invalid value for 'document', document cannot be nil.")
|
83
|
+
end
|
84
|
+
|
85
|
+
if @start_page.nil?
|
86
|
+
invalid_properties.push("invalid value for 'start_page', start_page cannot be nil.")
|
87
|
+
end
|
88
|
+
|
89
|
+
if @end_page.nil?
|
90
|
+
invalid_properties.push("invalid value for 'end_page', end_page cannot be nil.")
|
91
|
+
end
|
92
|
+
|
93
|
+
return invalid_properties
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
def valid?
|
99
|
+
return false if @document.nil?
|
100
|
+
return false if @start_page.nil?
|
101
|
+
return false if @end_page.nil?
|
102
|
+
return true
|
103
|
+
end
|
104
|
+
|
105
|
+
# Checks equality by comparing each attribute.
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def ==(o)
|
108
|
+
return true if self.equal?(o)
|
109
|
+
self.class == o.class &&
|
110
|
+
document == o.document &&
|
111
|
+
start_page == o.start_page &&
|
112
|
+
end_page == o.end_page
|
113
|
+
end
|
114
|
+
|
115
|
+
# @see the `==` method
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def eql?(o)
|
118
|
+
self == o
|
119
|
+
end
|
120
|
+
|
121
|
+
# Calculates hash code according to all attributes.
|
122
|
+
# @return [Fixnum] Hash code
|
123
|
+
def hash
|
124
|
+
[document, start_page, end_page].hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
self.class.swagger_types.each_pair do |key, type|
|
133
|
+
if type =~ /\AArray<(.*)>/i
|
134
|
+
# check to ensure the input is an array given that the the attribute
|
135
|
+
# is documented as an array but the input is not
|
136
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
137
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
138
|
+
end
|
139
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
140
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
141
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
142
|
+
end
|
143
|
+
|
144
|
+
self
|
145
|
+
end
|
146
|
+
|
147
|
+
# Deserializes the data based on type
|
148
|
+
# @param string type Data type
|
149
|
+
# @param string value Value to be deserialized
|
150
|
+
# @return [Object] Deserialized data
|
151
|
+
def _deserialize(type, value)
|
152
|
+
case type.to_sym
|
153
|
+
when :DateTime
|
154
|
+
DateTime.parse(value)
|
155
|
+
when :Date
|
156
|
+
Date.parse(value)
|
157
|
+
when :String
|
158
|
+
value.to_s
|
159
|
+
when :Integer
|
160
|
+
value.to_i
|
161
|
+
when :Float
|
162
|
+
value.to_f
|
163
|
+
when :BOOLEAN
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
|
+
true
|
166
|
+
else
|
167
|
+
false
|
168
|
+
end
|
169
|
+
when :Object
|
170
|
+
# generic object (usually a Hash), return directly
|
171
|
+
value
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each do |k, v|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
else # model
|
184
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
185
|
+
temp_model.build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
next if value.nil?
|
208
|
+
hash[param] = _to_hash(value)
|
209
|
+
end
|
210
|
+
hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Outputs non-array value in the form of hash
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
215
|
+
# @param [Object] value Any valid value
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
217
|
+
def _to_hash(value)
|
218
|
+
if value.is_a?(Array)
|
219
|
+
value.compact.map{ |v| _to_hash(v) }
|
220
|
+
elsif value.is_a?(Hash)
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
223
|
+
end
|
224
|
+
elsif value.respond_to? :to_hash
|
225
|
+
value.to_hash
|
226
|
+
else
|
227
|
+
value
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
232
|
+
|
233
|
+
end
|