aspose_pdf_cloud 18.10.0 → 18.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +75 -6
- data/docs/Annotation.md +0 -3
- data/docs/AnnotationInfo.md +0 -3
- data/docs/CapStyle.md +11 -0
- data/docs/CaretAnnotation.md +26 -0
- data/docs/CaretAnnotationResponse.md +11 -0
- data/docs/CaretAnnotations.md +10 -0
- data/docs/CaretAnnotationsResponse.md +11 -0
- data/docs/CaretSymbol.md +11 -0
- data/docs/CircleAnnotation.md +3 -3
- data/docs/CommonFigureAnnotation.md +3 -3
- data/docs/File.md +13 -0
- data/docs/FilesResponse.md +11 -0
- data/docs/FreeTextAnnotation.md +3 -3
- data/docs/HighlightAnnotation.md +25 -0
- data/docs/HighlightAnnotationResponse.md +11 -0
- data/docs/HighlightAnnotations.md +10 -0
- data/docs/HighlightAnnotationsResponse.md +11 -0
- data/docs/InkAnnotation.md +26 -0
- data/docs/InkAnnotationResponse.md +11 -0
- data/docs/InkAnnotations.md +10 -0
- data/docs/InkAnnotationsResponse.md +11 -0
- data/docs/LineAnnotation.md +3 -3
- data/docs/MarkupAnnotation.md +3 -3
- data/docs/PdfApi.md +1036 -69
- data/docs/PolyAnnotation.md +3 -3
- data/docs/PolyLineAnnotation.md +3 -3
- data/docs/PolygonAnnotation.md +3 -3
- data/docs/PopupAnnotation.md +21 -0
- data/docs/PopupAnnotationResponse.md +11 -0
- data/docs/PopupAnnotationWithParent.md +22 -0
- data/docs/PopupAnnotations.md +10 -0
- data/docs/PopupAnnotationsResponse.md +11 -0
- data/docs/SquareAnnotation.md +3 -3
- data/docs/SquigglyAnnotation.md +25 -0
- data/docs/SquigglyAnnotationResponse.md +11 -0
- data/docs/SquigglyAnnotations.md +10 -0
- data/docs/SquigglyAnnotationsResponse.md +11 -0
- data/docs/StrikeOutAnnotation.md +25 -0
- data/docs/StrikeOutAnnotationResponse.md +11 -0
- data/docs/StrikeOutAnnotations.md +10 -0
- data/docs/StrikeOutAnnotationsResponse.md +11 -0
- data/docs/TextAnnotation.md +3 -3
- data/docs/UnderlineAnnotation.md +25 -0
- data/docs/UnderlineAnnotationResponse.md +11 -0
- data/docs/UnderlineAnnotations.md +10 -0
- data/docs/UnderlineAnnotationsResponse.md +11 -0
- data/lib/aspose_pdf_cloud.rb +33 -0
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +4978 -2084
- data/lib/aspose_pdf_cloud/models/annotation.rb +6 -33
- data/lib/aspose_pdf_cloud/models/annotation_flags.rb +1 -0
- data/lib/aspose_pdf_cloud/models/annotation_info.rb +6 -33
- data/lib/aspose_pdf_cloud/models/annotation_state.rb +1 -0
- data/lib/aspose_pdf_cloud/models/annotation_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/annotations_info.rb +5 -2
- data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/antialiasing_processing_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/append_document.rb +5 -2
- data/lib/aspose_pdf_cloud/models/aspose_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/attachment.rb +5 -2
- data/lib/aspose_pdf_cloud/models/attachment_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/attachments.rb +5 -2
- data/lib/aspose_pdf_cloud/models/attachments_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/cap_style.rb +44 -0
- data/lib/aspose_pdf_cloud/models/caption_position.rb +1 -0
- data/lib/aspose_pdf_cloud/models/caret_annotation.rb +375 -0
- data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/caret_annotations.rb +214 -0
- data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/caret_symbol.rb +44 -0
- data/lib/aspose_pdf_cloud/models/circle_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/circle_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/color.rb +5 -2
- data/lib/aspose_pdf_cloud/models/color_depth.rb +1 -0
- data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/compression_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/doc_format.rb +1 -0
- data/lib/aspose_pdf_cloud/models/doc_recognition_mode.rb +1 -0
- data/lib/aspose_pdf_cloud/models/document.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_page_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_pages_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_privilege.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_properties.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_properties_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_property.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_property_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/document_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/epub_recognition_mode.rb +1 -0
- data/lib/aspose_pdf_cloud/models/field.rb +5 -2
- data/lib/aspose_pdf_cloud/models/field_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/field_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/fields.rb +5 -2
- data/lib/aspose_pdf_cloud/models/fields_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/file.rb +246 -0
- data/lib/aspose_pdf_cloud/models/files_response.rb +227 -0
- data/lib/aspose_pdf_cloud/models/font_encoding_rules.rb +1 -0
- data/lib/aspose_pdf_cloud/models/font_saving_modes.rb +1 -0
- data/lib/aspose_pdf_cloud/models/font_styles.rb +1 -0
- data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/free_text_intent.rb +1 -0
- data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +367 -0
- data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +214 -0
- data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +1 -0
- data/lib/aspose_pdf_cloud/models/html_document_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/html_markup_generation_modes.rb +1 -0
- data/lib/aspose_pdf_cloud/models/image.rb +5 -2
- data/lib/aspose_pdf_cloud/models/image_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/image_src_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/image_template.rb +5 -2
- data/lib/aspose_pdf_cloud/models/image_templates_request.rb +5 -2
- data/lib/aspose_pdf_cloud/models/images.rb +5 -2
- data/lib/aspose_pdf_cloud/models/images_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/ink_annotation.rb +377 -0
- data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/ink_annotations.rb +214 -0
- data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/justification.rb +1 -0
- data/lib/aspose_pdf_cloud/models/letters_positioning_methods.rb +1 -0
- data/lib/aspose_pdf_cloud/models/line_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/line_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/line_ending.rb +1 -0
- data/lib/aspose_pdf_cloud/models/line_intent.rb +1 -0
- data/lib/aspose_pdf_cloud/models/line_spacing.rb +1 -0
- data/lib/aspose_pdf_cloud/models/link.rb +5 -2
- data/lib/aspose_pdf_cloud/models/link_action_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/link_annotation.rb +5 -2
- data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/link_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/link_element.rb +5 -2
- data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +1 -0
- data/lib/aspose_pdf_cloud/models/margin_info.rb +5 -2
- data/lib/aspose_pdf_cloud/models/markup_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/merge_documents.rb +5 -2
- data/lib/aspose_pdf_cloud/models/optimize_options.rb +5 -2
- data/lib/aspose_pdf_cloud/models/page.rb +5 -2
- data/lib/aspose_pdf_cloud/models/page_word_count.rb +5 -2
- data/lib/aspose_pdf_cloud/models/pages.rb +5 -2
- data/lib/aspose_pdf_cloud/models/paragraph.rb +5 -2
- data/lib/aspose_pdf_cloud/models/parts_embedding_modes.rb +1 -0
- data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/point.rb +5 -2
- data/lib/aspose_pdf_cloud/models/poly_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/poly_intent.rb +1 -0
- data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/popup_annotation.rb +325 -0
- data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +335 -0
- data/lib/aspose_pdf_cloud/models/popup_annotations.rb +214 -0
- data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb +1 -0
- data/lib/aspose_pdf_cloud/models/rectangle_pdf.rb +5 -2
- data/lib/aspose_pdf_cloud/models/rotation.rb +1 -0
- data/lib/aspose_pdf_cloud/models/segment.rb +5 -2
- data/lib/aspose_pdf_cloud/models/shape_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/signature.rb +5 -2
- data/lib/aspose_pdf_cloud/models/signature_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/split_result.rb +5 -2
- data/lib/aspose_pdf_cloud/models/split_result_document.rb +5 -2
- data/lib/aspose_pdf_cloud/models/split_result_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/square_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/square_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +367 -0
- data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +214 -0
- data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/stamp.rb +5 -2
- data/lib/aspose_pdf_cloud/models/stamp_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +367 -0
- data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +214 -0
- data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/text_annotation.rb +36 -33
- data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_annotations.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +1 -0
- data/lib/aspose_pdf_cloud/models/text_icon.rb +1 -0
- data/lib/aspose_pdf_cloud/models/text_line.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_rect.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_rects.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_rects_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_replace.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_replace_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_state.rb +5 -2
- data/lib/aspose_pdf_cloud/models/text_style.rb +5 -2
- data/lib/aspose_pdf_cloud/models/underline_annotation.rb +367 -0
- data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/underline_annotations.rb +214 -0
- data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +1 -0
- data/lib/aspose_pdf_cloud/models/word_count.rb +5 -2
- data/lib/aspose_pdf_cloud/models/word_count_response.rb +5 -2
- data/lib/aspose_pdf_cloud/models/wrap_mode.rb +1 -0
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/test/pdf_tests.rb +757 -21
- metadata +68 -2
@@ -0,0 +1,375 @@
|
|
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
|
+
require 'time'
|
24
|
+
|
25
|
+
module AsposePdfCloud
|
26
|
+
# Provides CaretAnnotation.
|
27
|
+
class CaretAnnotation
|
28
|
+
# Link to the document.
|
29
|
+
attr_accessor :links
|
30
|
+
|
31
|
+
# Get the annotation content.
|
32
|
+
attr_accessor :contents
|
33
|
+
|
34
|
+
# The date and time when the annotation was last modified.
|
35
|
+
attr_accessor :modified
|
36
|
+
|
37
|
+
# Gets ID of the annotation.
|
38
|
+
attr_accessor :id
|
39
|
+
|
40
|
+
# Gets Flags of the annotation.
|
41
|
+
attr_accessor :flags
|
42
|
+
|
43
|
+
# Gets Name of the annotation.
|
44
|
+
attr_accessor :name
|
45
|
+
|
46
|
+
# Gets Rect of the annotation.
|
47
|
+
attr_accessor :rect
|
48
|
+
|
49
|
+
# Gets PageIndex of the annotation.
|
50
|
+
attr_accessor :page_index
|
51
|
+
|
52
|
+
# Gets ZIndex of the annotation.
|
53
|
+
attr_accessor :z_index
|
54
|
+
|
55
|
+
# Gets HorizontalAlignment of the annotation.
|
56
|
+
attr_accessor :horizontal_alignment
|
57
|
+
|
58
|
+
# Gets VerticalAlignment of the annotation.
|
59
|
+
attr_accessor :vertical_alignment
|
60
|
+
|
61
|
+
# The date and time when the annotation was created.
|
62
|
+
attr_accessor :creation_date
|
63
|
+
|
64
|
+
# Get the annotation subject.
|
65
|
+
attr_accessor :subject
|
66
|
+
|
67
|
+
# Get the annotation title.
|
68
|
+
attr_accessor :title
|
69
|
+
|
70
|
+
# Get the annotation RichText.
|
71
|
+
attr_accessor :rich_text
|
72
|
+
|
73
|
+
# Color of the annotation.
|
74
|
+
attr_accessor :color
|
75
|
+
|
76
|
+
# Gets or sets caret rectangle.
|
77
|
+
attr_accessor :frame
|
78
|
+
|
79
|
+
# Gets or sets symbol associated with caret.
|
80
|
+
attr_accessor :symbol
|
81
|
+
|
82
|
+
|
83
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
84
|
+
def self.attribute_map
|
85
|
+
{
|
86
|
+
:'links' => :'Links',
|
87
|
+
:'contents' => :'Contents',
|
88
|
+
:'modified' => :'Modified',
|
89
|
+
:'id' => :'Id',
|
90
|
+
:'flags' => :'Flags',
|
91
|
+
:'name' => :'Name',
|
92
|
+
:'rect' => :'Rect',
|
93
|
+
:'page_index' => :'PageIndex',
|
94
|
+
:'z_index' => :'ZIndex',
|
95
|
+
:'horizontal_alignment' => :'HorizontalAlignment',
|
96
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
97
|
+
:'creation_date' => :'CreationDate',
|
98
|
+
:'subject' => :'Subject',
|
99
|
+
:'title' => :'Title',
|
100
|
+
:'rich_text' => :'RichText',
|
101
|
+
:'color' => :'Color',
|
102
|
+
:'frame' => :'Frame',
|
103
|
+
:'symbol' => :'Symbol'
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
# Attribute type mapping.
|
108
|
+
def self.swagger_types
|
109
|
+
{
|
110
|
+
:'links' => :'Array<Link>',
|
111
|
+
:'contents' => :'String',
|
112
|
+
:'modified' => :'String',
|
113
|
+
:'id' => :'String',
|
114
|
+
:'flags' => :'Array<AnnotationFlags>',
|
115
|
+
:'name' => :'String',
|
116
|
+
:'rect' => :'RectanglePdf',
|
117
|
+
:'page_index' => :'Integer',
|
118
|
+
:'z_index' => :'Integer',
|
119
|
+
:'horizontal_alignment' => :'HorizontalAlignment',
|
120
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
121
|
+
:'creation_date' => :'String',
|
122
|
+
:'subject' => :'String',
|
123
|
+
:'title' => :'String',
|
124
|
+
:'rich_text' => :'String',
|
125
|
+
:'color' => :'Color',
|
126
|
+
:'frame' => :'RectanglePdf',
|
127
|
+
:'symbol' => :'CaretSymbol'
|
128
|
+
}
|
129
|
+
end
|
130
|
+
|
131
|
+
# Initializes the object
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
def initialize(attributes = {})
|
134
|
+
return unless attributes.is_a?(Hash)
|
135
|
+
|
136
|
+
# convert string to symbol for hash key
|
137
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
138
|
+
|
139
|
+
if attributes.has_key?(:'Links')
|
140
|
+
if (value = attributes[:'Links']).is_a?(Array)
|
141
|
+
self.links = value
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'Contents')
|
146
|
+
self.contents = attributes[:'Contents']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'Modified')
|
150
|
+
self.modified = attributes[:'Modified']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'Id')
|
154
|
+
self.id = attributes[:'Id']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'Flags')
|
158
|
+
if (value = attributes[:'Flags']).is_a?(Array)
|
159
|
+
self.flags = value
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'Name')
|
164
|
+
self.name = attributes[:'Name']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'Rect')
|
168
|
+
self.rect = attributes[:'Rect']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'PageIndex')
|
172
|
+
self.page_index = attributes[:'PageIndex']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'ZIndex')
|
176
|
+
self.z_index = attributes[:'ZIndex']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'HorizontalAlignment')
|
180
|
+
self.horizontal_alignment = attributes[:'HorizontalAlignment']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'VerticalAlignment')
|
184
|
+
self.vertical_alignment = attributes[:'VerticalAlignment']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'CreationDate')
|
188
|
+
self.creation_date = attributes[:'CreationDate']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'Subject')
|
192
|
+
self.subject = attributes[:'Subject']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.has_key?(:'Title')
|
196
|
+
self.title = attributes[:'Title']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.has_key?(:'RichText')
|
200
|
+
self.rich_text = attributes[:'RichText']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.has_key?(:'Color')
|
204
|
+
self.color = attributes[:'Color']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.has_key?(:'Frame')
|
208
|
+
self.frame = attributes[:'Frame']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.has_key?(:'Symbol')
|
212
|
+
self.symbol = attributes[:'Symbol']
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
|
217
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
218
|
+
# @return Array for valid properies with the reasons
|
219
|
+
def list_invalid_properties
|
220
|
+
invalid_properties = Array.new
|
221
|
+
return invalid_properties
|
222
|
+
end
|
223
|
+
|
224
|
+
# Check to see if the all the properties in the model are valid
|
225
|
+
# @return true if the model is valid
|
226
|
+
def valid?
|
227
|
+
return true
|
228
|
+
end
|
229
|
+
|
230
|
+
# Checks equality by comparing each attribute.
|
231
|
+
# @param [Object] Object to be compared
|
232
|
+
def ==(o)
|
233
|
+
return true if self.equal?(o)
|
234
|
+
self.class == o.class &&
|
235
|
+
links == o.links &&
|
236
|
+
contents == o.contents &&
|
237
|
+
modified == o.modified &&
|
238
|
+
id == o.id &&
|
239
|
+
flags == o.flags &&
|
240
|
+
name == o.name &&
|
241
|
+
rect == o.rect &&
|
242
|
+
page_index == o.page_index &&
|
243
|
+
z_index == o.z_index &&
|
244
|
+
horizontal_alignment == o.horizontal_alignment &&
|
245
|
+
vertical_alignment == o.vertical_alignment &&
|
246
|
+
creation_date == o.creation_date &&
|
247
|
+
subject == o.subject &&
|
248
|
+
title == o.title &&
|
249
|
+
rich_text == o.rich_text &&
|
250
|
+
color == o.color &&
|
251
|
+
frame == o.frame &&
|
252
|
+
symbol == o.symbol
|
253
|
+
end
|
254
|
+
|
255
|
+
# @see the `==` method
|
256
|
+
# @param [Object] Object to be compared
|
257
|
+
def eql?(o)
|
258
|
+
self == o
|
259
|
+
end
|
260
|
+
|
261
|
+
# Calculates hash code according to all attributes.
|
262
|
+
# @return [Fixnum] Hash code
|
263
|
+
def hash
|
264
|
+
[links, contents, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, creation_date, subject, title, rich_text, color, frame, symbol].hash
|
265
|
+
end
|
266
|
+
|
267
|
+
# Builds the object from hash
|
268
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
269
|
+
# @return [Object] Returns the model itself
|
270
|
+
def build_from_hash(attributes)
|
271
|
+
return nil unless attributes.is_a?(Hash)
|
272
|
+
self.class.swagger_types.each_pair do |key, type|
|
273
|
+
if type =~ /\AArray<(.*)>/i
|
274
|
+
# check to ensure the input is an array given that the the attribute
|
275
|
+
# is documented as an array but the input is not
|
276
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
277
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
278
|
+
end
|
279
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
280
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
281
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
282
|
+
end
|
283
|
+
|
284
|
+
self
|
285
|
+
end
|
286
|
+
|
287
|
+
# Deserializes the data based on type
|
288
|
+
# @param string type Data type
|
289
|
+
# @param string value Value to be deserialized
|
290
|
+
# @return [Object] Deserialized data
|
291
|
+
def _deserialize(type, value)
|
292
|
+
case type.to_sym
|
293
|
+
when :DateTime
|
294
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
295
|
+
Time.strptime(value, format).utc.to_datetime
|
296
|
+
when :Date
|
297
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
298
|
+
Time.strptime(value, format).utc.to_datetime.to_date
|
299
|
+
when :String
|
300
|
+
value.to_s
|
301
|
+
when :Integer
|
302
|
+
value.to_i
|
303
|
+
when :Float
|
304
|
+
value.to_f
|
305
|
+
when :BOOLEAN
|
306
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
307
|
+
true
|
308
|
+
else
|
309
|
+
false
|
310
|
+
end
|
311
|
+
when :Object
|
312
|
+
# generic object (usually a Hash), return directly
|
313
|
+
value
|
314
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
315
|
+
inner_type = Regexp.last_match[:inner_type]
|
316
|
+
value.map { |v| _deserialize(inner_type, v) }
|
317
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
318
|
+
k_type = Regexp.last_match[:k_type]
|
319
|
+
v_type = Regexp.last_match[:v_type]
|
320
|
+
{}.tap do |hash|
|
321
|
+
value.each do |k, v|
|
322
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
323
|
+
end
|
324
|
+
end
|
325
|
+
else # model
|
326
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
327
|
+
temp_model.build_from_hash(value)
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
# Returns the string representation of the object
|
332
|
+
# @return [String] String presentation of the object
|
333
|
+
def to_s
|
334
|
+
to_hash.to_s
|
335
|
+
end
|
336
|
+
|
337
|
+
# to_body is an alias to to_hash (backward compatibility)
|
338
|
+
# @return [Hash] Returns the object in the form of hash
|
339
|
+
def to_body
|
340
|
+
to_hash
|
341
|
+
end
|
342
|
+
|
343
|
+
# Returns the object in the form of hash
|
344
|
+
# @return [Hash] Returns the object in the form of hash
|
345
|
+
def to_hash
|
346
|
+
hash = {}
|
347
|
+
self.class.attribute_map.each_pair do |attr, param|
|
348
|
+
value = self.send(attr)
|
349
|
+
next if value.nil?
|
350
|
+
hash[param] = _to_hash(value)
|
351
|
+
end
|
352
|
+
hash
|
353
|
+
end
|
354
|
+
|
355
|
+
# Outputs non-array value in the form of hash
|
356
|
+
# For object, use to_hash. Otherwise, just return the value
|
357
|
+
# @param [Object] value Any valid value
|
358
|
+
# @return [Hash] Returns the value in the form of hash
|
359
|
+
def _to_hash(value)
|
360
|
+
if value.is_a?(Array)
|
361
|
+
value.compact.map{ |v| _to_hash(v) }
|
362
|
+
elsif value.is_a?(Hash)
|
363
|
+
{}.tap do |hash|
|
364
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
365
|
+
end
|
366
|
+
elsif value.respond_to? :to_hash
|
367
|
+
value.to_hash
|
368
|
+
else
|
369
|
+
value
|
370
|
+
end
|
371
|
+
end
|
372
|
+
|
373
|
+
end
|
374
|
+
|
375
|
+
end
|
@@ -0,0 +1,225 @@
|
|
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
|
+
require 'time'
|
24
|
+
|
25
|
+
module AsposePdfCloud
|
26
|
+
|
27
|
+
class CaretAnnotationResponse
|
28
|
+
# Response status code.
|
29
|
+
attr_accessor :code
|
30
|
+
|
31
|
+
# Response status.
|
32
|
+
attr_accessor :status
|
33
|
+
|
34
|
+
attr_accessor :annotation
|
35
|
+
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'code' => :'Code',
|
41
|
+
:'status' => :'Status',
|
42
|
+
:'annotation' => :'Annotation'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.swagger_types
|
48
|
+
{
|
49
|
+
:'code' => :'Integer',
|
50
|
+
:'status' => :'String',
|
51
|
+
:'annotation' => :'CaretAnnotation'
|
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?(:'Code')
|
64
|
+
self.code = attributes[:'Code']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'Status')
|
68
|
+
self.status = attributes[:'Status']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'Annotation')
|
72
|
+
self.annotation = attributes[:'Annotation']
|
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 @code.nil?
|
82
|
+
invalid_properties.push("invalid value for 'code', code cannot be nil.")
|
83
|
+
end
|
84
|
+
|
85
|
+
return invalid_properties
|
86
|
+
end
|
87
|
+
|
88
|
+
# Check to see if the all the properties in the model are valid
|
89
|
+
# @return true if the model is valid
|
90
|
+
def valid?
|
91
|
+
return false if @code.nil?
|
92
|
+
return true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
code == o.code &&
|
101
|
+
status == o.status &&
|
102
|
+
annotation == o.annotation
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Fixnum] Hash code
|
113
|
+
def hash
|
114
|
+
[code, status, annotation].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def build_from_hash(attributes)
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
123
|
+
if type =~ /\AArray<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Deserializes the data based on type
|
138
|
+
# @param string type Data type
|
139
|
+
# @param string value Value to be deserialized
|
140
|
+
# @return [Object] Deserialized data
|
141
|
+
def _deserialize(type, value)
|
142
|
+
case type.to_sym
|
143
|
+
when :DateTime
|
144
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
145
|
+
Time.strptime(value, format).utc.to_datetime
|
146
|
+
when :Date
|
147
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
148
|
+
Time.strptime(value, format).utc.to_datetime.to_date
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :BOOLEAN
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
177
|
+
temp_model.build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
next if value.nil?
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map{ |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|