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