pulpcore_client 3.118.4 → 3.119.0

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/docs/ArtifactDistributionResponse.md +16 -16
  4. data/docs/ContentguardsApi.md +4 -4
  5. data/docs/ContentguardsEnvvarHeaderApi.md +810 -0
  6. data/docs/EnvVarHeaderContentGuard.md +24 -0
  7. data/docs/EnvVarHeaderContentGuardResponse.md +32 -0
  8. data/docs/PaginatedEnvVarHeaderContentGuardResponseList.md +24 -0
  9. data/docs/PatchedEnvVarHeaderContentGuard.md +24 -0
  10. data/docs/Purge.md +1 -1
  11. data/lib/pulpcore_client/api/contentguards_api.rb +6 -6
  12. data/lib/pulpcore_client/api/contentguards_envvar_header_api.rb +799 -0
  13. data/lib/pulpcore_client/models/artifact_distribution_response.rb +68 -68
  14. data/lib/pulpcore_client/models/env_var_header_content_guard.rb +340 -0
  15. data/lib/pulpcore_client/models/env_var_header_content_guard_response.rb +307 -0
  16. data/lib/pulpcore_client/models/paginated_env_var_header_content_guard_response_list.rb +257 -0
  17. data/lib/pulpcore_client/models/patched_env_var_header_content_guard.rb +319 -0
  18. data/lib/pulpcore_client/models/purge.rb +1 -1
  19. data/lib/pulpcore_client/version.rb +1 -1
  20. data/lib/pulpcore_client.rb +5 -0
  21. data/spec/api/contentguards_api_spec.rb +2 -2
  22. data/spec/api/contentguards_envvar_header_api_spec.rb +192 -0
  23. data/spec/models/artifact_distribution_response_spec.rb +12 -12
  24. data/spec/models/env_var_header_content_guard_response_spec.rb +78 -0
  25. data/spec/models/env_var_header_content_guard_spec.rb +54 -0
  26. data/spec/models/paginated_env_var_header_content_guard_response_list_spec.rb +54 -0
  27. data/spec/models/patched_env_var_header_content_guard_spec.rb +54 -0
  28. metadata +217 -197
@@ -16,59 +16,59 @@ require 'time'
16
16
  module PulpcoreClient
17
17
  # A serializer for ArtifactDistribution.
18
18
  class ArtifactDistributionResponse
19
- # Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
20
- attr_accessor :pulp_last_updated
21
-
22
19
  # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
23
20
  attr_accessor :base_path
24
21
 
22
+ # The Pulp Resource Name (PRN).
23
+ attr_accessor :prn
24
+
25
25
  # Whether this distribution should be shown in the content app.
26
26
  attr_accessor :hidden
27
27
 
28
- # Timestamp of creation.
29
- attr_accessor :pulp_created
30
-
31
- # The Pulp Resource Name (PRN) of the associated optional content guard.
32
- attr_accessor :content_guard_prn
28
+ attr_accessor :pulp_href
33
29
 
34
- # Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.
35
- attr_accessor :no_content_change_since
30
+ # The URL for accessing the publication as defined by this distribution.
31
+ attr_accessor :base_url
36
32
 
37
- attr_accessor :pulp_labels
33
+ # An optional content-guard.
34
+ attr_accessor :content_guard
38
35
 
39
36
  # A unique name. Ex, `rawhide` and `stable`.
40
37
  attr_accessor :name
41
38
 
42
- attr_accessor :pulp_href
39
+ attr_accessor :pulp_labels
43
40
 
44
- # The Pulp Resource Name (PRN).
45
- attr_accessor :prn
41
+ # Timestamp of creation.
42
+ attr_accessor :pulp_created
46
43
 
47
- # The URL for accessing the publication as defined by this distribution.
48
- attr_accessor :base_url
44
+ # Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
45
+ attr_accessor :pulp_last_updated
49
46
 
50
47
  # RepositoryVersion to be served
51
48
  attr_accessor :repository_version
52
49
 
53
- # An optional content-guard.
54
- attr_accessor :content_guard
50
+ # Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.
51
+ attr_accessor :no_content_change_since
52
+
53
+ # The Pulp Resource Name (PRN) of the associated optional content guard.
54
+ attr_accessor :content_guard_prn
55
55
 
