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,736 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="cells_sign_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 Sign Options for Cells Documents.
32
+ class CellsSignTextOptionsData
33
+
34
+ # Gets or sets worksheet number for signing. Minimal value is 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
+ # Gets or sets the position of the left edge of the Signature area in pixels. This property is mutually exclusive with Column property. If Left property is set ColumnNumber will be reset to 0.
44
+ attr_accessor :left
45
+
46
+ # Gets or sets the position of the top edge of the Signature area in pixels. This property is mutually exclusive with Row property. If Top property is set RowNumber will be reset to 0.
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 worksheet 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 signature.
89
+ attr_accessor :fore_color
90
+
91
+ # Gets or sets the border color of signature.
92
+ attr_accessor :border_color
93
+
94
+ # Gets or sets the background color of signature.
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. For TextStamp implementation RadialGradientBrush is not applicable, it is replaced by LinearGradientBrush. It is not used for Watermark implementation.
98
+ attr_accessor :background_brush
99
+
100
+ # Gets or sets worksheet number for signing. DocumentPageNumber parameter contains the same value.
101
+ attr_accessor :sheet_number
102
+
103
+ # Gets or sets the top row number of signature (min value is 0). Top parameter contains the same value.
104
+ attr_accessor :row_number
105
+
106
+ # Gets or sets the left column number of signature (min value is 0). Left parameter contains the same value.
107
+ attr_accessor :column_number
108
+
109
+ # Gets or sets the signature border visibility.
110
+ attr_accessor :border_visiblity
111
+
112
+ # Gets or sets the signature border style.
113
+ attr_accessor :border_dash_style
114
+
115
+ # Gets or sets the signature border transparency (value from 0.0 (opaque) through 1.0 (clear)).
116
+ attr_accessor :border_transparency
117
+
118
+ # Gets or sets the weight of the signature border.
119
+ attr_accessor :border_weight
120
+
121
+ # Gets or sets the signature background transparency (value from 0.0 (opaque) through 1.0 (clear)).
122
+ attr_accessor :background_transparency
123
+
124
+ # Gets or sets the type of text signature implementation.
125
+ attr_accessor :signature_implementation
126
+
127
+ # Horizontal alignment of text inside a signature.
128
+ attr_accessor :text_horizontal_alignment
129
+
130
+ # Vertical alignment of text inside a signature.
131
+ attr_accessor :text_vertical_alignment
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
+ :'sheet_number' => :'SheetNumber',
180
+ :'row_number' => :'RowNumber',
181
+ :'column_number' => :'ColumnNumber',
182
+ :'border_visiblity' => :'BorderVisiblity',
183
+ :'border_dash_style' => :'BorderDashStyle',
184
+ :'border_transparency' => :'BorderTransparency',
185
+ :'border_weight' => :'BorderWeight',
186
+ :'background_transparency' => :'BackgroundTransparency',
187
+ :'signature_implementation' => :'SignatureImplementation',
188
+ :'text_horizontal_alignment' => :'TextHorizontalAlignment',
189
+ :'text_vertical_alignment' => :'TextVerticalAlignment'
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
+ :'sheet_number' => :'Integer',
219
+ :'row_number' => :'Integer',
220
+ :'column_number' => :'Integer',
221
+ :'border_visiblity' => :'BOOLEAN',
222
+ :'border_dash_style' => :'String',
223
+ :'border_transparency' => :'Float',
224
+ :'border_weight' => :'Float',
225
+ :'background_transparency' => :'Float',
226
+ :'signature_implementation' => :'String',
227
+ :'text_horizontal_alignment' => :'String',
228
+ :'text_vertical_alignment' => :'String'
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?(:'SheetNumber')
329
+ self.sheet_number = attributes[:'SheetNumber']
330
+ end
331
+
332
+ if attributes.key?(:'RowNumber')
333
+ self.row_number = attributes[:'RowNumber']
334
+ end
335
+
336
+ if attributes.key?(:'ColumnNumber')
337
+ self.column_number = attributes[:'ColumnNumber']
338
+ end
339
+
340
+ if attributes.key?(:'BorderVisiblity')
341
+ self.border_visiblity = attributes[:'BorderVisiblity']
342
+ end
343
+
344
+ if attributes.key?(:'BorderDashStyle')
345
+ self.border_dash_style = attributes[:'BorderDashStyle']
346
+ end
347
+
348
+ if attributes.key?(:'BorderTransparency')
349
+ self.border_transparency = attributes[:'BorderTransparency']
350
+ end
351
+
352
+ if attributes.key?(:'BorderWeight')
353
+ self.border_weight = attributes[:'BorderWeight']
354
+ end
355
+
356
+ if attributes.key?(:'BackgroundTransparency')
357
+ self.background_transparency = attributes[:'BackgroundTransparency']
358
+ end
359
+
360
+ if attributes.key?(:'SignatureImplementation')
361
+ self.signature_implementation = attributes[:'SignatureImplementation']
362
+ end
363
+
364
+ if attributes.key?(:'TextHorizontalAlignment')
365
+ self.text_horizontal_alignment = attributes[:'TextHorizontalAlignment']
366
+ end
367
+
368
+ if attributes.key?(:'TextVerticalAlignment')
369
+ self.text_vertical_alignment = attributes[:'TextVerticalAlignment']
370
+ end
371
+
372
+
373
+ if !((defined? options_type) == nil)
374
+ self.options_type = "CellsSignTextOptionsData"
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
+ signature_implementation_validator = EnumAttributeValidator.new('String', ["TextStamp", "TextAsImage"])
409
+ return false unless signature_implementation_validator.valid?(@signature_implementation)
410
+ text_horizontal_alignment_validator = EnumAttributeValidator.new('String', ["Left", "Center", "Right"])
411
+ return false unless text_horizontal_alignment_validator.valid?(@text_horizontal_alignment)
412
+ text_vertical_alignment_validator = EnumAttributeValidator.new('String', ["Top", "Center", "Bottom"])
413
+ return false unless text_vertical_alignment_validator.valid?(@text_vertical_alignment)
414
+ return true
415
+ end
416
+
417
+ # Custom attribute writer method checking allowed values (enum).
418
+ # @param [Object] location_measure_type Object to be assigned
419
+ def location_measure_type=(location_measure_type)
420
+ validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
421
+ if location_measure_type.to_i == 0
422
+ unless validator.valid?(location_measure_type)
423
+ raise ArgumentError, "invalid value for 'location_measure_type', must be one of #{validator.allowable_values}."
424
+ end
425
+ @location_measure_type = location_measure_type
426
+ else
427
+ @location_measure_type = validator.allowable_values[location_measure_type.to_i]
428
+ end
429
+ end
430
+
431
+ # Custom attribute writer method checking allowed values (enum).
432
+ # @param [Object] size_measure_type Object to be assigned
433
+ def size_measure_type=(size_measure_type)
434
+ validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
435
+ if size_measure_type.to_i == 0
436
+ unless validator.valid?(size_measure_type)
437
+ raise ArgumentError, "invalid value for 'size_measure_type', must be one of #{validator.allowable_values}."
438
+ end
439
+ @size_measure_type = size_measure_type
440
+ else
441
+ @size_measure_type = validator.allowable_values[size_measure_type.to_i]
442
+ end
443
+ end
444
+
445
+ # Custom attribute writer method checking allowed values (enum).
446
+ # @param [Object] stretch Object to be assigned
447
+ def stretch=(stretch)
448
+ validator = EnumAttributeValidator.new('String', ["None", "PageWidth", "PageHeight", "PageArea"])
449
+ if stretch.to_i == 0
450
+ unless validator.valid?(stretch)
451
+ raise ArgumentError, "invalid value for 'stretch', must be one of #{validator.allowable_values}."
452
+ end
453
+ @stretch = stretch
454
+ else
455
+ @stretch = validator.allowable_values[stretch.to_i]
456
+ end
457
+ end
458
+
459
+ # Custom attribute writer method checking allowed values (enum).
460
+ # @param [Object] horizontal_alignment Object to be assigned
461
+ def horizontal_alignment=(horizontal_alignment)
462
+ validator = EnumAttributeValidator.new('String', ["Default", "None", "Left", "Center", "Right"])
463
+ if horizontal_alignment.to_i == 0
464
+ unless validator.valid?(horizontal_alignment)
465
+ raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
466
+ end
467
+ @horizontal_alignment = horizontal_alignment
468
+ else
469
+ @horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
470
+ end
471
+ end
472
+
473
+ # Custom attribute writer method checking allowed values (enum).
474
+ # @param [Object] vertical_alignment Object to be assigned
475
+ def vertical_alignment=(vertical_alignment)
476
+ validator = EnumAttributeValidator.new('String', ["Default", "None", "Top", "Center", "Bottom"])
477
+ if vertical_alignment.to_i == 0
478
+ unless validator.valid?(vertical_alignment)
479
+ raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
480
+ end
481
+ @vertical_alignment = vertical_alignment
482
+ else
483
+ @vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
484
+ end
485
+ end
486
+
487
+ # Custom attribute writer method checking allowed values (enum).
488
+ # @param [Object] margin_measure_type Object to be assigned
489
+ def margin_measure_type=(margin_measure_type)
490
+ validator = EnumAttributeValidator.new('String', ["Pixels", "Percents", "Millimeters"])
491
+ if margin_measure_type.to_i == 0
492
+ unless validator.valid?(margin_measure_type)
493
+ raise ArgumentError, "invalid value for 'margin_measure_type', must be one of #{validator.allowable_values}."
494
+ end
495
+ @margin_measure_type = margin_measure_type
496
+ else
497
+ @margin_measure_type = validator.allowable_values[margin_measure_type.to_i]
498
+ end
499
+ end
500
+
501
+ # Custom attribute writer method checking allowed values (enum).
502
+ # @param [Object] border_dash_style Object to be assigned
503
+ def border_dash_style=(border_dash_style)
504
+ validator = EnumAttributeValidator.new('String', ["Dash", "DashDot", "DashDotDot", "DashLongDash", "DashLongDashDot", "RoundDot", "Solid", "SquareDot"])
505
+ if border_dash_style.to_i == 0
506
+ unless validator.valid?(border_dash_style)
507
+ raise ArgumentError, "invalid value for 'border_dash_style', must be one of #{validator.allowable_values}."
508
+ end
509
+ @border_dash_style = border_dash_style
510
+ else
511
+ @border_dash_style = validator.allowable_values[border_dash_style.to_i]
512
+ end
513
+ end
514
+
515
+ # Custom attribute writer method checking allowed values (enum).
516
+ # @param [Object] signature_implementation Object to be assigned
517
+ def signature_implementation=(signature_implementation)
518
+ validator = EnumAttributeValidator.new('String', ["TextStamp", "TextAsImage"])
519
+ if signature_implementation.to_i == 0
520
+ unless validator.valid?(signature_implementation)
521
+ raise ArgumentError, "invalid value for 'signature_implementation', must be one of #{validator.allowable_values}."
522
+ end
523
+ @signature_implementation = signature_implementation
524
+ else
525
+ @signature_implementation = validator.allowable_values[signature_implementation.to_i]
526
+ end
527
+ end
528
+
529
+ # Custom attribute writer method checking allowed values (enum).
530
+ # @param [Object] text_horizontal_alignment Object to be assigned
531
+ def text_horizontal_alignment=(text_horizontal_alignment)
532
+ validator = EnumAttributeValidator.new('String', ["Left", "Center", "Right"])
533
+ if text_horizontal_alignment.to_i == 0
534
+ unless validator.valid?(text_horizontal_alignment)
535
+ raise ArgumentError, "invalid value for 'text_horizontal_alignment', must be one of #{validator.allowable_values}."
536
+ end
537
+ @text_horizontal_alignment = text_horizontal_alignment
538
+ else
539
+ @text_horizontal_alignment = validator.allowable_values[text_horizontal_alignment.to_i]
540
+ end
541
+ end
542
+
543
+ # Custom attribute writer method checking allowed values (enum).
544
+ # @param [Object] text_vertical_alignment Object to be assigned
545
+ def text_vertical_alignment=(text_vertical_alignment)
546
+ validator = EnumAttributeValidator.new('String', ["Top", "Center", "Bottom"])
547
+ if text_vertical_alignment.to_i == 0
548
+ unless validator.valid?(text_vertical_alignment)
549
+ raise ArgumentError, "invalid value for 'text_vertical_alignment', must be one of #{validator.allowable_values}."
550
+ end
551
+ @text_vertical_alignment = text_vertical_alignment
552
+ else
553
+ @text_vertical_alignment = validator.allowable_values[text_vertical_alignment.to_i]
554
+ end
555
+ end
556
+
557
+ # Checks equality by comparing each attribute.
558
+ # @param [Object] Object to be compared
559
+ def ==(other)
560
+ return true if self.equal?(other)
561
+ self.class == other.class &&
562
+ document_page_number == other.document_page_number &&
563
+ pages_setup == other.pages_setup &&
564
+ options_type == other.options_type &&
565
+ left == other.left &&
566
+ top == other.top &&
567
+ width == other.width &&
568
+ height == other.height &&
569
+ location_measure_type == other.location_measure_type &&
570
+ size_measure_type == other.size_measure_type &&
571
+ stretch == other.stretch &&
572
+ rotation_angle == other.rotation_angle &&
573
+ horizontal_alignment == other.horizontal_alignment &&
574
+ vertical_alignment == other.vertical_alignment &&
575
+ margin == other.margin &&
576
+ margin_measure_type == other.margin_measure_type &&
577
+ text == other.text &&
578
+ sign_all_pages == other.sign_all_pages &&
579
+ font == other.font &&
580
+ fore_color == other.fore_color &&
581
+ border_color == other.border_color &&
582
+ background_color == other.background_color &&
583
+ background_brush == other.background_brush &&
584
+ sheet_number == other.sheet_number &&
585
+ row_number == other.row_number &&
586
+ column_number == other.column_number &&
587
+ border_visiblity == other.border_visiblity &&
588
+ border_dash_style == other.border_dash_style &&
589
+ border_transparency == other.border_transparency &&
590
+ border_weight == other.border_weight &&
591
+ background_transparency == other.background_transparency &&
592
+ signature_implementation == other.signature_implementation &&
593
+ text_horizontal_alignment == other.text_horizontal_alignment &&
594
+ text_vertical_alignment == other.text_vertical_alignment
595
+ end
596
+
597
+ # @see the `==` method
598
+ # @param [Object] Object to be compared
599
+ def eql?(other)
600
+ self == other
601
+ end
602
+
603
+ # Calculates hash code according to all attributes.
604
+ # @return [Fixnum] Hash code
605
+ def hash
606
+ [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, sheet_number, row_number, column_number, border_visiblity, border_dash_style, border_transparency, border_weight, background_transparency, signature_implementation, text_horizontal_alignment, text_vertical_alignment].hash
607
+ end
608
+
609
+ # Builds the object from hash
610
+ # @param [Hash] attributes Model attributes in the form of hash
611
+ # @return [Object] Returns the model itself
612
+ def build_from_hash(attributes)
613
+ return nil unless attributes.is_a?(Hash)
614
+ self.class.swagger_types.each_pair do |key, type|
615
+
616
+ attributeName = self.class.attribute_map[key]
617
+ attributeNameLowerStr = attributeName.to_s
618
+ attributeNameLowerStr[0] = attributeNameLowerStr[0].downcase
619
+ attributeNameLower = attributeNameLowerStr.to_sym
620
+ attributeNameLowerStr2 = attributeName.to_s
621
+ attributeNameLowerStr2[0] = attributeNameLowerStr[0].downcase
622
+ attributeNameLowerStr2[1] = attributeNameLowerStr[1].downcase
623
+ attributeNameLower2 = attributeNameLowerStr2.to_sym
624
+
625
+ if type =~ /\AArray<(.*)>/i
626
+ # check to ensure the input is an array given that the the attribute
627
+ # is documented as an array but the input is not
628
+ if attributes[attributeName].is_a?(Array)
629
+ self.send("#{key}=", attributes[attributeName].map { |v| _deserialize($1, v) })
630
+ end
631
+ if attributes[attributeNameLower].is_a?(Array)
632
+ self.send("#{key}=", attributes[attributeNameLower].map { |v| _deserialize($1, v) })
633
+ end
634
+ if attributes[attributeNameLower2].is_a?(Array)
635
+ self.send("#{key}=", attributes[attributeNameLower2].map { |v| _deserialize($1, v) })
636
+ end
637
+ elsif !attributes[attributeName].nil?
638
+ self.send("#{key}=", _deserialize(type, attributes[attributeName]))
639
+ elsif !attributes[attributeNameLower].nil?
640
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower]))
641
+ elsif !attributes[attributeNameLower2].nil?
642
+ self.send("#{key}=", _deserialize(type, attributes[attributeNameLower2]))
643
+ end
644
+ # or else data not found in attributes(hash), not an issue as the data can be optional
645
+ end
646
+ self
647
+ end
648
+
649
+ # Deserializes the data based on type
650
+ # @param string type Data type
651
+ # @param string value Value to be deserialized
652
+ # @return [Object] Deserialized data
653
+ def _deserialize(type, value)
654
+ case type.to_sym
655
+ when :DateTime
656
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
657
+ when :Date
658
+ Time.at(/\d/.match(value)[0].to_f).to_date
659
+ when :String
660
+ value.to_s
661
+ when :Integer
662
+ value.to_i
663
+ when :Float
664
+ value.to_f
665
+ when :BOOLEAN
666
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
667
+ true
668
+ else
669
+ false
670
+ end
671
+ when :Object
672
+ # generic object (usually a Hash), return directly
673
+ value
674
+ when /\AArray<(?<inner_type>.+)>\z/
675
+ inner_type = Regexp.last_match[:inner_type]
676
+ value.map { |v| _deserialize(inner_type, v) }
677
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
678
+ k_type = Regexp.last_match[:k_type]
679
+ v_type = Regexp.last_match[:v_type]
680
+ {}.tap do |hash|
681
+ value.each do |k, v|
682
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
683
+ end
684
+ end
685
+ else
686
+ # model
687
+ temp_model = GroupDocsSignatureCloud.const_get(type).new
688
+ temp_model.build_from_hash(value)
689
+ end
690
+ end
691
+
692
+ # Returns the string representation of the object
693
+ # @return [String] String presentation of the object
694
+ def to_s
695
+ to_hash.to_s
696
+ end
697
+
698
+ # to_body is an alias to to_hash (backward compatibility)
699
+ # @return [Hash] Returns the object in the form of hash
700
+ def to_body
701
+ to_hash
702
+ end
703
+
704
+ # Returns the object in the form of hash
705
+ # @return [Hash] Returns the object in the form of hash
706
+ def to_hash
707
+ hash = {}
708
+ self.class.attribute_map.each_pair do |attr, param|
709
+ value = self.send(attr)
710
+ next if value.nil?
711
+ hash[param] = _to_hash(value)
712
+ end
713
+ hash
714
+ end
715
+
716
+ # Outputs non-array value in the form of hash
717
+ # For object, use to_hash. Otherwise, just return the value
718
+ # @param [Object] value Any valid value
719
+ # @return [Hash] Returns the value in the form of hash
720
+ def _to_hash(value)
721
+ if value.is_a?(Array)
722
+ value.compact.map { |v| _to_hash(v) }
723
+ elsif value.is_a?(Hash)
724
+ {}.tap do |hash|
725
+ value.each { |k, v| hash[k] = _to_hash(v) }
726
+ end
727
+ elsif value.respond_to? :to_hash
728
+ value.to_hash
729
+ else
730
+ value
731
+ end
732
+ end
733
+
734
+ end
735
+
736
+ end