pulpcore_client 3.22.30 → 3.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -5
  3. data/docs/AccessPoliciesApi.md +1 -1
  4. data/docs/ArtifactDistributionResponse.md +10 -10
  5. data/docs/ArtifactsApi.md +1 -1
  6. data/docs/ContentApi.md +1 -1
  7. data/docs/ContentguardsApi.md +1 -1
  8. data/docs/ContentguardsContentRedirectApi.md +1 -1
  9. data/docs/ContentguardsRbacApi.md +1 -1
  10. data/docs/DistributionsApi.md +5 -1
  11. data/docs/DistributionsArtifactsApi.md +5 -1
  12. data/docs/Domain.md +27 -0
  13. data/docs/DomainResponse.md +31 -0
  14. data/docs/DomainsApi.md +362 -0
  15. data/docs/ExportersFilesystemApi.md +4 -4
  16. data/docs/ExportersFilesystemExportsApi.md +4 -4
  17. data/docs/ExportersPulpApi.md +1 -1
  18. data/docs/ExportersPulpExportsApi.md +1 -1
  19. data/docs/GroupRole.md +3 -1
  20. data/docs/GroupRoleResponse.md +3 -1
  21. data/docs/GroupsApi.md +7 -7
  22. data/docs/GroupsRolesApi.md +7 -5
  23. data/docs/GroupsUsersApi.md +1 -1
  24. data/docs/ImportersPulpApi.md +1 -1
  25. data/docs/ImportersPulpImportCheckApi.md +1 -1
  26. data/docs/ImportersPulpImportsApi.md +1 -1
  27. data/docs/OrphansApi.md +1 -1
  28. data/docs/OrphansCleanupApi.md +1 -1
  29. data/docs/PaginatedDomainResponseList.md +23 -0
  30. data/docs/PaginatedUpstreamPulpResponseList.md +23 -0
  31. data/docs/PatchedDomain.md +27 -0
  32. data/docs/PatchedUpstreamPulp.md +37 -0
  33. data/docs/PublicationsApi.md +1 -1
  34. data/docs/RemoteResponseHiddenFields.md +2 -2
  35. data/docs/RemotesApi.md +1 -1
  36. data/docs/RepairApi.md +1 -1
  37. data/docs/RepositoriesApi.md +17 -1
  38. data/docs/RepositoriesReclaimSpaceApi.md +1 -1
  39. data/docs/RepositoryResponse.md +1 -1
  40. data/docs/RepositoryVersionsApi.md +1 -1
  41. data/docs/RolesApi.md +7 -7
  42. data/docs/SigningServicesApi.md +1 -1
  43. data/docs/StatusApi.md +1 -1
  44. data/docs/StatusResponse.md +3 -1
  45. data/docs/StorageClassEnum.md +16 -0
  46. data/docs/TaskGroupsApi.md +1 -1
  47. data/docs/TaskSchedulesApi.md +3 -3
  48. data/docs/TasksApi.md +2 -2
  49. data/docs/UploadsApi.md +1 -1
  50. data/docs/UpstreamPulp.md +37 -0
  51. data/docs/UpstreamPulpResponse.md +39 -0
  52. data/docs/UpstreamPulpsApi.md +405 -0
  53. data/docs/UserRole.md +4 -2
  54. data/docs/UserRoleResponse.md +4 -2
  55. data/docs/UsersApi.md +7 -7
  56. data/docs/UsersRolesApi.md +7 -5
  57. data/docs/VersionResponse.md +3 -1
  58. data/docs/WorkersApi.md +1 -1
  59. data/lib/pulpcore_client/api/distributions_api.rb +6 -0
  60. data/lib/pulpcore_client/api/distributions_artifacts_api.rb +6 -0
  61. data/lib/pulpcore_client/api/domains_api.rb +446 -0
  62. data/lib/pulpcore_client/api/exporters_filesystem_api.rb +6 -6
  63. data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +6 -6
  64. data/lib/pulpcore_client/api/groups_api.rb +12 -12
  65. data/lib/pulpcore_client/api/groups_roles_api.rb +11 -8
  66. data/lib/pulpcore_client/api/repositories_api.rb +24 -0
  67. data/lib/pulpcore_client/api/roles_api.rb +12 -12
  68. data/lib/pulpcore_client/api/task_schedules_api.rb +4 -4
  69. data/lib/pulpcore_client/api/tasks_api.rb +2 -2
  70. data/lib/pulpcore_client/api/upstream_pulps_api.rb +492 -0
  71. data/lib/pulpcore_client/api/users_api.rb +12 -12
  72. data/lib/pulpcore_client/api/users_roles_api.rb +11 -8
  73. data/lib/pulpcore_client/api/workers_api.rb +1 -1
  74. data/lib/pulpcore_client/configuration.rb +3 -3
  75. data/lib/pulpcore_client/models/artifact_distribution_response.rb +46 -46
  76. data/lib/pulpcore_client/models/domain.rb +323 -0
  77. data/lib/pulpcore_client/models/domain_response.rb +318 -0
  78. data/lib/pulpcore_client/models/group_role.rb +16 -5
  79. data/lib/pulpcore_client/models/group_role_response.rb +15 -4
  80. data/lib/pulpcore_client/models/nested_role.rb +19 -0
  81. data/lib/pulpcore_client/models/paginated_domain_response_list.rb +237 -0
  82. data/lib/pulpcore_client/models/paginated_upstream_pulp_response_list.rb +237 -0
  83. data/lib/pulpcore_client/models/patched_domain.rb +304 -0
  84. data/lib/pulpcore_client/models/patched_upstream_pulp.rb +450 -0
  85. data/lib/pulpcore_client/models/remote_response.rb +20 -20
  86. data/lib/pulpcore_client/models/remote_response_hidden_fields.rb +0 -10
  87. data/lib/pulpcore_client/models/repository_response.rb +1 -1
  88. data/lib/pulpcore_client/models/status_response.rb +19 -4
  89. data/lib/pulpcore_client/models/storage_class_enum.rb +37 -0
  90. data/lib/pulpcore_client/models/upstream_pulp.rb +477 -0
  91. data/lib/pulpcore_client/models/upstream_pulp_response.rb +338 -0
  92. data/lib/pulpcore_client/models/user_role.rb +17 -6
  93. data/lib/pulpcore_client/models/user_role_response.rb +16 -5
  94. data/lib/pulpcore_client/models/version_response.rb +19 -4
  95. data/lib/pulpcore_client/version.rb +1 -1
  96. data/lib/pulpcore_client.rb +11 -0
  97. data/spec/api/distributions_api_spec.rb +2 -0
  98. data/spec/api/distributions_artifacts_api_spec.rb +2 -0
  99. data/spec/api/domains_api_spec.rb +120 -0
  100. data/spec/api/exporters_filesystem_api_spec.rb +3 -3
  101. data/spec/api/exporters_filesystem_exports_api_spec.rb +3 -3
  102. data/spec/api/groups_api_spec.rb +6 -6
  103. data/spec/api/groups_roles_api_spec.rb +5 -4
  104. data/spec/api/repositories_api_spec.rb +8 -0
  105. data/spec/api/roles_api_spec.rb +6 -6
  106. data/spec/api/task_schedules_api_spec.rb +2 -2
  107. data/spec/api/tasks_api_spec.rb +1 -1
  108. data/spec/api/upstream_pulps_api_spec.rb +127 -0
  109. data/spec/api/users_api_spec.rb +6 -6
  110. data/spec/api/users_roles_api_spec.rb +5 -4
  111. data/spec/configuration_spec.rb +3 -3
  112. data/spec/models/artifact_distribution_response_spec.rb +7 -7
  113. data/spec/models/domain_response_spec.rb +83 -0
  114. data/spec/models/domain_spec.rb +71 -0
  115. data/spec/models/group_role_response_spec.rb +6 -0
  116. data/spec/models/group_role_spec.rb +6 -0
  117. data/spec/models/paginated_domain_response_list_spec.rb +59 -0
  118. data/spec/models/paginated_upstream_pulp_response_list_spec.rb +59 -0
  119. data/spec/models/patched_domain_spec.rb +71 -0
  120. data/spec/models/patched_upstream_pulp_spec.rb +101 -0
  121. data/spec/models/status_response_spec.rb +6 -0
  122. data/spec/models/storage_class_enum_spec.rb +35 -0
  123. data/spec/models/upstream_pulp_response_spec.rb +107 -0
  124. data/spec/models/upstream_pulp_spec.rb +101 -0
  125. data/spec/models/user_role_response_spec.rb +6 -0
  126. data/spec/models/user_role_spec.rb +6 -0
  127. data/spec/models/version_response_spec.rb +6 -0
  128. metadata +185 -141
