oci 2.3.0 → 2.3.1

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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/core/blockstorage_client.rb +412 -13
  4. data/lib/oci/core/blockstorage_client_composite_operations.rb +158 -0
  5. data/lib/oci/core/compute_client.rb +6 -7
  6. data/lib/oci/core/core.rb +13 -0
  7. data/lib/oci/core/models/boot_volume.rb +68 -1
  8. data/lib/oci/core/models/boot_volume_backup.rb +435 -0
  9. data/lib/oci/core/models/boot_volume_source_details.rb +163 -0
  10. data/lib/oci/core/models/boot_volume_source_from_boot_volume_backup_details.rb +154 -0
  11. data/lib/oci/core/models/boot_volume_source_from_boot_volume_details.rb +154 -0
  12. data/lib/oci/core/models/create_boot_volume_backup_details.rb +227 -0
  13. data/lib/oci/core/models/create_boot_volume_details.rb +250 -0
  14. data/lib/oci/core/models/create_service_gateway_details.rb +228 -0
  15. data/lib/oci/core/models/egress_security_rule.rb +44 -3
  16. data/lib/oci/core/models/ingress_security_rule.rb +47 -3
  17. data/lib/oci/core/models/instance_source_via_image_details.rb +0 -1
  18. data/lib/oci/core/models/route_rule.rb +59 -2
  19. data/lib/oci/core/models/service.rb +185 -0
  20. data/lib/oci/core/models/service_gateway.rb +325 -0
  21. data/lib/oci/core/models/service_id_request_details.rb +151 -0
  22. data/lib/oci/core/models/service_id_response_details.rb +165 -0
  23. data/lib/oci/core/models/update_boot_volume_backup_details.rb +189 -0
  24. data/lib/oci/core/models/update_boot_volume_details.rb +41 -4
  25. data/lib/oci/core/models/update_service_gateway_details.rb +225 -0
  26. data/lib/oci/core/models/volume_group.rb +21 -7
  27. data/lib/oci/core/models/volume_group_backup.rb +39 -7
  28. data/lib/oci/core/models/volume_group_source_from_volumes_details.rb +1 -1
  29. data/lib/oci/core/virtual_network_client.rb +582 -1
  30. data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
  31. data/lib/oci/version.rb +1 -1
  32. metadata +15 -2
