pulp_python_client 3.0.0b10 → 3.0.0b11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +46 -33
  3. data/docs/ContentPackagesApi.md +52 -52
  4. data/docs/ContentSummary.md +3 -3
  5. data/docs/ContentSummaryResponse.md +21 -0
  6. data/docs/DistributionsPypiApi.md +108 -60
  7. data/docs/InlineResponse200.md +3 -3
  8. data/docs/InlineResponse2001.md +3 -3
  9. data/docs/InlineResponse2002.md +3 -3
  10. data/docs/InlineResponse2003.md +3 -3
  11. data/docs/InlineResponse2004.md +3 -3
  12. data/docs/InlineResponse2005.md +3 -3
  13. data/docs/PatchedpythonPythonDistribution.md +23 -0
  14. data/docs/PatchedpythonPythonRemote.md +43 -0
  15. data/docs/PatchedpythonPythonRepository.md +21 -0
  16. data/docs/PolicyEnum.md +16 -0
  17. data/docs/PublicationsPypiApi.md +40 -40
  18. data/docs/PythonBanderRemote.md +19 -0
  19. data/docs/PythonPythonDistribution.md +1 -7
  20. data/docs/PythonPythonDistributionResponse.md +29 -0
  21. data/docs/PythonPythonPackageContent.md +7 -15
  22. data/docs/PythonPythonPackageContentResponse.md +69 -0
  23. data/docs/PythonPythonPublication.md +2 -8
  24. data/docs/PythonPythonPublicationResponse.md +25 -0
  25. data/docs/PythonPythonRemote.md +4 -10
  26. data/docs/PythonPythonRemoteResponse.md +49 -0
  27. data/docs/PythonPythonRepository.md +4 -10
  28. data/docs/PythonPythonRepositoryResponse.md +29 -0
  29. data/docs/RemotesPythonApi.md +129 -69
  30. data/docs/RepositoriesPythonApi.md +97 -73
  31. data/docs/RepositoriesPythonVersionsApi.md +94 -62
  32. data/docs/RepositoryAddRemoveContent.md +2 -2
  33. data/docs/RepositorySyncURL.md +1 -1
  34. data/docs/RepositoryVersion.md +1 -9
  35. data/docs/RepositoryVersionResponse.md +25 -0
  36. data/lib/pulp_python_client.rb +14 -2
  37. data/lib/pulp_python_client/api/content_packages_api.rb +70 -70
  38. data/lib/pulp_python_client/api/distributions_pypi_api.rb +153 -90
  39. data/lib/pulp_python_client/api/publications_pypi_api.rb +59 -59
  40. data/lib/pulp_python_client/api/remotes_python_api.rb +185 -108
  41. data/lib/pulp_python_client/api/repositories_python_api.rb +145 -118
  42. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +137 -92
  43. data/lib/pulp_python_client/api_client.rb +2 -2
  44. data/lib/pulp_python_client/api_error.rb +2 -2
  45. data/lib/pulp_python_client/configuration.rb +3 -3
  46. data/lib/pulp_python_client/models/async_operation_response.rb +3 -2
  47. data/lib/pulp_python_client/models/content_summary.rb +9 -15
  48. data/lib/pulp_python_client/models/content_summary_response.rb +240 -0
  49. data/lib/pulp_python_client/models/inline_response200.rb +3 -13
  50. data/lib/pulp_python_client/models/inline_response2001.rb +3 -13
  51. data/lib/pulp_python_client/models/inline_response2002.rb +3 -13
  52. data/lib/pulp_python_client/models/inline_response2003.rb +3 -13
  53. data/lib/pulp_python_client/models/inline_response2004.rb +3 -13
  54. data/lib/pulp_python_client/models/inline_response2005.rb +3 -13
  55. data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +240 -0
  56. data/lib/pulp_python_client/models/patchedpython_python_remote.rb +359 -0
  57. data/lib/pulp_python_client/models/patchedpython_python_repository.rb +229 -0
  58. data/lib/pulp_python_client/models/policy_enum.rb +37 -0
  59. data/lib/pulp_python_client/models/python_bander_remote.rb +228 -0
  60. data/lib/pulp_python_client/models/python_python_distribution.rb +4 -85
  61. data/lib/pulp_python_client/models/python_python_distribution_response.rb +279 -0
  62. data/lib/pulp_python_client/models/python_python_package_content.rb +28 -136
  63. data/lib/pulp_python_client/models/python_python_package_content_response.rb +467 -0
  64. data/lib/pulp_python_client/models/python_python_publication.rb +7 -37
  65. data/lib/pulp_python_client/models/python_python_publication_response.rb +248 -0
  66. data/lib/pulp_python_client/models/python_python_remote.rb +7 -199
  67. data/lib/pulp_python_client/models/python_python_remote_response.rb +398 -0
  68. data/lib/pulp_python_client/models/python_python_repository.rb +18 -78
  69. data/lib/pulp_python_client/models/python_python_repository_response.rb +271 -0
  70. data/lib/pulp_python_client/models/repository_add_remove_content.rb +5 -4
  71. data/lib/pulp_python_client/models/repository_sync_url.rb +3 -8
  72. data/lib/pulp_python_client/models/repository_version.rb +7 -43
  73. data/lib/pulp_python_client/models/repository_version_response.rb +246 -0
  74. data/lib/pulp_python_client/version.rb +3 -3
  75. data/pulp_python_client.gemspec +4 -4
  76. data/spec/api/content_packages_api_spec.rb +24 -24
  77. data/spec/api/distributions_pypi_api_spec.rb +39 -18
  78. data/spec/api/publications_pypi_api_spec.rb +14 -14
  79. data/spec/api/remotes_python_api_spec.rb +49 -22
  80. data/spec/api/repositories_python_api_spec.rb +28 -19
  81. data/spec/api/repositories_python_versions_api_spec.rb +38 -23
  82. data/spec/api_client_spec.rb +2 -2
  83. data/spec/configuration_spec.rb +2 -2
  84. data/spec/models/async_operation_response_spec.rb +2 -2
  85. data/spec/models/content_summary_response_spec.rb +53 -0
  86. data/spec/models/content_summary_spec.rb +2 -2
  87. data/spec/models/inline_response2001_spec.rb +2 -2
  88. data/spec/models/inline_response2002_spec.rb +2 -2
  89. data/spec/models/inline_response2003_spec.rb +2 -2
  90. data/spec/models/inline_response2004_spec.rb +2 -2
  91. data/spec/models/inline_response2005_spec.rb +2 -2
  92. data/spec/models/inline_response200_spec.rb +2 -2
  93. data/spec/models/patchedpython_python_distribution_spec.rb +59 -0
  94. data/spec/models/patchedpython_python_remote_spec.rb +119 -0
  95. data/spec/models/patchedpython_python_repository_spec.rb +53 -0
  96. data/spec/models/policy_enum_spec.rb +35 -0
  97. data/spec/models/python_bander_remote_spec.rb +47 -0
  98. data/spec/models/python_python_distribution_response_spec.rb +77 -0
  99. data/spec/models/python_python_distribution_spec.rb +2 -20
  100. data/spec/models/python_python_package_content_response_spec.rb +197 -0
  101. data/spec/models/python_python_package_content_spec.rb +5 -29
  102. data/spec/models/python_python_publication_response_spec.rb +65 -0
  103. data/spec/models/python_python_publication_spec.rb +2 -20
  104. data/spec/models/python_python_remote_response_spec.rb +137 -0
  105. data/spec/models/python_python_remote_spec.rb +2 -24
  106. data/spec/models/python_python_repository_response_spec.rb +77 -0
  107. data/spec/models/python_python_repository_spec.rb +5 -23
  108. data/spec/models/repository_add_remove_content_spec.rb +2 -2
  109. data/spec/models/repository_sync_url_spec.rb +2 -2
  110. data/spec/models/repository_version_response_spec.rb +65 -0
  111. data/spec/models/repository_version_spec.rb +2 -26
  112. data/spec/spec_helper.rb +2 -2
  113. metadata +52 -4
