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
@@ -0,0 +1,44 @@
|
|
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 Justification
|
26
|
+
|
27
|
+
LEFT = "Left".freeze
|
28
|
+
CENTER = "Center".freeze
|
29
|
+
RIGHT = "Right".freeze
|
30
|
+
|
31
|
+
# Builds the enum from string
|
32
|
+
# @param [String] The enum value in the form of the string
|
33
|
+
# @return [String] The enum value
|
34
|
+
def build_from_hash(value)
|
35
|
+
# resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
|
36
|
+
# consantValues = Justification.constants.select{|c| c.to_s == value}
|
37
|
+
constantValues = Justification.constants.select{ |const_name| Justification.const_get(const_name) == value}
|
38
|
+
|
39
|
+
raise "Invalid ENUM value #{value} for class #Justification" if constantValues.empty?
|
40
|
+
value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
@@ -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 LettersPositioningMethods
|
26
|
-
|
27
|
-
USE_EM_UNITS_AND_COMPENSATION_OF_ROUNDING_ERRORS_IN_CSS = "UseEmUnitsAndCompensationOfRoundingErrorsInCss".freeze
|
28
|
-
USE_PIXEL_UNITS_IN_CSS_LETTER_SPACING_FOR_IE = "UsePixelUnitsInCssLetterSpacingForIE".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 = LettersPositioningMethods.constants.select{|c| c.to_s == value}
|
36
|
-
constantValues = LettersPositioningMethods.constants.select{ |const_name| LettersPositioningMethods.const_get(const_name) == value}
|
37
|
-
|
38
|
-
raise "Invalid ENUM value #{value} for class #LettersPositioningMethods" 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 LettersPositioningMethods
|
26
|
+
|
27
|
+
USE_EM_UNITS_AND_COMPENSATION_OF_ROUNDING_ERRORS_IN_CSS = "UseEmUnitsAndCompensationOfRoundingErrorsInCss".freeze
|
28
|
+
USE_PIXEL_UNITS_IN_CSS_LETTER_SPACING_FOR_IE = "UsePixelUnitsInCssLetterSpacingForIE".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 = LettersPositioningMethods.constants.select{|c| c.to_s == value}
|
36
|
+
constantValues = LettersPositioningMethods.constants.select{ |const_name| LettersPositioningMethods.const_get(const_name) == value}
|
37
|
+
|
38
|
+
raise "Invalid ENUM value #{value} for class #LettersPositioningMethods" if constantValues.empty?
|
39
|
+
value
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -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 LineSpacing
|
26
|
-
|
27
|
-
FONT_SIZE = "FontSize".freeze
|
28
|
-
FULL_SIZE = "FullSize".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 = LineSpacing.constants.select{|c| c.to_s == value}
|
36
|
-
constantValues = LineSpacing.constants.select{ |const_name| LineSpacing.const_get(const_name) == value}
|
37
|
-
|
38
|
-
raise "Invalid ENUM value #{value} for class #LineSpacing" 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 LineSpacing
|
26
|
+
|
27
|
+
FONT_SIZE = "FontSize".freeze
|
28
|
+
FULL_SIZE = "FullSize".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 = LineSpacing.constants.select{|c| c.to_s == value}
|
36
|
+
constantValues = LineSpacing.constants.select{ |const_name| LineSpacing.const_get(const_name) == value}
|
37
|
+
|
38
|
+
raise "Invalid ENUM value #{value} for class #LineSpacing" if constantValues.empty?
|
39
|
+
value
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -1,228 +1,228 @@
|
|
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
|
-
# Provides information for the object link. This is supposed to be an atom:link, therefore it should have all attributes specified here http://tools.ietf.org/html/rfc4287#section-4.2.7
|
26
|
-
class Link
|
27
|
-
# The \"href\" attribute contains the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference
|
28
|
-
attr_accessor :href
|
29
|
-
|
30
|
-
# atom:link elements MAY have a \"rel\" attribute that indicates the link relation type. If the \"rel\" attribute is not present, the link element MUST be interpreted as if the link relation type is \"alternate\".
|
31
|
-
attr_accessor :rel
|
32
|
-
|
33
|
-
# On the link element, the \"type\" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation.
|
34
|
-
attr_accessor :type
|
35
|
-
|
36
|
-
# The \"title\" attribute conveys human-readable information about the link. The content of the \"title\" attribute is Language-Sensitive.
|
37
|
-
attr_accessor :title
|
38
|
-
|
39
|
-
|
40
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
-
def self.attribute_map
|
42
|
-
{
|
43
|
-
:'href' => :'Href',
|
44
|
-
:'rel' => :'Rel',
|
45
|
-
:'type' => :'Type',
|
46
|
-
:'title' => :'Title'
|
47
|
-
}
|
48
|
-
end
|
49
|
-
|
50
|
-
# Attribute type mapping.
|
51
|
-
def self.swagger_types
|
52
|
-
{
|
53
|
-
:'href' => :'String',
|
54
|
-
:'rel' => :'String',
|
55
|
-
:'type' => :'String',
|
56
|
-
:'title' => :'String'
|
57
|
-
}
|
58
|
-
end
|
59
|
-
|
60
|
-
# Initializes the object
|
61
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
-
def initialize(attributes = {})
|
63
|
-
return unless attributes.is_a?(Hash)
|
64
|
-
|
65
|
-
# convert string to symbol for hash key
|
66
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
67
|
-
|
68
|
-
if attributes.has_key?(:'Href')
|
69
|
-
self.href = attributes[:'Href']
|
70
|
-
end
|
71
|
-
|
72
|
-
if attributes.has_key?(:'Rel')
|
73
|
-
self.rel = attributes[:'Rel']
|
74
|
-
end
|
75
|
-
|
76
|
-
if attributes.has_key?(:'Type')
|
77
|
-
self.type = attributes[:'Type']
|
78
|
-
end
|
79
|
-
|
80
|
-
if attributes.has_key?(:'Title')
|
81
|
-
self.title = attributes[:'Title']
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
87
|
-
# @return Array for valid properies with the reasons
|
88
|
-
def list_invalid_properties
|
89
|
-
invalid_properties = Array.new
|
90
|
-
return invalid_properties
|
91
|
-
end
|
92
|
-
|
93
|
-
# Check to see if the all the properties in the model are valid
|
94
|
-
# @return true if the model is valid
|
95
|
-
def valid?
|
96
|
-
return true
|
97
|
-
end
|
98
|
-
|
99
|
-
# Checks equality by comparing each attribute.
|
100
|
-
# @param [Object] Object to be compared
|
101
|
-
def ==(o)
|
102
|
-
return true if self.equal?(o)
|
103
|
-
self.class == o.class &&
|
104
|
-
href == o.href &&
|
105
|
-
rel == o.rel &&
|
106
|
-
type == o.type &&
|
107
|
-
title == o.title
|
108
|
-
end
|
109
|
-
|
110
|
-
# @see the `==` method
|
111
|
-
# @param [Object] Object to be compared
|
112
|
-
def eql?(o)
|
113
|
-
self == o
|
114
|
-
end
|
115
|
-
|
116
|
-
# Calculates hash code according to all attributes.
|
117
|
-
# @return [Fixnum] Hash code
|
118
|
-
def hash
|
119
|
-
[href, rel, type, title].hash
|
120
|
-
end
|
121
|
-
|
122
|
-
# Builds the object from hash
|
123
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
-
# @return [Object] Returns the model itself
|
125
|
-
def build_from_hash(attributes)
|
126
|
-
return nil unless attributes.is_a?(Hash)
|
127
|
-
self.class.swagger_types.each_pair do |key, type|
|
128
|
-
if type =~ /\AArray<(.*)>/i
|
129
|
-
# check to ensure the input is an array given that the the attribute
|
130
|
-
# is documented as an array but the input is not
|
131
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
132
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
133
|
-
end
|
134
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
135
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
136
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
137
|
-
end
|
138
|
-
|
139
|
-
self
|
140
|
-
end
|
141
|
-
|
142
|
-
# Deserializes the data based on type
|
143
|
-
# @param string type Data type
|
144
|
-
# @param string value Value to be deserialized
|
145
|
-
# @return [Object] Deserialized data
|
146
|
-
def _deserialize(type, value)
|
147
|
-
case type.to_sym
|
148
|
-
when :DateTime
|
149
|
-
DateTime.parse(value)
|
150
|
-
when :Date
|
151
|
-
Date.parse(value)
|
152
|
-
when :String
|
153
|
-
value.to_s
|
154
|
-
when :Integer
|
155
|
-
value.to_i
|
156
|
-
when :Float
|
157
|
-
value.to_f
|
158
|
-
when :BOOLEAN
|
159
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
160
|
-
true
|
161
|
-
else
|
162
|
-
false
|
163
|
-
end
|
164
|
-
when :Object
|
165
|
-
# generic object (usually a Hash), return directly
|
166
|
-
value
|
167
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
168
|
-
inner_type = Regexp.last_match[:inner_type]
|
169
|
-
value.map { |v| _deserialize(inner_type, v) }
|
170
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
171
|
-
k_type = Regexp.last_match[:k_type]
|
172
|
-
v_type = Regexp.last_match[:v_type]
|
173
|
-
{}.tap do |hash|
|
174
|
-
value.each do |k, v|
|
175
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
176
|
-
end
|
177
|
-
end
|
178
|
-
else # model
|
179
|
-
temp_model = AsposePdfCloud.const_get(type).new
|
180
|
-
temp_model.build_from_hash(value)
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
# Returns the string representation of the object
|
185
|
-
# @return [String] String presentation of the object
|
186
|
-
def to_s
|
187
|
-
to_hash.to_s
|
188
|
-
end
|
189
|
-
|
190
|
-
# to_body is an alias to to_hash (backward compatibility)
|
191
|
-
# @return [Hash] Returns the object in the form of hash
|
192
|
-
def to_body
|
193
|
-
to_hash
|
194
|
-
end
|
195
|
-
|
196
|
-
# Returns the object in the form of hash
|
197
|
-
# @return [Hash] Returns the object in the form of hash
|
198
|
-
def to_hash
|
199
|
-
hash = {}
|
200
|
-
self.class.attribute_map.each_pair do |attr, param|
|
201
|
-
value = self.send(attr)
|
202
|
-
next if value.nil?
|
203
|
-
hash[param] = _to_hash(value)
|
204
|
-
end
|
205
|
-
hash
|
206
|
-
end
|
207
|
-
|
208
|
-
# Outputs non-array value in the form of hash
|
209
|
-
# For object, use to_hash. Otherwise, just return the value
|
210
|
-
# @param [Object] value Any valid value
|
211
|
-
# @return [Hash] Returns the value in the form of hash
|
212
|
-
def _to_hash(value)
|
213
|
-
if value.is_a?(Array)
|
214
|
-
value.compact.map{ |v| _to_hash(v) }
|
215
|
-
elsif value.is_a?(Hash)
|
216
|
-
{}.tap do |hash|
|
217
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
218
|
-
end
|
219
|
-
elsif value.respond_to? :to_hash
|
220
|
-
value.to_hash
|
221
|
-
else
|
222
|
-
value
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
|
-
end
|
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
|
+
# Provides information for the object link. This is supposed to be an atom:link, therefore it should have all attributes specified here http://tools.ietf.org/html/rfc4287#section-4.2.7
|
26
|
+
class Link
|
27
|
+
# The \"href\" attribute contains the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference
|
28
|
+
attr_accessor :href
|
29
|
+
|
30
|
+
# atom:link elements MAY have a \"rel\" attribute that indicates the link relation type. If the \"rel\" attribute is not present, the link element MUST be interpreted as if the link relation type is \"alternate\".
|
31
|
+
attr_accessor :rel
|
32
|
+
|
33
|
+
# On the link element, the \"type\" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation.
|
34
|
+
attr_accessor :type
|
35
|
+
|
36
|
+
# The \"title\" attribute conveys human-readable information about the link. The content of the \"title\" attribute is Language-Sensitive.
|
37
|
+
attr_accessor :title
|
38
|
+
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'href' => :'Href',
|
44
|
+
:'rel' => :'Rel',
|
45
|
+
:'type' => :'Type',
|
46
|
+
:'title' => :'Title'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'href' => :'String',
|
54
|
+
:'rel' => :'String',
|
55
|
+
:'type' => :'String',
|
56
|
+
:'title' => :'String'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
return unless attributes.is_a?(Hash)
|
64
|
+
|
65
|
+
# convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
67
|
+
|
68
|
+
if attributes.has_key?(:'Href')
|
69
|
+
self.href = attributes[:'Href']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'Rel')
|
73
|
+
self.rel = attributes[:'Rel']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'Type')
|
77
|
+
self.type = attributes[:'Type']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'Title')
|
81
|
+
self.title = attributes[:'Title']
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
87
|
+
# @return Array for valid properies with the reasons
|
88
|
+
def list_invalid_properties
|
89
|
+
invalid_properties = Array.new
|
90
|
+
return invalid_properties
|
91
|
+
end
|
92
|
+
|
93
|
+
# Check to see if the all the properties in the model are valid
|
94
|
+
# @return true if the model is valid
|
95
|
+
def valid?
|
96
|
+
return true
|
97
|
+
end
|
98
|
+
|
99
|
+
# Checks equality by comparing each attribute.
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def ==(o)
|
102
|
+
return true if self.equal?(o)
|
103
|
+
self.class == o.class &&
|
104
|
+
href == o.href &&
|
105
|
+
rel == o.rel &&
|
106
|
+
type == o.type &&
|
107
|
+
title == o.title
|
108
|
+
end
|
109
|
+
|
110
|
+
# @see the `==` method
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def eql?(o)
|
113
|
+
self == o
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Fixnum] Hash code
|
118
|
+
def hash
|
119
|
+
[href, rel, type, title].hash
|
120
|
+
end
|
121
|
+
|
122
|
+
# Builds the object from hash
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
+
# @return [Object] Returns the model itself
|
125
|
+
def build_from_hash(attributes)
|
126
|
+
return nil unless attributes.is_a?(Hash)
|
127
|
+
self.class.swagger_types.each_pair do |key, type|
|
128
|
+
if type =~ /\AArray<(.*)>/i
|
129
|
+
# check to ensure the input is an array given that the the attribute
|
130
|
+
# is documented as an array but the input is not
|
131
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
132
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
133
|
+
end
|
134
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
135
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
136
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
137
|
+
end
|
138
|
+
|
139
|
+
self
|
140
|
+
end
|
141
|
+
|
142
|
+
# Deserializes the data based on type
|
143
|
+
# @param string type Data type
|
144
|
+
# @param string value Value to be deserialized
|
145
|
+
# @return [Object] Deserialized data
|
146
|
+
def _deserialize(type, value)
|
147
|
+
case type.to_sym
|
148
|
+
when :DateTime
|
149
|
+
DateTime.parse(value)
|
150
|
+
when :Date
|
151
|
+
Date.parse(value)
|
152
|
+
when :String
|
153
|
+
value.to_s
|
154
|
+
when :Integer
|
155
|
+
value.to_i
|
156
|
+
when :Float
|
157
|
+
value.to_f
|
158
|
+
when :BOOLEAN
|
159
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
160
|
+
true
|
161
|
+
else
|
162
|
+
false
|
163
|
+
end
|
164
|
+
when :Object
|
165
|
+
# generic object (usually a Hash), return directly
|
166
|
+
value
|
167
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
168
|
+
inner_type = Regexp.last_match[:inner_type]
|
169
|
+
value.map { |v| _deserialize(inner_type, v) }
|
170
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
171
|
+
k_type = Regexp.last_match[:k_type]
|
172
|
+
v_type = Regexp.last_match[:v_type]
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each do |k, v|
|
175
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
else # model
|
179
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
180
|
+
temp_model.build_from_hash(value)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the string representation of the object
|
185
|
+
# @return [String] String presentation of the object
|
186
|
+
def to_s
|
187
|
+
to_hash.to_s
|
188
|
+
end
|
189
|
+
|
190
|
+
# to_body is an alias to to_hash (backward compatibility)
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_body
|
193
|
+
to_hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the object in the form of hash
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_hash
|
199
|
+
hash = {}
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
201
|
+
value = self.send(attr)
|
202
|
+
next if value.nil?
|
203
|
+
hash[param] = _to_hash(value)
|
204
|
+
end
|
205
|
+
hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Outputs non-array value in the form of hash
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
210
|
+
# @param [Object] value Any valid value
|
211
|
+
# @return [Hash] Returns the value in the form of hash
|
212
|
+
def _to_hash(value)
|
213
|
+
if value.is_a?(Array)
|
214
|
+
value.compact.map{ |v| _to_hash(v) }
|
215
|
+
elsif value.is_a?(Hash)
|
216
|
+
{}.tap do |hash|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
218
|
+
end
|
219
|
+
elsif value.respond_to? :to_hash
|
220
|
+
value.to_hash
|
221
|
+
else
|
222
|
+
value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|