aspose_pdf_cloud 18.11.0 → 19.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +66 -6
- data/aspose_pdf_cloud.gemspec +1 -1
- data/docs/Annotation.md +3 -2
- data/docs/AnnotationFlags.md +14 -14
- data/docs/AnnotationInfo.md +3 -2
- data/docs/AnnotationState.md +11 -11
- data/docs/AnnotationType.md +31 -31
- data/docs/AnnotationsInfo.md +3 -3
- data/docs/AnnotationsInfoResponse.md +3 -3
- data/docs/AntialiasingProcessingType.md +5 -5
- data/docs/AppendDocument.md +1 -1
- data/docs/AsposeResponse.md +1 -1
- data/docs/Attachment.md +1 -1
- data/docs/AttachmentResponse.md +3 -3
- data/docs/Attachments.md +3 -3
- data/docs/AttachmentsResponse.md +3 -3
- data/docs/CapStyle.md +5 -5
- data/docs/CaptionPosition.md +6 -6
- data/docs/CaretAnnotation.md +4 -4
- data/docs/CaretAnnotationResponse.md +3 -3
- data/docs/CaretAnnotations.md +3 -3
- data/docs/CaretAnnotationsResponse.md +3 -3
- data/docs/CaretSymbol.md +5 -5
- data/docs/CircleAnnotation.md +4 -4
- data/docs/CircleAnnotationResponse.md +3 -3
- data/docs/CircleAnnotations.md +3 -3
- data/docs/CircleAnnotationsResponse.md +3 -3
- data/docs/Color.md +5 -5
- data/docs/ColorDepth.md +7 -7
- data/docs/CommonFigureAnnotation.md +4 -3
- data/docs/CompressionType.md +8 -8
- data/docs/DiscUsage.md +10 -0
- data/docs/DiscUsageResponse.md +11 -0
- data/docs/DocFormat.md +5 -5
- data/docs/DocRecognitionMode.md +5 -5
- data/docs/Document.md +1 -1
- data/docs/DocumentPageResponse.md +3 -3
- data/docs/DocumentPagesResponse.md +3 -3
- data/docs/DocumentPrivilege.md +1 -1
- data/docs/DocumentProperties.md +3 -3
- data/docs/DocumentPropertiesResponse.md +3 -3
- data/docs/DocumentProperty.md +4 -4
- data/docs/DocumentPropertyResponse.md +3 -3
- data/docs/DocumentResponse.md +4 -4
- data/docs/EpubRecognitionMode.md +6 -6
- data/docs/Field.md +2 -2
- data/docs/FieldResponse.md +3 -3
- data/docs/FieldType.md +7 -7
- data/docs/Fields.md +3 -3
- data/docs/FieldsResponse.md +3 -3
- data/docs/File.md +1 -1
- data/docs/FileAttachmentAnnotation.md +29 -0
- data/docs/FileAttachmentAnnotationResponse.md +11 -0
- data/docs/FileAttachmentAnnotations.md +10 -0
- data/docs/FileAttachmentAnnotationsResponse.md +11 -0
- data/docs/FileExist.md +10 -0
- data/docs/FileExistResponse.md +11 -0
- data/docs/FileIcon.md +13 -0
- data/docs/FileVersion.md +15 -0
- data/docs/FileVersionsResponse.md +11 -0
- data/docs/FilesResponse.md +1 -1
- data/docs/FontEncodingRules.md +5 -5
- data/docs/FontSavingModes.md +7 -7
- data/docs/FontStyles.md +7 -7
- data/docs/FreeTextAnnotation.md +3 -2
- data/docs/FreeTextAnnotationResponse.md +3 -3
- data/docs/FreeTextAnnotations.md +3 -3
- data/docs/FreeTextAnnotationsResponse.md +3 -3
- data/docs/FreeTextIntent.md +6 -6
- data/docs/HighlightAnnotation.md +3 -3
- data/docs/HighlightAnnotationResponse.md +3 -3
- data/docs/HighlightAnnotations.md +3 -3
- data/docs/HighlightAnnotationsResponse.md +3 -3
- data/docs/HorizontalAlignment.md +8 -8
- data/docs/HtmlDocumentType.md +5 -5
- data/docs/HtmlMarkupGenerationModes.md +5 -5
- data/docs/Image.md +2 -2
- data/docs/ImageResponse.md +3 -3
- data/docs/ImageSrcType.md +5 -5
- data/docs/ImageTemplate.md +1 -1
- data/docs/ImageTemplatesRequest.md +1 -1
- data/docs/Images.md +3 -3
- data/docs/ImagesResponse.md +3 -3
- data/docs/InkAnnotation.md +3 -3
- data/docs/InkAnnotationResponse.md +3 -3
- data/docs/InkAnnotations.md +3 -3
- data/docs/InkAnnotationsResponse.md +3 -3
- data/docs/Justification.md +7 -7
- data/docs/LettersPositioningMethods.md +5 -5
- data/docs/LineAnnotation.md +3 -3
- data/docs/LineAnnotationResponse.md +3 -3
- data/docs/LineAnnotations.md +3 -3
- data/docs/LineAnnotationsResponse.md +3 -3
- data/docs/LineEnding.md +13 -13
- data/docs/LineIntent.md +6 -6
- data/docs/LineSpacing.md +6 -6
- data/docs/Link.md +1 -1
- data/docs/LinkActionType.md +9 -9
- data/docs/LinkAnnotation.md +2 -2
- data/docs/LinkAnnotationResponse.md +3 -3
- data/docs/LinkAnnotations.md +3 -3
- data/docs/LinkAnnotationsResponse.md +3 -3
- data/docs/LinkElement.md +1 -1
- data/docs/LinkHighlightingMode.md +9 -9
- data/docs/MarginInfo.md +1 -1
- data/docs/MarkupAnnotation.md +3 -2
- data/docs/MergeDocuments.md +1 -1
- data/docs/MovieAnnotation.md +23 -0
- data/docs/MovieAnnotationResponse.md +11 -0
- data/docs/MovieAnnotations.md +10 -0
- data/docs/MovieAnnotationsResponse.md +11 -0
- data/docs/OptimizeOptions.md +1 -1
- data/docs/Page.md +3 -3
- data/docs/PageWordCount.md +1 -1
- data/docs/Pages.md +3 -3
- data/docs/Paragraph.md +14 -14
- data/docs/PartsEmbeddingModes.md +6 -6
- data/docs/PdfAType.md +5 -5
- data/docs/PdfApi.md +909 -28
- data/docs/Point.md +1 -1
- data/docs/PolyAnnotation.md +4 -3
- data/docs/PolyIntent.md +7 -7
- data/docs/PolyLineAnnotation.md +4 -4
- data/docs/PolyLineAnnotationResponse.md +3 -3
- data/docs/PolyLineAnnotations.md +3 -3
- data/docs/PolyLineAnnotationsResponse.md +3 -3
- data/docs/PolygonAnnotation.md +4 -4
- data/docs/PolygonAnnotationResponse.md +3 -3
- data/docs/PolygonAnnotations.md +3 -3
- data/docs/PolygonAnnotationsResponse.md +3 -3
- data/docs/PopupAnnotation.md +3 -3
- data/docs/PopupAnnotationResponse.md +3 -3
- data/docs/PopupAnnotationWithParent.md +3 -3
- data/docs/PopupAnnotations.md +3 -3
- data/docs/PopupAnnotationsResponse.md +3 -3
- data/docs/RasterImagesSavingModes.md +6 -6
- data/docs/Rectangle.md +12 -0
- data/docs/RedactionAnnotation.md +26 -0
- data/docs/RedactionAnnotationResponse.md +11 -0
- data/docs/RedactionAnnotations.md +10 -0
- data/docs/RedactionAnnotationsResponse.md +11 -0
- data/docs/Rotation.md +7 -7
- data/docs/Segment.md +4 -4
- data/docs/ShapeType.md +6 -6
- data/docs/Signature.md +3 -3
- data/docs/SignatureType.md +7 -7
- data/docs/SignatureVerifyResponse.md +3 -3
- data/docs/SoundAnnotation.md +30 -0
- data/docs/SoundAnnotationResponse.md +11 -0
- data/docs/SoundAnnotations.md +10 -0
- data/docs/SoundAnnotationsResponse.md +11 -0
- data/docs/SoundEncoding.md +13 -0
- data/docs/SoundIcon.md +11 -0
- data/docs/SplitResult.md +1 -1
- data/docs/SplitResultDocument.md +1 -1
- data/docs/SplitResultResponse.md +3 -3
- data/docs/SquareAnnotation.md +4 -4
- data/docs/SquareAnnotationResponse.md +3 -3
- data/docs/SquareAnnotations.md +3 -3
- data/docs/SquareAnnotationsResponse.md +3 -3
- data/docs/SquigglyAnnotation.md +3 -3
- data/docs/SquigglyAnnotationResponse.md +3 -3
- data/docs/SquigglyAnnotations.md +3 -3
- data/docs/SquigglyAnnotationsResponse.md +3 -3
- data/docs/Stamp.md +1 -1
- data/docs/StampType.md +7 -7
- data/docs/StorageExistResponse.md +11 -0
- data/docs/StrikeOutAnnotation.md +3 -3
- data/docs/StrikeOutAnnotationResponse.md +3 -3
- data/docs/StrikeOutAnnotations.md +3 -3
- data/docs/StrikeOutAnnotationsResponse.md +3 -3
- data/docs/TextAnnotation.md +3 -3
- data/docs/TextAnnotationResponse.md +3 -3
- data/docs/TextAnnotations.md +3 -3
- data/docs/TextAnnotationsResponse.md +3 -3
- data/docs/TextHorizontalAlignment.md +10 -10
- data/docs/TextIcon.md +14 -14
- data/docs/TextLine.md +2 -2
- data/docs/TextRect.md +5 -5
- data/docs/TextRects.md +3 -3
- data/docs/TextRectsResponse.md +3 -3
- data/docs/TextReplace.md +2 -2
- data/docs/TextReplaceListRequest.md +3 -3
- data/docs/TextReplaceResponse.md +3 -3
- data/docs/TextState.md +1 -1
- data/docs/TextStyle.md +1 -1
- data/docs/UnderlineAnnotation.md +3 -3
- data/docs/UnderlineAnnotationResponse.md +3 -3
- data/docs/UnderlineAnnotations.md +3 -3
- data/docs/UnderlineAnnotationsResponse.md +3 -3
- data/docs/VerticalAlignment.md +7 -7
- data/docs/WordCount.md +1 -1
- data/docs/WordCountResponse.md +1 -1
- data/docs/WrapMode.md +7 -7
- data/lib/aspose_pdf_cloud.rb +28 -2
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +4613 -1980
- data/lib/aspose_pdf_cloud/api_client.rb +1 -1
- data/lib/aspose_pdf_cloud/api_error.rb +1 -1
- data/lib/aspose_pdf_cloud/configuration.rb +1 -1
- data/lib/aspose_pdf_cloud/models/annotation.rb +13 -3
- data/lib/aspose_pdf_cloud/models/annotation_flags.rb +1 -1
- data/lib/aspose_pdf_cloud/models/annotation_info.rb +13 -3
- data/lib/aspose_pdf_cloud/models/annotation_state.rb +1 -1
- data/lib/aspose_pdf_cloud/models/annotation_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/annotations_info.rb +3 -2
- data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/antialiasing_processing_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/append_document.rb +1 -1
- data/lib/aspose_pdf_cloud/models/aspose_response.rb +1 -1
- data/lib/aspose_pdf_cloud/models/attachment.rb +1 -1
- data/lib/aspose_pdf_cloud/models/attachment_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/attachments.rb +3 -2
- data/lib/aspose_pdf_cloud/models/attachments_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/cap_style.rb +1 -1
- data/lib/aspose_pdf_cloud/models/caption_position.rb +1 -1
- data/lib/aspose_pdf_cloud/models/caret_annotation.rb +14 -14
- data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/caret_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/caret_symbol.rb +1 -1
- data/lib/aspose_pdf_cloud/models/circle_annotation.rb +16 -16
- data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/circle_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/color.rb +5 -1
- data/lib/aspose_pdf_cloud/models/color_depth.rb +1 -1
- data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +14 -4
- data/lib/aspose_pdf_cloud/models/compression_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/disc_usage.rb +219 -0
- data/lib/aspose_pdf_cloud/models/disc_usage_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/doc_format.rb +1 -1
- data/lib/aspose_pdf_cloud/models/doc_recognition_mode.rb +1 -1
- data/lib/aspose_pdf_cloud/models/document.rb +1 -1
- data/lib/aspose_pdf_cloud/models/document_page_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/document_pages_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/document_privilege.rb +1 -1
- data/lib/aspose_pdf_cloud/models/document_properties.rb +3 -2
- data/lib/aspose_pdf_cloud/models/document_properties_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/document_property.rb +4 -1
- data/lib/aspose_pdf_cloud/models/document_property_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/document_response.rb +4 -2
- data/lib/aspose_pdf_cloud/models/epub_recognition_mode.rb +1 -1
- data/lib/aspose_pdf_cloud/models/field.rb +2 -2
- data/lib/aspose_pdf_cloud/models/field_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/field_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/fields.rb +3 -2
- data/lib/aspose_pdf_cloud/models/fields_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/file.rb +1 -1
- data/lib/aspose_pdf_cloud/models/file_attachment_annotation.rb +405 -0
- data/lib/aspose_pdf_cloud/models/file_attachment_annotation_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/file_attachment_annotations.rb +215 -0
- data/lib/aspose_pdf_cloud/models/file_attachment_annotations_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/file_exist.rb +219 -0
- data/lib/aspose_pdf_cloud/models/file_exist_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/file_icon.rb +46 -0
- data/lib/aspose_pdf_cloud/models/file_version.rb +264 -0
- data/lib/aspose_pdf_cloud/models/file_versions_response.rb +227 -0
- data/lib/aspose_pdf_cloud/models/files_response.rb +1 -1
- data/lib/aspose_pdf_cloud/models/font_encoding_rules.rb +1 -1
- data/lib/aspose_pdf_cloud/models/font_saving_modes.rb +1 -1
- data/lib/aspose_pdf_cloud/models/font_styles.rb +1 -1
- data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +13 -3
- data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/free_text_intent.rb +1 -1
- data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +1 -1
- data/lib/aspose_pdf_cloud/models/html_document_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/html_markup_generation_modes.rb +1 -1
- data/lib/aspose_pdf_cloud/models/image.rb +2 -2
- data/lib/aspose_pdf_cloud/models/image_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/image_src_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/image_template.rb +1 -1
- data/lib/aspose_pdf_cloud/models/image_templates_request.rb +1 -1
- data/lib/aspose_pdf_cloud/models/images.rb +3 -2
- data/lib/aspose_pdf_cloud/models/images_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/ink_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/ink_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/justification.rb +1 -1
- data/lib/aspose_pdf_cloud/models/letters_positioning_methods.rb +1 -1
- data/lib/aspose_pdf_cloud/models/line_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/line_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/line_ending.rb +1 -1
- data/lib/aspose_pdf_cloud/models/line_intent.rb +1 -1
- data/lib/aspose_pdf_cloud/models/line_spacing.rb +1 -1
- data/lib/aspose_pdf_cloud/models/link.rb +1 -1
- data/lib/aspose_pdf_cloud/models/link_action_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/link_annotation.rb +2 -2
- data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/link_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/link_element.rb +1 -1
- data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +1 -1
- data/lib/aspose_pdf_cloud/models/margin_info.rb +1 -1
- data/lib/aspose_pdf_cloud/models/markup_annotation.rb +13 -3
- data/lib/aspose_pdf_cloud/models/merge_documents.rb +1 -1
- data/lib/aspose_pdf_cloud/models/movie_annotation.rb +345 -0
- data/lib/aspose_pdf_cloud/models/movie_annotation_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/movie_annotations.rb +215 -0
- data/lib/aspose_pdf_cloud/models/movie_annotations_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/optimize_options.rb +1 -1
- data/lib/aspose_pdf_cloud/models/page.rb +4 -2
- data/lib/aspose_pdf_cloud/models/page_word_count.rb +1 -1
- data/lib/aspose_pdf_cloud/models/pages.rb +3 -2
- data/lib/aspose_pdf_cloud/models/paragraph.rb +15 -3
- data/lib/aspose_pdf_cloud/models/parts_embedding_modes.rb +1 -1
- data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/point.rb +1 -1
- data/lib/aspose_pdf_cloud/models/poly_annotation.rb +14 -4
- data/lib/aspose_pdf_cloud/models/poly_intent.rb +1 -1
- data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +17 -17
- data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +17 -17
- data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/popup_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +13 -13
- data/lib/aspose_pdf_cloud/models/popup_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb +1 -1
- data/lib/aspose_pdf_cloud/models/{rectangle_pdf.rb → rectangle.rb} +6 -2
- data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +377 -0
- data/lib/aspose_pdf_cloud/models/redaction_annotation_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/redaction_annotations.rb +215 -0
- data/lib/aspose_pdf_cloud/models/redaction_annotations_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/rotation.rb +1 -1
- data/lib/aspose_pdf_cloud/models/segment.rb +4 -2
- data/lib/aspose_pdf_cloud/models/shape_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/signature.rb +3 -3
- data/lib/aspose_pdf_cloud/models/signature_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +3 -3
- data/lib/aspose_pdf_cloud/models/sound_annotation.rb +415 -0
- data/lib/aspose_pdf_cloud/models/sound_annotation_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/sound_annotations.rb +215 -0
- data/lib/aspose_pdf_cloud/models/sound_annotations_response.rb +226 -0
- data/lib/aspose_pdf_cloud/models/sound_encoding.rb +46 -0
- data/lib/aspose_pdf_cloud/models/sound_icon.rb +44 -0
- data/lib/aspose_pdf_cloud/models/split_result.rb +1 -1
- data/lib/aspose_pdf_cloud/models/split_result_document.rb +1 -1
- data/lib/aspose_pdf_cloud/models/split_result_response.rb +3 -3
- data/lib/aspose_pdf_cloud/models/square_annotation.rb +16 -16
- data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/square_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/stamp.rb +1 -1
- data/lib/aspose_pdf_cloud/models/stamp_type.rb +1 -1
- data/lib/aspose_pdf_cloud/models/storage_exist_response.rb +225 -0
- data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/text_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/text_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +1 -1
- data/lib/aspose_pdf_cloud/models/text_icon.rb +1 -1
- data/lib/aspose_pdf_cloud/models/text_line.rb +2 -2
- data/lib/aspose_pdf_cloud/models/text_rect.rb +6 -3
- data/lib/aspose_pdf_cloud/models/text_rects.rb +3 -2
- data/lib/aspose_pdf_cloud/models/text_rects_response.rb +10 -9
- data/lib/aspose_pdf_cloud/models/text_replace.rb +2 -2
- data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +3 -1
- data/lib/aspose_pdf_cloud/models/text_replace_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/text_state.rb +1 -1
- data/lib/aspose_pdf_cloud/models/text_style.rb +1 -1
- data/lib/aspose_pdf_cloud/models/underline_annotation.rb +13 -13
- data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/underline_annotations.rb +3 -2
- data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +3 -2
- data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +1 -1
- data/lib/aspose_pdf_cloud/models/word_count.rb +1 -1
- data/lib/aspose_pdf_cloud/models/word_count_response.rb +1 -1
- data/lib/aspose_pdf_cloud/models/wrap_mode.rb +1 -1
- data/lib/aspose_pdf_cloud/version.rb +2 -2
- data/test/pdf_tests.rb +595 -41
- data/test_data/PdfWithAnnotations.pdf +0 -0
- data/test_data/PdfWithAnnotations1.pdf +0 -0
- metadata +57 -4
- data/docs/RectanglePdf.md +0 -12
@@ -0,0 +1,226 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
Copyright (c) 2019 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
|
+
# Represents response containing single FileAttachment annotation object
|
27
|
+
class FileAttachmentAnnotationResponse
|
28
|
+
# Response status code.
|
29
|
+
attr_accessor :code
|
30
|
+
|
31
|
+
# Response status.
|
32
|
+
attr_accessor :status
|
33
|
+
|
34
|
+
# FileAttachment annotation object
|
35
|
+
attr_accessor :annotation
|
36
|
+
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'code' => :'Code',
|
42
|
+
:'status' => :'Status',
|
43
|
+
:'annotation' => :'Annotation'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'code' => :'Integer',
|
51
|
+
:'status' => :'String',
|
52
|
+
:'annotation' => :'FileAttachmentAnnotation'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
return unless attributes.is_a?(Hash)
|
60
|
+
|
61
|
+
# convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
63
|
+
|
64
|
+
if attributes.has_key?(:'Code')
|
65
|
+
self.code = attributes[:'Code']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'Status')
|
69
|
+
self.status = attributes[:'Status']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'Annotation')
|
73
|
+
self.annotation = attributes[:'Annotation']
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properies with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @code.nil?
|
83
|
+
invalid_properties.push("invalid value for 'code', code cannot be nil.")
|
84
|
+
end
|
85
|
+
|
86
|
+
return invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if @code.nil?
|
93
|
+
return true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
code == o.code &&
|
102
|
+
status == o.status &&
|
103
|
+
annotation == o.annotation
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Fixnum] Hash code
|
114
|
+
def hash
|
115
|
+
[code, status, annotation].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.swagger_types.each_pair do |key, type|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :DateTime
|
145
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
146
|
+
Time.strptime(value, format).utc.to_datetime
|
147
|
+
when :Date
|
148
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
149
|
+
Time.strptime(value, format).utc.to_datetime.to_date
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :BOOLEAN
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
178
|
+
temp_model.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
next if value.nil?
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map{ |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
@@ -0,0 +1,215 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
Copyright (c) 2019 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
|
+
# Object representing a list of FileAttachment annotations.
|
27
|
+
class FileAttachmentAnnotations
|
28
|
+
# Link to the document.
|
29
|
+
attr_accessor :links
|
30
|
+
|
31
|
+
# List of FileAttachment annotations.
|
32
|
+
attr_accessor :list
|
33
|
+
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'links' => :'Links',
|
39
|
+
:'list' => :'List'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.swagger_types
|
45
|
+
{
|
46
|
+
:'links' => :'Array<Link>',
|
47
|
+
:'list' => :'Array<FileAttachmentAnnotation>'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
58
|
+
|
59
|
+
if attributes.has_key?(:'Links')
|
60
|
+
if (value = attributes[:'Links']).is_a?(Array)
|
61
|
+
self.links = value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'List')
|
66
|
+
if (value = attributes[:'List']).is_a?(Array)
|
67
|
+
self.list = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properies with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
return invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
return true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
links == o.links &&
|
92
|
+
list == o.list
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Fixnum] Hash code
|
103
|
+
def hash
|
104
|
+
[links, list].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
self.class.swagger_types.each_pair do |key, type|
|
113
|
+
if type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
122
|
+
end
|
123
|
+
|
124
|
+
self
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def _deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :DateTime
|
134
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
135
|
+
Time.strptime(value, format).utc.to_datetime
|
136
|
+
when :Date
|
137
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
138
|
+
Time.strptime(value, format).utc.to_datetime.to_date
|
139
|
+
when :String
|
140
|
+
value.to_s
|
141
|
+
when :Integer
|
142
|
+
value.to_i
|
143
|
+
when :Float
|
144
|
+
value.to_f
|
145
|
+
when :BOOLEAN
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
147
|
+
true
|
148
|
+
else
|
149
|
+
false
|
150
|
+
end
|
151
|
+
when :Object
|
152
|
+
# generic object (usually a Hash), return directly
|
153
|
+
value
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
160
|
+
{}.tap do |hash|
|
161
|
+
value.each do |k, v|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
else # model
|
166
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
167
|
+
temp_model.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
next if value.nil?
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map{ |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
@@ -0,0 +1,226 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
Copyright (c) 2019 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
|
+
# Represents response containing multiple FileAttachment annotation objects
|
27
|
+
class FileAttachmentAnnotationsResponse
|
28
|
+
# Response status code.
|
29
|
+
attr_accessor :code
|
30
|
+
|
31
|
+
# Response status.
|
32
|
+
attr_accessor :status
|
33
|
+
|
34
|
+
# Free text annotations object
|
35
|
+
attr_accessor :annotations
|
36
|
+
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'code' => :'Code',
|
42
|
+
:'status' => :'Status',
|
43
|
+
:'annotations' => :'Annotations'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'code' => :'Integer',
|
51
|
+
:'status' => :'String',
|
52
|
+
:'annotations' => :'FileAttachmentAnnotations'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
return unless attributes.is_a?(Hash)
|
60
|
+
|
61
|
+
# convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
63
|
+
|
64
|
+
if attributes.has_key?(:'Code')
|
65
|
+
self.code = attributes[:'Code']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'Status')
|
69
|
+
self.status = attributes[:'Status']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'Annotations')
|
73
|
+
self.annotations = attributes[:'Annotations']
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properies with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @code.nil?
|
83
|
+
invalid_properties.push("invalid value for 'code', code cannot be nil.")
|
84
|
+
end
|
85
|
+
|
86
|
+
return invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if @code.nil?
|
93
|
+
return true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
code == o.code &&
|
102
|
+
status == o.status &&
|
103
|
+
annotations == o.annotations
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Fixnum] Hash code
|
114
|
+
def hash
|
115
|
+
[code, status, annotations].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.swagger_types.each_pair do |key, type|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :DateTime
|
145
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
146
|
+
Time.strptime(value, format).utc.to_datetime
|
147
|
+
when :Date
|
148
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
149
|
+
Time.strptime(value, format).utc.to_datetime.to_date
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :BOOLEAN
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
178
|
+
temp_model.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
next if value.nil?
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map{ |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|