@@ -0,0 +1,467 @@
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
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpPythonClient
16
+ # A Serializer for PythonPackageContent.
17
+ class PythonPythonPackageContentResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # Artifact file representing the physical content
24
+ attr_accessor :artifact
25
+
26
+ # The name of the distribution package, usually of the format: {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.{packagetype}
27
+ attr_accessor :filename
28
+
29
+ # The type of the distribution package (e.g. sdist, bdist_wheel, bdist_egg, etc)
30
+ attr_accessor :packagetype
31
+
32
+ # The name of the python project.
33
+ attr_accessor :name
34
+
35
+ # The packages version number.
36
+ attr_accessor :version
37
+
38
+ # Version of the file format
39
+ attr_accessor :metadata_version
40
+
41
+ # A one-line summary of what the package does.
42
+ attr_accessor :summary
43
+
44
+ # A longer description of the package that can run to several paragraphs.
45
+ attr_accessor :description
46
+
47
+ # Additional keywords to be used to assist searching for the package in a larger catalog.
48
+ attr_accessor :keywords
49
+
50
+ # The URL for the package's home page.
51
+ attr_accessor :home_page
52
+
53
+ # Legacy field denoting the URL from which this package can be downloaded.
54
+ attr_accessor :download_url
55
+
56
+ # Text containing the author's name. Contact information can also be added, separated with newlines.
57
+ attr_accessor :author
58
+
59
+ # The author's e-mail address.
60
+ attr_accessor :author_email
61
+
62
+ # The maintainer's name at a minimum; additional contact information may be provided.
63
+ attr_accessor :maintainer
64
+
65
+ # The maintainer's e-mail address.
66
+ attr_accessor :maintainer_email
67
+
68
+ # Text indicating the license covering the distribution
69
+ attr_accessor :license
70
+
71
+ # The Python version(s) that the distribution is guaranteed to be compatible with.
72
+ attr_accessor :requires_python
73
+
74
+ # A browsable URL for the project and a label for it, separated by a comma.
75
+ attr_accessor :project_url
76
+
77
+ # A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
78
+ attr_accessor :platform
79
+
80
+ # Field to specify the OS and CPU for which the binary package was compiled.
81
+ attr_accessor :supported_platform
82
+
83
+ # A JSON list containing names of some other distutils project required by this distribution.
84
+ attr_accessor :requires_dist
85
+
86
+ # A JSON list containing names of a Distutils project which is contained within this distribution.
87
+ attr_accessor :provides_dist
88
+
89
+ # A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
90
+ attr_accessor :obsoletes_dist
91
+
92
+ # A JSON list containing some dependency in the system that the distribution is to be used.
93
+ attr_accessor :requires_external
94
+
95
+ # A JSON list containing classification values for a Python package.
96
+ attr_accessor :classifiers
97
+
98
+ # Attribute mapping from ruby-style variable name to JSON key.
99
+ def self.attribute_map
100
+ {
101
+ :'pulp_href' => :'pulp_href',
102
+ :'pulp_created' => :'pulp_created',
103
+ :'artifact' => :'artifact',
104
+ :'filename' => :'filename',
105
+ :'packagetype' => :'packagetype',
106
+ :'name' => :'name',
107
+ :'version' => :'version',
108
+ :'metadata_version' => :'metadata_version',
109
+ :'summary' => :'summary',
110
+ :'description' => :'description',
111
+ :'keywords' => :'keywords',
112
+ :'home_page' => :'home_page',
113
+ :'download_url' => :'download_url',
114
+ :'author' => :'author',
115
+ :'author_email' => :'author_email',
116
+ :'maintainer' => :'maintainer',
117
+ :'maintainer_email' => :'maintainer_email',
118
+ :'license' => :'license',
119
+ :'requires_python' => :'requires_python',
120
+ :'project_url' => :'project_url',
121
+ :'platform' => :'platform',
122
+ :'supported_platform' => :'supported_platform',
123
+ :'requires_dist' => :'requires_dist',
124
+ :'provides_dist' => :'provides_dist',
125
+ :'obsoletes_dist' => :'obsoletes_dist',
126
+ :'requires_external' => :'requires_external',
127
+ :'classifiers' => :'classifiers'
128
+ }
129
+ end
130
+
131
+ # Attribute type mapping.
132
+ def self.openapi_types
133
+ {
134
+ :'pulp_href' => :'String',
135
+ :'pulp_created' => :'DateTime',
136
+ :'artifact' => :'String',
137
+ :'filename' => :'String',
138
+ :'packagetype' => :'String',
139
+ :'name' => :'String',
140
+ :'version' => :'String',
141
+ :'metadata_version' => :'String',
142
+ :'summary' => :'String',
143
+ :'description' => :'String',
144
+ :'keywords' => :'String',
145
+ :'home_page' => :'String',
146
+ :'download_url' => :'String',
147
+ :'author' => :'String',
148
+ :'author_email' => :'String',
149
+ :'maintainer' => :'String',
150
+ :'maintainer_email' => :'String',
151
+ :'license' => :'String',
152
+ :'requires_python' => :'String',
153
+ :'project_url' => :'String',
154
+ :'platform' => :'String',
155
+ :'supported_platform' => :'String',
156
+ :'requires_dist' => :'Object',
157
+ :'provides_dist' => :'Object',
158
+ :'obsoletes_dist' => :'Object',
159
+ :'requires_external' => :'Object',
160
+ :'classifiers' => :'Object'
161
+ }
162
+ end
163
+
164
+ # List of attributes with nullable: true
165
+ def self.openapi_nullable
166
+ Set.new([
167
+ ])
168
+ end
169
+
170
+ # Initializes the object
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ def initialize(attributes = {})
173
+ if (!attributes.is_a?(Hash))
174
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonPackageContentResponse` initialize method"
175
+ end
176
+
177
+ # check to see if the attribute exists and convert string to symbol for hash key
178
+ attributes = attributes.each_with_object({}) { |(k, v), h|
179
+ if (!self.class.attribute_map.key?(k.to_sym))
180
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonPackageContentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
181
+ end
182
+ h[k.to_sym] = v
183
+ }
184
+
185
+ if attributes.key?(:'pulp_href')
186
+ self.pulp_href = attributes[:'pulp_href']
187
+ end
188
+
189
+ if attributes.key?(:'pulp_created')
190
+ self.pulp_created = attributes[:'pulp_created']
191
+ end
192
+
193
+ if attributes.key?(:'artifact')
194
+ self.artifact = attributes[:'artifact']
195
+ end
196
+
197
+ if attributes.key?(:'filename')
198
+ self.filename = attributes[:'filename']
199
+ end
200
+
201
+ if attributes.key?(:'packagetype')
202
+ self.packagetype = attributes[:'packagetype']
203
+ end
204
+
205
+ if attributes.key?(:'name')
206
+ self.name = attributes[:'name']
207
+ end
208
+
209
+ if attributes.key?(:'version')
210
+ self.version = attributes[:'version']
211
+ end
212
+
213
+ if attributes.key?(:'metadata_version')
214
+ self.metadata_version = attributes[:'metadata_version']
215
+ end
216
+
217
+ if attributes.key?(:'summary')
218
+ self.summary = attributes[:'summary']
219
+ end
220
+
221
+ if attributes.key?(:'description')
222
+ self.description = attributes[:'description']
223
+ end
224
+
225
+ if attributes.key?(:'keywords')
226
+ self.keywords = attributes[:'keywords']
227
+ end
228
+
229
+ if attributes.key?(:'home_page')
230
+ self.home_page = attributes[:'home_page']
231
+ end
232
+
233
+ if attributes.key?(:'download_url')
234
+ self.download_url = attributes[:'download_url']
235
+ end
236
+
237
+ if attributes.key?(:'author')
238
+ self.author = attributes[:'author']
239
+ end
240
+
241
+ if attributes.key?(:'author_email')
242
+ self.author_email = attributes[:'author_email']
243
+ end
244
+
245
+ if attributes.key?(:'maintainer')
246
+ self.maintainer = attributes[:'maintainer']
247
+ end
248
+
249
+ if attributes.key?(:'maintainer_email')
250
+ self.maintainer_email = attributes[:'maintainer_email']
251
+ end
252
+
253
+ if attributes.key?(:'license')
254
+ self.license = attributes[:'license']
255
+ end
256
+
257
+ if attributes.key?(:'requires_python')
258
+ self.requires_python = attributes[:'requires_python']
259
+ end
260
+
261
+ if attributes.key?(:'project_url')
262
+ self.project_url = attributes[:'project_url']
263
+ end
264
+
265
+ if attributes.key?(:'platform')
266
+ self.platform = attributes[:'platform']
267
+ end
268
+
269
+ if attributes.key?(:'supported_platform')
270
+ self.supported_platform = attributes[:'supported_platform']
271
+ end
272
+
273
+ if attributes.key?(:'requires_dist')
274
+ self.requires_dist = attributes[:'requires_dist']
275
+ end
276
+
277
+ if attributes.key?(:'provides_dist')
278
+ self.provides_dist = attributes[:'provides_dist']
279
+ end
280
+
281
+ if attributes.key?(:'obsoletes_dist')
282
+ self.obsoletes_dist = attributes[:'obsoletes_dist']
283
+ end
284
+
285
+ if attributes.key?(:'requires_external')
286
+ self.requires_external = attributes[:'requires_external']
287
+ end
288
+
289
+ if attributes.key?(:'classifiers')
290
+ self.classifiers = attributes[:'classifiers']
291
+ end
292
+ end
293
+
294
+ # Show invalid properties with the reasons. Usually used together with valid?
295
+ # @return Array for valid properties with the reasons
296
+ def list_invalid_properties
297
+ invalid_properties = Array.new
298
+ invalid_properties
299
+ end
300
+
301
+ # Check to see if the all the properties in the model are valid
302
+ # @return true if the model is valid
303
+ def valid?
304
+ true
305
+ end
306
+
307
+ # Checks equality by comparing each attribute.
308
+ # @param [Object] Object to be compared
309
+ def ==(o)
310
+ return true if self.equal?(o)
311
+ self.class == o.class &&
312
+ pulp_href == o.pulp_href &&
313
+ pulp_created == o.pulp_created &&
314
+ artifact == o.artifact &&
315
+ filename == o.filename &&
316
+ packagetype == o.packagetype &&
317
+ name == o.name &&
318
+ version == o.version &&
319
+ metadata_version == o.metadata_version &&
320
+ summary == o.summary &&
321
+ description == o.description &&
322
+ keywords == o.keywords &&
323
+ home_page == o.home_page &&
324
+ download_url == o.download_url &&
325
+ author == o.author &&
326
+ author_email == o.author_email &&
327
+ maintainer == o.maintainer &&
328
+ maintainer_email == o.maintainer_email &&
329
+ license == o.license &&
330
+ requires_python == o.requires_python &&
331
+ project_url == o.project_url &&
332
+ platform == o.platform &&
333
+ supported_platform == o.supported_platform &&
334
+ requires_dist == o.requires_dist &&
335
+ provides_dist == o.provides_dist &&
336
+ obsoletes_dist == o.obsoletes_dist &&
337
+ requires_external == o.requires_external &&
338
+ classifiers == o.classifiers
339
+ end
340
+
341
+ # @see the `==` method
342
+ # @param [Object] Object to be compared
343
+ def eql?(o)
344
+ self == o
345
+ end
346
+
347
+ # Calculates hash code according to all attributes.
348
+ # @return [Integer] Hash code
349
+ def hash
350
+ [pulp_href, pulp_created, artifact, filename, packagetype, name, version, metadata_version, summary, description, keywords, home_page, download_url, author, author_email, maintainer, maintainer_email, license, requires_python, project_url, platform, supported_platform, requires_dist, provides_dist, obsoletes_dist, requires_external, classifiers].hash
351
+ end
352
+
353
+ # Builds the object from hash
354
+ # @param [Hash] attributes Model attributes in the form of hash
355
+ # @return [Object] Returns the model itself
356
+ def self.build_from_hash(attributes)
357
+ new.build_from_hash(attributes)
358
+ end
359
+
360
+ # Builds the object from hash
361
+ # @param [Hash] attributes Model attributes in the form of hash
362
+ # @return [Object] Returns the model itself
363
+ def build_from_hash(attributes)
364
+ return nil unless attributes.is_a?(Hash)
365
+ self.class.openapi_types.each_pair do |key, type|
366
+ if type =~ /\AArray<(.*)>/i
367
+ # check to ensure the input is an array given that the attribute
368
+ # is documented as an array but the input is not
369
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
370
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
371
+ end
372
+ elsif !attributes[self.class.attribute_map[key]].nil?
373
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
374
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
375
+ end
376
+
377
+ self
378
+ end
379
+
380
+ # Deserializes the data based on type
381
+ # @param string type Data type
382
+ # @param string value Value to be deserialized
383
+ # @return [Object] Deserialized data
384
+ def _deserialize(type, value)
385
+ case type.to_sym
386
+ when :DateTime
387
+ DateTime.parse(value)
388
+ when :Date
389
+ Date.parse(value)
390
+ when :String
391
+ value.to_s
392
+ when :Integer
393
+ value.to_i
394
+ when :Float
395
+ value.to_f
396
+ when :Boolean
397
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
398
+ true
399
+ else
400
+ false
401
+ end
402
+ when :Object
403
+ # generic object (usually a Hash), return directly
404
+ value
405
+ when /\AArray<(?<inner_type>.+)>\z/
406
+ inner_type = Regexp.last_match[:inner_type]
407
+ value.map { |v| _deserialize(inner_type, v) }
408
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
409
+ k_type = Regexp.last_match[:k_type]
410
+ v_type = Regexp.last_match[:v_type]
411
+ {}.tap do |hash|
412
+ value.each do |k, v|
413
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
414
+ end
415
+ end
416
+ else # model
417
+ PulpPythonClient.const_get(type).build_from_hash(value)
418
+ end
419
+ end
420
+
421
+ # Returns the string representation of the object
422
+ # @return [String] String presentation of the object
423
+ def to_s
424
+ to_hash.to_s
425
+ end
426
+
427
+ # to_body is an alias to to_hash (backward compatibility)
428
+ # @return [Hash] Returns the object in the form of hash
429
+ def to_body
430
+ to_hash
431
+ end
432
+
433
+ # Returns the object in the form of hash
434
+ # @return [Hash] Returns the object in the form of hash
435
+ def to_hash
436
+ hash = {}
437
+ self.class.attribute_map.each_pair do |attr, param|
438
+ value = self.send(attr)
439
+ if value.nil?
440
+ is_nullable = self.class.openapi_nullable.include?(attr)
441
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
442
+ end
443
+
444
+ hash[param] = _to_hash(value)
445
+ end
446
+ hash
447
+ end
448
+
449
+ # Outputs non-array value in the form of hash
450
+ # For object, use to_hash. Otherwise, just return the value
451
+ # @param [Object] value Any valid value
452
+ # @return [Hash] Returns the value in the form of hash
453
+ def _to_hash(value)
454
+ if value.is_a?(Array)
455
+ value.compact.map { |v| _to_hash(v) }
456
+ elsif value.is_a?(Hash)
457
+ {}.tap do |hash|
458
+ value.each { |k, v| hash[k] = _to_hash(v) }
459
+ end
460
+ elsif value.respond_to? :to_hash
461
+ value.to_hash
462
+ else
463
+ value
464
+ end
465
+ end
466
+ end
467
+ end