@@ -0,0 +1,237 @@
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.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ class PaginatedDomainResponseList
17
+ attr_accessor :count
18
+
19
+ attr_accessor :_next
20
+
21
+ attr_accessor :previous
22
+
23
+ attr_accessor :results
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'count' => :'count',
29
+ :'_next' => :'next',
30
+ :'previous' => :'previous',
31
+ :'results' => :'results'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'count' => :'Integer',
39
+ :'_next' => :'String',
40
+ :'previous' => :'String',
41
+ :'results' => :'Array<DomainResponse>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'_next',
49
+ :'previous',
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PaginatedDomainResponseList` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PaginatedDomainResponseList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'count')
69
+ self.count = attributes[:'count']
70
+ end
71
+
72
+ if attributes.key?(:'_next')
73
+ self._next = attributes[:'_next']
74
+ end
75
+
76
+ if attributes.key?(:'previous')
77
+ self.previous = attributes[:'previous']
78
+ end
79
+
80
+ if attributes.key?(:'results')
81
+ if (value = attributes[:'results']).is_a?(Array)
82
+ self.results = value
83
+ end
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ count == o.count &&
106
+ _next == o._next &&
107
+ previous == o.previous &&
108
+ results == o.results
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [count, _next, previous, results].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ new.build_from_hash(attributes)
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ self.class.openapi_types.each_pair do |key, type|
136
+ if type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ PulpcoreClient.const_get(type).build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+ end
237
+ end
@@ -0,0 +1,237 @@
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.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ class PaginatedUpstreamPulpResponseList
17
+ attr_accessor :count
18
+
19
+ attr_accessor :_next
20
+
21
+ attr_accessor :previous
22
+
23
+ attr_accessor :results
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'count' => :'count',
29
+ :'_next' => :'next',
30
+ :'previous' => :'previous',
31
+ :'results' => :'results'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'count' => :'Integer',
39
+ :'_next' => :'String',
40
+ :'previous' => :'String',
41
+ :'results' => :'Array<UpstreamPulpResponse>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'_next',
49
+ :'previous',
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PaginatedUpstreamPulpResponseList` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PaginatedUpstreamPulpResponseList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'count')
69
+ self.count = attributes[:'count']
70
+ end
71
+
72
+ if attributes.key?(:'_next')
73
+ self._next = attributes[:'_next']
74
+ end
75
+
76
+ if attributes.key?(:'previous')
77
+ self.previous = attributes[:'previous']
78
+ end
79
+
80
+ if attributes.key?(:'results')
81
+ if (value = attributes[:'results']).is_a?(Array)
82
+ self.results = value
83
+ end
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ count == o.count &&
106
+ _next == o._next &&
107
+ previous == o.previous &&
108
+ results == o.results
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [count, _next, previous, results].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ new.build_from_hash(attributes)
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ self.class.openapi_types.each_pair do |key, type|
136
+ if type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ PulpcoreClient.const_get(type).build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+ end
237
+ end