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_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 Verify Options for Cells Documents.
32
+ class CellsVerifyBarcodeOptionsData
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 Barcode Type Name verification.
53
+ attr_accessor :barcode_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
+ :'barcode_type_name' => :'BarcodeTypeName',
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
+ :'barcode_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?(:'BarcodeTypeName')
140
+ self.barcode_type_name = attributes[:'BarcodeTypeName']
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 = "CellsVerifyBarcodeOptionsData"
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
+ barcode_type_name == other.barcode_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, barcode_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,315 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="cells_verify_digital_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
+ # Cells Verify Digital Options - keeps options to verify Digital Signature of Cells Documents
32
+ class CellsVerifyDigitalOptionsData
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. Value is not supported for digital verification.
38
+ attr_accessor :document_page_number
39
+
40
+ # Page Options to specify pages to be verified. Value is not supported for digital verification.
41
+ attr_accessor :pages_setup
42
+
43
+ # Internal property that specify the name of Options.
44
+ attr_accessor :options_type
45
+
46
+ # Password of Digital Certificate if required
47
+ attr_accessor :password
48
+
49
+ # File Guid of Digital Certificate
50
+ attr_accessor :certificate_guid
51
+
52
+ # Comments of Digital Signature to validate
53
+ attr_accessor :comments
54
+
55
+ # Date and time range of Digital Signature to validate. Nullable value will be ignored.
56
+ attr_accessor :sign_date_time_from
57
+
58
+ # Date and time range of Digital Signature to validate. Nullable value will be ignored.
59
+ attr_accessor :sign_date_time_to
60
+
61
+ # Attribute mapping from ruby-style variable name to JSON key.
62
+ def self.attribute_map
63
+ {
64
+ :'is_valid' => :'IsValid',
65
+ :'document_page_number' => :'DocumentPageNumber',
66
+ :'pages_setup' => :'PagesSetup',
67
+ :'options_type' => :'OptionsType',
68
+ :'password' => :'Password',
69
+ :'certificate_guid' => :'CertificateGuid',
70
+ :'comments' => :'Comments',
71
+ :'sign_date_time_from' => :'SignDateTimeFrom',
72
+ :'sign_date_time_to' => :'SignDateTimeTo'
73
+ }
74
+ end
75
+
76
+ # Attribute type mapping.
77
+ def self.swagger_types
78
+ {
79
+ :'is_valid' => :'BOOLEAN',
80
+ :'document_page_number' => :'Integer',
81
+ :'pages_setup' => :'PagesSetupData',
82
+ :'options_type' => :'String',
83
+ :'password' => :'String',
84
+ :'certificate_guid' => :'String',
85
+ :'comments' => :'String',
86
+ :'sign_date_time_from' => :'DateTime',
87
+ :'sign_date_time_to' => :'DateTime'
88
+ }
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ return unless attributes.is_a?(Hash)
95
+
96
+ # convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
98
+
99
+ if attributes.key?(:'IsValid')
100
+ self.is_valid = attributes[:'IsValid']
101
+ end
102
+
103
+ if attributes.key?(:'DocumentPageNumber')
104
+ self.document_page_number = attributes[:'DocumentPageNumber']
105
+ end
106
+
107
+ if attributes.key?(:'PagesSetup')
108
+ self.pages_setup = attributes[:'PagesSetup']
109
+ end
110
+
111
+ if attributes.key?(:'OptionsType')
112
+ self.options_type = attributes[:'OptionsType']
113
+ end
114
+
115
+ if attributes.key?(:'Password')
116
+ self.password = attributes[:'Password']
117
+ end
118
+
119
+ if attributes.key?(:'CertificateGuid')
120
+ self.certificate_guid = attributes[:'CertificateGuid']
121
+ end
122
+
123
+ if attributes.key?(:'Comments')
124
+ self.comments = attributes[:'Comments']
125
+ end
126
+
127
+ if attributes.key?(:'SignDateTimeFrom')
128
+ self.sign_date_time_from = attributes[:'SignDateTimeFrom']
129
+ end
130
+
131
+ if attributes.key?(:'SignDateTimeTo')
132
+ self.sign_date_time_to = attributes[:'SignDateTimeTo']
133
+ end
134
+
135
+
136
+ if !((defined? options_type) == nil)
137
+ self.options_type = "CellsVerifyDigitalOptionsData"
138
+ end
139
+
140
+ end
141
+
142
+ # Show invalid properties with the reasons. Usually used together with valid?
143
+ # @return Array for valid properies with the reasons
144
+ def list_invalid_properties
145
+ invalid_properties = []
146
+ if @is_valid.nil?
147
+ invalid_properties.push("invalid value for 'is_valid', is_valid cannot be nil.")
148
+ end
149
+
150
+ return invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ return false if @is_valid.nil?
157
+ return true
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(other)
163
+ return true if self.equal?(other)
164
+ self.class == other.class &&
165
+ is_valid == other.is_valid &&
166
+ document_page_number == other.document_page_number &&
167
+ pages_setup == other.pages_setup &&
168
+ options_type == other.options_type &&
169
+ password == other.password &&
170
+ certificate_guid == other.certificate_guid &&
171
+ comments == other.comments &&
172
+ sign_date_time_from == other.sign_date_time_from &&
173
+ sign_date_time_to == other.sign_date_time_to
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(other)
179
+ self == other
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Fixnum] Hash code
184
+ def hash
185
+ [is_valid, document_page_number, pages_setup, options_type, password, certificate_guid, comments, sign_date_time_from, sign_date_time_to].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ self.class.swagger_types.each_pair do |key, type|
194
+
195
+ attributeName = self.class.attribute_map[key]
196
+ attributeNameLowerStr = attributeName.to_s
197
+ attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
198
+ attributeNameLower = attributeNameLowerStr.to_sym
199
+ attributeNameLowerStr2 = attributeName.to_s
200
+ attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
201
+ attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
202
+ attributeNameLower2 = attributeNameLowerStr2.to_sym
203
+
204
+ if type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[attributeName].is_a?(Array)
208
+ self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
209
+ end
210
+ if attributes[attributeNameLower].is_a?(Array)
211
+ self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
212
+ end
213
+ if attributes[attributeNameLower2].is_a?(Array)
214
+ self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
215
+ end
216
+ elsif !attributes[attributeName].nil?
217
+ self.send("#{key}=", _deserialize(type, attributes[attributeName]))
218
+ elsif !attributes[attributeNameLower].nil?
219
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
220
+ elsif !attributes[attributeNameLower2].nil?
221
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
222
+ end
223
+ # or else data not found in attributes(hash), not an issue as the data can be optional
224
+ end
225
+ self
226
+ end
227
+
228
+ # Deserializes the data based on type
229
+ # @param string type Data type
230
+ # @param string value Value to be deserialized
231
+ # @return [Object] Deserialized data
232
+ def _deserialize(type, value)
233
+ case type.to_sym
234
+ when :DateTime
235
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
236
+ when :Date
237
+ Time.at(/\d/.match(value)[0].to_f).to_date
238
+ when :String
239
+ value.to_s
240
+ when :Integer
241
+ value.to_i
242
+ when :Float
243
+ value.to_f
244
+ when :BOOLEAN
245
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
246
+ true
247
+ else
248
+ false
249
+ end
250
+ when :Object
251
+ # generic object (usually a Hash), return directly
252
+ value
253
+ when /\AArray<(?<inner_type>.+)>\z/
254
+ inner_type = Regexp.last_match[:inner_type]
255
+ value.map { |v| _deserialize(inner_type, v) }
256
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
257
+ k_type = Regexp.last_match[:k_type]
258
+ v_type = Regexp.last_match[:v_type]
259
+ {}.tap do |hash|
260
+ value.each do |k, v|
261
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
262
+ end
263
+ end
264
+ else
265
+ # model
266
+ temp_model = GroupDocsSignatureCloud.const_get(type).new
267
+ temp_model.build_from_hash(value)
268
+ end
269
+ end
270
+
271
+ # Returns the string representation of the object
272
+ # @return [String] String presentation of the object
273
+ def to_s
274
+ to_hash.to_s
275
+ end
276
+
277
+ # to_body is an alias to to_hash (backward compatibility)
278
+ # @return [Hash] Returns the object in the form of hash
279
+ def to_body
280
+ to_hash
281
+ end
282
+
283
+ # Returns the object in the form of hash
284
+ # @return [Hash] Returns the object in the form of hash
285
+ def to_hash
286
+ hash = {}
287
+ self.class.attribute_map.each_pair do |attr, param|
288
+ value = self.send(attr)
289
+ next if value.nil?
290
+ hash[param] = _to_hash(value)
291
+ end
292
+ hash
293
+ end
294
+
295
+ # Outputs non-array value in the form of hash
296
+ # For object, use to_hash. Otherwise, just return the value
297
+ # @param [Object] value Any valid value
298
+ # @return [Hash] Returns the value in the form of hash
299
+ def _to_hash(value)
300
+ if value.is_a?(Array)
301
+ value.compact.map { |v| _to_hash(v) }
302
+ elsif value.is_a?(Hash)
303
+ {}.tap do |hash|
304
+ value.each { |k, v| hash[k] = _to_hash(v) }
305
+ end
306
+ elsif value.respond_to? :to_hash
307
+ value.to_hash
308
+ else
309
+ value
310
+ end
311
+ end
312
+
313
+ end
314
+
315
+ end