oci 2.3.4 → 2.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/core/models/create_virtual_circuit_public_prefix_details.rb +1 -1
  4. data/lib/oci/core/models/update_boot_volume_details.rb +18 -4
  5. data/lib/oci/core/models/update_volume_details.rb +18 -4
  6. data/lib/oci/core/models/virtual_circuit.rb +1 -1
  7. data/lib/oci/core/models/vnic.rb +1 -1
  8. data/lib/oci/core/models/volume_group.rb +18 -4
  9. data/lib/oci/database/database.rb +18 -0
  10. data/lib/oci/database/database_client.rb +1779 -427
  11. data/lib/oci/database/database_client_composite_operations.rb +316 -0
  12. data/lib/oci/database/models/autonomous_data_warehouse.rb +391 -0
  13. data/lib/oci/database/models/autonomous_data_warehouse_backup.rb +316 -0
  14. data/lib/oci/database/models/autonomous_data_warehouse_backup_summary.rb +316 -0
  15. data/lib/oci/database/models/autonomous_data_warehouse_connection_strings.rb +167 -0
  16. data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +391 -0
  17. data/lib/oci/database/models/autonomous_database.rb +391 -0
  18. data/lib/oci/database/models/autonomous_database_backup.rb +316 -0
  19. data/lib/oci/database/models/autonomous_database_backup_summary.rb +316 -0
  20. data/lib/oci/database/models/autonomous_database_connection_strings.rb +167 -0
  21. data/lib/oci/database/models/autonomous_database_summary.rb +391 -0
  22. data/lib/oci/database/models/create_autonomous_data_warehouse_backup_details.rb +165 -0
  23. data/lib/oci/database/models/create_autonomous_data_warehouse_details.rb +287 -0
  24. data/lib/oci/database/models/create_autonomous_database_backup_details.rb +165 -0
  25. data/lib/oci/database/models/create_autonomous_database_details.rb +287 -0
  26. data/lib/oci/database/models/db_system.rb +1 -1
  27. data/lib/oci/database/models/db_system_summary.rb +1 -1
  28. data/lib/oci/database/models/launch_db_system_details.rb +1 -1
  29. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +1 -1
  30. data/lib/oci/database/models/restore_autonomous_data_warehouse_details.rb +147 -0
  31. data/lib/oci/database/models/restore_autonomous_database_details.rb +147 -0
  32. data/lib/oci/database/models/update_autonomous_data_warehouse_details.rb +230 -0
  33. data/lib/oci/database/models/update_autonomous_database_details.rb +230 -0
  34. data/lib/oci/identity/identity.rb +1 -0
  35. data/lib/oci/identity/identity_client.rb +64 -1
  36. data/lib/oci/identity/models/availability_domain.rb +11 -1
  37. data/lib/oci/identity/models/fault_domain.rb +187 -0
  38. data/lib/oci/version.rb +1 -1
  39. metadata +21 -2