@@ -0,0 +1,227 @@
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
+ # CreateBootVolumeBackupDetails model.
8
+ class Core::Models::CreateBootVolumeBackupDetails # rubocop:disable Metrics/LineLength
9
+ TYPE_ENUM = [
10
+ TYPE_FULL = 'FULL'.freeze,
11
+ TYPE_INCREMENTAL = 'INCREMENTAL'.freeze
12
+ ].freeze
13
+
14
+ # **[Required]** The OCID of the boot volume that needs to be backed up.
15
+ # @return [String]
16
+ attr_accessor :boot_volume_id
17
+
18
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
19
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
20
+ #
21
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
22
+ #
23
+ # @return [Hash<String, Hash<String, Object>>]
24
+ attr_accessor :defined_tags
25
+
26
+ # A user-friendly name for the boot volume backup. Does not have to be unique and it's changeable.
27
+ # Avoid entering confidential information.
28
+ #
29
+ # @return [String]
30
+ attr_accessor :display_name
31
+
32
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
33
+ # predefined name, type, or namespace. For more information, see
34
+ # [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
35
+ #
36
+ # Example: `{\"Department\": \"Finance\"}`
37
+ #
38
+ # @return [Hash<String, String>]
39
+ attr_accessor :freeform_tags
40
+
41
+ # The type of backup to create. If omitted, defaults to incremental.
42
+ # @return [String]
43
+ attr_reader :type
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ # rubocop:disable Style/SymbolLiteral
49
+ 'boot_volume_id': :'bootVolumeId',
50
+ 'defined_tags': :'definedTags',
51
+ 'display_name': :'displayName',
52
+ 'freeform_tags': :'freeformTags',
53
+ 'type': :'type'
54
+ # rubocop:enable Style/SymbolLiteral
55
+ }
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.swagger_types
60
+ {
61
+ # rubocop:disable Style/SymbolLiteral
62
+ 'boot_volume_id': :'String',
63
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
64
+ 'display_name': :'String',
65
+ 'freeform_tags': :'Hash<String, String>',
66
+ 'type': :'String'
67
+ # rubocop:enable Style/SymbolLiteral
68
+ }
69
+ end
70
+
71
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
72
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
73
+
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ # @option attributes [String] :boot_volume_id The value to assign to the {#boot_volume_id} property
78
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
79
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
80
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
81
+ # @option attributes [String] :type The value to assign to the {#type} property
82
+ def initialize(attributes = {})
83
+ return unless attributes.is_a?(Hash)
84
+
85
+ # convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
87
+
88
+ self.boot_volume_id = attributes[:'bootVolumeId'] if attributes[:'bootVolumeId']
89
+
90
+ raise 'You cannot provide both :bootVolumeId and :boot_volume_id' if attributes.key?(:'bootVolumeId') && attributes.key?(:'boot_volume_id')
91
+
92
+ self.boot_volume_id = attributes[:'boot_volume_id'] if attributes[:'boot_volume_id']
93
+
94
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
95
+
96
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
97
+
98
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
99
+
100
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
101
+
102
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
103
+
104
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
105
+
106
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
107
+
108
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
109
+
110
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
111
+
112
+ self.type = attributes[:'type'] if attributes[:'type']
113
+ end
114
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
115
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
116
+
117
+ # Custom attribute writer method checking allowed values (enum).
118
+ # @param [Object] type Object to be assigned
119
+ def type=(type)
120
+ # rubocop: disable Metrics/LineLength
121
+ raise "Invalid value for 'type': this must be one of the values in TYPE_ENUM." if type && !TYPE_ENUM.include?(type)
122
+ # rubocop: enable Metrics/LineLength
123
+ @type = type
124
+ end
125
+
126
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
127
+
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] other the other object to be compared
131
+ def ==(other)
132
+ return true if equal?(other)
133
+ self.class == other.class &&
134
+ boot_volume_id == other.boot_volume_id &&
135
+ defined_tags == other.defined_tags &&
136
+ display_name == other.display_name &&
137
+ freeform_tags == other.freeform_tags &&
138
+ type == other.type
139
+ end
140
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
141
+
142
+ # @see the `==` method
143
+ # @param [Object] other the other object to be compared
144
+ def eql?(other)
145
+ self == other
146
+ end
147
+
148
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
149
+
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Fixnum] Hash code
153
+ def hash
154
+ [boot_volume_id, defined_tags, display_name, freeform_tags, type].hash
155
+ end
156
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
157
+
158
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
159
+
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ self.class.swagger_types.each_pair do |key, type|
167
+ if type =~ /^Array<(.*)>/i
168
+ # check to ensure the input is an array given that the the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
171
+ public_method("#{key}=").call(
172
+ attributes[self.class.attribute_map[key]]
173
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
174
+ )
175
+ end
176
+ elsif !attributes[self.class.attribute_map[key]].nil?
177
+ public_method("#{key}=").call(
178
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
179
+ )
180
+ end
181
+ # or else data not found in attributes(hash), not an issue as the data can be optional
182
+ end
183
+
184
+ self
185
+ end
186
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
187
+
188
+ # Returns the string representation of the object
189
+ # @return [String] String presentation of the object
190
+ def to_s
191
+ to_hash.to_s
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = public_method(attr).call
200
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ private
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+ end
226
+ end
227
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -0,0 +1,250 @@
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
+ # CreateBootVolumeDetails model.
8
+ class Core::Models::CreateBootVolumeDetails # rubocop:disable Metrics/LineLength
9
+ # **[Required]** The Availability Domain of the boot volume.
10
+ #
11
+ # Example: `Uocm:PHX-AD-1`
12
+ #
13
+ # @return [String]
14
+ attr_accessor :availability_domain
15
+
16
+ # **[Required]** The OCID of the compartment that contains the boot volume.
17
+ # @return [String]
18
+ attr_accessor :compartment_id
19
+
20
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
21
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
22
+ #
23
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
24
+ #
25
+ # @return [Hash<String, Hash<String, Object>>]
26
+ attr_accessor :defined_tags
27
+
28
+ # A user-friendly name. Does not have to be unique, and it's changeable.
29
+ # Avoid entering confidential information.
30
+ #
31
+ # @return [String]
32
+ attr_accessor :display_name
33
+
34
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
35
+ # predefined name, type, or namespace. For more information, see
36
+ # [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
37
+ #
38
+ # Example: `{\"Department\": \"Finance\"}`
39
+ #
40
+ # @return [Hash<String, String>]
41
+ attr_accessor :freeform_tags
42
+
43
+ # The size of the volume in GBs.
44
+ # @return [Integer]
45
+ attr_accessor :size_in_gbs
46
+
47
+ # **[Required]** Specifies the boot volume source details for a new boot volume. The volume source is either another boot volume in the same Availability Domain or a boot volume backup.
48
+ # This is a mandatory field for a boot volume.
49
+ #
50
+ # @return [OCI::Core::Models::BootVolumeSourceDetails]
51
+ attr_accessor :source_details
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ # rubocop:disable Style/SymbolLiteral
57
+ 'availability_domain': :'availabilityDomain',
58
+ 'compartment_id': :'compartmentId',
59
+ 'defined_tags': :'definedTags',
60
+ 'display_name': :'displayName',
61
+ 'freeform_tags': :'freeformTags',
62
+ 'size_in_gbs': :'sizeInGBs',
63
+ 'source_details': :'sourceDetails'
64
+ # rubocop:enable Style/SymbolLiteral
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+ # rubocop:disable Style/SymbolLiteral
72
+ 'availability_domain': :'String',
73
+ 'compartment_id': :'String',
74
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
75
+ 'display_name': :'String',
76
+ 'freeform_tags': :'Hash<String, String>',
77
+ 'size_in_gbs': :'Integer',
78
+ 'source_details': :'OCI::Core::Models::BootVolumeSourceDetails'
79
+ # rubocop:enable Style/SymbolLiteral
80
+ }
81
+ end
82
+
83
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
84
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
85
+
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ # @option attributes [String] :availability_domain The value to assign to the {#availability_domain} property
90
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
91
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
92
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
93
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
94
+ # @option attributes [Integer] :size_in_gbs The value to assign to the {#size_in_gbs} property
95
+ # @option attributes [OCI::Core::Models::BootVolumeSourceDetails] :source_details The value to assign to the {#source_details} property
96
+ def initialize(attributes = {})
97
+ return unless attributes.is_a?(Hash)
98
+
99
+ # convert string to symbol for hash key
100
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
101
+
102
+ self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']
103
+
104
+ raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
105
+
106
+ self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain']
107
+
108
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
109
+
110
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
111
+
112
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
113
+
114
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
115
+
116
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
117
+
118
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
119
+
120
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
121
+
122
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
123
+
124
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
125
+
126
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
127
+
128
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
129
+
130
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
131
+
132
+ self.size_in_gbs = attributes[:'sizeInGBs'] if attributes[:'sizeInGBs']
133
+
134
+ raise 'You cannot provide both :sizeInGBs and :size_in_gbs' if attributes.key?(:'sizeInGBs') && attributes.key?(:'size_in_gbs')
135
+
136
+ self.size_in_gbs = attributes[:'size_in_gbs'] if attributes[:'size_in_gbs']
137
+
138
+ self.source_details = attributes[:'sourceDetails'] if attributes[:'sourceDetails']
139
+
140
+ raise 'You cannot provide both :sourceDetails and :source_details' if attributes.key?(:'sourceDetails') && attributes.key?(:'source_details')
141
+
142
+ self.source_details = attributes[:'source_details'] if attributes[:'source_details']
143
+ end
144
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
145
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
146
+
147
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
148
+
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] other the other object to be compared
152
+ def ==(other)
153
+ return true if equal?(other)
154
+ self.class == other.class &&
155
+ availability_domain == other.availability_domain &&
156
+ compartment_id == other.compartment_id &&
157
+ defined_tags == other.defined_tags &&
158
+ display_name == other.display_name &&
159
+ freeform_tags == other.freeform_tags &&
160
+ size_in_gbs == other.size_in_gbs &&
161
+ source_details == other.source_details
162
+ end
163
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
164
+
165
+ # @see the `==` method
166
+ # @param [Object] other the other object to be compared
167
+ def eql?(other)
168
+ self == other
169
+ end
170
+
171
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
172
+
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Fixnum] Hash code
176
+ def hash
177
+ [availability_domain, compartment_id, defined_tags, display_name, freeform_tags, size_in_gbs, source_details].hash
178
+ end
179
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
180
+
181
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
182
+
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ self.class.swagger_types.each_pair do |key, type|
190
+ if type =~ /^Array<(.*)>/i
191
+ # check to ensure the input is an array given that the the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
194
+ public_method("#{key}=").call(
195
+ attributes[self.class.attribute_map[key]]
196
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
197
+ )
198
+ end
199
+ elsif !attributes[self.class.attribute_map[key]].nil?
200
+ public_method("#{key}=").call(
201
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
202
+ )
203
+ end
204
+ # or else data not found in attributes(hash), not an issue as the data can be optional
205
+ end
206
+
207
+ self
208
+ end
209
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = public_method(attr).call
223
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ private
230
+
231
+ # Outputs non-array value in the form of hash
232
+ # For object, use to_hash. Otherwise, just return the value
233
+ # @param [Object] value Any valid value
234
+ # @return [Hash] Returns the value in the form of hash
235
+ def _to_hash(value)
236
+ if value.is_a?(Array)
237
+ value.compact.map { |v| _to_hash(v) }
238
+ elsif value.is_a?(Hash)
239
+ {}.tap do |hash|
240
+ value.each { |k, v| hash[k] = _to_hash(v) }
241
+ end
242
+ elsif value.respond_to? :to_hash
243
+ value.to_hash
244
+ else
245
+ value
246
+ end
247
+ end
248
+ end
249
+ end
250
+ # rubocop:enable Lint/UnneededCopDisableDirective