56
56
  # Attribute mapping from ruby-style variable name to JSON key.
57
57
  def self.attribute_map
58
58
  {
59
- :'pulp_last_updated' => :'pulp_last_updated',
60
59
  :'base_path' => :'base_path',
60
+ :'prn' => :'prn',
61
61
  :'hidden' => :'hidden',
62
- :'pulp_created' => :'pulp_created',
63
- :'content_guard_prn' => :'content_guard_prn',
64
- :'no_content_change_since' => :'no_content_change_since',
65
- :'pulp_labels' => :'pulp_labels',
66
- :'name' => :'name',
67
62
  :'pulp_href' => :'pulp_href',
68
- :'prn' => :'prn',
69
63
  :'base_url' => :'base_url',
64
+ :'content_guard' => :'content_guard',
65
+ :'name' => :'name',
66
+ :'pulp_labels' => :'pulp_labels',
67
+ :'pulp_created' => :'pulp_created',
68
+ :'pulp_last_updated' => :'pulp_last_updated',
70
69
  :'repository_version' => :'repository_version',
71
- :'content_guard' => :'content_guard'
70
+ :'no_content_change_since' => :'no_content_change_since',
71
+ :'content_guard_prn' => :'content_guard_prn'
72
72
  }
73
73
  end
74
74
 
@@ -80,27 +80,27 @@ module PulpcoreClient
80
80
  # Attribute type mapping.
81
81
  def self.openapi_types
82
82
  {
83
- :'pulp_last_updated' => :'Time',
84
83
  :'base_path' => :'String',
84
+ :'prn' => :'String',
85
85
  :'hidden' => :'Boolean',
86
- :'pulp_created' => :'Time',
87
- :'content_guard_prn' => :'String',
88
- :'no_content_change_since' => :'String',
89
- :'pulp_labels' => :'Hash<String, String>',
90
- :'name' => :'String',
91
86
  :'pulp_href' => :'String',
92
- :'prn' => :'String',
93
87
  :'base_url' => :'String',
88
+ :'content_guard' => :'String',
89
+ :'name' => :'String',
90
+ :'pulp_labels' => :'Hash<String, String>',
91
+ :'pulp_created' => :'Time',
92
+ :'pulp_last_updated' => :'Time',
94
93
  :'repository_version' => :'String',
95
- :'content_guard' => :'String'
94
+ :'no_content_change_since' => :'String',
95
+ :'content_guard_prn' => :'String'
96
96
  }
97
97
  end
98
98
 
99
99
  # List of attributes with nullable: true
100
100
  def self.openapi_nullable
101
101
  Set.new([
102
+ :'content_guard',
102
103
  :'repository_version',
103
- :'content_guard'
104
104
  ])
105
105
  end
106
106
 
@@ -119,38 +119,32 @@ module PulpcoreClient
119
119
  h[k.to_sym] = v
120
120
  }
121
121
 
122
- if attributes.key?(:'pulp_last_updated')
123
- self.pulp_last_updated = attributes[:'pulp_last_updated']
124
- end
125
-
126
122
  if attributes.key?(:'base_path')
127
123
  self.base_path = attributes[:'base_path']
128
124
  else
129
125
  self.base_path = nil
130
126
  end
131
127
 
128
+ if attributes.key?(:'prn')
129
+ self.prn = attributes[:'prn']
130
+ end
131
+
132
132
  if attributes.key?(:'hidden')
133
133
  self.hidden = attributes[:'hidden']
134
134
  else
135
135
  self.hidden = false
136
136
  end
137
137
 
138
- if attributes.key?(:'pulp_created')
139
- self.pulp_created = attributes[:'pulp_created']
140
- end
141
-
142
- if attributes.key?(:'content_guard_prn')
143
- self.content_guard_prn = attributes[:'content_guard_prn']
138
+ if attributes.key?(:'pulp_href')
139
+ self.pulp_href = attributes[:'pulp_href']
144
140
  end
145
141
 
146
- if attributes.key?(:'no_content_change_since')
147
- self.no_content_change_since = attributes[:'no_content_change_since']
142
+ if attributes.key?(:'base_url')
143
+ self.base_url = attributes[:'base_url']
148
144
  end
