groupdocs_signature_cloud 18.8.1

Sign up to get free protection for your applications and to get access to all the features.
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,704 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="cells_sign_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 Signature Options for Cells Documents.
32
+ class CellsSignQRCodeOptionsData
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 Qr-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 QRCode type. Pick one from supported QRCode Types list.
101
+ attr_accessor :qr_code_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 QRCode. Default value is None.
116
+ attr_accessor :code_text_alignment
117
+
118
+ # Gets or sets the space between QRCode elements and result image borders.
119
+ attr_accessor :inner_margins
120
+
121
+ # Gets or sets the QR-code logo image file name. This property in use only if LogoStream is not specified. Using of this property could cause problems with verification. Use it carefully.
122
+ attr_accessor :logo_guid
123
+
124
+ # Gets or sets worksheet number for signing. DocumentPageNumber parameter contains the same value.
125
+ attr_accessor :sheet_number
126
+
127
+ # Gets or sets the top row number of signature (min value is 0). Top parameter contains the same value.
128
+ attr_accessor :row_number
129
+
130
+ # Gets or sets the left column number of signature (min value is 0). Left parameter contains the same value.
131
+ attr_accessor :column_number
132
+ class EnumAttributeValidator
133
+ attr_reader :datatype
134
+ attr_reader :allowable_values
135
+
136
+ def initialize(datatype, allowable_values)
137
+ @allowable_values = allowable_values.map do |value|
138
+ case datatype.to_s
139
+ when /Integer/i
140
+ value.to_i
141
+ when /Float/i
142
+ value.to_f
143
+ else
144
+ value
145
+ end
146
+ end
147
+ end
148
+
149
+ def valid?(value)
150
+ !value || allowable_values.include?(value)
151
+ end
152
+ end
153
+
154
+ # Attribute mapping from ruby-style variable name to JSON key.
155
+ def self.attribute_map
156
+ {
157
+ :'document_page_number' => :'DocumentPageNumber',
158
+ :'pages_setup' => :'PagesSetup',
159
+ :'options_type' => :'OptionsType',
160
+ :'left' => :'Left',
161
+ :'top' => :'Top',
162
+ :'width' => :'Width',
163
+ :'height' => :'Height',
164
+ :'location_measure_type' => :'LocationMeasureType',
165
+ :'size_measure_type' => :'SizeMeasureType',
166
+ :'stretch' => :'Stretch',
167
+ :'rotation_angle' => :'RotationAngle',
168
+ :'horizontal_alignment' => :'HorizontalAlignment',
169
+ :'vertical_alignment' => :'VerticalAlignment',
170
+ :'margin' => :'Margin',
171
+ :'margin_measure_type' => :'MarginMeasureType',
172
+ :'text' => :'Text',
173
+ :'sign_all_pages' => :'SignAllPages',
174
+ :'font' => :'Font',
175
+ :'fore_color' => :'ForeColor',
176
+ :'border_color' => :'BorderColor',
177
+ :'background_color' => :'BackgroundColor',
178
+ :'background_brush' => :'BackgroundBrush',
179
+ :'qr_code_type_name' => :'QRCodeTypeName',
180
+ :'border_visiblity' => :'BorderVisiblity',
181
+ :'border_dash_style' => :'BorderDashStyle',
182
+ :'border_weight' => :'BorderWeight',
183
+ :'opacity' => :'Opacity',
184
+ :'code_text_alignment' => :'CodeTextAlignment',
185
+ :'inner_margins' => :'InnerMargins',
186
+ :'logo_guid' => :'LogoGuid',
187
+ :'sheet_number' => :'SheetNumber',
188
+ :'row_number' => :'RowNumber',
189
+ :'column_number' => :'ColumnNumber'
190
+ }
191
+ end
192
+
193
+ # Attribute type mapping.
194
+ def self.swagger_types
195
+ {
196
+ :'document_page_number' => :'Integer',
197
+ :'pages_setup' => :'PagesSetupData',
198
+ :'options_type' => :'String',
199
+ :'left' => :'Integer',
200
+ :'top' => :'Integer',
201
+ :'width' => :'Integer',
202
+ :'height' => :'Integer',
203
+ :'location_measure_type' => :'String',
204
+ :'size_measure_type' => :'String',
205
+ :'stretch' => :'String',
206
+ :'rotation_angle' => :'Integer',
207
+ :'horizontal_alignment' => :'String',
208
+ :'vertical_alignment' => :'String',
209
+ :'margin' => :'PaddingData',
210
+ :'margin_measure_type' => :'String',
211
+ :'text' => :'String',
212
+ :'sign_all_pages' => :'BOOLEAN',
213
+ :'font' => :'SignatureFontData',
214
+ :'fore_color' => :'Color',
215
+ :'border_color' => :'Color',
216
+ :'background_color' => :'Color',
217
+ :'background_brush' => :'BrushData',
218
+ :'qr_code_type_name' => :'String',
219
+ :'border_visiblity' => :'BOOLEAN',
220
+ :'border_dash_style' => :'String',
221
+ :'border_weight' => :'Float',
222
+ :'opacity' => :'Float',
223
+ :'code_text_alignment' => :'String',
224
+ :'inner_margins' => :'PaddingData',
225
+ :'logo_guid' => :'String',
226
+ :'sheet_number' => :'Integer',
227
+ :'row_number' => :'Integer',
228
+ :'column_number' => :'Integer'
229
+ }
230
+ end
231
+
232
+ # Initializes the object
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ def initialize(attributes = {})
235
+ return unless attributes.is_a?(Hash)
236
+
237
+ # convert string to symbol for hash key
238
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
239
+
240
+ if attributes.key?(:'DocumentPageNumber')
241
+ self.document_page_number = attributes[:'DocumentPageNumber']
242
+ end
243
+
244
+ if attributes.key?(:'PagesSetup')
245
+ self.pages_setup = attributes[:'PagesSetup']
246
+ end
247
+
248
+ if attributes.key?(:'OptionsType')
249
+ self.options_type = attributes[:'OptionsType']
250
+ end
251
+
252
+ if attributes.key?(:'Left')
253
+ self.left = attributes[:'Left']
254
+ end
255
+
256
+ if attributes.key?(:'Top')
257
+ self.top = attributes[:'Top']
258
+ end
259
+
260
+ if attributes.key?(:'Width')
261
+ self.width = attributes[:'Width']
262
+ end
263
+
264
+ if attributes.key?(:'Height')
265
+ self.height = attributes[:'Height']
266
+ end
267
+
268
+ if attributes.key?(:'LocationMeasureType')
269
+ self.location_measure_type = attributes[:'LocationMeasureType']
270
+ end
271
+
272
+ if attributes.key?(:'SizeMeasureType')
273
+ self.size_measure_type = attributes[:'SizeMeasureType']
274
+ end
275
+
276
+ if attributes.key?(:'Stretch')
277
+ self.stretch = attributes[:'Stretch']
278
+ end
279
+
280
+ if attributes.key?(:'RotationAngle')
281
+ self.rotation_angle = attributes[:'RotationAngle']
282
+ end
283
+
284
+ if attributes.key?(:'HorizontalAlignment')
285
+ self.horizontal_alignment = attributes[:'HorizontalAlignment']
286
+ end
287
+
288
+ if attributes.key?(:'VerticalAlignment')
289
+ self.vertical_alignment = attributes[:'VerticalAlignment']
290
+ end
291
+
292
+ if attributes.key?(:'Margin')
293
+ self.margin = attributes[:'Margin']
294
+ end
295
+
296
+ if attributes.key?(:'MarginMeasureType')
297
+ self.margin_measure_type = attributes[:'MarginMeasureType']
298
+ end
299
+
300
+ if attributes.key?(:'Text')
301
+ self.text = attributes[:'Text']
302
+ end
303
+
304
+ if attributes.key?(:'SignAllPages')
305
+ self.sign_all_pages = attributes[:'SignAllPages']
306
+ end
307
+
308
+ if attributes.key?(:'Font')
309
+ self.font = attributes[:'Font']
310
+ end
311
+
312
+ if attributes.key?(:'ForeColor')
313
+ self.fore_color = attributes[:'ForeColor']
314
+ end
315
+
316
+ if attributes.key?(:'BorderColor')
317
+ self.border_color = attributes[:'BorderColor']
318
+ end
319
+
320
+ if attributes.key?(:'BackgroundColor')
321
+ self.background_color = attributes[:'BackgroundColor']
322
+ end
323
+
324
+ if attributes.key?(:'BackgroundBrush')
325
+ self.background_brush = attributes[:'BackgroundBrush']
326
+ end
327
+
328
+ if attributes.key?(:'QRCodeTypeName')
329
+ self.qr_code_type_name = attributes[:'QRCodeTypeName']
330
+ end
331
+
332
+ if attributes.key?(:'BorderVisiblity')
333
+ self.border_visiblity = attributes[:'BorderVisiblity']
334
+ end
335
+
336
+ if attributes.key?(:'BorderDashStyle')
337
+ self.border_dash_style = attributes[:'BorderDashStyle']
338
+ end
339
+
340
+ if attributes.key?(:'BorderWeight')
341
+ self.border_weight = attributes[:'BorderWeight']
342
+ end
343
+
344
+ if attributes.key?(:'Opacity')
345
+ self.opacity = attributes[:'Opacity']
346
+ end
347
+
348
+ if attributes.key?(:'CodeTextAlignment')
349
+ self.code_text_alignment = attributes[:'CodeTextAlignment']
350
+ end
351
+
352
+ if attributes.key?(:'InnerMargins')
353
+ self.inner_margins = attributes[:'InnerMargins']
354
+ end
355
+
356
+ if attributes.key?(:'LogoGuid')
357
+ self.logo_guid = attributes[:'LogoGuid']
358
+ end
359
+
360
+ if attributes.key?(:'SheetNumber')
361
+ self.sheet_number = attributes[:'SheetNumber']
362
+ end
363
+
364
+ if attributes.key?(:'RowNumber')
365
+ self.row_number = attributes[:'RowNumber']
366
+ end
367
+
368
+ if attributes.key?(:'ColumnNumber')
369
+ self.column_number = attributes[:'ColumnNumber']
370
+ end
371
+
372
+
373
+ if !((defined? options_type) == nil)
374
+ self.options_type = "CellsSignQRCodeOptionsData"
375
+ end
376
+
377
+ end
378
+
379
+ # Show invalid properties with the reasons. Usually used together with valid?
380
+ # @return Array for valid properies with the reasons
381
+ def list_invalid_properties
382
+ invalid_properties = []
383
+ if @document_page_number.nil?
384
+ invalid_properties.push("invalid value for 'document_page_number', document_page_number cannot be nil.")
385
+ end
386
+
387
+ return invalid_properties
388
+ end
389
+
390
+ # Check to see if the all the properties in the model are valid
391
+ # @return true if the model is valid
392
+ def valid?
393
+ return false if @document_page_number.nil?
394
+ location_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
395
+ return false unless location_measure_type_validator.valid?(@location_measure_type)
396
+ size_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
397
+ return false unless size_measure_type_validator.valid?(@size_measure_type)
398
+ stretch_validator = EnumAttributeValidator.new('String', ["None", "PageWidth", "PageHeight", "PageArea"])
399
+ return false unless stretch_validator.valid?(@stretch)
400
+ horizontal_alignment_validator = EnumAttributeValidator.new('String', ["Default", "None", "Left", "Center", "Right"])
401
+ return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
402
+ vertical_alignment_validator = EnumAttributeValidator.new('String', ["Default", "None", "Top", "Center", "Bottom"])
403
+ return false unless vertical_alignment_validator.valid?(@vertical_alignment)
404
+ margin_measure_type_validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
405
+ return false unless margin_measure_type_validator.valid?(@margin_measure_type)
406
+ border_dash_style_validator = EnumAttributeValidator.new('String', ["Dash", "DashDot", "DashDotDot", "DashLongDash", "DashLongDashDot", "RoundDot", "Solid", "SquareDot"])
407
+ return false unless border_dash_style_validator.valid?(@border_dash_style)
408
+ code_text_alignment_validator = EnumAttributeValidator.new('String', ["None", "Above", "Below", "Right"])
409
+ return false unless code_text_alignment_validator.valid?(@code_text_alignment)
410
+ return true
411
+ end
412
+
413
+ # Custom attribute writer method checking allowed values (enum).
414
+ # @param [Object] location_measure_type Object to be assigned
415
+ def location_measure_type=(location_measure_type)
416
+ validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
417
+ if location_measure_type.to_i == 0
418
+ unless validator.valid?(location_measure_type)
419
+ raise ArgumentError, "invalid value for 'location_measure_type', must be one of #{validator.allowable_values}."
420
+ end
421
+ @location_measure_type = location_measure_type
422
+ else
423
+ @location_measure_type = validator.allowable_values[location_measure_type.to_i]
424
+ end
425
+ end
426
+
427
+ # Custom attribute writer method checking allowed values (enum).
428
+ # @param [Object] size_measure_type Object to be assigned
429
+ def size_measure_type=(size_measure_type)
430
+ validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
431
+ if size_measure_type.to_i == 0
432
+ unless validator.valid?(size_measure_type)
433
+ raise ArgumentError, "invalid value for 'size_measure_type', must be one of #{validator.allowable_values}."
434
+ end
435
+ @size_measure_type = size_measure_type
436
+ else
437
+ @size_measure_type = validator.allowable_values[size_measure_type.to_i]
438
+ end
439
+ end
440
+
441
+ # Custom attribute writer method checking allowed values (enum).
442
+ # @param [Object] stretch Object to be assigned
443
+ def stretch=(stretch)
444
+ validator = EnumAttributeValidator.new('String', ["None", "PageWidth", "PageHeight", "PageArea"])
445
+ if stretch.to_i == 0
446
+ unless validator.valid?(stretch)
447
+ raise ArgumentError, "invalid value for 'stretch', must be one of #{validator.allowable_values}."
448
+ end
449
+ @stretch = stretch
450
+ else
451
+ @stretch = validator.allowable_values[stretch.to_i]
452
+ end
453
+ end
454
+
455
+ # Custom attribute writer method checking allowed values (enum).
456
+ # @param [Object] horizontal_alignment Object to be assigned
457
+ def horizontal_alignment=(horizontal_alignment)
458
+ validator = EnumAttributeValidator.new('String', ["Default", "None", "Left", "Center", "Right"])
459
+ if horizontal_alignment.to_i == 0
460
+ unless validator.valid?(horizontal_alignment)
461
+ raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
462
+ end
463
+ @horizontal_alignment = horizontal_alignment
464
+ else
465
+ @horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
466
+ end
467
+ end
468
+
469
+ # Custom attribute writer method checking allowed values (enum).
470
+ # @param [Object] vertical_alignment Object to be assigned
471
+ def vertical_alignment=(vertical_alignment)
472
+ validator = EnumAttributeValidator.new('String', ["Default", "None", "Top", "Center", "Bottom"])
473
+ if vertical_alignment.to_i == 0
474
+ unless validator.valid?(vertical_alignment)
475
+ raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
476
+ end
477
+ @vertical_alignment = vertical_alignment
478
+ else
479
+ @vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
480
+ end
481
+ end
482
+
483
+ # Custom attribute writer method checking allowed values (enum).
484
+ # @param [Object] margin_measure_type Object to be assigned
485
+ def margin_measure_type=(margin_measure_type)
486
+ validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
487
+ if margin_measure_type.to_i == 0
488
+ unless validator.valid?(margin_measure_type)
489
+ raise ArgumentError, "invalid value for 'margin_measure_type', must be one of #{validator.allowable_values}."
490
+ end
491
+ @margin_measure_type = margin_measure_type
492
+ else
493
+ @margin_measure_type = validator.allowable_values[margin_measure_type.to_i]
494
+ end
495
+ end
496
+
497
+ # Custom attribute writer method checking allowed values (enum).
498
+ # @param [Object] border_dash_style Object to be assigned
499
+ def border_dash_style=(border_dash_style)
500
+ validator = EnumAttributeValidator.new('String', ["Dash", "DashDot", "DashDotDot", "DashLongDash", "DashLongDashDot", "RoundDot", "Solid", "SquareDot"])
501
+ if border_dash_style.to_i == 0
502
+ unless validator.valid?(border_dash_style)
503
+ raise ArgumentError, "invalid value for 'border_dash_style', must be one of #{validator.allowable_values}."
504
+ end
505
+ @border_dash_style = border_dash_style
506
+ else
507
+ @border_dash_style = validator.allowable_values[border_dash_style.to_i]
508
+ end
509
+ end
510
+
511
+ # Custom attribute writer method checking allowed values (enum).
512
+ # @param [Object] code_text_alignment Object to be assigned
513
+ def code_text_alignment=(code_text_alignment)
514
+ validator = EnumAttributeValidator.new('String', ["None", "Above", "Below", "Right"])
515
+ if code_text_alignment.to_i == 0
516
+ unless validator.valid?(code_text_alignment)
517
+ raise ArgumentError, "invalid value for 'code_text_alignment', must be one of #{validator.allowable_values}."
518
+ end
519
+ @code_text_alignment = code_text_alignment
520
+ else
521
+ @code_text_alignment = validator.allowable_values[code_text_alignment.to_i]
522
+ end
523
+ end
524
+
525
+ # Checks equality by comparing each attribute.
526
+ # @param [Object] Object to be compared
527
+ def ==(other)
528
+ return true if self.equal?(other)
529
+ self.class == other.class &&
530
+ document_page_number == other.document_page_number &&
531
+ pages_setup == other.pages_setup &&
532
+ options_type == other.options_type &&
533
+ left == other.left &&
534
+ top == other.top &&
535
+ width == other.width &&
536
+ height == other.height &&
537
+ location_measure_type == other.location_measure_type &&
538
+ size_measure_type == other.size_measure_type &&
539
+ stretch == other.stretch &&
540
+ rotation_angle == other.rotation_angle &&
541
+ horizontal_alignment == other.horizontal_alignment &&
542
+ vertical_alignment == other.vertical_alignment &&
543
+ margin == other.margin &&
544
+ margin_measure_type == other.margin_measure_type &&
545
+ text == other.text &&
546
+ sign_all_pages == other.sign_all_pages &&
547
+ font == other.font &&
548
+ fore_color == other.fore_color &&
549
+ border_color == other.border_color &&
550
+ background_color == other.background_color &&
551
+ background_brush == other.background_brush &&
552
+ qr_code_type_name == other.qr_code_type_name &&
553
+ border_visiblity == other.border_visiblity &&
554
+ border_dash_style == other.border_dash_style &&
555
+ border_weight == other.border_weight &&
556
+ opacity == other.opacity &&
557
+ code_text_alignment == other.code_text_alignment &&
558
+ inner_margins == other.inner_margins &&
559
+ logo_guid == other.logo_guid &&
560
+ sheet_number == other.sheet_number &&
561
+ row_number == other.row_number &&
562
+ column_number == other.column_number
563
+ end
564
+
565
+ # @see the `==` method
566
+ # @param [Object] Object to be compared
567
+ def eql?(other)
568
+ self == other
569
+ end
570
+
571
+ # Calculates hash code according to all attributes.
572
+ # @return [Fixnum] Hash code
573
+ def hash
574
+ [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, qr_code_type_name, border_visiblity, border_dash_style, border_weight, opacity, code_text_alignment, inner_margins, logo_guid, sheet_number, row_number, column_number].hash
575
+ end
576
+
577
+ # Builds the object from hash
578
+ # @param [Hash] attributes Model attributes in the form of hash
579
+ # @return [Object] Returns the model itself
580
+ def build_from_hash(attributes)
581
+ return nil unless attributes.is_a?(Hash)
582
+ self.class.swagger_types.each_pair do |key, type|
583
+
584
+ attributeName = self.class.attribute_map[key]
585
+ attributeNameLowerStr = attributeName.to_s
586
+ attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
587
+ attributeNameLower = attributeNameLowerStr.to_sym
588
+ attributeNameLowerStr2 = attributeName.to_s
589
+ attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
590
+ attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
591
+ attributeNameLower2 = attributeNameLowerStr2.to_sym
592
+
593
+ if type =~ /\AArray<(.*)>/i
594
+ # check to ensure the input is an array given that the the attribute
595
+ # is documented as an array but the input is not
596
+ if attributes[attributeName].is_a?(Array)
597
+ self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
598
+ end
599
+ if attributes[attributeNameLower].is_a?(Array)
600
+ self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
601
+ end
602
+ if attributes[attributeNameLower2].is_a?(Array)
603
+ self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
604
+ end
605
+ elsif !attributes[attributeName].nil?
606
+ self.send("#{key}=", _deserialize(type, attributes[attributeName]))
607
+ elsif !attributes[attributeNameLower].nil?
608
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
609
+ elsif !attributes[attributeNameLower2].nil?
610
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
611
+ end
612
+ # or else data not found in attributes(hash), not an issue as the data can be optional
613
+ end
614
+ self
615
+ end
616
+
617
+ # Deserializes the data based on type
618
+ # @param string type Data type
619
+ # @param string value Value to be deserialized
620
+ # @return [Object] Deserialized data
621
+ def _deserialize(type, value)
622
+ case type.to_sym
623
+ when :DateTime
624
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
625
+ when :Date
626
+ Time.at(/\d/.match(value)[0].to_f).to_date
627
+ when :String
628
+ value.to_s
629
+ when :Integer
630
+ value.to_i
631
+ when :Float
632
+ value.to_f
633
+ when :BOOLEAN
634
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
635
+ true
636
+ else
637
+ false
638
+ end
639
+ when :Object
640
+ # generic object (usually a Hash), return directly
641
+ value
642
+ when /\AArray<(?<inner_type>.+)>\z/
643
+ inner_type = Regexp.last_match[:inner_type]
644
+ value.map { |v| _deserialize(inner_type, v) }
645
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
646
+ k_type = Regexp.last_match[:k_type]
647
+ v_type = Regexp.last_match[:v_type]
648
+ {}.tap do |hash|
649
+ value.each do |k, v|
650
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
651
+ end
652
+ end
653
+ else
654
+ # model
655
+ temp_model = GroupDocsSignatureCloud.const_get(type).new
656
+ temp_model.build_from_hash(value)
657
+ end
658
+ end
659
+
660
+ # Returns the string representation of the object
661
+ # @return [String] String presentation of the object
662
+ def to_s
663
+ to_hash.to_s
664
+ end
665
+
666
+ # to_body is an alias to to_hash (backward compatibility)
667
+ # @return [Hash] Returns the object in the form of hash
668
+ def to_body
669
+ to_hash
670
+ end
671
+
672
+ # Returns the object in the form of hash
673
+ # @return [Hash] Returns the object in the form of hash
674
+ def to_hash
675
+ hash = {}
676
+ self.class.attribute_map.each_pair do |attr, param|
677
+ value = self.send(attr)
678
+ next if value.nil?
679
+ hash[param] = _to_hash(value)
680
+ end
681
+ hash
682
+ end
683
+
684
+ # Outputs non-array value in the form of hash
685
+ # For object, use to_hash. Otherwise, just return the value
686
+ # @param [Object] value Any valid value
687
+ # @return [Hash] Returns the value in the form of hash
688
+ def _to_hash(value)
689
+ if value.is_a?(Array)
690
+ value.compact.map { |v| _to_hash(v) }
691
+ elsif value.is_a?(Hash)
692
+ {}.tap do |hash|
693
+ value.each { |k, v| hash[k] = _to_hash(v) }
694
+ end
695
+ elsif value.respond_to? :to_hash
696
+ value.to_hash
697
+ else
698
+ value
699
+ end
700
+ end
701
+
702
+ end
703
+
704
+ end