groupdocs_signature_cloud 18.8.1 → 19.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +5 -5
  2. data/lib/groupdocs_signature_cloud.rb +99 -191
  3. data/lib/groupdocs_signature_cloud/api/file_api.rb +734 -0
  4. data/lib/groupdocs_signature_cloud/api/folder_api.rb +699 -0
  5. data/lib/groupdocs_signature_cloud/api/info_api.rb +364 -0
  6. data/lib/groupdocs_signature_cloud/api/sign_api.rb +411 -0
  7. data/lib/groupdocs_signature_cloud/api/storage_api.rb +544 -0
  8. data/lib/groupdocs_signature_cloud/api_client.rb +382 -380
  9. data/lib/groupdocs_signature_cloud/api_error.rb +58 -58
  10. data/lib/groupdocs_signature_cloud/configuration.rb +95 -110
  11. data/lib/groupdocs_signature_cloud/models/{digital_signature_data.rb → barcode_signature.rb} +312 -307
  12. data/lib/groupdocs_signature_cloud/models/barcode_type.rb +219 -230
  13. data/lib/groupdocs_signature_cloud/models/{barcode_collection.rb → barcodes_result.rb} +221 -232
  14. data/lib/groupdocs_signature_cloud/models/base_settings.rb +219 -0
  15. data/lib/groupdocs_signature_cloud/models/{border_line_data.rb → border_line.rb} +301 -312
  16. data/lib/groupdocs_signature_cloud/models/{brush_data.rb → brush.rb} +219 -230
  17. data/lib/groupdocs_signature_cloud/models/color.rb +219 -245
  18. data/lib/groupdocs_signature_cloud/models/{pdf_digital_signature_data.rb → digital_signature.rb} +363 -307
  19. data/lib/groupdocs_signature_cloud/models/disc_usage.rb +239 -0
  20. data/lib/groupdocs_signature_cloud/models/error.rb +249 -0
  21. data/lib/groupdocs_signature_cloud/models/error_details.rb +234 -0
  22. data/lib/groupdocs_signature_cloud/models/file_info.rb +249 -0
  23. data/lib/groupdocs_signature_cloud/models/{document_info.rb → file_version.rb} +294 -300
  24. data/lib/groupdocs_signature_cloud/models/file_versions.rb +221 -0
  25. data/lib/groupdocs_signature_cloud/models/files_list.rb +221 -0
  26. data/lib/groupdocs_signature_cloud/models/{base_signature_data.rb → files_upload_result.rb} +233 -230
  27. data/lib/groupdocs_signature_cloud/models/format.rb +229 -240
  28. data/lib/groupdocs_signature_cloud/models/{format_collection.rb → formats_result.rb} +221 -232
  29. data/lib/groupdocs_signature_cloud/models/{search_document_response.rb → info_result.rb} +339 -303
  30. data/lib/groupdocs_signature_cloud/models/info_settings.rb +219 -0
  31. data/lib/groupdocs_signature_cloud/models/{linear_gradient_brush_data.rb → linear_gradient_brush.rb} +254 -260
  32. data/lib/groupdocs_signature_cloud/models/object_exist.rb +239 -0
  33. data/lib/groupdocs_signature_cloud/models/options_base.rb +327 -0
  34. data/lib/groupdocs_signature_cloud/models/{padding_data.rb → padding.rb} +284 -295
  35. data/lib/groupdocs_signature_cloud/models/page_info.rb +294 -305
  36. data/lib/groupdocs_signature_cloud/models/{pages_setup_data.rb → pages_setup.rb} +281 -292
  37. data/lib/groupdocs_signature_cloud/models/{words_digital_signature_data.rb → qr_code_signature.rb} +312 -307
  38. data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +219 -230
  39. data/lib/groupdocs_signature_cloud/models/{qr_code_collection.rb → qr_codes_result.rb} +221 -232
  40. data/lib/groupdocs_signature_cloud/models/{radial_gradient_brush_data.rb → radial_gradient_brush.rb} +239 -250
  41. data/lib/groupdocs_signature_cloud/models/save_options.rb +244 -0
  42. data/lib/groupdocs_signature_cloud/models/{search_barcode_options_data.rb → search_barcode_options.rb} +378 -332
  43. data/lib/groupdocs_signature_cloud/models/search_digital_options.rb +327 -0
  44. data/lib/groupdocs_signature_cloud/models/search_options.rb +327 -0
  45. data/lib/groupdocs_signature_cloud/models/{pdf_search_barcode_options_data.rb → search_qr_code_options.rb} +378 -332
  46. data/lib/groupdocs_signature_cloud/models/{sign_options_collection_data.rb → search_result.rb} +246 -232
  47. data/lib/groupdocs_signature_cloud/models/search_settings.rb +231 -0
  48. data/lib/groupdocs_signature_cloud/models/{images_sign_text_options_data.rb → sign_barcode_options.rb} +857 -706
  49. data/lib/groupdocs_signature_cloud/models/{sign_digital_options_data.rb → sign_digital_options.rb} +612 -516
  50. data/lib/groupdocs_signature_cloud/models/{sign_stamp_options_data.rb → sign_image_options.rb} +592 -592
  51. data/lib/groupdocs_signature_cloud/models/sign_options.rb +327 -0
  52. data/lib/groupdocs_signature_cloud/models/{words_sign_text_options_data.rb → sign_qr_code_options.rb} +872 -696
  53. data/lib/groupdocs_signature_cloud/models/sign_result.rb +244 -0
  54. data/lib/groupdocs_signature_cloud/models/sign_settings.rb +241 -0
  55. data/lib/groupdocs_signature_cloud/models/{slides_sign_stamp_options_data.rb → sign_stamp_options.rb} +698 -592
  56. data/lib/groupdocs_signature_cloud/models/{cells_sign_text_options_data.rb → sign_text_options.rb} +781 -736
  57. data/lib/groupdocs_signature_cloud/models/{signature_document_response.rb → signature.rb} +292 -290
  58. data/lib/groupdocs_signature_cloud/models/{signature_font_data.rb → signature_font.rb} +279 -290
  59. data/lib/groupdocs_signature_cloud/models/{solid_brush_data.rb → solid_brush.rb} +229 -240
  60. data/lib/groupdocs_signature_cloud/models/{stamp_line_data.rb → stamp_line.rb} +366 -377
  61. data/lib/groupdocs_signature_cloud/models/storage_exist.rb +224 -0
  62. data/lib/groupdocs_signature_cloud/models/{pdf_qr_code_signature_data.rb → storage_file.rb} +269 -250
  63. data/lib/groupdocs_signature_cloud/models/{texture_brush_data.rb → texture_brush.rb} +229 -240
  64. data/lib/groupdocs_signature_cloud/models/{verify_barcode_options_data.rb → verify_barcode_options.rb} +378 -342
  65. data/lib/groupdocs_signature_cloud/models/{cells_verify_digital_options_data.rb → verify_digital_options.rb} +407 -315
  66. data/lib/groupdocs_signature_cloud/models/{cells_digital_signature_data.rb → verify_options.rb} +327 -307
  67. data/lib/groupdocs_signature_cloud/models/{verify_qr_code_options_data.rb → verify_qr_code_options.rb} +378 -342
  68. data/lib/groupdocs_signature_cloud/models/verify_result.rb +249 -0
  69. data/lib/groupdocs_signature_cloud/models/verify_settings.rb +231 -0
  70. data/lib/groupdocs_signature_cloud/models/{cells_verify_barcode_options_data.rb → verify_text_options.rb} +368 -342
  71. data/lib/groupdocs_signature_cloud/version.rb +2 -2
  72. metadata +63 -171
  73. data/lib/groupdocs_signature_cloud/api/signature_api.rb +0 -2590
  74. data/lib/groupdocs_signature_cloud/models/barcode_signature_data.rb +0 -250
  75. data/lib/groupdocs_signature_cloud/models/cells_barcode_signature_data.rb +0 -250
  76. data/lib/groupdocs_signature_cloud/models/cells_qr_code_signature_data.rb +0 -250
  77. data/lib/groupdocs_signature_cloud/models/cells_search_barcode_options_data.rb +0 -332
  78. data/lib/groupdocs_signature_cloud/models/cells_search_digital_options_data.rb +0 -265
  79. data/lib/groupdocs_signature_cloud/models/cells_search_qr_code_options_data.rb +0 -332
  80. data/lib/groupdocs_signature_cloud/models/cells_sign_barcode_options_data.rb +0 -694
  81. data/lib/groupdocs_signature_cloud/models/cells_sign_digital_options_data.rb +0 -546
  82. data/lib/groupdocs_signature_cloud/models/cells_sign_image_options_data.rb +0 -526
  83. data/lib/groupdocs_signature_cloud/models/cells_sign_qr_code_options_data.rb +0 -704
  84. data/lib/groupdocs_signature_cloud/models/cells_sign_stamp_options_data.rb +0 -622
  85. data/lib/groupdocs_signature_cloud/models/cells_verify_qr_code_options_data.rb +0 -342
  86. data/lib/groupdocs_signature_cloud/models/cells_verify_text_options_data.rb +0 -285
  87. data/lib/groupdocs_signature_cloud/models/document_response.rb +0 -302
  88. data/lib/groupdocs_signature_cloud/models/images_barcode_signature_data.rb +0 -250
  89. data/lib/groupdocs_signature_cloud/models/images_qr_code_signature_data.rb +0 -250
  90. data/lib/groupdocs_signature_cloud/models/images_search_barcode_options_data.rb +0 -332
  91. data/lib/groupdocs_signature_cloud/models/images_search_qr_code_options_data.rb +0 -332
  92. data/lib/groupdocs_signature_cloud/models/images_sign_barcode_options_data.rb +0 -664
  93. data/lib/groupdocs_signature_cloud/models/images_sign_image_options_data.rb +0 -496
  94. data/lib/groupdocs_signature_cloud/models/images_sign_qr_code_options_data.rb +0 -674
  95. data/lib/groupdocs_signature_cloud/models/images_sign_stamp_options_data.rb +0 -592
  96. data/lib/groupdocs_signature_cloud/models/images_verify_barcode_options_data.rb +0 -342
  97. data/lib/groupdocs_signature_cloud/models/images_verify_qr_code_options_data.rb +0 -342
  98. data/lib/groupdocs_signature_cloud/models/pages_info.rb +0 -247
  99. data/lib/groupdocs_signature_cloud/models/pdf_barcode_signature_data.rb +0 -250
  100. data/lib/groupdocs_signature_cloud/models/pdf_search_digital_options_data.rb +0 -265
  101. data/lib/groupdocs_signature_cloud/models/pdf_search_qr_code_options_data.rb +0 -332
  102. data/lib/groupdocs_signature_cloud/models/pdf_sign_barcode_options_data.rb +0 -664
  103. data/lib/groupdocs_signature_cloud/models/pdf_sign_digital_options_data.rb +0 -556
  104. data/lib/groupdocs_signature_cloud/models/pdf_sign_image_options_data.rb +0 -496
  105. data/lib/groupdocs_signature_cloud/models/pdf_sign_qr_code_options_data.rb +0 -674
  106. data/lib/groupdocs_signature_cloud/models/pdf_sign_stamp_options_data.rb +0 -592
  107. data/lib/groupdocs_signature_cloud/models/pdf_sign_text_options_data.rb +0 -696
  108. data/lib/groupdocs_signature_cloud/models/pdf_verify_barcode_options_data.rb +0 -342
  109. data/lib/groupdocs_signature_cloud/models/pdf_verify_digital_options_data.rb +0 -315
  110. data/lib/groupdocs_signature_cloud/models/pdf_verify_qr_code_options_data.rb +0 -342
  111. data/lib/groupdocs_signature_cloud/models/pdf_verify_text_options_data.rb +0 -342
  112. data/lib/groupdocs_signature_cloud/models/qr_code_signature_data.rb +0 -250
  113. data/lib/groupdocs_signature_cloud/models/requests/get_document_info_from_url_request.rb +0 -55
  114. data/lib/groupdocs_signature_cloud/models/requests/get_document_info_request.rb +0 -59
  115. data/lib/groupdocs_signature_cloud/models/requests/post_barcode_from_url_request.rb +0 -59
  116. data/lib/groupdocs_signature_cloud/models/requests/post_barcode_request.rb +0 -63
  117. data/lib/groupdocs_signature_cloud/models/requests/post_collection_from_url_request.rb +0 -59
  118. data/lib/groupdocs_signature_cloud/models/requests/post_collection_request.rb +0 -63
  119. data/lib/groupdocs_signature_cloud/models/requests/post_digital_from_url_request.rb +0 -67
  120. data/lib/groupdocs_signature_cloud/models/requests/post_digital_request.rb +0 -71
  121. data/lib/groupdocs_signature_cloud/models/requests/post_image_from_url_request.rb +0 -63
  122. data/lib/groupdocs_signature_cloud/models/requests/post_image_request.rb +0 -67
  123. data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_from_url_request.rb +0 -59
  124. data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_request.rb +0 -63
  125. data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_from_url_request.rb +0 -59
  126. data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_request.rb +0 -63
  127. data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_from_url_request.rb +0 -59
  128. data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_request.rb +0 -63
  129. data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_from_url_request.rb +0 -59
  130. data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_request.rb +0 -63
  131. data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_from_url_request.rb +0 -59
  132. data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_request.rb +0 -63
  133. data/lib/groupdocs_signature_cloud/models/requests/post_stamp_from_url_request.rb +0 -59
  134. data/lib/groupdocs_signature_cloud/models/requests/post_stamp_request.rb +0 -63
  135. data/lib/groupdocs_signature_cloud/models/requests/post_text_from_url_request.rb +0 -59
  136. data/lib/groupdocs_signature_cloud/models/requests/post_text_request.rb +0 -63
  137. data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_from_url_request.rb +0 -59
  138. data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_request.rb +0 -63
  139. data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_from_url_request.rb +0 -59
  140. data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_request.rb +0 -63
  141. data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_from_url_request.rb +0 -63
  142. data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_request.rb +0 -67
  143. data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_from_url_request.rb +0 -59
  144. data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_request.rb +0 -63
  145. data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_from_url_request.rb +0 -57
  146. data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_request.rb +0 -63
  147. data/lib/groupdocs_signature_cloud/models/search_digital_options_data.rb +0 -265
  148. data/lib/groupdocs_signature_cloud/models/search_options_collection_data.rb +0 -232
  149. data/lib/groupdocs_signature_cloud/models/search_options_data.rb +0 -265
  150. data/lib/groupdocs_signature_cloud/models/search_qr_code_options_data.rb +0 -332
  151. data/lib/groupdocs_signature_cloud/models/sign_barcode_options_data.rb +0 -664
  152. data/lib/groupdocs_signature_cloud/models/sign_image_options_data.rb +0 -496
  153. data/lib/groupdocs_signature_cloud/models/sign_options_data.rb +0 -255
  154. data/lib/groupdocs_signature_cloud/models/sign_qr_code_options_data.rb +0 -674
  155. data/lib/groupdocs_signature_cloud/models/sign_text_options_data.rb +0 -562
  156. data/lib/groupdocs_signature_cloud/models/slides_barcode_signature_data.rb +0 -250
  157. data/lib/groupdocs_signature_cloud/models/slides_qr_code_signature_data.rb +0 -250
  158. data/lib/groupdocs_signature_cloud/models/slides_search_barcode_options_data.rb +0 -332
  159. data/lib/groupdocs_signature_cloud/models/slides_search_qr_code_options_data.rb +0 -332
  160. data/lib/groupdocs_signature_cloud/models/slides_sign_barcode_options_data.rb +0 -664
  161. data/lib/groupdocs_signature_cloud/models/slides_sign_image_options_data.rb +0 -496
  162. data/lib/groupdocs_signature_cloud/models/slides_sign_qr_code_options_data.rb +0 -674
  163. data/lib/groupdocs_signature_cloud/models/slides_sign_text_options_data.rb +0 -670
  164. data/lib/groupdocs_signature_cloud/models/slides_verify_barcode_options_data.rb +0 -342
  165. data/lib/groupdocs_signature_cloud/models/slides_verify_qr_code_options_data.rb +0 -342
  166. data/lib/groupdocs_signature_cloud/models/slides_verify_text_options_data.rb +0 -285
  167. data/lib/groupdocs_signature_cloud/models/verified_document_response.rb +0 -300
  168. data/lib/groupdocs_signature_cloud/models/verify_digital_options_data.rb +0 -285
  169. data/lib/groupdocs_signature_cloud/models/verify_options_collection_data.rb +0 -247
  170. data/lib/groupdocs_signature_cloud/models/verify_options_data.rb +0 -265
  171. data/lib/groupdocs_signature_cloud/models/verify_text_options_data.rb +0 -285
  172. data/lib/groupdocs_signature_cloud/models/words_barcode_signature_data.rb +0 -250
  173. data/lib/groupdocs_signature_cloud/models/words_qr_code_signature_data.rb +0 -250
  174. data/lib/groupdocs_signature_cloud/models/words_search_barcode_options_data.rb +0 -332
  175. data/lib/groupdocs_signature_cloud/models/words_search_digital_options_data.rb +0 -265
  176. data/lib/groupdocs_signature_cloud/models/words_search_qr_code_options_data.rb +0 -332
  177. data/lib/groupdocs_signature_cloud/models/words_sign_barcode_options_data.rb +0 -664
  178. data/lib/groupdocs_signature_cloud/models/words_sign_digital_options_data.rb +0 -516
  179. data/lib/groupdocs_signature_cloud/models/words_sign_image_options_data.rb +0 -496
  180. data/lib/groupdocs_signature_cloud/models/words_sign_qr_code_options_data.rb +0 -674
  181. data/lib/groupdocs_signature_cloud/models/words_sign_stamp_options_data.rb +0 -592
  182. data/lib/groupdocs_signature_cloud/models/words_verify_barcode_options_data.rb +0 -342
  183. data/lib/groupdocs_signature_cloud/models/words_verify_digital_options_data.rb +0 -315
  184. data/lib/groupdocs_signature_cloud/models/words_verify_qr_code_options_data.rb +0 -342
  185. 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="words_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 Words Documents.