149
145
 
150
- if attributes.key?(:'pulp_labels')
151
- if (value = attributes[:'pulp_labels']).is_a?(Hash)
152
- self.pulp_labels = value
153
- end
146
+ if attributes.key?(:'content_guard')
147
+ self.content_guard = attributes[:'content_guard']
154
148
  end
155
149
 
156
150
  if attributes.key?(:'name')
@@ -159,24 +153,30 @@ module PulpcoreClient
159
153
  self.name = nil
160
154
  end
161
155
 
162
- if attributes.key?(:'pulp_href')
163
- self.pulp_href = attributes[:'pulp_href']
156
+ if attributes.key?(:'pulp_labels')
157
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
158
+ self.pulp_labels = value
159
+ end
164
160
  end
165
161
 
166
- if attributes.key?(:'prn')
167
- self.prn = attributes[:'prn']
162
+ if attributes.key?(:'pulp_created')
163
+ self.pulp_created = attributes[:'pulp_created']
168
164
  end
169
165
 
170
- if attributes.key?(:'base_url')
171
- self.base_url = attributes[:'base_url']
166
+ if attributes.key?(:'pulp_last_updated')
167
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
172
168
  end
173
169
 
174
170
  if attributes.key?(:'repository_version')
175
171
  self.repository_version = attributes[:'repository_version']
176
172
  end
177
173
 
178
- if attributes.key?(:'content_guard')
179
- self.content_guard = attributes[:'content_guard']
174
+ if attributes.key?(:'no_content_change_since')
175
+ self.no_content_change_since = attributes[:'no_content_change_since']
176
+ end
177
+
178
+ if attributes.key?(:'content_guard_prn')
179
+ self.content_guard_prn = attributes[:'content_guard_prn']
180
180
  end
181
181
  end
182
182
 
@@ -210,19 +210,19 @@ module PulpcoreClient
210
210
  def ==(o)
211
211
  return true if self.equal?(o)
212
212
  self.class == o.class &&
213
- pulp_last_updated == o.pulp_last_updated &&
214
213
  base_path == o.base_path &&
214
+ prn == o.prn &&
215
215
  hidden == o.hidden &&
216
- pulp_created == o.pulp_created &&
217
- content_guard_prn == o.content_guard_prn &&
218
- no_content_change_since == o.no_content_change_since &&
219
- pulp_labels == o.pulp_labels &&
220
- name == o.name &&
221
216
  pulp_href == o.pulp_href &&
222
- prn == o.prn &&
223
217
  base_url == o.base_url &&
218
+ content_guard == o.content_guard &&
219
+ name == o.name &&
220
+ pulp_labels == o.pulp_labels &&
221
+ pulp_created == o.pulp_created &&
222
+ pulp_last_updated == o.pulp_last_updated &&
224
223
  repository_version == o.repository_version &&
225
- content_guard == o.content_guard
224
+ no_content_change_since == o.no_content_change_since &&
225
+ content_guard_prn == o.content_guard_prn
226
226
  end
227
227
 
228
228
  # @see the `==` method
@@ -234,7 +234,7 @@ module PulpcoreClient
234
234
  # Calculates hash code according to all attributes.
235
235
  # @return [Integer] Hash code
236
236
  def hash
237
- [pulp_last_updated, base_path, hidden, pulp_created, content_guard_prn, no_content_change_since, pulp_labels, name, pulp_href, prn, base_url, repository_version, content_guard].hash
237
+ [base_path, prn, hidden, pulp_href, base_url, content_guard, name, pulp_labels, pulp_created, pulp_last_updated, repository_version, no_content_change_since, content_guard_prn].hash
238
238
  end
239
239
 
240
240
  # Builds the object from hash
