groupdocs_signature_cloud 18.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. checksums.yaml +7 -0
  2. data/lib/groupdocs_signature_cloud.rb +191 -0
  3. data/lib/groupdocs_signature_cloud/api/signature_api.rb +2590 -0
  4. data/lib/groupdocs_signature_cloud/api_client.rb +380 -0
  5. data/lib/groupdocs_signature_cloud/api_error.rb +58 -0
  6. data/lib/groupdocs_signature_cloud/configuration.rb +110 -0
  7. data/lib/groupdocs_signature_cloud/models/barcode_collection.rb +232 -0
  8. data/lib/groupdocs_signature_cloud/models/barcode_signature_data.rb +250 -0
  9. data/lib/groupdocs_signature_cloud/models/barcode_type.rb +230 -0
  10. data/lib/groupdocs_signature_cloud/models/base_signature_data.rb +230 -0
  11. data/lib/groupdocs_signature_cloud/models/border_line_data.rb +312 -0
  12. data/lib/groupdocs_signature_cloud/models/brush_data.rb +230 -0
  13. data/lib/groupdocs_signature_cloud/models/cells_barcode_signature_data.rb +250 -0
  14. data/lib/groupdocs_signature_cloud/models/cells_digital_signature_data.rb +307 -0
  15. data/lib/groupdocs_signature_cloud/models/cells_qr_code_signature_data.rb +250 -0
  16. data/lib/groupdocs_signature_cloud/models/cells_search_barcode_options_data.rb +332 -0
  17. data/lib/groupdocs_signature_cloud/models/cells_search_digital_options_data.rb +265 -0
  18. data/lib/groupdocs_signature_cloud/models/cells_search_qr_code_options_data.rb +332 -0
  19. data/lib/groupdocs_signature_cloud/models/cells_sign_barcode_options_data.rb +694 -0
  20. data/lib/groupdocs_signature_cloud/models/cells_sign_digital_options_data.rb +546 -0
  21. data/lib/groupdocs_signature_cloud/models/cells_sign_image_options_data.rb +526 -0
  22. data/lib/groupdocs_signature_cloud/models/cells_sign_qr_code_options_data.rb +704 -0
  23. data/lib/groupdocs_signature_cloud/models/cells_sign_stamp_options_data.rb +622 -0
  24. data/lib/groupdocs_signature_cloud/models/cells_sign_text_options_data.rb +736 -0
  25. data/lib/groupdocs_signature_cloud/models/cells_verify_barcode_options_data.rb +342 -0
  26. data/lib/groupdocs_signature_cloud/models/cells_verify_digital_options_data.rb +315 -0
  27. data/lib/groupdocs_signature_cloud/models/cells_verify_qr_code_options_data.rb +342 -0
  28. data/lib/groupdocs_signature_cloud/models/cells_verify_text_options_data.rb +285 -0
  29. data/lib/groupdocs_signature_cloud/models/color.rb +245 -0
  30. data/lib/groupdocs_signature_cloud/models/digital_signature_data.rb +307 -0
  31. data/lib/groupdocs_signature_cloud/models/document_info.rb +300 -0
  32. data/lib/groupdocs_signature_cloud/models/document_response.rb +302 -0
  33. data/lib/groupdocs_signature_cloud/models/format.rb +240 -0
  34. data/lib/groupdocs_signature_cloud/models/format_collection.rb +232 -0
  35. data/lib/groupdocs_signature_cloud/models/images_barcode_signature_data.rb +250 -0
  36. data/lib/groupdocs_signature_cloud/models/images_qr_code_signature_data.rb +250 -0
  37. data/lib/groupdocs_signature_cloud/models/images_search_barcode_options_data.rb +332 -0
  38. data/lib/groupdocs_signature_cloud/models/images_search_qr_code_options_data.rb +332 -0
  39. data/lib/groupdocs_signature_cloud/models/images_sign_barcode_options_data.rb +664 -0
  40. data/lib/groupdocs_signature_cloud/models/images_sign_image_options_data.rb +496 -0
  41. data/lib/groupdocs_signature_cloud/models/images_sign_qr_code_options_data.rb +674 -0
  42. data/lib/groupdocs_signature_cloud/models/images_sign_stamp_options_data.rb +592 -0
  43. data/lib/groupdocs_signature_cloud/models/images_sign_text_options_data.rb +706 -0
  44. data/lib/groupdocs_signature_cloud/models/images_verify_barcode_options_data.rb +342 -0
  45. data/lib/groupdocs_signature_cloud/models/images_verify_qr_code_options_data.rb +342 -0
  46. data/lib/groupdocs_signature_cloud/models/linear_gradient_brush_data.rb +260 -0
  47. data/lib/groupdocs_signature_cloud/models/padding_data.rb +295 -0
  48. data/lib/groupdocs_signature_cloud/models/page_info.rb +305 -0
  49. data/lib/groupdocs_signature_cloud/models/pages_info.rb +247 -0
  50. data/lib/groupdocs_signature_cloud/models/pages_setup_data.rb +292 -0
  51. data/lib/groupdocs_signature_cloud/models/pdf_barcode_signature_data.rb +250 -0
  52. data/lib/groupdocs_signature_cloud/models/pdf_digital_signature_data.rb +307 -0
  53. data/lib/groupdocs_signature_cloud/models/pdf_qr_code_signature_data.rb +250 -0
  54. data/lib/groupdocs_signature_cloud/models/pdf_search_barcode_options_data.rb +332 -0
  55. data/lib/groupdocs_signature_cloud/models/pdf_search_digital_options_data.rb +265 -0
  56. data/lib/groupdocs_signature_cloud/models/pdf_search_qr_code_options_data.rb +332 -0
  57. data/lib/groupdocs_signature_cloud/models/pdf_sign_barcode_options_data.rb +664 -0
  58. data/lib/groupdocs_signature_cloud/models/pdf_sign_digital_options_data.rb +556 -0
  59. data/lib/groupdocs_signature_cloud/models/pdf_sign_image_options_data.rb +496 -0
  60. data/lib/groupdocs_signature_cloud/models/pdf_sign_qr_code_options_data.rb +674 -0
  61. data/lib/groupdocs_signature_cloud/models/pdf_sign_stamp_options_data.rb +592 -0
  62. data/lib/groupdocs_signature_cloud/models/pdf_sign_text_options_data.rb +696 -0
  63. data/lib/groupdocs_signature_cloud/models/pdf_verify_barcode_options_data.rb +342 -0
  64. data/lib/groupdocs_signature_cloud/models/pdf_verify_digital_options_data.rb +315 -0
  65. data/lib/groupdocs_signature_cloud/models/pdf_verify_qr_code_options_data.rb +342 -0
  66. data/lib/groupdocs_signature_cloud/models/pdf_verify_text_options_data.rb +342 -0
  67. data/lib/groupdocs_signature_cloud/models/qr_code_collection.rb +232 -0
  68. data/lib/groupdocs_signature_cloud/models/qr_code_signature_data.rb +250 -0
  69. data/lib/groupdocs_signature_cloud/models/qr_code_type.rb +230 -0
  70. data/lib/groupdocs_signature_cloud/models/radial_gradient_brush_data.rb +250 -0
  71. data/lib/groupdocs_signature_cloud/models/requests/get_document_info_from_url_request.rb +55 -0
  72. data/lib/groupdocs_signature_cloud/models/requests/get_document_info_request.rb +59 -0
  73. data/lib/groupdocs_signature_cloud/models/requests/post_barcode_from_url_request.rb +59 -0
  74. data/lib/groupdocs_signature_cloud/models/requests/post_barcode_request.rb +63 -0
  75. data/lib/groupdocs_signature_cloud/models/requests/post_collection_from_url_request.rb +59 -0
  76. data/lib/groupdocs_signature_cloud/models/requests/post_collection_request.rb +63 -0
  77. data/lib/groupdocs_signature_cloud/models/requests/post_digital_from_url_request.rb +67 -0
  78. data/lib/groupdocs_signature_cloud/models/requests/post_digital_request.rb +71 -0
  79. data/lib/groupdocs_signature_cloud/models/requests/post_image_from_url_request.rb +63 -0
  80. data/lib/groupdocs_signature_cloud/models/requests/post_image_request.rb +67 -0
  81. data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_from_url_request.rb +59 -0
  82. data/lib/groupdocs_signature_cloud/models/requests/post_qr_code_request.rb +63 -0
  83. data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_from_url_request.rb +59 -0
  84. data/lib/groupdocs_signature_cloud/models/requests/post_search_barcode_request.rb +63 -0
  85. data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_from_url_request.rb +59 -0
  86. data/lib/groupdocs_signature_cloud/models/requests/post_search_collection_request.rb +63 -0
  87. data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_from_url_request.rb +59 -0
  88. data/lib/groupdocs_signature_cloud/models/requests/post_search_digital_request.rb +63 -0
  89. data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_from_url_request.rb +59 -0
  90. data/lib/groupdocs_signature_cloud/models/requests/post_search_qr_code_request.rb +63 -0
  91. data/lib/groupdocs_signature_cloud/models/requests/post_stamp_from_url_request.rb +59 -0
  92. data/lib/groupdocs_signature_cloud/models/requests/post_stamp_request.rb +63 -0
  93. data/lib/groupdocs_signature_cloud/models/requests/post_text_from_url_request.rb +59 -0
  94. data/lib/groupdocs_signature_cloud/models/requests/post_text_request.rb +63 -0
  95. data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_from_url_request.rb +59 -0
  96. data/lib/groupdocs_signature_cloud/models/requests/post_verification_barcode_request.rb +63 -0
  97. data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_from_url_request.rb +59 -0
  98. data/lib/groupdocs_signature_cloud/models/requests/post_verification_collection_request.rb +63 -0
  99. data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_from_url_request.rb +63 -0
  100. data/lib/groupdocs_signature_cloud/models/requests/post_verification_digital_request.rb +67 -0
  101. data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_from_url_request.rb +59 -0
  102. data/lib/groupdocs_signature_cloud/models/requests/post_verification_qr_code_request.rb +63 -0
  103. data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_from_url_request.rb +57 -0
  104. data/lib/groupdocs_signature_cloud/models/requests/post_verification_text_request.rb +63 -0
  105. data/lib/groupdocs_signature_cloud/models/search_barcode_options_data.rb +332 -0
  106. data/lib/groupdocs_signature_cloud/models/search_digital_options_data.rb +265 -0
  107. data/lib/groupdocs_signature_cloud/models/search_document_response.rb +305 -0
  108. data/lib/groupdocs_signature_cloud/models/search_options_collection_data.rb +232 -0
  109. data/lib/groupdocs_signature_cloud/models/search_options_data.rb +265 -0
  110. data/lib/groupdocs_signature_cloud/models/search_qr_code_options_data.rb +332 -0
  111. data/lib/groupdocs_signature_cloud/models/sign_barcode_options_data.rb +664 -0
  112. data/lib/groupdocs_signature_cloud/models/sign_digital_options_data.rb +516 -0
  113. data/lib/groupdocs_signature_cloud/models/sign_image_options_data.rb +496 -0
  114. data/lib/groupdocs_signature_cloud/models/sign_options_collection_data.rb +232 -0
  115. data/lib/groupdocs_signature_cloud/models/sign_options_data.rb +255 -0
  116. data/lib/groupdocs_signature_cloud/models/sign_qr_code_options_data.rb +674 -0
  117. data/lib/groupdocs_signature_cloud/models/sign_stamp_options_data.rb +592 -0
  118. data/lib/groupdocs_signature_cloud/models/sign_text_options_data.rb +562 -0
  119. data/lib/groupdocs_signature_cloud/models/signature_document_response.rb +290 -0
  120. data/lib/groupdocs_signature_cloud/models/signature_font_data.rb +290 -0
  121. data/lib/groupdocs_signature_cloud/models/slides_barcode_signature_data.rb +250 -0
  122. data/lib/groupdocs_signature_cloud/models/slides_qr_code_signature_data.rb +250 -0
  123. data/lib/groupdocs_signature_cloud/models/slides_search_barcode_options_data.rb +332 -0
  124. data/lib/groupdocs_signature_cloud/models/slides_search_qr_code_options_data.rb +332 -0
  125. data/lib/groupdocs_signature_cloud/models/slides_sign_barcode_options_data.rb +664 -0
  126. data/lib/groupdocs_signature_cloud/models/slides_sign_image_options_data.rb +496 -0
  127. data/lib/groupdocs_signature_cloud/models/slides_sign_qr_code_options_data.rb +674 -0
  128. data/lib/groupdocs_signature_cloud/models/slides_sign_stamp_options_data.rb +592 -0
  129. data/lib/groupdocs_signature_cloud/models/slides_sign_text_options_data.rb +670 -0
  130. data/lib/groupdocs_signature_cloud/models/slides_verify_barcode_options_data.rb +342 -0
  131. data/lib/groupdocs_signature_cloud/models/slides_verify_qr_code_options_data.rb +342 -0
  132. data/lib/groupdocs_signature_cloud/models/slides_verify_text_options_data.rb +285 -0
  133. data/lib/groupdocs_signature_cloud/models/solid_brush_data.rb +240 -0
  134. data/lib/groupdocs_signature_cloud/models/stamp_line_data.rb +377 -0
  135. data/lib/groupdocs_signature_cloud/models/texture_brush_data.rb +240 -0
  136. data/lib/groupdocs_signature_cloud/models/verified_document_response.rb +300 -0
  137. data/lib/groupdocs_signature_cloud/models/verify_barcode_options_data.rb +342 -0
  138. data/lib/groupdocs_signature_cloud/models/verify_digital_options_data.rb +285 -0
  139. data/lib/groupdocs_signature_cloud/models/verify_options_collection_data.rb +247 -0
  140. data/lib/groupdocs_signature_cloud/models/verify_options_data.rb +265 -0
  141. data/lib/groupdocs_signature_cloud/models/verify_qr_code_options_data.rb +342 -0
  142. data/lib/groupdocs_signature_cloud/models/verify_text_options_data.rb +285 -0
  143. data/lib/groupdocs_signature_cloud/models/words_barcode_signature_data.rb +250 -0
  144. data/lib/groupdocs_signature_cloud/models/words_digital_signature_data.rb +307 -0
  145. data/lib/groupdocs_signature_cloud/models/words_qr_code_signature_data.rb +250 -0
  146. data/lib/groupdocs_signature_cloud/models/words_search_barcode_options_data.rb +332 -0
  147. data/lib/groupdocs_signature_cloud/models/words_search_digital_options_data.rb +265 -0
  148. data/lib/groupdocs_signature_cloud/models/words_search_qr_code_options_data.rb +332 -0
  149. data/lib/groupdocs_signature_cloud/models/words_sign_barcode_options_data.rb +664 -0
  150. data/lib/groupdocs_signature_cloud/models/words_sign_digital_options_data.rb +516 -0
  151. data/lib/groupdocs_signature_cloud/models/words_sign_image_options_data.rb +496 -0
  152. data/lib/groupdocs_signature_cloud/models/words_sign_qr_code_options_data.rb +674 -0
  153. data/lib/groupdocs_signature_cloud/models/words_sign_stamp_options_data.rb +592 -0
  154. data/lib/groupdocs_signature_cloud/models/words_sign_text_options_data.rb +696 -0
  155. data/lib/groupdocs_signature_cloud/models/words_verify_barcode_options_data.rb +342 -0
  156. data/lib/groupdocs_signature_cloud/models/words_verify_digital_options_data.rb +315 -0
  157. data/lib/groupdocs_signature_cloud/models/words_verify_qr_code_options_data.rb +342 -0
  158. data/lib/groupdocs_signature_cloud/models/words_verify_text_options_data.rb +285 -0
  159. data/lib/groupdocs_signature_cloud/version.rb +29 -0
  160. metadata +290 -0