@@ -0,0 +1,287 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # Details to create an Oracle Autonomous Data Warehouse.
8
+ #
9
+ class Database::Models::CreateAutonomousDataWarehouseDetails # rubocop:disable Metrics/LineLength
10
+ LICENSE_MODEL_ENUM = [
11
+ LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
12
+ LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze
13
+ ].freeze
14
+
15
+ # **[Required]** A strong password for Admin. The password must be between 12 and 60 characters long, and must contain at least 1 uppercase, 1 lowercase and 2 numeric characters. It cannot contain the double quote symbol (\"). It must be different than the last 4 passwords.
16
+ # @return [String]
17
+ attr_accessor :admin_password
18
+
19
+ # **[Required]** The Oracle Cloud ID (OCID) of the compartment of the DB system.
20
+ # @return [String]
21
+ attr_accessor :compartment_id
22
+
23
+ # **[Required]** The number of CPU Cores to be made available to the database.
24
+ # @return [Integer]
25
+ attr_accessor :cpu_core_count
26
+
27
+ # **[Required]** Size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed.
28
+ #
29
+ # @return [Integer]
30
+ attr_accessor :data_storage_size_in_tbs
31
+
32
+ # **[Required]** The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy.
33
+ # @return [String]
34
+ attr_accessor :db_name
35
+
36
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
37
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
38
+ #
39
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
40
+ #
41
+ # @return [Hash<String, Hash<String, Object>>]
42
+ attr_accessor :defined_tags
43
+
44
+ # The user-friendly name for the Autonomous Data Warehouse. The name does not have to be unique.
45
+ # @return [String]
46
+ attr_accessor :display_name
47
+
48
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
49
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
50
+ #
51
+ # Example: `{\"Department\": \"Finance\"}`
52
+ #
53
+ # @return [Hash<String, String>]
54
+ attr_accessor :freeform_tags
55
+
56
+ # The Oracle license model that applies to the Oracle Autonomous Data Warehouse. The default is BRING_YOUR_OWN_LICENSE.
57
+ #
58
+ # @return [String]
59
+ attr_reader :license_model
60
+
61
+ # Attribute mapping from ruby-style variable name to JSON key.
62
+ def self.attribute_map
63
+ {
64
+ # rubocop:disable Style/SymbolLiteral
65
+ 'admin_password': :'adminPassword',
66
+ 'compartment_id': :'compartmentId',
67
+ 'cpu_core_count': :'cpuCoreCount',
68
+ 'data_storage_size_in_tbs': :'dataStorageSizeInTBs',
69
+ 'db_name': :'dbName',
70
+ 'defined_tags': :'definedTags',
71
+ 'display_name': :'displayName',
72
+ 'freeform_tags': :'freeformTags',
73
+ 'license_model': :'licenseModel'
74
+ # rubocop:enable Style/SymbolLiteral
75
+ }
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.swagger_types
80
+ {
81
+ # rubocop:disable Style/SymbolLiteral
82
+ 'admin_password': :'String',
83
+ 'compartment_id': :'String',
84
+ 'cpu_core_count': :'Integer',
85
+ 'data_storage_size_in_tbs': :'Integer',
86
+ 'db_name': :'String',
87
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
88
+ 'display_name': :'String',
89
+ 'freeform_tags': :'Hash<String, String>',
90
+ 'license_model': :'String'
91
+ # rubocop:enable Style/SymbolLiteral
92
+ }
93
+ end
94
+
95
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
96
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
97
+
98
+
99
+ # Initializes the object
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @option attributes [String] :admin_password The value to assign to the {#admin_password} property
102
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
103
+ # @option attributes [Integer] :cpu_core_count The value to assign to the {#cpu_core_count} property
104
+ # @option attributes [Integer] :data_storage_size_in_tbs The value to assign to the {#data_storage_size_in_tbs} property
105
+ # @option attributes [String] :db_name The value to assign to the {#db_name} property
106
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
107
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
108
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
109
+ # @option attributes [String] :license_model The value to assign to the {#license_model} property
110
+ def initialize(attributes = {})
111
+ return unless attributes.is_a?(Hash)
112
+
113
+ # convert string to symbol for hash key
114
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
115
+
116
+ self.admin_password = attributes[:'adminPassword'] if attributes[:'adminPassword']
117
+
118
+ raise 'You cannot provide both :adminPassword and :admin_password' if attributes.key?(:'adminPassword') && attributes.key?(:'admin_password')
119
+
120
+ self.admin_password = attributes[:'admin_password'] if attributes[:'admin_password']
121
+
122
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
123
+
124
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
125
+
126
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
127
+
128
+ self.cpu_core_count = attributes[:'cpuCoreCount'] if attributes[:'cpuCoreCount']
129
+
130
+ raise 'You cannot provide both :cpuCoreCount and :cpu_core_count' if attributes.key?(:'cpuCoreCount') && attributes.key?(:'cpu_core_count')
131
+
132
+ self.cpu_core_count = attributes[:'cpu_core_count'] if attributes[:'cpu_core_count']
133
+
134
+ self.data_storage_size_in_tbs = attributes[:'dataStorageSizeInTBs'] if attributes[:'dataStorageSizeInTBs']
135
+
136
+ raise 'You cannot provide both :dataStorageSizeInTBs and :data_storage_size_in_tbs' if attributes.key?(:'dataStorageSizeInTBs') && attributes.key?(:'data_storage_size_in_tbs')
137
+
138
+ self.data_storage_size_in_tbs = attributes[:'data_storage_size_in_tbs'] if attributes[:'data_storage_size_in_tbs']
139
+
140
+ self.db_name = attributes[:'dbName'] if attributes[:'dbName']
141
+
142
+ raise 'You cannot provide both :dbName and :db_name' if attributes.key?(:'dbName') && attributes.key?(:'db_name')
143
+
144
+ self.db_name = attributes[:'db_name'] if attributes[:'db_name']
145
+
146
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
147
+
148
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
149
+
150
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
151
+
152
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
153
+
154
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
155
+
156
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
157
+
158
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
159
+
160
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
161
+
162
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
163
+
164
+ self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']
165
+
166
+ raise 'You cannot provide both :licenseModel and :license_model' if attributes.key?(:'licenseModel') && attributes.key?(:'license_model')
167
+
168
+ self.license_model = attributes[:'license_model'] if attributes[:'license_model']
169
+ end
170
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
171
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
172
+
173
+ # Custom attribute writer method checking allowed values (enum).
174
+ # @param [Object] license_model Object to be assigned
175
+ def license_model=(license_model)
176
+ # rubocop: disable Metrics/LineLength
177
+ raise "Invalid value for 'license_model': this must be one of the values in LICENSE_MODEL_ENUM." if license_model && !LICENSE_MODEL_ENUM.include?(license_model)
178
+ # rubocop: enable Metrics/LineLength
179
+ @license_model = license_model
180
+ end
181
+
182
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
183
+
184
+
185
+ # Checks equality by comparing each attribute.
186
+ # @param [Object] other the other object to be compared
187
+ def ==(other)
188
+ return true if equal?(other)
189
+ self.class == other.class &&
190
+ admin_password == other.admin_password &&
191
+ compartment_id == other.compartment_id &&
192
+ cpu_core_count == other.cpu_core_count &&
193
+ data_storage_size_in_tbs == other.data_storage_size_in_tbs &&
194
+ db_name == other.db_name &&
195
+ defined_tags == other.defined_tags &&
196
+ display_name == other.display_name &&
197
+ freeform_tags == other.freeform_tags &&
198
+ license_model == other.license_model
199
+ end
200
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
201
+
202
+ # @see the `==` method
203
+ # @param [Object] other the other object to be compared
204
+ def eql?(other)
205
+ self == other
206
+ end
207
+
208
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
209
+
210
+
211
+ # Calculates hash code according to all attributes.
212
+ # @return [Fixnum] Hash code
213
+ def hash
214
+ [admin_password, compartment_id, cpu_core_count, data_storage_size_in_tbs, db_name, defined_tags, display_name, freeform_tags, license_model].hash
215
+ end
216
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
217
+
218
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
219
+
220
+
221
+ # Builds the object from hash
222
+ # @param [Hash] attributes Model attributes in the form of hash
223
+ # @return [Object] Returns the model itself
224
+ def build_from_hash(attributes)
225
+ return nil unless attributes.is_a?(Hash)
226
+ self.class.swagger_types.each_pair do |key, type|
227
+ if type =~ /^Array<(.*)>/i
228
+ # check to ensure the input is an array given that the the attribute
229
+ # is documented as an array but the input is not
230
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
231
+ public_method("#{key}=").call(
232
+ attributes[self.class.attribute_map[key]]
233
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
234
+ )
235
+ end
236
+ elsif !attributes[self.class.attribute_map[key]].nil?
237
+ public_method("#{key}=").call(
238
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
239
+ )
240
+ end
241
+ # or else data not found in attributes(hash), not an issue as the data can be optional
242
+ end
243
+
244
+ self
245
+ end
246
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
247
+
248
+ # Returns the string representation of the object
249
+ # @return [String] String presentation of the object
250
+ def to_s
251
+ to_hash.to_s
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = public_method(attr).call
260
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
261
+ hash[param] = _to_hash(value)
262
+ end
263
+ hash
264
+ end
265
+
266
+ private
267
+
268
+ # Outputs non-array value in the form of hash
269
+ # For object, use to_hash. Otherwise, just return the value
270
+ # @param [Object] value Any valid value
271
+ # @return [Hash] Returns the value in the form of hash
272
+ def _to_hash(value)
273
+ if value.is_a?(Array)
274
+ value.compact.map { |v| _to_hash(v) }
275
+ elsif value.is_a?(Hash)
276
+ {}.tap do |hash|
277
+ value.each { |k, v| hash[k] = _to_hash(v) }
278
+ end
279
+ elsif value.respond_to? :to_hash
280
+ value.to_hash
281
+ else
282
+ value
283
+ end
284
+ end
285
+ end
286
+ end
287
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -0,0 +1,165 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # Details to create an Oracle Autonomous Database backup.
8
+ #
9
+ class Database::Models::CreateAutonomousDatabaseBackupDetails # rubocop:disable Metrics/LineLength
10
+ # **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database backup.
11
+ # @return [String]
12
+ attr_accessor :autonomous_database_id
13
+
14
+ # **[Required]** The user-friendly name for the backup. The name does not have to be unique.
15
+ # @return [String]
16
+ attr_accessor :display_name
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ # rubocop:disable Style/SymbolLiteral
22
+ 'autonomous_database_id': :'autonomousDatabaseId',
23
+ 'display_name': :'displayName'
24
+ # rubocop:enable Style/SymbolLiteral
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ # rubocop:disable Style/SymbolLiteral
32
+ 'autonomous_database_id': :'String',
33
+ 'display_name': :'String'
34
+ # rubocop:enable Style/SymbolLiteral
35
+ }
36
+ end
37
+
38
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
39
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
40
+
41
+
42
+ # Initializes the object
43
+ # @param [Hash] attributes Model attributes in the form of hash
44
+ # @option attributes [String] :autonomous_database_id The value to assign to the {#autonomous_database_id} property
45
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
+
52
+ self.autonomous_database_id = attributes[:'autonomousDatabaseId'] if attributes[:'autonomousDatabaseId']
53
+
54
+ raise 'You cannot provide both :autonomousDatabaseId and :autonomous_database_id' if attributes.key?(:'autonomousDatabaseId') && attributes.key?(:'autonomous_database_id')
55
+
56
+ self.autonomous_database_id = attributes[:'autonomous_database_id'] if attributes[:'autonomous_database_id']
57
+
58
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
59
+
60
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
61
+
62
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
63
+ end
64
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
65
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
66
+
67
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
68
+
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] other the other object to be compared
72
+ def ==(other)
73
+ return true if equal?(other)
74
+ self.class == other.class &&
75
+ autonomous_database_id == other.autonomous_database_id &&
76
+ display_name == other.display_name
77
+ end
78
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
79
+
80
+ # @see the `==` method
81
+ # @param [Object] other the other object to be compared
82
+ def eql?(other)
83
+ self == other
84
+ end
85
+
86
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
87
+
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Fixnum] Hash code
91
+ def hash
92
+ [autonomous_database_id, display_name].hash
93
+ end
94
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
95
+
96
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
97
+
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+ self.class.swagger_types.each_pair do |key, type|
105
+ if type =~ /^Array<(.*)>/i
106
+ # check to ensure the input is an array given that the the attribute
107
+ # is documented as an array but the input is not
108
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
109
+ public_method("#{key}=").call(
110
+ attributes[self.class.attribute_map[key]]
111
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
112
+ )
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ public_method("#{key}=").call(
116
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
117
+ )
118
+ end
119
+ # or else data not found in attributes(hash), not an issue as the data can be optional
120
+ end
121
+
122
+ self
123
+ end
124
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
125
+
126
+ # Returns the string representation of the object
127
+ # @return [String] String presentation of the object
128
+ def to_s
129
+ to_hash.to_s
130
+ end
131
+
132
+ # Returns the object in the form of hash
133
+ # @return [Hash] Returns the object in the form of hash
134
+ def to_hash
135
+ hash = {}
136
+ self.class.attribute_map.each_pair do |attr, param|
137
+ value = public_method(attr).call
138
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
139
+ hash[param] = _to_hash(value)
140
+ end
141
+ hash
142
+ end
143
+
144
+ private
145
+
146
+ # Outputs non-array value in the form of hash
147
+ # For object, use to_hash. Otherwise, just return the value
148
+ # @param [Object] value Any valid value
149
+ # @return [Hash] Returns the value in the form of hash
150
+ def _to_hash(value)
151
+ if value.is_a?(Array)
152
+ value.compact.map { |v| _to_hash(v) }
153
+ elsif value.is_a?(Hash)
154
+ {}.tap do |hash|
155
+ value.each { |k, v| hash[k] = _to_hash(v) }
156
+ end
157
+ elsif value.respond_to? :to_hash
158
+ value.to_hash
159
+ else
160
+ value
161
+ end
162
+ end
163
+ end
164
+ end
165
+ # rubocop:enable Lint/UnneededCopDisableDirective