carbon_ruby_sdk 0.2.8 → 0.2.10

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.
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class EmbeddingsAndChunksQueryInputV2
14
+ attr_accessor :pagination
15
+
16
+ attr_accessor :order_by
17
+
18
+ attr_accessor :order_dir
19
+
20
+ attr_accessor :filters
21
+
22
+ attr_accessor :include_vectors
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'pagination' => :'pagination',
28
+ :'order_by' => :'order_by',
29
+ :'order_dir' => :'order_dir',
30
+ :'filters' => :'filters',
31
+ :'include_vectors' => :'include_vectors'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'pagination' => :'Pagination',
44
+ :'order_by' => :'OrganizationUserFilesToSyncOrderByTypes',
45
+ :'order_dir' => :'OrderDir',
46
+ :'filters' => :'OrganizationUserFilesToSyncFilters',
47
+ :'include_vectors' => :'Boolean'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::EmbeddingsAndChunksQueryInputV2` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::EmbeddingsAndChunksQueryInputV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'pagination')
73
+ self.pagination = attributes[:'pagination']
74
+ end
75
+
76
+ if attributes.key?(:'order_by')
77
+ self.order_by = attributes[:'order_by']
78
+ else
79
+ self.order_by = 'updated_at'
80
+ end
81
+
82
+ if attributes.key?(:'order_dir')
83
+ self.order_dir = attributes[:'order_dir']
84
+ else
85
+ self.order_dir = 'asc'
86
+ end
87
+
88
+ if attributes.key?(:'filters')
89
+ self.filters = attributes[:'filters']
90
+ end
91
+
92
+ if attributes.key?(:'include_vectors')
93
+ self.include_vectors = attributes[:'include_vectors']
94
+ else
95
+ self.include_vectors = false
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+ if @filters.nil?
104
+ invalid_properties.push('invalid value for "filters", filters cannot be nil.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ return false if @filters.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ pagination == o.pagination &&
123
+ order_by == o.order_by &&
124
+ order_dir == o.order_dir &&
125
+ filters == o.filters &&
126
+ include_vectors == o.include_vectors
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [pagination, order_by, order_dir, filters, include_vectors].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ new.build_from_hash(attributes)
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def build_from_hash(attributes)
152
+ return nil unless attributes.is_a?(Hash)
153
+ attributes = attributes.transform_keys(&:to_sym)
154
+ self.class.openapi_types.each_pair do |key, type|
155
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
156
+ self.send("#{key}=", nil)
157
+ elsif type =~ /\AArray<(.*)>/i
158
+ # check to ensure the input is an array given that the attribute
159
+ # is documented as an array but the input is not
160
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
161
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
162
+ end
163
+ elsif !attributes[self.class.attribute_map[key]].nil?
164
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
165
+ end
166
+ end
167
+
168
+ self
169
+ end
170
+
171
+ # Deserializes the data based on type
172
+ # @param string type Data type
173
+ # @param string value Value to be deserialized
174
+ # @return [Object] Deserialized data
175
+ def _deserialize(type, value)
176
+ case type.to_sym
177
+ when :Time
178
+ Time.parse(value)
179
+ when :Date
180
+ Date.parse(value)
181
+ when :String
182
+ value.to_s
183
+ when :Integer
184
+ value.to_i
185
+ when :Float
186
+ value.to_f
187
+ when :Boolean
188
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
189
+ true
190
+ else
191
+ false
192
+ end
193
+ when :Object
194
+ # generic object (usually a Hash), return directly
195
+ value
196
+ when /\AArray<(?<inner_type>.+)>\z/
197
+ inner_type = Regexp.last_match[:inner_type]
198
+ value.map { |v| _deserialize(inner_type, v) }
199
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
200
+ k_type = Regexp.last_match[:k_type]
201
+ v_type = Regexp.last_match[:v_type]
202
+ {}.tap do |hash|
203
+ value.each do |k, v|
204
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
205
+ end
206
+ end
207
+ else # model
208
+ # models (e.g. Pet) or oneOf
209
+ klass = Carbon.const_get(type)
210
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
+ end
212
+ end
213
+
214
+ # Returns the string representation of the object
215
+ # @return [String] String presentation of the object
216
+ def to_s
217
+ to_hash.to_s
218
+ end
219
+
220
+ # to_body is an alias to to_hash (backward compatibility)
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_body
223
+ to_hash
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ if value.nil?
233
+ is_nullable = self.class.openapi_nullable.include?(attr)
234
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
+ end
236
+
237
+ hash[param] = _to_hash(value)
238
+ end
239
+ hash
240
+ end
241
+
242
+ # Outputs non-array value in the form of hash
243
+ # For object, use to_hash. Otherwise, just return the value
244
+ # @param [Object] value Any valid value
245
+ # @return [Hash] Returns the value in the form of hash
246
+ def _to_hash(value)
247
+ if value.is_a?(Array)
248
+ value.compact.map { |v| _to_hash(v) }
249
+ elsif value.is_a?(Hash)
250
+ {}.tap do |hash|
251
+ value.each { |k, v| hash[k] = _to_hash(v) }
252
+ end
253
+ elsif value.respond_to? :to_hash
254
+ value.to_hash
255
+ else
256
+ value
257
+ end
258
+ end
259
+
260
+ end
261
+
262
+ end
@@ -53,6 +53,9 @@ module Carbon
53
53
 
54
54
  attr_accessor :embedding_model
55
55
 
56
+ # Flag to control whether or not to include file-level metadata in the response. This metadata will be included in the `content_metadata` field of each document along with chunk/embedding level metadata.
57
+ attr_accessor :include_file_level_metadata
58
+
56
59
  # Attribute mapping from ruby-style variable name to JSON key.
57
60
  def self.attribute_map
58
61
  {
@@ -70,7 +73,8 @@ module Carbon
70
73
  :'hybrid_search' => :'hybrid_search',
71
74
  :'hybrid_search_tuning_parameters' => :'hybrid_search_tuning_parameters',
72
75
  :'media_type' => :'media_type',
73
- :'embedding_model' => :'embedding_model'
76
+ :'embedding_model' => :'embedding_model',
77
+ :'include_file_level_metadata' => :'include_file_level_metadata'
74
78
  }
75
79
  end
76
80
 
@@ -96,7 +100,8 @@ module Carbon
96
100
  :'hybrid_search' => :'Boolean',
97
101
  :'hybrid_search_tuning_parameters' => :'HybridSearchTuningParamsNullable',
98
102
  :'media_type' => :'FileContentTypesNullable',
99
- :'embedding_model' => :'EmbeddingGeneratorsNullable'
103
+ :'embedding_model' => :'EmbeddingGeneratorsNullable',
104
+ :'include_file_level_metadata' => :'Boolean'
100
105
  }
101
106
  end
102
107
 
@@ -114,7 +119,8 @@ module Carbon
114
119
  :'hybrid_search',
115
120
  :'hybrid_search_tuning_parameters',
116
121
  :'media_type',
117
- :'embedding_model'
122
+ :'embedding_model',
123
+ :'include_file_level_metadata'
118
124
  ])
119
125
  end
120
126
 
@@ -204,6 +210,12 @@ module Carbon
204
210
  else
205
211
  self.embedding_model = 'OPENAI'
206
212
  end
213
+
214
+ if attributes.key?(:'include_file_level_metadata')
215
+ self.include_file_level_metadata = attributes[:'include_file_level_metadata']
216
+ else
217
+ self.include_file_level_metadata = false
218
+ end
207
219
  end
208
220
 
209
221
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -286,7 +298,8 @@ module Carbon
286
298
  hybrid_search == o.hybrid_search &&
287
299
  hybrid_search_tuning_parameters == o.hybrid_search_tuning_parameters &&
288
300
  media_type == o.media_type &&
289
- embedding_model == o.embedding_model
301
+ embedding_model == o.embedding_model &&
302
+ include_file_level_metadata == o.include_file_level_metadata
290
303
  end
291
304
 
292
305
  # @see the `==` method
@@ -298,7 +311,7 @@ module Carbon
298
311
  # Calculates hash code according to all attributes.
299
312
  # @return [Integer] Hash code
300
313
  def hash
301
- [tags, query, query_vector, k, file_ids, parent_file_ids, include_all_children, tags_v2, include_tags, include_vectors, include_raw_file, hybrid_search, hybrid_search_tuning_parameters, media_type, embedding_model].hash
314
+ [tags, query, query_vector, k, file_ids, parent_file_ids, include_all_children, tags_v2, include_tags, include_vectors, include_raw_file, hybrid_search, hybrid_search_tuning_parameters, media_type, embedding_model, include_file_level_metadata].hash
302
315
  end
303
316
 
304
317
  # Builds the object from hash
@@ -0,0 +1,326 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class ListUserResponse
14
+ attr_accessor :id
15
+
16
+ attr_accessor :organization_id
17
+
18
+ attr_accessor :organization_supplied_user_id
19
+
20
+ attr_accessor :created_at
21
+
22
+ attr_accessor :updated_at
23
+
24
+ attr_accessor :deleted_at
25
+
26
+ attr_accessor :enabled_features
27
+
28
+ attr_accessor :custom_limits
29
+
30
+ attr_accessor :auto_sync_enabled_sources
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'organization_id' => :'organization_id',
37
+ :'organization_supplied_user_id' => :'organization_supplied_user_id',
38
+ :'created_at' => :'created_at',
39
+ :'updated_at' => :'updated_at',
40
+ :'deleted_at' => :'deleted_at',
41
+ :'enabled_features' => :'enabled_features',
42
+ :'custom_limits' => :'custom_limits',
43
+ :'auto_sync_enabled_sources' => :'auto_sync_enabled_sources'
44
+ }
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'id' => :'Integer',
56
+ :'organization_id' => :'Integer',
57
+ :'organization_supplied_user_id' => :'String',
58
+ :'created_at' => :'Time',
59
+ :'updated_at' => :'Time',
60
+ :'deleted_at' => :'Time',
61
+ :'enabled_features' => :'Object',
62
+ :'custom_limits' => :'Object',
63
+ :'auto_sync_enabled_sources' => :'Array<Object>'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ :'deleted_at',
71
+ :'enabled_features',
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::ListUserResponse` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!self.class.attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::ListUserResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'id')
91
+ self.id = attributes[:'id']
92
+ end
93
+
94
+ if attributes.key?(:'organization_id')
95
+ self.organization_id = attributes[:'organization_id']
96
+ end
97
+
98
+ if attributes.key?(:'organization_supplied_user_id')
99
+ self.organization_supplied_user_id = attributes[:'organization_supplied_user_id']
100
+ end
101
+
102
+ if attributes.key?(:'created_at')
103
+ self.created_at = attributes[:'created_at']
104
+ end
105
+
106
+ if attributes.key?(:'updated_at')
107
+ self.updated_at = attributes[:'updated_at']
108
+ end
109
+
110
+ if attributes.key?(:'deleted_at')
111
+ self.deleted_at = attributes[:'deleted_at']
112
+ end
113
+
114
+ if attributes.key?(:'enabled_features')
115
+ self.enabled_features = attributes[:'enabled_features']
116
+ end
117
+
118
+ if attributes.key?(:'custom_limits')
119
+ self.custom_limits = attributes[:'custom_limits']
120
+ end
121
+
122
+ if attributes.key?(:'auto_sync_enabled_sources')
123
+ if (value = attributes[:'auto_sync_enabled_sources']).is_a?(Array)
124
+ self.auto_sync_enabled_sources = value
125
+ end
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ if @id.nil?
134
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
135
+ end
136
+
137
+ if @organization_id.nil?
138
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
139
+ end
140
+
141
+ if @organization_supplied_user_id.nil?
142
+ invalid_properties.push('invalid value for "organization_supplied_user_id", organization_supplied_user_id cannot be nil.')
143
+ end
144
+
145
+ if @created_at.nil?
146
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
147
+ end
148
+
149
+ if @updated_at.nil?
150
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
151
+ end
152
+
153
+ if @custom_limits.nil?
154
+ invalid_properties.push('invalid value for "custom_limits", custom_limits cannot be nil.')
155
+ end
156
+
157
+ if @auto_sync_enabled_sources.nil?
158
+ invalid_properties.push('invalid value for "auto_sync_enabled_sources", auto_sync_enabled_sources cannot be nil.')
159
+ end
160
+
161
+ invalid_properties
162
+ end
163
+
164
+ # Check to see if the all the properties in the model are valid
165
+ # @return true if the model is valid
166
+ def valid?
167
+ return false if @id.nil?
168
+ return false if @organization_id.nil?
169
+ return false if @organization_supplied_user_id.nil?
170
+ return false if @created_at.nil?
171
+ return false if @updated_at.nil?
172
+ return false if @custom_limits.nil?
173
+ return false if @auto_sync_enabled_sources.nil?
174
+ true
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ id == o.id &&
183
+ organization_id == o.organization_id &&
184
+ organization_supplied_user_id == o.organization_supplied_user_id &&
185
+ created_at == o.created_at &&
186
+ updated_at == o.updated_at &&
187
+ deleted_at == o.deleted_at &&
188
+ enabled_features == o.enabled_features &&
189
+ custom_limits == o.custom_limits &&
190
+ auto_sync_enabled_sources == o.auto_sync_enabled_sources
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [id, organization_id, organization_supplied_user_id, created_at, updated_at, deleted_at, enabled_features, custom_limits, auto_sync_enabled_sources].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ new.build_from_hash(attributes)
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ attributes = attributes.transform_keys(&:to_sym)
218
+ self.class.openapi_types.each_pair do |key, type|
219
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
220
+ self.send("#{key}=", nil)
221
+ elsif type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
225
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
226
+ end
227
+ elsif !attributes[self.class.attribute_map[key]].nil?
228
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
229
+ end
230
+ end
231
+
232
+ self
233
+ end
234
+
235
+ # Deserializes the data based on type
236
+ # @param string type Data type
237
+ # @param string value Value to be deserialized
238
+ # @return [Object] Deserialized data
239
+ def _deserialize(type, value)
240
+ case type.to_sym
241
+ when :Time
242
+ Time.parse(value)
243
+ when :Date
244
+ Date.parse(value)
245
+ when :String
246
+ value.to_s
247
+ when :Integer
248
+ value.to_i
249
+ when :Float
250
+ value.to_f
251
+ when :Boolean
252
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
+ true
254
+ else
255
+ false
256
+ end
257
+ when :Object
258
+ # generic object (usually a Hash), return directly
259
+ value
260
+ when /\AArray<(?<inner_type>.+)>\z/
261
+ inner_type = Regexp.last_match[:inner_type]
262
+ value.map { |v| _deserialize(inner_type, v) }
263
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
+ k_type = Regexp.last_match[:k_type]
265
+ v_type = Regexp.last_match[:v_type]
266
+ {}.tap do |hash|
267
+ value.each do |k, v|
268
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
269
+ end
270
+ end
271
+ else # model
272
+ # models (e.g. Pet) or oneOf
273
+ klass = Carbon.const_get(type)
274
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
275
+ end
276
+ end
277
+
278
+ # Returns the string representation of the object
279
+ # @return [String] String presentation of the object
280
+ def to_s
281
+ to_hash.to_s
282
+ end
283
+
284
+ # to_body is an alias to to_hash (backward compatibility)
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_body
287
+ to_hash
288
+ end
289
+
290
+ # Returns the object in the form of hash
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_hash
293
+ hash = {}
294
+ self.class.attribute_map.each_pair do |attr, param|
295
+ value = self.send(attr)
296
+ if value.nil?
297
+ is_nullable = self.class.openapi_nullable.include?(attr)
298
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
299
+ end
300
+
301
+ hash[param] = _to_hash(value)
302
+ end
303
+ hash
304
+ end
305
+
306
+ # Outputs non-array value in the form of hash
307
+ # For object, use to_hash. Otherwise, just return the value
308
+ # @param [Object] value Any valid value
309
+ # @return [Hash] Returns the value in the form of hash
310
+ def _to_hash(value)
311
+ if value.is_a?(Array)
312
+ value.compact.map { |v| _to_hash(v) }
313
+ elsif value.is_a?(Hash)
314
+ {}.tap do |hash|
315
+ value.each { |k, v| hash[k] = _to_hash(v) }
316
+ end
317
+ elsif value.respond_to? :to_hash
318
+ value.to_hash
319
+ else
320
+ value
321
+ end
322
+ end
323
+
324
+ end
325
+
326
+ end