@@ -0,0 +1,342 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="cells_verify_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 Verify Options for Cells Documents.
32
+ class CellsVerifyQRCodeOptionsData
33
+
34
+ # Valid property flag
35
+ attr_accessor :is_valid
36
+
37
+ # Document Page Number to be verified. If property is not set - all Pages of Document will be verified for first occurrence.
38
+ attr_accessor :document_page_number
39
+
40
+ # Page Options to specify pages to be verified.
41
+ attr_accessor :pages_setup
42
+
43
+ # Internal property that specify the name of Options.
44
+ attr_accessor :options_type
45
+
46
+ # Specify Signature Text if it should be verified.
47
+ attr_accessor :text
48
+
49
+ # Flag to verify each Document Page.
50
+ attr_accessor :verify_all_pages
51
+
52
+ # Get or set QRCode Type Name verification.
53
+ attr_accessor :qr_code_type_name
54
+
55
+ # Get or set Text Match Type verification.
56
+ attr_accessor :match_type
57
+ class EnumAttributeValidator
58
+ attr_reader :datatype
59
+ attr_reader :allowable_values
60
+
61
+ def initialize(datatype, allowable_values)
62
+ @allowable_values = allowable_values.map do |value|
63
+ case datatype.to_s
64
+ when /Integer/i
65
+ value.to_i
66
+ when /Float/i
67
+ value.to_f
68
+ else
69
+ value
70
+ end
71
+ end
72
+ end
73
+
74
+ def valid?(value)
75
+ !value || allowable_values.include?(value)
76
+ end
77
+ end
78
+
79
+ # Attribute mapping from ruby-style variable name to JSON key.
80
+ def self.attribute_map
81
+ {
82
+ :'is_valid' => :'IsValid',
83
+ :'document_page_number' => :'DocumentPageNumber',
84
+ :'pages_setup' => :'PagesSetup',
85
+ :'options_type' => :'OptionsType',
86
+ :'text' => :'Text',
87
+ :'verify_all_pages' => :'VerifyAllPages',
88
+ :'qr_code_type_name' => :'QRCodeTypeName',
89
+ :'match_type' => :'MatchType'
90
+ }
91
+ end
92
+
93
+ # Attribute type mapping.
94
+ def self.swagger_types
95
+ {
96
+ :'is_valid' => :'BOOLEAN',
97
+ :'document_page_number' => :'Integer',
98
+ :'pages_setup' => :'PagesSetupData',
99
+ :'options_type' => :'String',
100
+ :'text' => :'String',
101
+ :'verify_all_pages' => :'BOOLEAN',
102
+ :'qr_code_type_name' => :'String',
103
+ :'match_type' => :'String'
104
+ }
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ return unless attributes.is_a?(Hash)
111
+
112
+ # convert string to symbol for hash key
113
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
114
+
115
+ if attributes.key?(:'IsValid')
116
+ self.is_valid = attributes[:'IsValid']
117
+ end
118
+
119
+ if attributes.key?(:'DocumentPageNumber')
120
+ self.document_page_number = attributes[:'DocumentPageNumber']
121
+ end
122
+
123
+ if attributes.key?(:'PagesSetup')
124
+ self.pages_setup = attributes[:'PagesSetup']
125
+ end
126
+
127
+ if attributes.key?(:'OptionsType')
128
+ self.options_type = attributes[:'OptionsType']
129
+ end
130
+
131
+ if attributes.key?(:'Text')
132
+ self.text = attributes[:'Text']
133
+ end
134
+
135
+ if attributes.key?(:'VerifyAllPages')
136
+ self.verify_all_pages = attributes[:'VerifyAllPages']
137
+ end
138
+
139
+ if attributes.key?(:'QRCodeTypeName')
140
+ self.qr_code_type_name = attributes[:'QRCodeTypeName']
141
+ end
142
+
143
+ if attributes.key?(:'MatchType')
144
+ self.match_type = attributes[:'MatchType']
145
+ end
146
+
147
+
148
+ if !((defined? options_type) == nil)
149
+ self.options_type = "CellsVerifyQRCodeOptionsData"
150
+ end
151
+
152
+ end
153
+
154
+ # Show invalid properties with the reasons. Usually used together with valid?
155
+ # @return Array for valid properies with the reasons
156
+ def list_invalid_properties
157
+ invalid_properties = []
158
+ if @is_valid.nil?
159
+ invalid_properties.push("invalid value for 'is_valid', is_valid cannot be nil.")
160
+ end
161
+
162
+ return invalid_properties
163
+ end
164
+
165
+ # Check to see if the all the properties in the model are valid
166
+ # @return true if the model is valid
167
+ def valid?
168
+ return false if @is_valid.nil?
169
+ match_type_validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
170
+ return false unless match_type_validator.valid?(@match_type)
171
+ return true
172
+ end
173
+
174
+ # Custom attribute writer method checking allowed values (enum).
175
+ # @param [Object] match_type Object to be assigned
176
+ def match_type=(match_type)
177
+ validator = EnumAttributeValidator.new('String', ["Exact", "StartsWith", "EndsWith", "Contains"])
178
+ if match_type.to_i == 0
179
+ unless validator.valid?(match_type)
180
+ raise ArgumentError, "invalid value for 'match_type', must be one of #{validator.allowable_values}."
181
+ end
182
+ @match_type = match_type
183
+ else
184
+ @match_type = validator.allowable_values[match_type.to_i]
185
+ end
186
+ end
187
+
188
+ # Checks equality by comparing each attribute.
189
+ # @param [Object] Object to be compared
190
+ def ==(other)
191
+ return true if self.equal?(other)
192
+ self.class == other.class &&
193
+ is_valid == other.is_valid &&
194
+ document_page_number == other.document_page_number &&
195
+ pages_setup == other.pages_setup &&
196
+ options_type == other.options_type &&
197
+ text == other.text &&
198
+ verify_all_pages == other.verify_all_pages &&
199
+ qr_code_type_name == other.qr_code_type_name &&
200
+ match_type == other.match_type
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(other)
206
+ self == other
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Fixnum] Hash code
211
+ def hash
212
+ [is_valid, document_page_number, pages_setup, options_type, text, verify_all_pages, qr_code_type_name, match_type].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def build_from_hash(attributes)
219
+ return nil unless attributes.is_a?(Hash)
220
+ self.class.swagger_types.each_pair do |key, type|
221
+
222
+ attributeName = self.class.attribute_map[key]
223
+ attributeNameLowerStr = attributeName.to_s
224
+ attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
225
+ attributeNameLower = attributeNameLowerStr.to_sym
226
+ attributeNameLowerStr2 = attributeName.to_s
227
+ attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
228
+ attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
229
+ attributeNameLower2 = attributeNameLowerStr2.to_sym
230
+
231
+ if type =~ /\AArray<(.*)>/i
232
+ # check to ensure the input is an array given that the the attribute
233
+ # is documented as an array but the input is not
234
+ if attributes[attributeName].is_a?(Array)
235
+ self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
236
+ end
237
+ if attributes[attributeNameLower].is_a?(Array)
238
+ self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
239
+ end
240
+ if attributes[attributeNameLower2].is_a?(Array)
241
+ self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
242
+ end
243
+ elsif !attributes[attributeName].nil?
244
+ self.send("#{key}=", _deserialize(type, attributes[attributeName]))
245
+ elsif !attributes[attributeNameLower].nil?
246
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
247
+ elsif !attributes[attributeNameLower2].nil?
248
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
249
+ end
250
+ # or else data not found in attributes(hash), not an issue as the data can be optional
251
+ end
252
+ self
253
+ end
254
+
255
+ # Deserializes the data based on type
256
+ # @param string type Data type
257
+ # @param string value Value to be deserialized
258
+ # @return [Object] Deserialized data
259
+ def _deserialize(type, value)
260
+ case type.to_sym
261
+ when :DateTime
262
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
263
+ when :Date
264
+ Time.at(/\d/.match(value)[0].to_f).to_date
265
+ when :String
266
+ value.to_s
267
+ when :Integer
268
+ value.to_i
269
+ when :Float
270
+ value.to_f
271
+ when :BOOLEAN
272
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
273
+ true
274
+ else
275
+ false
276
+ end
277
+ when :Object
278
+ # generic object (usually a Hash), return directly
279
+ value
280
+ when /\AArray<(?<inner_type>.+)>\z/
281
+ inner_type = Regexp.last_match[:inner_type]
282
+ value.map { |v| _deserialize(inner_type, v) }
283
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
284
+ k_type = Regexp.last_match[:k_type]
285
+ v_type = Regexp.last_match[:v_type]
286
+ {}.tap do |hash|
287
+ value.each do |k, v|
288
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
289
+ end
290
+ end
291
+ else
292
+ # model
293
+ temp_model = GroupDocsSignatureCloud.const_get(type).new
294
+ temp_model.build_from_hash(value)
295
+ end
296
+ end
297
+
298
+ # Returns the string representation of the object
299
+ # @return [String] String presentation of the object
300
+ def to_s
301
+ to_hash.to_s
302
+ end
303
+
304
+ # to_body is an alias to to_hash (backward compatibility)
305
+ # @return [Hash] Returns the object in the form of hash
306
+ def to_body
307
+ to_hash
308
+ end
309
+
310
+ # Returns the object in the form of hash
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_hash
313
+ hash = {}
314
+ self.class.attribute_map.each_pair do |attr, param|
315
+ value = self.send(attr)
316
+ next if value.nil?
317
+ hash[param] = _to_hash(value)
318
+ end
319
+ hash
320
+ end
321
+
322
+ # Outputs non-array value in the form of hash
323
+ # For object, use to_hash. Otherwise, just return the value
324
+ # @param [Object] value Any valid value
325
+ # @return [Hash] Returns the value in the form of hash
326
+ def _to_hash(value)
327
+ if value.is_a?(Array)
328
+ value.compact.map { |v| _to_hash(v) }
329
+ elsif value.is_a?(Hash)
330
+ {}.tap do |hash|
331
+ value.each { |k, v| hash[k] = _to_hash(v) }
332
+ end
333
+ elsif value.respond_to? :to_hash
334
+ value.to_hash
335
+ else
336
+ value
337
+ end
338
+ end
339
+
340
+ end
341
+
342
+ end
@@ -0,0 +1,285 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="cells_verify_text_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 Text Verify Options for Cells Documents.
32
+ class CellsVerifyTextOptionsData
33
+
34
+ # Valid property flag
35
+ attr_accessor :is_valid
36
+
37
+ # Document Page Number to be verified. If property is not set - all Pages of Document will be verified for first occurrence.
38
+ attr_accessor :document_page_number
39
+
40
+ # Page Options to specify pages to be verified.
41
+ attr_accessor :pages_setup
42
+
43
+ # Internal property that specify the name of Options.
44
+ attr_accessor :options_type
45
+
46
+ # Specify Signature Text if it should be verified.
47
+ attr_accessor :text
48
+
49
+ # Flag to verify each Document Page.
50
+ attr_accessor :verify_all_pages
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'is_valid' => :'IsValid',
56
+ :'document_page_number' => :'DocumentPageNumber',
57
+ :'pages_setup' => :'PagesSetup',
58
+ :'options_type' => :'OptionsType',
59
+ :'text' => :'Text',
60
+ :'verify_all_pages' => :'VerifyAllPages'
61
+ }
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.swagger_types
66
+ {
67
+ :'is_valid' => :'BOOLEAN',
68
+ :'document_page_number' => :'Integer',
69
+ :'pages_setup' => :'PagesSetupData',
70
+ :'options_type' => :'String',
71
+ :'text' => :'String',
72
+ :'verify_all_pages' => :'BOOLEAN'
73
+ }
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ return unless attributes.is_a?(Hash)
80
+
81
+ # convert string to symbol for hash key
82
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
83
+
84
+ if attributes.key?(:'IsValid')
85
+ self.is_valid = attributes[:'IsValid']
86
+ end
87
+
88
+ if attributes.key?(:'DocumentPageNumber')
89
+ self.document_page_number = attributes[:'DocumentPageNumber']
90
+ end
91
+
92
+ if attributes.key?(:'PagesSetup')
93
+ self.pages_setup = attributes[:'PagesSetup']
94
+ end
95
+
96
+ if attributes.key?(:'OptionsType')
97
+ self.options_type = attributes[:'OptionsType']
98
+ end
99
+
100
+ if attributes.key?(:'Text')
101
+ self.text = attributes[:'Text']
102
+ end
103
+
104
+ if attributes.key?(:'VerifyAllPages')
105
+ self.verify_all_pages = attributes[:'VerifyAllPages']
106
+ end
107
+
108
+
109
+ if !((defined? options_type) == nil)
110
+ self.options_type = "CellsVerifyTextOptionsData"
111
+ end
112
+
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properies with the reasons
117
+ def list_invalid_properties
118
+ invalid_properties = []
119
+ if @is_valid.nil?
120
+ invalid_properties.push("invalid value for 'is_valid', is_valid cannot be nil.")
121
+ end
122
+
123
+ return invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ return false if @is_valid.nil?
130
+ return true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(other)
136
+ return true if self.equal?(other)
137
+ self.class == other.class &&
138
+ is_valid == other.is_valid &&
139
+ document_page_number == other.document_page_number &&
140
+ pages_setup == other.pages_setup &&
141
+ options_type == other.options_type &&
142
+ text == other.text &&
143
+ verify_all_pages == other.verify_all_pages
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(other)
149
+ self == other
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Fixnum] Hash code
154
+ def hash
155
+ [is_valid, document_page_number, pages_setup, options_type, text, verify_all_pages].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ self.class.swagger_types.each_pair do |key, type|
164
+
165
+ attributeName = self.class.attribute_map[key]
166
+ attributeNameLowerStr = attributeName.to_s
167
+ attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
168
+ attributeNameLower = attributeNameLowerStr.to_sym
169
+ attributeNameLowerStr2 = attributeName.to_s
170
+ attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
171
+ attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
172
+ attributeNameLower2 = attributeNameLowerStr2.to_sym
173
+
174
+ if type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[attributeName].is_a?(Array)
178
+ self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
179
+ end
180
+ if attributes[attributeNameLower].is_a?(Array)
181
+ self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
182
+ end
183
+ if attributes[attributeNameLower2].is_a?(Array)
184
+ self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
185
+ end
186
+ elsif !attributes[attributeName].nil?
187
+ self.send("#{key}=", _deserialize(type, attributes[attributeName]))
188
+ elsif !attributes[attributeNameLower].nil?
189
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
190
+ elsif !attributes[attributeNameLower2].nil?
191
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
192
+ end
193
+ # or else data not found in attributes(hash), not an issue as the data can be optional
194
+ end
195
+ self
196
+ end
197
+
198
+ # Deserializes the data based on type
199
+ # @param string type Data type
200
+ # @param string value Value to be deserialized
201
+ # @return [Object] Deserialized data
202
+ def _deserialize(type, value)
203
+ case type.to_sym
204
+ when :DateTime
205
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
206
+ when :Date
207
+ Time.at(/\d/.match(value)[0].to_f).to_date
208
+ when :String
209
+ value.to_s
210
+ when :Integer
211
+ value.to_i
212
+ when :Float
213
+ value.to_f
214
+ when :BOOLEAN
215
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
216
+ true
217
+ else
218
+ false
219
+ end
220
+ when :Object
221
+ # generic object (usually a Hash), return directly
222
+ value
223
+ when /\AArray<(?<inner_type>.+)>\z/
224
+ inner_type = Regexp.last_match[:inner_type]
225
+ value.map { |v| _deserialize(inner_type, v) }
226
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
227
+ k_type = Regexp.last_match[:k_type]
228
+ v_type = Regexp.last_match[:v_type]
229
+ {}.tap do |hash|
230
+ value.each do |k, v|
231
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
232
+ end
233
+ end
234
+ else
235
+ # model
236
+ temp_model = GroupDocsSignatureCloud.const_get(type).new
237
+ temp_model.build_from_hash(value)
238
+ end
239
+ end
240
+
241
+ # Returns the string representation of the object
242
+ # @return [String] String presentation of the object
243
+ def to_s
244
+ to_hash.to_s
245
+ end
246
+
247
+ # to_body is an alias to to_hash (backward compatibility)
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_body
250
+ to_hash
251
+ end
252
+
253
+ # Returns the object in the form of hash
254
+ # @return [Hash] Returns the object in the form of hash
255
+ def to_hash
256
+ hash = {}
257
+ self.class.attribute_map.each_pair do |attr, param|
258
+ value = self.send(attr)
259
+ next if value.nil?
260
+ hash[param] = _to_hash(value)
261
+ end
262
+ hash
263
+ end
264
+
265
+ # Outputs non-array value in the form of hash
266
+ # For object, use to_hash. Otherwise, just return the value
267
+ # @param [Object] value Any valid value
268
+ # @return [Hash] Returns the value in the form of hash
269
+ def _to_hash(value)
270
+ if value.is_a?(Array)
271
+ value.compact.map { |v| _to_hash(v) }
272
+ elsif value.is_a?(Hash)
273
+ {}.tap do |hash|
274
+ value.each { |k, v| hash[k] = _to_hash(v) }
275
+ end
276
+ elsif value.respond_to? :to_hash
277
+ value.to_hash
278
+ else
279
+ value
280
+ end
281
+ end
282
+
283
+ end
284
+
285
+ end