@@ -0,0 +1,340 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PulpcoreClient
17
+ # A serializer for EnvVarHeaderContentGuard. The guard expects the request header named ``header_name`` to carry a Base64-encoded UTF-8 representation of the secret. The plaintext secret is read from ``env_var`` on the server at request time and is never stored in or returned by the API.
18
+ class EnvVarHeaderContentGuard
19
+ # The unique name.
20
+ attr_accessor :name
21
+
22
+ # An optional description.
23
+ attr_accessor :description
24
+
25
+ # The header name the guard will check on.
26
+ attr_accessor :header_name
27
+
28
+ # Name of a content-app environment variable holding the expected secret (plaintext UTF-8). Must be listed in ENVVAR_HEADER_CONTENT_GUARD_ALLOWED_VARS. The request header must send that value Base64-encoded. The value is never stored in or returned by the API.
29
+ attr_accessor :env_var
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'name' => :'name',
35
+ :'description' => :'description',
36
+ :'header_name' => :'header_name',
37
+ :'env_var' => :'env_var'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'name' => :'String',
50
+ :'description' => :'String',
51
+ :'header_name' => :'String',
52
+ :'env_var' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'description',
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::EnvVarHeaderContentGuard` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::EnvVarHeaderContentGuard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'name')
79
+ self.name = attributes[:'name']
80
+ else
81
+ self.name = nil
82
+ end
83
+
84
+ if attributes.key?(:'description')
85
+ self.description = attributes[:'description']
86
+ end
87
+
88
+ if attributes.key?(:'header_name')
89
+ self.header_name = attributes[:'header_name']
90
+ else
91
+ self.header_name = nil
92
+ end
93
+
94
+ if attributes.key?(:'env_var')
95
+ self.env_var = attributes[:'env_var']
96
+ else
97
+ self.env_var = nil
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ if @name.nil?
107
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
108
+ end
109
+
110
+ if @name.to_s.length < 1
111
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
112
+ end
113
+
114
+ if !@description.nil? && @description.to_s.length < 1
115
+ invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
116
+ end
117
+
118
+ if @header_name.nil?
119
+ invalid_properties.push('invalid value for "header_name", header_name cannot be nil.')
120
+ end
121
+
122
+ if @header_name.to_s.length < 1
123
+ invalid_properties.push('invalid value for "header_name", the character length must be great than or equal to 1.')
124
+ end
125
+
126
+ if @env_var.nil?
127
+ invalid_properties.push('invalid value for "env_var", env_var cannot be nil.')
128
+ end
129
+
130
+ if @env_var.to_s.length < 1
131
+ invalid_properties.push('invalid value for "env_var", the character length must be great than or equal to 1.')
132
+ end
133
+
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ return false if @name.nil?
142
+ return false if @name.to_s.length < 1
143
+ return false if !@description.nil? && @description.to_s.length < 1
144
+ return false if @header_name.nil?
145
+ return false if @header_name.to_s.length < 1
146
+ return false if @env_var.nil?
147
+ return false if @env_var.to_s.length < 1
148
+ true
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] name Value to be assigned
153
+ def name=(name)
154
+ if name.nil?
155
+ fail ArgumentError, 'name cannot be nil'
156
+ end
157
+
158
+ if name.to_s.length < 1
159
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
160
+ end
161
+
162
+ @name = name
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] description Value to be assigned
167
+ def description=(description)
168
+ if !description.nil? && description.to_s.length < 1
169
+ fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
170
+ end
171
+
172
+ @description = description
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] header_name Value to be assigned
177
+ def header_name=(header_name)
178
+ if header_name.nil?
179
+ fail ArgumentError, 'header_name cannot be nil'
180
+ end
181
+
182
+ if header_name.to_s.length < 1
183
+ fail ArgumentError, 'invalid value for "header_name", the character length must be great than or equal to 1.'
184
+ end
185
+
186
+ @header_name = header_name
187
+ end
188
+
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] env_var Value to be assigned
191
+ def env_var=(env_var)
192
+ if env_var.nil?
193
+ fail ArgumentError, 'env_var cannot be nil'
194
+ end
195
+
196
+ if env_var.to_s.length < 1
197
+ fail ArgumentError, 'invalid value for "env_var", the character length must be great than or equal to 1.'
198
+ end
199
+
200
+ @env_var = env_var
201
+ end
202
+
203
+ # Checks equality by comparing each attribute.
204
+ # @param [Object] Object to be compared
205
+ def ==(o)
206
+ return true if self.equal?(o)
207
+ self.class == o.class &&
208
+ name == o.name &&
209
+ description == o.description &&
210
+ header_name == o.header_name &&
211
+ env_var == o.env_var
212
+ end
213
+
214
+ # @see the `==` method
215
+ # @param [Object] Object to be compared
216
+ def eql?(o)
217
+ self == o
218
+ end
219
+
220
+ # Calculates hash code according to all attributes.
221
+ # @return [Integer] Hash code
222
+ def hash
223
+ [name, description, header_name, env_var].hash
224
+ end
225
+
226
+ # Builds the object from hash
227
+ # @param [Hash] attributes Model attributes in the form of hash
228
+ # @return [Object] Returns the model itself
229
+ def self.build_from_hash(attributes)
230
+ return nil unless attributes.is_a?(Hash)
231
+ attributes = attributes.transform_keys(&:to_sym)
232
+ transformed_hash = {}
233
+ openapi_types.each_pair do |key, type|
234
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
235
+ transformed_hash["#{key}"] = nil
236
+ elsif type =~ /\AArray<(.*)>/i
237
+ # check to ensure the input is an array given that the attribute
238
+ # is documented as an array but the input is not
239
+ if attributes[attribute_map[key]].is_a?(Array)
240
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
241
+ end
242
+ elsif !attributes[attribute_map[key]].nil?
243
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
244
+ end
245
+ end
246
+ new(transformed_hash)
247
+ end
248
+
249
+ # Deserializes the data based on type
250
+ # @param string type Data type
251
+ # @param string value Value to be deserialized
252
+ # @return [Object] Deserialized data
253
+ def self._deserialize(type, value)
254
+ case type.to_sym
255
+ when :Time
256
+ Time.parse(value)
257
+ when :Date
258
+ Date.parse(value)
259
+ when :String
260
+ value.to_s
261
+ when :Integer
262
+ value.to_i
263
+ when :Float
264
+ value.to_f
265
+ when :Boolean
266
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
267
+ true
268
+ else
269
+ false
270
+ end
271
+ when :Object
272
+ # generic object (usually a Hash), return directly
273
+ value
274
+ when /\AArray<(?<inner_type>.+)>\z/
275
+ inner_type = Regexp.last_match[:inner_type]
276
+ value.map { |v| _deserialize(inner_type, v) }
277
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
278
+ k_type = Regexp.last_match[:k_type]
279
+ v_type = Regexp.last_match[:v_type]
280
+ {}.tap do |hash|
281
+ value.each do |k, v|
282
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
283
+ end
284
+ end
285
+ else # model
286
+ # models (e.g. Pet) or oneOf
287
+ klass = PulpcoreClient.const_get(type)
288
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
289
+ end
290
+ end
291
+
292
+ # Returns the string representation of the object
293
+ # @return [String] String presentation of the object
294
+ def to_s
295
+ to_hash.to_s
296
+ end
297
+
298
+ # to_body is an alias to to_hash (backward compatibility)
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_body
301
+ to_hash
302
+ end
303
+
304
+ # Returns the object in the form of hash
305
+ # @return [Hash] Returns the object in the form of hash
306
+ def to_hash
307
+ hash = {}
308
+ self.class.attribute_map.each_pair do |attr, param|
309
+ value = self.send(attr)
310
+ if value.nil?
311
+ is_nullable = self.class.openapi_nullable.include?(attr)
312
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
313
+ end
314
+
315
+ hash[param] = _to_hash(value)
316
+ end
317
+ hash
318
+ end
319
+
320
+ # Outputs non-array value in the form of hash
321
+ # For object, use to_hash. Otherwise, just return the value
322
+ # @param [Object] value Any valid value
323
+ # @return [Hash] Returns the value in the form of hash
324
+ def _to_hash(value)
325
+ if value.is_a?(Array)
326
+ value.compact.map { |v| _to_hash(v) }
327
+ elsif value.is_a?(Hash)
328
+ {}.tap do |hash|
329
+ value.each { |k, v| hash[k] = _to_hash(v) }
330
+ end
331
+ elsif value.respond_to? :to_hash
332
+ value.to_hash
333
+ else
334
+ value
335
+ end
336
+ end
337
+
338
+ end
339
+
340
+ end