32
- class WordsSearchQRCodeOptionsData
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 = "WordsSearchQRCodeOptionsData"
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
@@ -1,664 +0,0 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="words_sign_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 Signature Options for Cells Documents.
32
- class WordsSignBarcodeOptionsData
33
-
34
- # Gets or sets a document page number to put signature Value starts from 1
35
- attr_accessor :document_page_number
36
-
37
- # Page Options to specify pages to be verified.
38
- attr_accessor :pages_setup
39
-
40
- # Internal property that specify the name of Options.
41
- attr_accessor :options_type
42
-
43
- # Left X position of Signature on Document Page in Measure values (pixels or percent see LocationMeasureType property)
44
- attr_accessor :left
45
-
46
- # Top Y Position of Signature on Document Page in Measure values (pixels or percent see LocationMeasureType property)
47
- attr_accessor :top
48
-
49
- # Width of Signature area on Document Page in Measure values (pixels or percent see SizeMeasureType property)
50
- attr_accessor :width
51
-
52
- # Height of Signature are on Document Page in Measure values (pixels or percent see SizeMeasureType property)
53
- attr_accessor :height
54
-
55
- # Measure type (pixels or percent) for Left and Top properties.
56
- attr_accessor :location_measure_type
57
-
58
- # Measure type (pixels or percent) for Width and Height properties.
59
- attr_accessor :size_measure_type
60
-
61
- # Stretch mode on Document Page
62
- attr_accessor :stretch
63
-
64
- # Rotation angle of signature on document page (clockwise).
65
- attr_accessor :rotation_angle
66
-
67
- # Horizontal alignment of signature on document page.
68
- attr_accessor :horizontal_alignment
69
-
70
- # Vertical alignment of signature on document page.
71
- attr_accessor :vertical_alignment
72
-
73
- # Gets or sets the space between Sign and Document edges. (works ONLY if horizontal or vertical alignment are specified).
74
- attr_accessor :margin
75
-
76
- # Gets or sets the measure type (pixels or percent) for Margin.
77
- attr_accessor :margin_measure_type
78
-
79
- # Text of signature
80
- attr_accessor :text
81
-
82
- # Put signature on all document pages.
83
- attr_accessor :sign_all_pages
84
-
85
- # Gets or sets the font of signature.
86
- attr_accessor :font
87
-
88
- # Gets or sets the Fore color of Barcode bars Using of this property could cause problems with verification. Use it carefully with maximum contrast with background.
89
- attr_accessor :fore_color
90
-
91
- # Gets or sets the border color of signature. Using of this property could cause problems with verification. Use it carefully with maximum contrast with background.
92
- attr_accessor :border_color
93
-
94
- # Gets or sets the background color of signature. Using of this property could cause problems with verification. Use it carefully with maximum contrast with background.
95
- attr_accessor :background_color
96
-
97
- # Gets or sets the signature background brush. Value by default is null. When property has a value it is used instead BackgroundBrush property. BackgroundBrush has limited scope of application for Bar-codes. SolidBrush, LinearGradientBrush (ColorStart) and RadialGradientBrush (ColorInner) are used instead BackgroundColor. TextureBrush is not used.
98
- attr_accessor :background_brush
99
-
100
- # Get or set Barcode type. Pick one from supported Barcode Types list.
101
- attr_accessor :barcode_type_name
102
-
103
- # Gets or sets the signature border visibility.
104
- attr_accessor :border_visiblity
105
-
106
- # Gets or sets the signature border style.
107
- attr_accessor :border_dash_style
108
-
109
- # Gets or sets the weight of the signature border.
110
- attr_accessor :border_weight
111
-
112
- # Gets or sets the signature opacity (value from 0.0 (clear) through 1.0 (opaque)). By default the value is 1.0.
113
- attr_accessor :opacity
114
-
115
- # Gets or sets the alignment of text in the result Barcode. Default value is None.
116
- attr_accessor :code_text_alignment
117
-
118
- # Gets or sets the space between Barcode elements and result image borders.
119
- attr_accessor :inner_margins
120
- class EnumAttributeValidator
121
- attr_reader :datatype
122
- attr_reader :allowable_values
123
-
124
- def initialize(datatype, allowable_values)
125
- @allowable_values = allowable_values.map do |value|
126
- case datatype.to_s
127
- when /Integer/i
128
- value.to_i
129
- when /Float/i
130
- value.to_f
131
- else
132
- value
133
- end
134
- end
135
- end
136
-
137
- def valid?(value)
138
- !value || allowable_values.include?(value)
139
- end
140
- end
141
-
142
- # Attribute mapping from ruby-style variable name to JSON key.
143
- def self.attribute_map
144
- {
145
- :'document_page_number' => :'DocumentPageNumber',
146
- :'pages_setup' => :'PagesSetup',
147
- :'options_type' => :'OptionsType',
148
- :'left' => :'Left',
149
- :'top' => :'Top',
150
- :'width' => :'Width',
151
- :'height' => :'Height',
152
- :'location_measure_type' => :'LocationMeasureType',
153
- :'size_measure_type' => :'SizeMeasureType',
154
- :'stretch' => :'Stretch',
155
- :'rotation_angle' => :'RotationAngle',
156
- :'horizontal_alignment' => :'HorizontalAlignment',
157
- :'vertical_alignment' => :'VerticalAlignment',
158
- :'margin' => :'Margin',
159
- :'margin_measure_type' => :'MarginMeasureType',
160
- :'text' => :'Text',
161
- :'sign_all_pages' => :'SignAllPages',
162
- :'font' => :'Font',
163
- :'fore_color' => :'ForeColor',
164
- :'border_color' => :'BorderColor',
165
- :'background_color' => :'BackgroundColor',
166
- :'background_brush' => :'BackgroundBrush',
167
- :'barcode_type_name' => :'BarcodeTypeName',
168
- :'border_visiblity' => :'BorderVisiblity',
169
- :'border_dash_style' => :'BorderDashStyle',
170
- :'border_weight' => :'BorderWeight',
171
- :'opacity' => :'Opacity',
172
- :'code_text_alignment' => :'CodeTextAlignment',
173
- :'inner_margins' => :'InnerMargins'
174
- }
175
- end
176
-
177
- # Attribute type mapping.
178
- def self.swagger_types
179
- {
180
- :'document_page_number' => :'Integer',
181
- :'pages_setup' => :'PagesSetupData',
182
- :'options_type' => :'String',
183
- :'left' => :'Integer',
184
- :'top' => :'Integer',
185
- :'width' => :'Integer',
186
- :'height' => :'Integer',
187
- :'location_measure_type' => :'String',
188
- :'size_measure_type' => :'String',
189
- :'stretch' => :'String',
190
- :'rotation_angle' => :'Integer',
191
- :'horizontal_alignment' => :'String',
192
- :'vertical_alignment' => :'String',
193
- :'margin' => :'PaddingData',
194
- :'margin_measure_type' => :'String',
195
- :'text' => :'String',
196
- :'sign_all_pages' => :'BOOLEAN',
197
- :'font' => :'SignatureFontData',
198
- :'fore_color' => :'Color',
199
- :'border_color' => :'Color',
200
- :'background_color' => :'Color',
201
- :'background_brush' => :'BrushData',
202
- :'barcode_type_name' => :'String',
203
- :'border_visiblity' => :'BOOLEAN',
204
- :'border_dash_style' => :'String',
205
- :'border_weight' => :'Float',
206
- :'opacity' => :'Float',
207
- :'code_text_alignment' => :'String',
208
- :'inner_margins' => :'PaddingData'
209
- }
210
- end
211
-
212
- # Initializes the object
213
- # @param [Hash] attributes Model attributes in the form of hash
214
- def initialize(attributes = {})
215
- return unless attributes.is_a?(Hash)
216
-
217
- # convert string to symbol for hash key
218
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
219
-
220
- if attributes.key?(:'DocumentPageNumber')
221
- self.document_page_number = attributes[:'DocumentPageNumber']
222
- end
223
-
224
- if attributes.key?(:'PagesSetup')
225
- self.pages_setup = attributes[:'PagesSetup']
226
- end
227
-
228
- if attributes.key?(:'OptionsType')
229
- self.options_type = attributes[:'OptionsType']
230
- end
231
-
232
- if attributes.key?(:'Left')
233
- self.left = attributes[:'Left']
234
- end
235
-
236
- if attributes.key?(:'Top')
237
- self.top = attributes[:'Top']
238
- end
239
-
240
- if attributes.key?(:'Width')
241
- self.width = attributes[:'Width']
242
- end
243
-
244
- if attributes.key?(:'Height')
245
- self.height = attributes[:'Height']
246
- end
247
-
248
- if attributes.key?(:'LocationMeasureType')
249
- self.location_measure_type = attributes[:'LocationMeasureType']
250
- end
251
-
252
- if attributes.key?(:'SizeMeasureType')
253
- self.size_measure_type = attributes[:'SizeMeasureType']
254
- end
255
-
256
- if attributes.key?(:'Stretch')
257
- self.stretch = attributes[:'Stretch']
258
- end
259
-
260
- if attributes.key?(:'RotationAngle')
261
- self.rotation_angle = attributes[:'RotationAngle']
262
- end
263
-
264
- if attributes.key?(:'HorizontalAlignment')
265
- self.horizontal_alignment = attributes[:'HorizontalAlignment']
266
- end
267
-
268
- if attributes.key?(:'VerticalAlignment')
269
- self.vertical_alignment = attributes[:'VerticalAlignment']
270
- end
271
-
272
- if attributes.key?(:'Margin')
273
- self.margin = attributes[:'Margin']
274
- end
275
-
276
- if attributes.key?(:'MarginMeasureType')
277
- self.margin_measure_type = attributes[:'MarginMeasureType']
278
- end
279
-
280
- if attributes.key?(:'Text')
281
- self.text = attributes[:'Text']
282
- end
283
-
284
- if attributes.key?(:'SignAllPages')
285
- self.sign_all_pages = attributes[:'SignAllPages']
286
- end
287
-
288
- if attributes.key?(:'Font')
289
- self.font = attributes[:'Font']
290
- end
291
-
292
- if attributes.key?(:'ForeColor')
293
- self.fore_color = attributes[:'ForeColor']
294
- end
295
-
296
- if attributes.key?(:'BorderColor')
297
- self.border_color = attributes[:'BorderColor']
298
- end
299
-
300
- if attributes.key?(:'BackgroundColor')
301
- self.background_color = attributes[:'BackgroundColor']
302
- end
303
-
304
- if attributes.key?(:'BackgroundBrush')
305
- self.background_brush = attributes[:'BackgroundBrush']
306
- end
307
-
308
- if attributes.key?(:'BarcodeTypeName')
309
- self.barcode_type_name = attributes[:'BarcodeTypeName']
310
- end
311
-
312
- if attributes.key?(:'BorderVisiblity')
313
- self.border_visiblity = attributes[:'BorderVisiblity']
314
- end
315
-
316
- if attributes.key?(:'BorderDashStyle')
317
- self.border_dash_style = attributes[:'BorderDashStyle']
318
- end
319
-
320
- if attributes.key?(:'BorderWeight')
321
- self.border_weight = attributes[:'BorderWeight']
322
- end
323
-
324
- if attributes.key?(:'Opacity')
325
- self.opacity = attributes[:'Opacity']
326
- end
327
-
328
- if attributes.key?(:'CodeTextAlignment')
329
- self.code_text_alignment = attributes[:'CodeTextAlignment']
330
- end
331
-
332
- if attributes.key?(:'InnerMargins')
333
- self.inner_margins = attributes[:'InnerMargins']
334
- end
335
-
336
-
337
- if !((defined? options_type) == nil)
338
- self.options_type = "WordsSignBarcodeOptionsData"
339
- end
340
-
341
- end
342
-
343
- # Show invalid properties with the reasons. Usually used together with valid?
344
- # @return Array for valid properies with the reasons
345
- def list_invalid_properties
346
- invalid_properties = []
347
- if @document_page_number.nil?
348
- invalid_properties.push("invalid value for 'document_page_number', document_page_number cannot be nil.")
349
- end
350
-
351
- return invalid_properties
352
- end
353
-
354
- # Check to see if the all the properties in the model are valid
355
- # @return true if the model is valid
356
- def valid?
357
- return false if @document_page_number.nil?
358
- location_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
359
- return false unless location_measure_type_validator.valid?(@location_measure_type)
360
- size_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
361
- return false unless size_measure_type_validator.valid?(@size_measure_type)
362
- stretch_validator = EnumAttributeValidator.new('String', ["None", "PageWidth", "PageHeight", "PageArea"])
363
- return false unless stretch_validator.valid?(@stretch)
364
- horizontal_alignment_validator = EnumAttributeValidator.new('String', ["Default", "None", "Left", "Center", "Right"])
365
- return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
366
- vertical_alignment_validator = EnumAttributeValidator.new('String', ["Default", "None", "Top", "Center", "Bottom"])
367
- return false unless vertical_alignment_validator.valid?(@vertical_alignment)
368
- margin_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
369
- return false unless margin_measure_type_validator.valid?(@margin_measure_type)
370
- border_dash_style_validator = EnumAttributeValidator.new('String', ["Dash", "DashDot", "DashDotDot", "DashLongDash", "DashLongDashDot", "RoundDot", "Solid", "SquareDot"])
371
- return false unless border_dash_style_validator.valid?(@border_dash_style)
372
- code_text_alignment_validator = EnumAttributeValidator.new('String', ["None", "Above", "Below", "Right"])
373
- return false unless code_text_alignment_validator.valid?(@code_text_alignment)
374
- return true
375
- end
376
-
377
- # Custom attribute writer method checking allowed values (enum).
378
- # @param [Object] location_measure_type Object to be assigned
379
- def location_measure_type=(location_measure_type)
380
- validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
381
- if location_measure_type.to_i == 0
382
- unless validator.valid?(location_measure_type)
383
- raise ArgumentError, "invalid value for 'location_measure_type', must be one of #{validator.allowable_values}."
384
- end
385
- @location_measure_type = location_measure_type
386
- else
387
- @location_measure_type = validator.allowable_values[location_measure_type.to_i]
388
- end
389
- end
390
-
391
- # Custom attribute writer method checking allowed values (enum).
392
- # @param [Object] size_measure_type Object to be assigned
393
- def size_measure_type=(size_measure_type)
394
- validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
395
- if size_measure_type.to_i == 0
396
- unless validator.valid?(size_measure_type)
397
- raise ArgumentError, "invalid value for 'size_measure_type', must be one of #{validator.allowable_values}."
398
- end
399
- @size_measure_type = size_measure_type
400
- else
401
- @size_measure_type = validator.allowable_values[size_measure_type.to_i]
402
- end
403
- end
404
-
405
- # Custom attribute writer method checking allowed values (enum).
406
- # @param [Object] stretch Object to be assigned
407
- def stretch=(stretch)
408
- validator = EnumAttributeValidator.new('String', ["None", "PageWidth", "PageHeight", "PageArea"])
409
- if stretch.to_i == 0
410
- unless validator.valid?(stretch)
411
- raise ArgumentError, "invalid value for 'stretch', must be one of #{validator.allowable_values}."
412
- end
413
- @stretch = stretch
414
- else
415
- @stretch = validator.allowable_values[stretch.to_i]
416
- end
417
- end
418
-
419
- # Custom attribute writer method checking allowed values (enum).
420
- # @param [Object] horizontal_alignment Object to be assigned
421
- def horizontal_alignment=(horizontal_alignment)
422
- validator = EnumAttributeValidator.new('String', ["Default", "None", "Left", "Center", "Right"])
423
- if horizontal_alignment.to_i == 0
424
- unless validator.valid?(horizontal_alignment)
425
- raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
426
- end
427
- @horizontal_alignment = horizontal_alignment
428
- else
429
- @horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
430
- end
431
- end
432
-
433
- # Custom attribute writer method checking allowed values (enum).
434
- # @param [Object] vertical_alignment Object to be assigned
435
- def vertical_alignment=(vertical_alignment)
436
- validator = EnumAttributeValidator.new('String', ["Default", "None", "Top", "Center", "Bottom"])
437
- if vertical_alignment.to_i == 0
438
- unless validator.valid?(vertical_alignment)
439
- raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
440
- end
441
- @vertical_alignment = vertical_alignment
442
- else
443
- @vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
444
- end
445
- end
446
-
447
- # Custom attribute writer method checking allowed values (enum).
448
- # @param [Object] margin_measure_type Object to be assigned
449
- def margin_measure_type=(margin_measure_type)
450
- validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
451
- if margin_measure_type.to_i == 0
452
- unless validator.valid?(margin_measure_type)
453
- raise ArgumentError, "invalid value for 'margin_measure_type', must be one of #{validator.allowable_values}."
454
- end
455
- @margin_measure_type = margin_measure_type
456
- else
457
- @margin_measure_type = validator.allowable_values[margin_measure_type.to_i]
458
- end
459
- end
460
-
461
- # Custom attribute writer method checking allowed values (enum).
462
- # @param [Object] border_dash_style Object to be assigned
463
- def border_dash_style=(border_dash_style)
464
- validator = EnumAttributeValidator.new('String', ["Dash", "DashDot", "DashDotDot", "DashLongDash", "DashLongDashDot", "RoundDot", "Solid", "SquareDot"])
465
- if border_dash_style.to_i == 0
466
- unless validator.valid?(border_dash_style)
467
- raise ArgumentError, "invalid value for 'border_dash_style', must be one of #{validator.allowable_values}."
468
- end
469
- @border_dash_style = border_dash_style
470
- else
471
- @border_dash_style = validator.allowable_values[border_dash_style.to_i]
472
- end
473
- end
474
-
475
- # Custom attribute writer method checking allowed values (enum).
476
- # @param [Object] code_text_alignment Object to be assigned
477
- def code_text_alignment=(code_text_alignment)
478
- validator = EnumAttributeValidator.new('String', ["None", "Above", "Below", "Right"])
479
- if code_text_alignment.to_i == 0
480
- unless validator.valid?(code_text_alignment)
481
- raise ArgumentError, "invalid value for 'code_text_alignment', must be one of #{validator.allowable_values}."
482
- end
483
- @code_text_alignment = code_text_alignment
484
- else
485
- @code_text_alignment = validator.allowable_values[code_text_alignment.to_i]
486
- end
487
- end
488
-
489
- # Checks equality by comparing each attribute.
490
- # @param [Object] Object to be compared
491
- def ==(other)
492
- return true if self.equal?(other)
493
- self.class == other.class &&
494
- document_page_number == other.document_page_number &&
495
- pages_setup == other.pages_setup &&
496
- options_type == other.options_type &&
497
- left == other.left &&
498
- top == other.top &&
499
- width == other.width &&
500
- height == other.height &&
501
- location_measure_type == other.location_measure_type &&
502
- size_measure_type == other.size_measure_type &&
503
- stretch == other.stretch &&
504
- rotation_angle == other.rotation_angle &&
505
- horizontal_alignment == other.horizontal_alignment &&
506
- vertical_alignment == other.vertical_alignment &&
507
- margin == other.margin &&
508
- margin_measure_type == other.margin_measure_type &&
509
- text == other.text &&
510
- sign_all_pages == other.sign_all_pages &&
511
- font == other.font &&
512
- fore_color == other.fore_color &&
513
- border_color == other.border_color &&
514
- background_color == other.background_color &&
515
- background_brush == other.background_brush &&
516
- barcode_type_name == other.barcode_type_name &&
517
- border_visiblity == other.border_visiblity &&
518
- border_dash_style == other.border_dash_style &&
519
- border_weight == other.border_weight &&
520
- opacity == other.opacity &&
521
- code_text_alignment == other.code_text_alignment &&
522
- inner_margins == other.inner_margins
523
- end
524
-
525
- # @see the `==` method
526
- # @param [Object] Object to be compared
527
- def eql?(other)
528
- self == other
529
- end
530
-
531
- # Calculates hash code according to all attributes.
532
- # @return [Fixnum] Hash code
533
- def hash
534
- [document_page_number, pages_setup, options_type, left, top, width, height, location_measure_type, size_measure_type, stretch, rotation_angle, horizontal_alignment, vertical_alignment, margin, margin_measure_type, text, sign_all_pages, font, fore_color, border_color, background_color, background_brush, barcode_type_name, border_visiblity, border_dash_style, border_weight, opacity, code_text_alignment, inner_margins].hash
535
- end
536
-
537
- # Builds the object from hash
538
- # @param [Hash] attributes Model attributes in the form of hash
539
- # @return [Object] Returns the model itself
540
- def build_from_hash(attributes)
541
- return nil unless attributes.is_a?(Hash)
542
- self.class.swagger_types.each_pair do |key, type|
543
-
544
- attributeName = self.class.attribute_map[key]
545
- attributeNameLowerStr = attributeName.to_s
546
- attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
547
- attributeNameLower = attributeNameLowerStr.to_sym
548
- attributeNameLowerStr2 = attributeName.to_s
549
- attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
550
- attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
551
- attributeNameLower2 = attributeNameLowerStr2.to_sym
552
-
553
- if type =~ /\AArray<(.*)>/i
554
- # check to ensure the input is an array given that the the attribute
555
- # is documented as an array but the input is not
556
- if attributes[attributeName].is_a?(Array)
557
- self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
558
- end
559
- if attributes[attributeNameLower].is_a?(Array)
560
- self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
561
- end
562
- if attributes[attributeNameLower2].is_a?(Array)
563
- self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
564
- end
565
- elsif !attributes[attributeName].nil?
566
- self.send("#{key}=", _deserialize(type, attributes[attributeName]))
567
- elsif !attributes[attributeNameLower].nil?
568
- self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
569
- elsif !attributes[attributeNameLower2].nil?
570
- self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
571
- end
572
- # or else data not found in attributes(hash), not an issue as the data can be optional
573
- end
574
- self
575
- end
576
-
577
- # Deserializes the data based on type
578
- # @param string type Data type
579
- # @param string value Value to be deserialized
580
- # @return [Object] Deserialized data
581
- def _deserialize(type, value)
582
- case type.to_sym
583
- when :DateTime
584
- Time.at(/\d/.match(value)[0].to_f).to_datetime
585
- when :Date
586
- Time.at(/\d/.match(value)[0].to_f).to_date
587
- when :String
588
- value.to_s
589
- when :Integer
590
- value.to_i
591
- when :Float
592
- value.to_f
593
- when :BOOLEAN
594
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
595
- true
596
- else
597
- false
598
- end
599
- when :Object
600
- # generic object (usually a Hash), return directly
601
- value
602
- when /\AArray<(?<inner_type>.+)>\z/
603
- inner_type = Regexp.last_match[:inner_type]
604
- value.map { |v| _deserialize(inner_type, v) }
605
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
606
- k_type = Regexp.last_match[:k_type]
607
- v_type = Regexp.last_match[:v_type]
608
- {}.tap do |hash|
609
- value.each do |k, v|
610
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
611
- end
612
- end
613
- else
614
- # model
615
- temp_model = GroupDocsSignatureCloud.const_get(type).new
616
- temp_model.build_from_hash(value)
617
- end
618
- end
619
-
620
- # Returns the string representation of the object
621
- # @return [String] String presentation of the object
622
- def to_s
623
- to_hash.to_s
624
- end
625
-
626
- # to_body is an alias to to_hash (backward compatibility)
627
- # @return [Hash] Returns the object in the form of hash
628
- def to_body
629
- to_hash
630
- end
631
-
632
- # Returns the object in the form of hash
633
- # @return [Hash] Returns the object in the form of hash
634
- def to_hash
635
- hash = {}
636
- self.class.attribute_map.each_pair do |attr, param|
637
- value = self.send(attr)
638
- next if value.nil?
639
- hash[param] = _to_hash(value)
640
- end
641
- hash
642
- end
643
-
644
- # Outputs non-array value in the form of hash
645
- # For object, use to_hash. Otherwise, just return the value
646
- # @param [Object] value Any valid value
647
- # @return [Hash] Returns the value in the form of hash
648
- def _to_hash(value)
649
- if value.is_a?(Array)
650
- value.compact.map { |v| _to_hash(v) }
651
- elsif value.is_a?(Hash)
652
- {}.tap do |hash|
653
- value.each { |k, v| hash[k] = _to_hash(v) }
654
- end
655
- elsif value.respond_to? :to_hash
656
- value.to_hash
657
- else
658
- value
659
- end
660
- end
661
-
662
- end
663
-
664
- end