groupdocs_signature_cloud 18.8.1 → 21.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/groupdocs_signature_cloud/api/file_api.rb +734 -0
- data/lib/groupdocs_signature_cloud/api/folder_api.rb +699 -0
- data/lib/groupdocs_signature_cloud/api/info_api.rb +364 -0
- data/lib/groupdocs_signature_cloud/api/preview_api.rb +217 -0
- data/lib/groupdocs_signature_cloud/api/sign_api.rb +605 -0
- data/lib/groupdocs_signature_cloud/api/storage_api.rb +544 -0
- data/lib/groupdocs_signature_cloud/api_client.rb +382 -380
- data/lib/groupdocs_signature_cloud/api_error.rb +71 -58
- data/lib/groupdocs_signature_cloud/configuration.rb +95 -110
- data/lib/groupdocs_signature_cloud/models/barcode_signature.rb +434 -0
- data/lib/groupdocs_signature_cloud/models/barcode_type.rb +237 -230
- data/lib/groupdocs_signature_cloud/models/{barcode_collection.rb → barcodes_result.rb} +239 -232
- data/lib/groupdocs_signature_cloud/models/{base_signature_data.rb → base_settings.rb} +237 -230
- data/lib/groupdocs_signature_cloud/models/{border_line_data.rb → border_line.rb} +334 -312
- data/lib/groupdocs_signature_cloud/models/{brush_data.rb → brush.rb} +237 -230
- data/lib/groupdocs_signature_cloud/models/checkbox_form_field_signature.rb +460 -0
- data/lib/groupdocs_signature_cloud/models/color.rb +237 -245
- data/lib/groupdocs_signature_cloud/models/combobox_form_field_signature.rb +467 -0
- data/lib/groupdocs_signature_cloud/models/delete_options.rb +289 -0
- data/lib/groupdocs_signature_cloud/models/{sign_options_data.rb → delete_result.rb} +276 -255
- data/lib/groupdocs_signature_cloud/models/delete_settings.rb +249 -0
- data/lib/groupdocs_signature_cloud/models/digital_form_field_signature.rb +460 -0
- data/lib/groupdocs_signature_cloud/models/digital_signature.rb +454 -0
- data/lib/groupdocs_signature_cloud/models/digital_signature_appearance.rb +309 -0
- data/lib/groupdocs_signature_cloud/models/disc_usage.rb +257 -0
- data/lib/groupdocs_signature_cloud/models/{cells_qr_code_signature_data.rb → error.rb} +267 -250
- data/lib/groupdocs_signature_cloud/models/error_details.rb +252 -0
- data/lib/groupdocs_signature_cloud/models/{barcode_signature_data.rb → file_info.rb} +267 -250
- data/lib/groupdocs_signature_cloud/models/file_version.rb +312 -0
- data/lib/groupdocs_signature_cloud/models/file_versions.rb +239 -0
- data/lib/groupdocs_signature_cloud/models/files_list.rb +239 -0
- data/lib/groupdocs_signature_cloud/models/files_upload_result.rb +251 -0
- data/lib/groupdocs_signature_cloud/models/form_field_signature.rb +445 -0
- data/lib/groupdocs_signature_cloud/models/format.rb +247 -240
- data/lib/groupdocs_signature_cloud/models/{format_collection.rb → formats_result.rb} +239 -232
- data/lib/groupdocs_signature_cloud/models/image_appearance.rb +339 -0
- data/lib/groupdocs_signature_cloud/models/image_signature.rb +429 -0
- data/lib/groupdocs_signature_cloud/models/info_result.rb +371 -0
- data/lib/groupdocs_signature_cloud/models/{cells_barcode_signature_data.rb → info_settings.rb} +252 -250
- data/lib/groupdocs_signature_cloud/models/{linear_gradient_brush_data.rb → linear_gradient_brush.rb} +272 -260
- data/lib/groupdocs_signature_cloud/models/{pages_info.rb → object_exist.rb} +257 -247
- data/lib/groupdocs_signature_cloud/models/{pdf_digital_signature_data.rb → options_base.rb} +314 -307
- data/lib/groupdocs_signature_cloud/models/{padding_data.rb → padding.rb} +302 -295
- data/lib/groupdocs_signature_cloud/models/page_info.rb +312 -305
- data/lib/groupdocs_signature_cloud/models/{pages_setup_data.rb → pages_setup.rb} +299 -292
- data/lib/groupdocs_signature_cloud/models/pdf_digital_signature.rb +339 -0
- data/lib/groupdocs_signature_cloud/models/pdf_digital_signature_appearance.rb +359 -0
- data/lib/groupdocs_signature_cloud/models/pdf_text_annotation_appearance.rb +395 -0
- data/lib/groupdocs_signature_cloud/models/{document_response.rb → pdf_text_sticker_appearance.rb} +355 -302
- data/lib/groupdocs_signature_cloud/models/preview_page.rb +277 -0
- data/lib/groupdocs_signature_cloud/models/preview_result.rb +279 -0
- data/lib/groupdocs_signature_cloud/models/{cells_verify_qr_code_options_data.rb → preview_settings.rb} +356 -342
- data/lib/groupdocs_signature_cloud/models/qr_code_signature.rb +434 -0
- data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +237 -230
- data/lib/groupdocs_signature_cloud/models/{qr_code_collection.rb → qr_codes_result.rb} +239 -232
- data/lib/groupdocs_signature_cloud/models/{radial_gradient_brush_data.rb → radial_gradient_brush.rb} +257 -250
- data/lib/groupdocs_signature_cloud/models/radio_button_form_field_signature.rb +467 -0
- data/lib/groupdocs_signature_cloud/models/save_options.rb +262 -0
- data/lib/groupdocs_signature_cloud/models/{search_barcode_options_data.rb → search_barcode_options.rb} +365 -332
- data/lib/groupdocs_signature_cloud/models/{cells_digital_signature_data.rb → search_digital_options.rb} +314 -307
- data/lib/groupdocs_signature_cloud/models/{words_digital_signature_data.rb → search_options.rb} +314 -307
- data/lib/groupdocs_signature_cloud/models/{pdf_search_barcode_options_data.rb → search_qr_code_options.rb} +365 -332
- data/lib/groupdocs_signature_cloud/models/{verify_options_collection_data.rb → search_result.rb} +264 -247
- data/lib/groupdocs_signature_cloud/models/search_settings.rb +249 -0
- data/lib/groupdocs_signature_cloud/models/{pdf_sign_text_options_data.rb → sign_barcode_options.rb} +808 -696
- data/lib/groupdocs_signature_cloud/models/{pdf_sign_digital_options_data.rb → sign_digital_options.rb} +695 -556
- data/lib/groupdocs_signature_cloud/models/{sign_stamp_options_data.rb → sign_image_options.rb} +599 -592
- data/lib/groupdocs_signature_cloud/models/sign_options.rb +324 -0
- data/lib/groupdocs_signature_cloud/models/{words_sign_text_options_data.rb → sign_qr_code_options.rb} +823 -696
- data/lib/groupdocs_signature_cloud/models/{verify_options_data.rb → sign_result.rb} +286 -265
- data/lib/groupdocs_signature_cloud/models/{qr_code_signature_data.rb → sign_settings.rb} +259 -250
- data/lib/groupdocs_signature_cloud/models/{slides_sign_stamp_options_data.rb → sign_stamp_options.rb} +705 -592
- data/lib/groupdocs_signature_cloud/models/{images_sign_text_options_data.rb → sign_text_options.rb} +747 -706
- data/lib/groupdocs_signature_cloud/models/signature.rb +404 -0
- data/lib/groupdocs_signature_cloud/models/{signature_document_response.rb → signature_appearance.rb} +278 -289
- data/lib/groupdocs_signature_cloud/models/{signature_font_data.rb → signature_font.rb} +297 -290
- data/lib/groupdocs_signature_cloud/models/{solid_brush_data.rb → solid_brush.rb} +247 -240
- data/lib/groupdocs_signature_cloud/models/{stamp_line_data.rb → stamp_line.rb} +384 -377
- data/lib/groupdocs_signature_cloud/models/storage_exist.rb +242 -0
- data/lib/groupdocs_signature_cloud/models/{document_info.rb → storage_file.rb} +287 -300
- data/lib/groupdocs_signature_cloud/models/text_form_field_signature.rb +455 -0
- data/lib/groupdocs_signature_cloud/models/text_signature.rb +424 -0
- data/lib/groupdocs_signature_cloud/models/{texture_brush_data.rb → texture_brush.rb} +247 -240
- data/lib/groupdocs_signature_cloud/models/time_stamp.rb +257 -0
- data/lib/groupdocs_signature_cloud/models/update_options.rb +374 -0
- data/lib/groupdocs_signature_cloud/models/update_result.rb +276 -0
- data/lib/groupdocs_signature_cloud/models/update_settings.rb +249 -0
- data/lib/groupdocs_signature_cloud/models/{verify_barcode_options_data.rb → verify_barcode_options.rb} +365 -342
- data/lib/groupdocs_signature_cloud/models/{cells_verify_digital_options_data.rb → verify_digital_options.rb} +394 -315
- data/lib/groupdocs_signature_cloud/models/{digital_signature_data.rb → verify_options.rb} +314 -307
- data/lib/groupdocs_signature_cloud/models/{verify_qr_code_options_data.rb → verify_qr_code_options.rb} +365 -342
- data/lib/groupdocs_signature_cloud/models/{images_barcode_signature_data.rb → verify_result.rb} +267 -250
- data/lib/groupdocs_signature_cloud/models/{search_options_collection_data.rb → verify_settings.rb} +249 -232
- data/lib/groupdocs_signature_cloud/models/{cells_verify_barcode_options_data.rb → verify_text_options.rb} +355 -342
- data/lib/groupdocs_signature_cloud/version.rb +2 -2
- data/lib/groupdocs_signature_cloud.rb +125 -191
- metadata +89 -185
- data/lib/groupdocs_signature_cloud/api/signature_api.rb +0 -2590
- data/lib/groupdocs_signature_cloud/models/cells_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/cells_search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/cells_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/cells_sign_barcode_options_data.rb +0 -694
- data/lib/groupdocs_signature_cloud/models/cells_sign_digital_options_data.rb +0 -546
- data/lib/groupdocs_signature_cloud/models/cells_sign_image_options_data.rb +0 -526
- data/lib/groupdocs_signature_cloud/models/cells_sign_qr_code_options_data.rb +0 -704
- data/lib/groupdocs_signature_cloud/models/cells_sign_stamp_options_data.rb +0 -622
- data/lib/groupdocs_signature_cloud/models/cells_sign_text_options_data.rb +0 -736
- data/lib/groupdocs_signature_cloud/models/cells_verify_text_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/images_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/images_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/images_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/images_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/images_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/images_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/images_sign_stamp_options_data.rb +0 -592
- data/lib/groupdocs_signature_cloud/models/images_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/images_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/pdf_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/pdf_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/pdf_search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/pdf_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/pdf_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/pdf_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/pdf_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/pdf_sign_stamp_options_data.rb +0 -592
- data/lib/groupdocs_signature_cloud/models/pdf_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/pdf_verify_digital_options_data.rb +0 -315
- data/lib/groupdocs_signature_cloud/models/pdf_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/pdf_verify_text_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/requests/get_document_info_from_url_request.rb +0 -55
- data/lib/groupdocs_signature_cloud/models/requests/get_document_info_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_barcode_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_barcode_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_collection_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_collection_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_digital_from_url_request.rb +0 -67
- data/lib/groupdocs_signature_cloud/models/requests/post_digital_request.rb +0 -71
- data/lib/groupdocs_signature_cloud/models/requests/post_image_from_url_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_image_request.rb +0 -67
- data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_stamp_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_stamp_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_text_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_text_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_from_url_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_request.rb +0 -67
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_from_url_request.rb +0 -59
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_from_url_request.rb +0 -57
- data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_request.rb +0 -63
- data/lib/groupdocs_signature_cloud/models/search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/search_document_response.rb +0 -305
- data/lib/groupdocs_signature_cloud/models/search_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/sign_digital_options_data.rb +0 -516
- data/lib/groupdocs_signature_cloud/models/sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/sign_options_collection_data.rb +0 -232
- data/lib/groupdocs_signature_cloud/models/sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/sign_text_options_data.rb +0 -562
- data/lib/groupdocs_signature_cloud/models/slides_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/slides_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/slides_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/slides_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/slides_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/slides_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/slides_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/slides_sign_text_options_data.rb +0 -670
- data/lib/groupdocs_signature_cloud/models/slides_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/slides_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/slides_verify_text_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/verified_document_response.rb +0 -300
- data/lib/groupdocs_signature_cloud/models/verify_digital_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/verify_text_options_data.rb +0 -285
- data/lib/groupdocs_signature_cloud/models/words_barcode_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/words_qr_code_signature_data.rb +0 -250
- data/lib/groupdocs_signature_cloud/models/words_search_barcode_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/words_search_digital_options_data.rb +0 -265
- data/lib/groupdocs_signature_cloud/models/words_search_qr_code_options_data.rb +0 -332
- data/lib/groupdocs_signature_cloud/models/words_sign_barcode_options_data.rb +0 -664
- data/lib/groupdocs_signature_cloud/models/words_sign_digital_options_data.rb +0 -516
- data/lib/groupdocs_signature_cloud/models/words_sign_image_options_data.rb +0 -496
- data/lib/groupdocs_signature_cloud/models/words_sign_qr_code_options_data.rb +0 -674
- data/lib/groupdocs_signature_cloud/models/words_sign_stamp_options_data.rb +0 -592
- data/lib/groupdocs_signature_cloud/models/words_verify_barcode_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/words_verify_digital_options_data.rb +0 -315
- data/lib/groupdocs_signature_cloud/models/words_verify_qr_code_options_data.rb +0 -342
- data/lib/groupdocs_signature_cloud/models/words_verify_text_options_data.rb +0 -285
@@ -1,332 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="images_search_barcode_options_data.rb">
|
4
|
-
# Copyright (c) 2003-2018 Aspose Pty Ltd
|
5
|
-
# </copyright>
|
6
|
-
# <summary>
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
# of this software and associated documentation files (the "Software"), to deal
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
12
|
-
# furnished to do so, subject to the following conditions:
|
13
|
-
#
|
14
|
-
# The above copyright notice and this permission notice shall be included in all
|
15
|
-
# copies or substantial portions of the Software.
|
16
|
-
#
|
17
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
-
# SOFTWARE.
|
24
|
-
# </summary>
|
25
|
-
# --------------------------------------------------------------------------------------------------------------------
|
26
|
-
#
|
27
|
-
|
28
|
-
require 'date'
|
29
|
-
|
30
|
-
module GroupDocsSignatureCloud
|
31
|
-
# Represents the barcode search options for Images documents.
|
32
|
-
class ImagesSearchBarcodeOptionsData
|
33
|
-
|
34
|
-
# Gets or sets Document page number for searching. Value is optional.
|
35
|
-
attr_accessor :document_page_number
|
36
|
-
|
37
|
-
# Options to specify pages for Signature searching.
|
38
|
-
attr_accessor :pages_setup
|
39
|
-
|
40
|
-
# Flag to search on each Document page.
|
41
|
-
attr_accessor :search_all_pages
|
42
|
-
|
43
|
-
# Internal property that specify the name of Options.
|
44
|
-
attr_accessor :options_type
|
45
|
-
|
46
|
-
# Specifies Encode Type property to search barcodes. If this value is not set, search is processed for all supported barcode Types.
|
47
|
-
attr_accessor :barcode_type_name
|
48
|
-
|
49
|
-
# Specifies text for searching and matching in barcode signature.
|
50
|
-
attr_accessor :text
|
51
|
-
|
52
|
-
# Get or set barcode text Match Type search. It is used only when Text property is set.
|
53
|
-
attr_accessor :match_type
|
54
|
-
class EnumAttributeValidator
|
55
|
-
attr_reader :datatype
|
56
|
-
attr_reader :allowable_values
|
57
|
-
|
58
|
-
def initialize(datatype, allowable_values)
|
59
|
-
@allowable_values = allowable_values.map do |value|
|
60
|
-
case datatype.to_s
|
61
|
-
when /Integer/i
|
62
|
-
value.to_i
|
63
|
-
when /Float/i
|
64
|
-
value.to_f
|
65
|
-
else
|
66
|
-
value
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
def valid?(value)
|
72
|
-
!value || allowable_values.include?(value)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
77
|
-
def self.attribute_map
|
78
|
-
{
|
79
|
-
:'document_page_number' => :'DocumentPageNumber',
|
80
|
-
:'pages_setup' => :'PagesSetup',
|
81
|
-
:'search_all_pages' => :'SearchAllPages',
|
82
|
-
:'options_type' => :'OptionsType',
|
83
|
-
:'barcode_type_name' => :'BarcodeTypeName',
|
84
|
-
:'text' => :'Text',
|
85
|
-
:'match_type' => :'MatchType'
|
86
|
-
}
|
87
|
-
end
|
88
|
-
|
89
|
-
# Attribute type mapping.
|
90
|
-
def self.swagger_types
|
91
|
-
{
|
92
|
-
:'document_page_number' => :'Integer',
|
93
|
-
:'pages_setup' => :'PagesSetupData',
|
94
|
-
:'search_all_pages' => :'BOOLEAN',
|
95
|
-
:'options_type' => :'String',
|
96
|
-
:'barcode_type_name' => :'String',
|
97
|
-
:'text' => :'String',
|
98
|
-
:'match_type' => :'String'
|
99
|
-
}
|
100
|
-
end
|
101
|
-
|
102
|
-
# Initializes the object
|
103
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
104
|
-
def initialize(attributes = {})
|
105
|
-
return unless attributes.is_a?(Hash)
|
106
|
-
|
107
|
-
# convert string to symbol for hash key
|
108
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
109
|
-
|
110
|
-
if attributes.key?(:'DocumentPageNumber')
|
111
|
-
self.document_page_number = attributes[:'DocumentPageNumber']
|
112
|
-
end
|
113
|
-
|
114
|
-
if attributes.key?(:'PagesSetup')
|
115
|
-
self.pages_setup = attributes[:'PagesSetup']
|
116
|
-
end
|
117
|
-
|
118
|
-
if attributes.key?(:'SearchAllPages')
|
119
|
-
self.search_all_pages = attributes[:'SearchAllPages']
|
120
|
-
end
|
121
|
-
|
122
|
-
if attributes.key?(:'OptionsType')
|
123
|
-
self.options_type = attributes[:'OptionsType']
|
124
|
-
end
|
125
|
-
|
126
|
-
if attributes.key?(:'BarcodeTypeName')
|
127
|
-
self.barcode_type_name = attributes[:'BarcodeTypeName']
|
128
|
-
end
|
129
|
-
|
130
|
-
if attributes.key?(:'Text')
|
131
|
-
self.text = attributes[:'Text']
|
132
|
-
end
|
133
|
-
|
134
|
-
if attributes.key?(:'MatchType')
|
135
|
-
self.match_type = attributes[:'MatchType']
|
136
|
-
end
|
137
|
-
|
138
|
-
|
139
|
-
if !((defined? options_type) == nil)
|
140
|
-
self.options_type = "ImagesSearchBarcodeOptionsData"
|
141
|
-
end
|
142
|
-
|
143
|
-
end
|
144
|
-
|
145
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
146
|
-
# @return Array for valid properies with the reasons
|
147
|
-
def list_invalid_properties
|
148
|
-
invalid_properties = []
|
149
|
-
if @search_all_pages.nil?
|
150
|
-
invalid_properties.push("invalid value for 'search_all_pages', search_all_pages cannot be nil.")
|
151
|
-
end
|
152
|
-
|
153
|
-
return invalid_properties
|
154
|
-
end
|
155
|
-
|
156
|
-
# Check to see if the all the properties in the model are valid
|
157
|
-
# @return true if the model is valid
|
158
|
-
def valid?
|
159
|
-
return false if @search_all_pages.nil?
|
160
|
-
match_type_validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
|
161
|
-
return false unless match_type_validator.valid?(@match_type)
|
162
|
-
return true
|
163
|
-
end
|
164
|
-
|
165
|
-
# Custom attribute writer method checking allowed values (enum).
|
166
|
-
# @param [Object] match_type Object to be assigned
|
167
|
-
def match_type=(match_type)
|
168
|
-
validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
|
169
|
-
if match_type.to_i == 0
|
170
|
-
unless validator.valid?(match_type)
|
171
|
-
raise ArgumentError, "invalid value for 'match_type', must be one of #{validator.allowable_values}."
|
172
|
-
end
|
173
|
-
@match_type = match_type
|
174
|
-
else
|
175
|
-
@match_type = validator.allowable_values[match_type.to_i]
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
# Checks equality by comparing each attribute.
|
180
|
-
# @param [Object] Object to be compared
|
181
|
-
def ==(other)
|
182
|
-
return true if self.equal?(other)
|
183
|
-
self.class == other.class &&
|
184
|
-
document_page_number == other.document_page_number &&
|
185
|
-
pages_setup == other.pages_setup &&
|
186
|
-
search_all_pages == other.search_all_pages &&
|
187
|
-
options_type == other.options_type &&
|
188
|
-
barcode_type_name == other.barcode_type_name &&
|
189
|
-
text == other.text &&
|
190
|
-
match_type == other.match_type
|
191
|
-
end
|
192
|
-
|
193
|
-
# @see the `==` method
|
194
|
-
# @param [Object] Object to be compared
|
195
|
-
def eql?(other)
|
196
|
-
self == other
|
197
|
-
end
|
198
|
-
|
199
|
-
# Calculates hash code according to all attributes.
|
200
|
-
# @return [Fixnum] Hash code
|
201
|
-
def hash
|
202
|
-
[document_page_number, pages_setup, search_all_pages, options_type, barcode_type_name, text, match_type].hash
|
203
|
-
end
|
204
|
-
|
205
|
-
# Builds the object from hash
|
206
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
207
|
-
# @return [Object] Returns the model itself
|
208
|
-
def build_from_hash(attributes)
|
209
|
-
return nil unless attributes.is_a?(Hash)
|
210
|
-
self.class.swagger_types.each_pair do |key, type|
|
211
|
-
|
212
|
-
attributeName = self.class.attribute_map[key]
|
213
|
-
attributeNameLowerStr = attributeName.to_s
|
214
|
-
attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
|
215
|
-
attributeNameLower = attributeNameLowerStr.to_sym
|
216
|
-
attributeNameLowerStr2 = attributeName.to_s
|
217
|
-
attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
|
218
|
-
attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
|
219
|
-
attributeNameLower2 = attributeNameLowerStr2.to_sym
|
220
|
-
|
221
|
-
if type =~ /\AArray<(.*)>/i
|
222
|
-
# check to ensure the input is an array given that the the attribute
|
223
|
-
# is documented as an array but the input is not
|
224
|
-
if attributes[attributeName].is_a?(Array)
|
225
|
-
self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
|
226
|
-
end
|
227
|
-
if attributes[attributeNameLower].is_a?(Array)
|
228
|
-
self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
|
229
|
-
end
|
230
|
-
if attributes[attributeNameLower2].is_a?(Array)
|
231
|
-
self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
|
232
|
-
end
|
233
|
-
elsif !attributes[attributeName].nil?
|
234
|
-
self.send("#{key}=", _deserialize(type, attributes[attributeName]))
|
235
|
-
elsif !attributes[attributeNameLower].nil?
|
236
|
-
self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
|
237
|
-
elsif !attributes[attributeNameLower2].nil?
|
238
|
-
self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
|
239
|
-
end
|
240
|
-
# or else data not found in attributes(hash), not an issue as the data can be optional
|
241
|
-
end
|
242
|
-
self
|
243
|
-
end
|
244
|
-
|
245
|
-
# Deserializes the data based on type
|
246
|
-
# @param string type Data type
|
247
|
-
# @param string value Value to be deserialized
|
248
|
-
# @return [Object] Deserialized data
|
249
|
-
def _deserialize(type, value)
|
250
|
-
case type.to_sym
|
251
|
-
when :DateTime
|
252
|
-
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
253
|
-
when :Date
|
254
|
-
Time.at(/\d/.match(value)[0].to_f).to_date
|
255
|
-
when :String
|
256
|
-
value.to_s
|
257
|
-
when :Integer
|
258
|
-
value.to_i
|
259
|
-
when :Float
|
260
|
-
value.to_f
|
261
|
-
when :BOOLEAN
|
262
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
263
|
-
true
|
264
|
-
else
|
265
|
-
false
|
266
|
-
end
|
267
|
-
when :Object
|
268
|
-
# generic object (usually a Hash), return directly
|
269
|
-
value
|
270
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
271
|
-
inner_type = Regexp.last_match[:inner_type]
|
272
|
-
value.map { |v| _deserialize(inner_type, v) }
|
273
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
274
|
-
k_type = Regexp.last_match[:k_type]
|
275
|
-
v_type = Regexp.last_match[:v_type]
|
276
|
-
{}.tap do |hash|
|
277
|
-
value.each do |k, v|
|
278
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
279
|
-
end
|
280
|
-
end
|
281
|
-
else
|
282
|
-
# model
|
283
|
-
temp_model = GroupDocsSignatureCloud.const_get(type).new
|
284
|
-
temp_model.build_from_hash(value)
|
285
|
-
end
|
286
|
-
end
|
287
|
-
|
288
|
-
# Returns the string representation of the object
|
289
|
-
# @return [String] String presentation of the object
|
290
|
-
def to_s
|
291
|
-
to_hash.to_s
|
292
|
-
end
|
293
|
-
|
294
|
-
# to_body is an alias to to_hash (backward compatibility)
|
295
|
-
# @return [Hash] Returns the object in the form of hash
|
296
|
-
def to_body
|
297
|
-
to_hash
|
298
|
-
end
|
299
|
-
|
300
|
-
# Returns the object in the form of hash
|
301
|
-
# @return [Hash] Returns the object in the form of hash
|
302
|
-
def to_hash
|
303
|
-
hash = {}
|
304
|
-
self.class.attribute_map.each_pair do |attr, param|
|
305
|
-
value = self.send(attr)
|
306
|
-
next if value.nil?
|
307
|
-
hash[param] = _to_hash(value)
|
308
|
-
end
|
309
|
-
hash
|
310
|
-
end
|
311
|
-
|
312
|
-
# Outputs non-array value in the form of hash
|
313
|
-
# For object, use to_hash. Otherwise, just return the value
|
314
|
-
# @param [Object] value Any valid value
|
315
|
-
# @return [Hash] Returns the value in the form of hash
|
316
|
-
def _to_hash(value)
|
317
|
-
if value.is_a?(Array)
|
318
|
-
value.compact.map { |v| _to_hash(v) }
|
319
|
-
elsif value.is_a?(Hash)
|
320
|
-
{}.tap do |hash|
|
321
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
322
|
-
end
|
323
|
-
elsif value.respond_to? :to_hash
|
324
|
-
value.to_hash
|
325
|
-
else
|
326
|
-
value
|
327
|
-
end
|
328
|
-
end
|
329
|
-
|
330
|
-
end
|
331
|
-
|
332
|
-
end
|
@@ -1,332 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="images_search_qr_code_options_data.rb">
|
4
|
-
# Copyright (c) 2003-2018 Aspose Pty Ltd
|
5
|
-
# </copyright>
|
6
|
-
# <summary>
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
# of this software and associated documentation files (the "Software"), to deal
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
12
|
-
# furnished to do so, subject to the following conditions:
|
13
|
-
#
|
14
|
-
# The above copyright notice and this permission notice shall be included in all
|
15
|
-
# copies or substantial portions of the Software.
|
16
|
-
#
|
17
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
-
# SOFTWARE.
|
24
|
-
# </summary>
|
25
|
-
# --------------------------------------------------------------------------------------------------------------------
|
26
|
-
#
|
27
|
-
|
28
|
-
require 'date'
|
29
|
-
|
30
|
-
module GroupDocsSignatureCloud
|
31
|
-
# Represents the QRCode search options for Images documents.
|
32
|
-
class ImagesSearchQRCodeOptionsData
|
33
|
-
|
34
|
-
# Gets or sets Document page number for searching. Value is optional.
|
35
|
-
attr_accessor :document_page_number
|
36
|
-
|
37
|
-
# Options to specify pages for Signature searching.
|
38
|
-
attr_accessor :pages_setup
|
39
|
-
|
40
|
-
# Flag to search on each Document page.
|
41
|
-
attr_accessor :search_all_pages
|
42
|
-
|
43
|
-
# Internal property that specify the name of Options.
|
44
|
-
attr_accessor :options_type
|
45
|
-
|
46
|
-
# Specifies Encode Type property to search QRCodes. If this value is not set, search is processed for all supported QRCode Types.
|
47
|
-
attr_accessor :qr_code_type_name
|
48
|
-
|
49
|
-
# Specifies text for searching and matching in QRCode signature.
|
50
|
-
attr_accessor :text
|
51
|
-
|
52
|
-
# Get or set QRCode text Match Type search. It is used only when Text property is set.
|
53
|
-
attr_accessor :match_type
|
54
|
-
class EnumAttributeValidator
|
55
|
-
attr_reader :datatype
|
56
|
-
attr_reader :allowable_values
|
57
|
-
|
58
|
-
def initialize(datatype, allowable_values)
|
59
|
-
@allowable_values = allowable_values.map do |value|
|
60
|
-
case datatype.to_s
|
61
|
-
when /Integer/i
|
62
|
-
value.to_i
|
63
|
-
when /Float/i
|
64
|
-
value.to_f
|
65
|
-
else
|
66
|
-
value
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
def valid?(value)
|
72
|
-
!value || allowable_values.include?(value)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
77
|
-
def self.attribute_map
|
78
|
-
{
|
79
|
-
:'document_page_number' => :'DocumentPageNumber',
|
80
|
-
:'pages_setup' => :'PagesSetup',
|
81
|
-
:'search_all_pages' => :'SearchAllPages',
|
82
|
-
:'options_type' => :'OptionsType',
|
83
|
-
:'qr_code_type_name' => :'QRCodeTypeName',
|
84
|
-
:'text' => :'Text',
|
85
|
-
:'match_type' => :'MatchType'
|
86
|
-
}
|
87
|
-
end
|
88
|
-
|
89
|
-
# Attribute type mapping.
|
90
|
-
def self.swagger_types
|
91
|
-
{
|
92
|
-
:'document_page_number' => :'Integer',
|
93
|
-
:'pages_setup' => :'PagesSetupData',
|
94
|
-
:'search_all_pages' => :'BOOLEAN',
|
95
|
-
:'options_type' => :'String',
|
96
|
-
:'qr_code_type_name' => :'String',
|
97
|
-
:'text' => :'String',
|
98
|
-
:'match_type' => :'String'
|
99
|
-
}
|
100
|
-
end
|
101
|
-
|
102
|
-
# Initializes the object
|
103
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
104
|
-
def initialize(attributes = {})
|
105
|
-
return unless attributes.is_a?(Hash)
|
106
|
-
|
107
|
-
# convert string to symbol for hash key
|
108
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
109
|
-
|
110
|
-
if attributes.key?(:'DocumentPageNumber')
|
111
|
-
self.document_page_number = attributes[:'DocumentPageNumber']
|
112
|
-
end
|
113
|
-
|
114
|
-
if attributes.key?(:'PagesSetup')
|
115
|
-
self.pages_setup = attributes[:'PagesSetup']
|
116
|
-
end
|
117
|
-
|
118
|
-
if attributes.key?(:'SearchAllPages')
|
119
|
-
self.search_all_pages = attributes[:'SearchAllPages']
|
120
|
-
end
|
121
|
-
|
122
|
-
if attributes.key?(:'OptionsType')
|
123
|
-
self.options_type = attributes[:'OptionsType']
|
124
|
-
end
|
125
|
-
|
126
|
-
if attributes.key?(:'QRCodeTypeName')
|
127
|
-
self.qr_code_type_name = attributes[:'QRCodeTypeName']
|
128
|
-
end
|
129
|
-
|
130
|
-
if attributes.key?(:'Text')
|
131
|
-
self.text = attributes[:'Text']
|
132
|
-
end
|
133
|
-
|
134
|
-
if attributes.key?(:'MatchType')
|
135
|
-
self.match_type = attributes[:'MatchType']
|
136
|
-
end
|
137
|
-
|
138
|
-
|
139
|
-
if !((defined? options_type) == nil)
|
140
|
-
self.options_type = "ImagesSearchQRCodeOptionsData"
|
141
|
-
end
|
142
|
-
|
143
|
-
end
|
144
|
-
|
145
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
146
|
-
# @return Array for valid properies with the reasons
|
147
|
-
def list_invalid_properties
|
148
|
-
invalid_properties = []
|
149
|
-
if @search_all_pages.nil?
|
150
|
-
invalid_properties.push("invalid value for 'search_all_pages', search_all_pages cannot be nil.")
|
151
|
-
end
|
152
|
-
|
153
|
-
return invalid_properties
|
154
|
-
end
|
155
|
-
|
156
|
-
# Check to see if the all the properties in the model are valid
|
157
|
-
# @return true if the model is valid
|
158
|
-
def valid?
|
159
|
-
return false if @search_all_pages.nil?
|
160
|
-
match_type_validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
|
161
|
-
return false unless match_type_validator.valid?(@match_type)
|
162
|
-
return true
|
163
|
-
end
|
164
|
-
|
165
|
-
# Custom attribute writer method checking allowed values (enum).
|
166
|
-
# @param [Object] match_type Object to be assigned
|
167
|
-
def match_type=(match_type)
|
168
|
-
validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
|
169
|
-
if match_type.to_i == 0
|
170
|
-
unless validator.valid?(match_type)
|
171
|
-
raise ArgumentError, "invalid value for 'match_type', must be one of #{validator.allowable_values}."
|
172
|
-
end
|
173
|
-
@match_type = match_type
|
174
|
-
else
|
175
|
-
@match_type = validator.allowable_values[match_type.to_i]
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
# Checks equality by comparing each attribute.
|
180
|
-
# @param [Object] Object to be compared
|
181
|
-
def ==(other)
|
182
|
-
return true if self.equal?(other)
|
183
|
-
self.class == other.class &&
|
184
|
-
document_page_number == other.document_page_number &&
|
185
|
-
pages_setup == other.pages_setup &&
|
186
|
-
search_all_pages == other.search_all_pages &&
|
187
|
-
options_type == other.options_type &&
|
188
|
-
qr_code_type_name == other.qr_code_type_name &&
|
189
|
-
text == other.text &&
|
190
|
-
match_type == other.match_type
|
191
|
-
end
|
192
|
-
|
193
|
-
# @see the `==` method
|
194
|
-
# @param [Object] Object to be compared
|
195
|
-
def eql?(other)
|
196
|
-
self == other
|
197
|
-
end
|
198
|
-
|
199
|
-
# Calculates hash code according to all attributes.
|
200
|
-
# @return [Fixnum] Hash code
|
201
|
-
def hash
|
202
|
-
[document_page_number, pages_setup, search_all_pages, options_type, qr_code_type_name, text, match_type].hash
|
203
|
-
end
|
204
|
-
|
205
|
-
# Builds the object from hash
|
206
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
207
|
-
# @return [Object] Returns the model itself
|
208
|
-
def build_from_hash(attributes)
|
209
|
-
return nil unless attributes.is_a?(Hash)
|
210
|
-
self.class.swagger_types.each_pair do |key, type|
|
211
|
-
|
212
|
-
attributeName = self.class.attribute_map[key]
|
213
|
-
attributeNameLowerStr = attributeName.to_s
|
214
|
-
attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
|
215
|
-
attributeNameLower = attributeNameLowerStr.to_sym
|
216
|
-
attributeNameLowerStr2 = attributeName.to_s
|
217
|
-
attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
|
218
|
-
attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
|
219
|
-
attributeNameLower2 = attributeNameLowerStr2.to_sym
|
220
|
-
|
221
|
-
if type =~ /\AArray<(.*)>/i
|
222
|
-
# check to ensure the input is an array given that the the attribute
|
223
|
-
# is documented as an array but the input is not
|
224
|
-
if attributes[attributeName].is_a?(Array)
|
225
|
-
self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
|
226
|
-
end
|
227
|
-
if attributes[attributeNameLower].is_a?(Array)
|
228
|
-
self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
|
229
|
-
end
|
230
|
-
if attributes[attributeNameLower2].is_a?(Array)
|
231
|
-
self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
|
232
|
-
end
|
233
|
-
elsif !attributes[attributeName].nil?
|
234
|
-
self.send("#{key}=", _deserialize(type, attributes[attributeName]))
|
235
|
-
elsif !attributes[attributeNameLower].nil?
|
236
|
-
self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
|
237
|
-
elsif !attributes[attributeNameLower2].nil?
|
238
|
-
self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
|
239
|
-
end
|
240
|
-
# or else data not found in attributes(hash), not an issue as the data can be optional
|
241
|
-
end
|
242
|
-
self
|
243
|
-
end
|
244
|
-
|
245
|
-
# Deserializes the data based on type
|
246
|
-
# @param string type Data type
|
247
|
-
# @param string value Value to be deserialized
|
248
|
-
# @return [Object] Deserialized data
|
249
|
-
def _deserialize(type, value)
|
250
|
-
case type.to_sym
|
251
|
-
when :DateTime
|
252
|
-
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
253
|
-
when :Date
|
254
|
-
Time.at(/\d/.match(value)[0].to_f).to_date
|
255
|
-
when :String
|
256
|
-
value.to_s
|
257
|
-
when :Integer
|
258
|
-
value.to_i
|
259
|
-
when :Float
|
260
|
-
value.to_f
|
261
|
-
when :BOOLEAN
|
262
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
263
|
-
true
|
264
|
-
else
|
265
|
-
false
|
266
|
-
end
|
267
|
-
when :Object
|
268
|
-
# generic object (usually a Hash), return directly
|
269
|
-
value
|
270
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
271
|
-
inner_type = Regexp.last_match[:inner_type]
|
272
|
-
value.map { |v| _deserialize(inner_type, v) }
|
273
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
274
|
-
k_type = Regexp.last_match[:k_type]
|
275
|
-
v_type = Regexp.last_match[:v_type]
|
276
|
-
{}.tap do |hash|
|
277
|
-
value.each do |k, v|
|
278
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
279
|
-
end
|
280
|
-
end
|
281
|
-
else
|
282
|
-
# model
|
283
|
-
temp_model = GroupDocsSignatureCloud.const_get(type).new
|
284
|
-
temp_model.build_from_hash(value)
|
285
|
-
end
|
286
|
-
end
|
287
|
-
|
288
|
-
# Returns the string representation of the object
|
289
|
-
# @return [String] String presentation of the object
|
290
|
-
def to_s
|
291
|
-
to_hash.to_s
|
292
|
-
end
|
293
|
-
|
294
|
-
# to_body is an alias to to_hash (backward compatibility)
|
295
|
-
# @return [Hash] Returns the object in the form of hash
|
296
|
-
def to_body
|
297
|
-
to_hash
|
298
|
-
end
|
299
|
-
|
300
|
-
# Returns the object in the form of hash
|
301
|
-
# @return [Hash] Returns the object in the form of hash
|
302
|
-
def to_hash
|
303
|
-
hash = {}
|
304
|
-
self.class.attribute_map.each_pair do |attr, param|
|
305
|
-
value = self.send(attr)
|
306
|
-
next if value.nil?
|
307
|
-
hash[param] = _to_hash(value)
|
308
|
-
end
|
309
|
-
hash
|
310
|
-
end
|
311
|
-
|
312
|
-
# Outputs non-array value in the form of hash
|
313
|
-
# For object, use to_hash. Otherwise, just return the value
|
314
|
-
# @param [Object] value Any valid value
|
315
|
-
# @return [Hash] Returns the value in the form of hash
|
316
|
-
def _to_hash(value)
|
317
|
-
if value.is_a?(Array)
|
318
|
-
value.compact.map { |v| _to_hash(v) }
|
319
|
-
elsif value.is_a?(Hash)
|
320
|
-
{}.tap do |hash|
|
321
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
322
|
-
end
|
323
|
-
elsif value.respond_to? :to_hash
|
324
|
-
value.to_hash
|
325
|
-
else
|
326
|
-
value
|
327
|
-
end
|
328
|
-
end
|
329
|
-
|
330
|
-
end
|
331
|
-
|
332
|
-
end
|