aspose_pdf_cloud 19.8.0 → 19.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,443 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2019 Aspose.PDF Cloud
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
19
+ --------------------------------------------------------------------------------------------------------------------
20
+ =end
21
+
22
+ require 'date'
23
+ require 'time'
24
+
25
+ module AsposePdfCloud
26
+ # Provides TextBoxField.
27
+ class TextBoxField
28
+ # Link to the document.
29
+ attr_accessor :links
30
+
31
+ # Field name.
32
+ attr_accessor :partial_name
33
+
34
+ # Field rectangle.
35
+ attr_accessor :rect
36
+
37
+ # Field value.
38
+ attr_accessor :value
39
+
40
+ # Page index.
41
+ attr_accessor :page_index
42
+
43
+ # Gets or sets height of the field.
44
+ attr_accessor :height
45
+
46
+ # Gets or sets width of the field.
47
+ attr_accessor :width
48
+
49
+ # Z index.
50
+ attr_accessor :z_index
51
+
52
+ # Is group.
53
+ attr_accessor :is_group
54
+
55
+ # Gets field parent.
56
+ attr_accessor :parent
57
+
58
+ # Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page.
59
+ attr_accessor :is_shared_field
60
+
61
+ # Gets Flags of the field.
62
+ attr_accessor :flags
63
+
64
+ # Color of the annotation.
65
+ attr_accessor :color
66
+
67
+ # Get the field content.
68
+ attr_accessor :contents
69
+
70
+ # Gets or sets a outer margin for paragraph (for pdf generation)
71
+ attr_accessor :margin
72
+
73
+ # Field highlighting mode.
74
+ attr_accessor :highlighting
75
+
76
+ # Gets HorizontalAlignment of the field.
77
+ attr_accessor :horizontal_alignment
78
+
79
+ # Gets VerticalAlignment of the field.
80
+ attr_accessor :vertical_alignment
81
+
82
+ # Gets or sets multiline flag of the field. If Multiline is true field can contain multiple lines of text.
83
+ attr_accessor :multiline
84
+
85
+ # Gets or sets spellcheck flag for field. If true field shall be spell checked.
86
+ attr_accessor :spell_check
87
+
88
+ # Gets or sets scrollable flag of field. If true field can be scrolled.
89
+ attr_accessor :scrollable
90
+
91
+ # Gets or sets flag which indicates is field divided into spaced positions.
92
+ attr_accessor :force_combs
93
+
94
+ # Gets or sets maximum length of text in the field.
95
+ attr_accessor :max_len
96
+
97
+ # Adds barcode 128 into the field. Field value will be changed onto the code and field become read only.
98
+ attr_accessor :barcode
99
+
100
+
101
+ # Attribute mapping from ruby-style variable name to JSON key.
102
+ def self.attribute_map
103
+ {
104
+ :'links' => :'Links',
105
+ :'partial_name' => :'PartialName',
106
+ :'rect' => :'Rect',
107
+ :'value' => :'Value',
108
+ :'page_index' => :'PageIndex',
109
+ :'height' => :'Height',
110
+ :'width' => :'Width',
111
+ :'z_index' => :'ZIndex',
112
+ :'is_group' => :'IsGroup',
113
+ :'parent' => :'Parent',
114
+ :'is_shared_field' => :'IsSharedField',
115
+ :'flags' => :'Flags',
116
+ :'color' => :'Color',
117
+ :'contents' => :'Contents',
118
+ :'margin' => :'Margin',
119
+ :'highlighting' => :'Highlighting',
120
+ :'horizontal_alignment' => :'HorizontalAlignment',
121
+ :'vertical_alignment' => :'VerticalAlignment',
122
+ :'multiline' => :'Multiline',
123
+ :'spell_check' => :'SpellCheck',
124
+ :'scrollable' => :'Scrollable',
125
+ :'force_combs' => :'ForceCombs',
126
+ :'max_len' => :'MaxLen',
127
+ :'barcode' => :'Barcode'
128
+ }
129
+ end
130
+
131
+ # Attribute type mapping.
132
+ def self.swagger_types
133
+ {
134
+ :'links' => :'Array<Link>',
135
+ :'partial_name' => :'String',
136
+ :'rect' => :'Rectangle',
137
+ :'value' => :'String',
138
+ :'page_index' => :'Integer',
139
+ :'height' => :'Float',
140
+ :'width' => :'Float',
141
+ :'z_index' => :'Integer',
142
+ :'is_group' => :'BOOLEAN',
143
+ :'parent' => :'FormField',
144
+ :'is_shared_field' => :'BOOLEAN',
145
+ :'flags' => :'Array<AnnotationFlags>',
146
+ :'color' => :'Color',
147
+ :'contents' => :'String',
148
+ :'margin' => :'MarginInfo',
149
+ :'highlighting' => :'LinkHighlightingMode',
150
+ :'horizontal_alignment' => :'HorizontalAlignment',
151
+ :'vertical_alignment' => :'VerticalAlignment',
152
+ :'multiline' => :'BOOLEAN',
153
+ :'spell_check' => :'BOOLEAN',
154
+ :'scrollable' => :'BOOLEAN',
155
+ :'force_combs' => :'BOOLEAN',
156
+ :'max_len' => :'Integer',
157
+ :'barcode' => :'String'
158
+ }
159
+ end
160
+
161
+ # Initializes the object
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ def initialize(attributes = {})
164
+ return unless attributes.is_a?(Hash)
165
+
166
+ # convert string to symbol for hash key
167
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
168
+
169
+ if attributes.has_key?(:'Links')
170
+ if (value = attributes[:'Links']).is_a?(Array)
171
+ self.links = value
172
+ end
173
+ end
174
+
175
+ if attributes.has_key?(:'PartialName')
176
+ self.partial_name = attributes[:'PartialName']
177
+ end
178
+
179
+ if attributes.has_key?(:'Rect')
180
+ self.rect = attributes[:'Rect']
181
+ end
182
+
183
+ if attributes.has_key?(:'Value')
184
+ self.value = attributes[:'Value']
185
+ end
186
+
187
+ if attributes.has_key?(:'PageIndex')
188
+ self.page_index = attributes[:'PageIndex']
189
+ end
190
+
191
+ if attributes.has_key?(:'Height')
192
+ self.height = attributes[:'Height']
193
+ end
194
+
195
+ if attributes.has_key?(:'Width')
196
+ self.width = attributes[:'Width']
197
+ end
198
+
199
+ if attributes.has_key?(:'ZIndex')
200
+ self.z_index = attributes[:'ZIndex']
201
+ end
202
+
203
+ if attributes.has_key?(:'IsGroup')
204
+ self.is_group = attributes[:'IsGroup']
205
+ end
206
+
207
+ if attributes.has_key?(:'Parent')
208
+ self.parent = attributes[:'Parent']
209
+ end
210
+
211
+ if attributes.has_key?(:'IsSharedField')
212
+ self.is_shared_field = attributes[:'IsSharedField']
213
+ end
214
+
215
+ if attributes.has_key?(:'Flags')
216
+ if (value = attributes[:'Flags']).is_a?(Array)
217
+ self.flags = value
218
+ end
219
+ end
220
+
221
+ if attributes.has_key?(:'Color')
222
+ self.color = attributes[:'Color']
223
+ end
224
+
225
+ if attributes.has_key?(:'Contents')
226
+ self.contents = attributes[:'Contents']
227
+ end
228
+
229
+ if attributes.has_key?(:'Margin')
230
+ self.margin = attributes[:'Margin']
231
+ end
232
+
233
+ if attributes.has_key?(:'Highlighting')
234
+ self.highlighting = attributes[:'Highlighting']
235
+ end
236
+
237
+ if attributes.has_key?(:'HorizontalAlignment')
238
+ self.horizontal_alignment = attributes[:'HorizontalAlignment']
239
+ end
240
+
241
+ if attributes.has_key?(:'VerticalAlignment')
242
+ self.vertical_alignment = attributes[:'VerticalAlignment']
243
+ end
244
+
245
+ if attributes.has_key?(:'Multiline')
246
+ self.multiline = attributes[:'Multiline']
247
+ end
248
+
249
+ if attributes.has_key?(:'SpellCheck')
250
+ self.spell_check = attributes[:'SpellCheck']
251
+ end
252
+
253
+ if attributes.has_key?(:'Scrollable')
254
+ self.scrollable = attributes[:'Scrollable']
255
+ end
256
+
257
+ if attributes.has_key?(:'ForceCombs')
258
+ self.force_combs = attributes[:'ForceCombs']
259
+ end
260
+
261
+ if attributes.has_key?(:'MaxLen')
262
+ self.max_len = attributes[:'MaxLen']
263
+ end
264
+
265
+ if attributes.has_key?(:'Barcode')
266
+ self.barcode = attributes[:'Barcode']
267
+ end
268
+
269
+ end
270
+
271
+ # Show invalid properties with the reasons. Usually used together with valid?
272
+ # @return Array for valid properies with the reasons
273
+ def list_invalid_properties
274
+ invalid_properties = Array.new
275
+ if @page_index.nil?
276
+ invalid_properties.push("invalid value for 'page_index', page_index cannot be nil.")
277
+ end
278
+
279
+ if @is_group.nil?
280
+ invalid_properties.push("invalid value for 'is_group', is_group cannot be nil.")
281
+ end
282
+
283
+ return invalid_properties
284
+ end
285
+
286
+ # Check to see if the all the properties in the model are valid
287
+ # @return true if the model is valid
288
+ def valid?
289
+ return false if @page_index.nil?
290
+ return false if @is_group.nil?
291
+ return true
292
+ end
293
+
294
+ # Checks equality by comparing each attribute.
295
+ # @param [Object] Object to be compared
296
+ def ==(o)
297
+ return true if self.equal?(o)
298
+ self.class == o.class &&
299
+ links == o.links &&
300
+ partial_name == o.partial_name &&
301
+ rect == o.rect &&
302
+ value == o.value &&
303
+ page_index == o.page_index &&
304
+ height == o.height &&
305
+ width == o.width &&
306
+ z_index == o.z_index &&
307
+ is_group == o.is_group &&
308
+ parent == o.parent &&
309
+ is_shared_field == o.is_shared_field &&
310
+ flags == o.flags &&
311
+ color == o.color &&
312
+ contents == o.contents &&
313
+ margin == o.margin &&
314
+ highlighting == o.highlighting &&
315
+ horizontal_alignment == o.horizontal_alignment &&
316
+ vertical_alignment == o.vertical_alignment &&
317
+ multiline == o.multiline &&
318
+ spell_check == o.spell_check &&
319
+ scrollable == o.scrollable &&
320
+ force_combs == o.force_combs &&
321
+ max_len == o.max_len &&
322
+ barcode == o.barcode
323
+ end
324
+
325
+ # @see the `==` method
326
+ # @param [Object] Object to be compared
327
+ def eql?(o)
328
+ self == o
329
+ end
330
+
331
+ # Calculates hash code according to all attributes.
332
+ # @return [Fixnum] Hash code
333
+ def hash
334
+ [links, partial_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, multiline, spell_check, scrollable, force_combs, max_len, barcode].hash
335
+ end
336
+
337
+ # Builds the object from hash
338
+ # @param [Hash] attributes Model attributes in the form of hash
339
+ # @return [Object] Returns the model itself
340
+ def build_from_hash(attributes)
341
+ return nil unless attributes.is_a?(Hash)
342
+ self.class.swagger_types.each_pair do |key, type|
343
+ if type =~ /\AArray<(.*)>/i
344
+ # check to ensure the input is an array given that the the attribute
345
+ # is documented as an array but the input is not
346
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
347
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
348
+ end
349
+ elsif !attributes[self.class.attribute_map[key]].nil?
350
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
351
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
352
+ end
353
+
354
+ self
355
+ end
356
+
357
+ # Deserializes the data based on type
358
+ # @param string type Data type
359
+ # @param string value Value to be deserialized
360
+ # @return [Object] Deserialized data
361
+ def _deserialize(type, value)
362
+ case type.to_sym
363
+ when :DateTime
364
+ DateTime.parse(value)
365
+ when :Date
366
+ Date.parse(value)
367
+ when :String
368
+ value.to_s
369
+ when :Integer
370
+ value.to_i
371
+ when :Float
372
+ value.to_f
373
+ when :BOOLEAN
374
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
375
+ true
376
+ else
377
+ false
378
+ end
379
+ when :Object
380
+ # generic object (usually a Hash), return directly
381
+ value
382
+ when /\AArray<(?<inner_type>.+)>\z/
383
+ inner_type = Regexp.last_match[:inner_type]
384
+ value.map { |v| _deserialize(inner_type, v) }
385
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
386
+ k_type = Regexp.last_match[:k_type]
387
+ v_type = Regexp.last_match[:v_type]
388
+ {}.tap do |hash|
389
+ value.each do |k, v|
390
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
391
+ end
392
+ end
393
+ else # model
394
+ temp_model = AsposePdfCloud.const_get(type).new
395
+ temp_model.build_from_hash(value)
396
+ end
397
+ end
398
+
399
+ # Returns the string representation of the object
400
+ # @return [String] String presentation of the object
401
+ def to_s
402
+ to_hash.to_s
403
+ end
404
+
405
+ # to_body is an alias to to_hash (backward compatibility)
406
+ # @return [Hash] Returns the object in the form of hash
407
+ def to_body
408
+ to_hash
409
+ end
410
+
411
+ # Returns the object in the form of hash
412
+ # @return [Hash] Returns the object in the form of hash
413
+ def to_hash
414
+ hash = {}
415
+ self.class.attribute_map.each_pair do |attr, param|
416
+ value = self.send(attr)
417
+ next if value.nil?
418
+ hash[param] = _to_hash(value)
419
+ end
420
+ hash
421
+ end
422
+
423
+ # Outputs non-array value in the form of hash
424
+ # For object, use to_hash. Otherwise, just return the value
425
+ # @param [Object] value Any valid value
426
+ # @return [Hash] Returns the value in the form of hash
427
+ def _to_hash(value)
428
+ if value.is_a?(Array)
429
+ value.compact.map{ |v| _to_hash(v) }
430
+ elsif value.is_a?(Hash)
431
+ {}.tap do |hash|
432
+ value.each { |k, v| hash[k] = _to_hash(v) }
433
+ end
434
+ elsif value.respond_to? :to_hash
435
+ value.to_hash
436
+ else
437
+ value
438
+ end
439
+ end
440
+
441
+ end
442
+
443
+ end
@@ -0,0 +1,224 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2019 Aspose.PDF Cloud
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
19
+ --------------------------------------------------------------------------------------------------------------------
20
+ =end
21
+
22
+ require 'date'
23
+ require 'time'
24
+
25
+ module AsposePdfCloud
26
+ # Represents response containing single text box field object
27
+ class TextBoxFieldResponse
28
+ # Response status code.
29
+ attr_accessor :code
30
+
31
+ # Response status.
32
+ attr_accessor :status
33
+
34
+ # Text box field object
35
+ attr_accessor :field
36
+
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'code' => :'Code',
42
+ :'status' => :'Status',
43
+ :'field' => :'Field'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'code' => :'Integer',
51
+ :'status' => :'String',
52
+ :'field' => :'TextBoxField'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
63
+
64
+ if attributes.has_key?(:'Code')
65
+ self.code = attributes[:'Code']
66
+ end
67
+
68
+ if attributes.has_key?(:'Status')
69
+ self.status = attributes[:'Status']
70
+ end
71
+
72
+ if attributes.has_key?(:'Field')
73
+ self.field = attributes[:'Field']
74
+ end
75
+
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properies with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ if @code.nil?
83
+ invalid_properties.push("invalid value for 'code', code cannot be nil.")
84
+ end
85
+
86
+ return invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if @code.nil?
93
+ return true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ code == o.code &&
102
+ status == o.status &&
103
+ field == o.field
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [code, status, field].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.swagger_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :DateTime
145
+ DateTime.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :BOOLEAN
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ temp_model = AsposePdfCloud.const_get(type).new
176
+ temp_model.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ next if value.nil?
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map{ |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+
224
+ end