oci 2.1.2 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -13
  3. data/lib/oci/core/blockstorage_client.rb +690 -61
  4. data/lib/oci/core/blockstorage_client_composite_operations.rb +238 -0
  5. data/lib/oci/core/compute_client.rb +1 -5
  6. data/lib/oci/core/core.rb +10 -0
  7. data/lib/oci/core/models/boot_volume.rb +18 -4
  8. data/lib/oci/core/models/cpe.rb +38 -1
  9. data/lib/oci/core/models/create_cpe_details.rb +38 -1
  10. data/lib/oci/core/models/create_drg_details.rb +41 -4
  11. data/lib/oci/core/models/create_internet_gateway_details.rb +38 -1
  12. data/lib/oci/core/models/create_ip_sec_connection_details.rb +38 -1
  13. data/lib/oci/core/models/create_local_peering_gateway_details.rb +38 -1
  14. data/lib/oci/core/models/create_public_ip_details.rb +38 -1
  15. data/lib/oci/core/models/create_vnic_details.rb +38 -1
  16. data/lib/oci/core/models/create_volume_group_backup_details.rb +239 -0
  17. data/lib/oci/core/models/create_volume_group_details.rb +231 -0
  18. data/lib/oci/core/models/drg.rb +38 -1
  19. data/lib/oci/core/models/internet_gateway.rb +38 -1
  20. data/lib/oci/core/models/ip_sec_connection.rb +38 -1
  21. data/lib/oci/core/models/launch_options.rb +4 -0
  22. data/lib/oci/core/models/local_peering_gateway.rb +38 -1
  23. data/lib/oci/core/models/public_ip.rb +38 -1
  24. data/lib/oci/core/models/update_cpe_details.rb +41 -4
  25. data/lib/oci/core/models/update_drg_details.rb +41 -4
  26. data/lib/oci/core/models/update_internet_gateway_details.rb +38 -1
  27. data/lib/oci/core/models/update_ip_sec_connection_details.rb +41 -4
  28. data/lib/oci/core/models/update_local_peering_gateway_details.rb +41 -4
  29. data/lib/oci/core/models/update_public_ip_details.rb +38 -1
  30. data/lib/oci/core/models/update_vnic_details.rb +38 -1
  31. data/lib/oci/core/models/update_volume_group_backup_details.rb +187 -0
  32. data/lib/oci/core/models/update_volume_group_details.rb +201 -0
  33. data/lib/oci/core/models/vnic.rb +38 -1
  34. data/lib/oci/core/models/volume.rb +18 -4
  35. data/lib/oci/core/models/volume_group.rb +322 -0
  36. data/lib/oci/core/models/volume_group_backup.rb +380 -0
  37. data/lib/oci/core/models/volume_group_source_details.rb +164 -0
  38. data/lib/oci/core/models/volume_group_source_from_volume_group_backup_details.rb +158 -0
  39. data/lib/oci/core/models/volume_group_source_from_volume_group_details.rb +158 -0
  40. data/lib/oci/core/models/volume_group_source_from_volumes_details.rb +158 -0
  41. data/lib/oci/core/virtual_network_client.rb +6 -6
  42. data/lib/oci/database/database.rb +3 -0
  43. data/lib/oci/database/database_client.rb +1 -1
  44. data/lib/oci/database/database_client_composite_operations.rb +1 -1
  45. data/lib/oci/database/models/backup.rb +31 -1
  46. data/lib/oci/database/models/backup_summary.rb +31 -1
  47. data/lib/oci/database/models/create_db_home_from_backup_details.rb +160 -0
  48. data/lib/oci/database/models/launch_db_system_base.rb +438 -0
  49. data/lib/oci/database/models/launch_db_system_details.rb +41 -227
  50. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +314 -0
  51. data/lib/oci/file_storage/file_storage_client.rb +9 -8
  52. data/lib/oci/file_storage/models/export.rb +6 -5
  53. data/lib/oci/file_storage/models/file_system_summary.rb +1 -2
  54. data/lib/oci/version.rb +1 -1
  55. metadata +15 -2
@@ -41,12 +41,29 @@ module OCI
41
41
  # @return [String]
42
42
  attr_accessor :compartment_id
43
43
 
44
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
45
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
46
+ #
47
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
48
+ #
49
+ # @return [Hash<String, Hash<String, Object>>]
50
+ attr_accessor :defined_tags
51
+
44
52
  # A user-friendly name. Does not have to be unique.
45
53
  # Avoid entering confidential information.
46
54
  #
47
55
  # @return [String]
48
56
  attr_accessor :display_name
49
57
 
58
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
59
+ # predefined name, type, or namespace. For more information, see
60
+ # [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
61
+ #
62
+ # Example: `{\"Department\": \"Finance\"}`
63
+ #
64
+ # @return [Hash<String, String>]
65
+ attr_accessor :freeform_tags
66
+
50
67
  # The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname
51
68
  # portion of the primary private IP's fully qualified domain name (FQDN)
52
69
  # (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`).
@@ -123,7 +140,9 @@ module OCI
123
140
  # rubocop:disable Style/SymbolLiteral
124
141
  'availability_domain': :'availabilityDomain',
125
142
  'compartment_id': :'compartmentId',
143
+ 'defined_tags': :'definedTags',
126
144
  'display_name': :'displayName',
145
+ 'freeform_tags': :'freeformTags',
127
146
  'hostname_label': :'hostnameLabel',
128
147
  'id': :'id',
129
148
  'is_primary': :'isPrimary',
@@ -144,7 +163,9 @@ module OCI
144
163
  # rubocop:disable Style/SymbolLiteral
145
164
  'availability_domain': :'String',
146
165
  'compartment_id': :'String',
166
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
147
167
  'display_name': :'String',
168
+ 'freeform_tags': :'Hash<String, String>',
148
169
  'hostname_label': :'String',
149
170
  'id': :'String',
150
171
  'is_primary': :'BOOLEAN',
@@ -167,7 +188,9 @@ module OCI
167
188
  # @param [Hash] attributes Model attributes in the form of hash
168
189
  # @option attributes [String] :availability_domain The value to assign to the {#availability_domain} property
169
190
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
191
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
170
192
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
193
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
171
194
  # @option attributes [String] :hostname_label The value to assign to the {#hostname_label} property
172
195
  # @option attributes [String] :id The value to assign to the {#id} property
173
196
  # @option attributes [BOOLEAN] :is_primary The value to assign to the {#is_primary} property
@@ -196,12 +219,24 @@ module OCI
196
219
 
197
220
  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
198
221
 
222
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
223
+
224
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
225
+
226
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
227
+
199
228
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
200
229
 
201
230
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
202
231
 
203
232
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
204
233
 
234
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
235
+
236
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
237
+
238
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
239
+
205
240
  self.hostname_label = attributes[:'hostnameLabel'] if attributes[:'hostnameLabel']
206
241
 
207
242
  raise 'You cannot provide both :hostnameLabel and :hostname_label' if attributes.key?(:'hostnameLabel') && attributes.key?(:'hostname_label')
@@ -286,7 +321,9 @@ module OCI
286
321
  self.class == other.class &&
287
322
  availability_domain == other.availability_domain &&
288
323
  compartment_id == other.compartment_id &&
324
+ defined_tags == other.defined_tags &&
289
325
  display_name == other.display_name &&
326
+ freeform_tags == other.freeform_tags &&
290
327
  hostname_label == other.hostname_label &&
291
328
  id == other.id &&
292
329
  is_primary == other.is_primary &&
@@ -312,7 +349,7 @@ module OCI
312
349
  # Calculates hash code according to all attributes.
313
350
  # @return [Fixnum] Hash code
314
351
  def hash
315
- [availability_domain, compartment_id, display_name, hostname_label, id, is_primary, lifecycle_state, mac_address, private_ip, public_ip, skip_source_dest_check, subnet_id, time_created].hash
352
+ [availability_domain, compartment_id, defined_tags, display_name, freeform_tags, hostname_label, id, is_primary, lifecycle_state, mac_address, private_ip, public_ip, skip_source_dest_check, subnet_id, time_created].hash
316
353
  end
317
354
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
318
355
 
@@ -88,6 +88,10 @@ module OCI
88
88
  # @return [DateTime]
89
89
  attr_accessor :time_created
90
90
 
91
+ # The OCID of the source volume group.
92
+ # @return [String]
93
+ attr_accessor :volume_group_id
94
+
91
95
  # Attribute mapping from ruby-style variable name to JSON key.
92
96
  def self.attribute_map
93
97
  {
@@ -103,7 +107,8 @@ module OCI
103
107
  'size_in_gbs': :'sizeInGBs',
104
108
  'size_in_mbs': :'sizeInMBs',
105
109
  'source_details': :'sourceDetails',
106
- 'time_created': :'timeCreated'
110
+ 'time_created': :'timeCreated',
111
+ 'volume_group_id': :'volumeGroupId'
107
112
  # rubocop:enable Style/SymbolLiteral
108
113
  }
109
114
  end
@@ -123,7 +128,8 @@ module OCI
123
128
  'size_in_gbs': :'Integer',
124
129
  'size_in_mbs': :'Integer',
125
130
  'source_details': :'OCI::Core::Models::VolumeSourceDetails',
126
- 'time_created': :'DateTime'
131
+ 'time_created': :'DateTime',
132
+ 'volume_group_id': :'String'
127
133
  # rubocop:enable Style/SymbolLiteral
128
134
  }
129
135
  end
@@ -146,6 +152,7 @@ module OCI
146
152
  # @option attributes [Integer] :size_in_mbs The value to assign to the {#size_in_mbs} property
147
153
  # @option attributes [OCI::Core::Models::VolumeSourceDetails] :source_details The value to assign to the {#source_details} property
148
154
  # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
155
+ # @option attributes [String] :volume_group_id The value to assign to the {#volume_group_id} property
149
156
  def initialize(attributes = {})
150
157
  return unless attributes.is_a?(Hash)
151
158
 
@@ -219,6 +226,12 @@ module OCI
219
226
  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
220
227
 
221
228
  self.time_created = attributes[:'time_created'] if attributes[:'time_created']
229
+
230
+ self.volume_group_id = attributes[:'volumeGroupId'] if attributes[:'volumeGroupId']
231
+
232
+ raise 'You cannot provide both :volumeGroupId and :volume_group_id' if attributes.key?(:'volumeGroupId') && attributes.key?(:'volume_group_id')
233
+
234
+ self.volume_group_id = attributes[:'volume_group_id'] if attributes[:'volume_group_id']
222
235
  end
223
236
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
224
237
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -257,7 +270,8 @@ module OCI
257
270
  size_in_gbs == other.size_in_gbs &&
258
271
  size_in_mbs == other.size_in_mbs &&
259
272
  source_details == other.source_details &&
260
- time_created == other.time_created
273
+ time_created == other.time_created &&
274
+ volume_group_id == other.volume_group_id
261
275
  end
262
276
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
263
277
 
@@ -273,7 +287,7 @@ module OCI
273
287
  # Calculates hash code according to all attributes.
274
288
  # @return [Fixnum] Hash code
275
289
  def hash
276
- [availability_domain, compartment_id, defined_tags, display_name, freeform_tags, id, is_hydrated, lifecycle_state, size_in_gbs, size_in_mbs, source_details, time_created].hash
290
+ [availability_domain, compartment_id, defined_tags, display_name, freeform_tags, id, is_hydrated, lifecycle_state, size_in_gbs, size_in_mbs, source_details, time_created, volume_group_id].hash
277
291
  end
278
292
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
279
293
 
@@ -0,0 +1,322 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require 'logger'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective
7
+ module OCI
8
+ # Specifies a volume group. A volume group is a collection of block volumes.
9
+ class Core::Models::VolumeGroup # rubocop:disable Metrics/LineLength
10
+ LIFECYCLE_STATE_ENUM = [
11
+ LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
12
+ LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
13
+ LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
14
+ LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
15
+ LIFECYCLE_STATE_FAULTY = 'FAULTY'.freeze,
16
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
17
+ ].freeze
18
+
19
+ # **[Required]** The Availability Domain of the volume group.
20
+ # @return [String]
21
+ attr_accessor :availability_domain
22
+
23
+ # **[Required]** The OCID of the compartment that contains the volume group.
24
+ # @return [String]
25
+ attr_accessor :compartment_id
26
+
27
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
28
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
29
+ #
30
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
31
+ #
32
+ # @return [Hash<String, Hash<String, Object>>]
33
+ attr_accessor :defined_tags
34
+
35
+ # **[Required]** A user-friendly name for the volume group. Does not have to be unique, and it's changeable.
36
+ # @return [String]
37
+ attr_accessor :display_name
38
+
39
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
40
+ # predefined name, type, or namespace. For more information, see
41
+ # [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
42
+ #
43
+ # Example: `{\"Department\": \"Finance\"}`
44
+ #
45
+ # @return [Hash<String, String>]
46
+ attr_accessor :freeform_tags
47
+
48
+ # **[Required]** The Oracle Cloud ID (OCID) that uniquely identifies the volume group.
49
+ # @return [String]
50
+ attr_accessor :id
51
+
52
+ # The current state of a volume group.
53
+ # @return [String]
54
+ attr_reader :lifecycle_state
55
+
56
+ # **[Required]** The aggregate size of the volume group in MBs.
57
+ # @return [Integer]
58
+ attr_accessor :size_in_mbs
59
+
60
+ # The volume group source. The volume source is either another a list of
61
+ # volume ids in the same Availability Domain, another volume group or a volume group backup.
62
+ #
63
+ # @return [OCI::Core::Models::VolumeGroupSourceDetails]
64
+ attr_accessor :source_details
65
+
66
+ # **[Required]** The date and time the volume group was created. Format defined by RFC3339.
67
+ # @return [DateTime]
68
+ attr_accessor :time_created
69
+
70
+ # **[Required]** OCIDs for the volumes in this volume group.
71
+ # @return [Array<String>]
72
+ attr_accessor :volume_ids
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ # rubocop:disable Style/SymbolLiteral
78
+ 'availability_domain': :'availabilityDomain',
79
+ 'compartment_id': :'compartmentId',
80
+ 'defined_tags': :'definedTags',
81
+ 'display_name': :'displayName',
82
+ 'freeform_tags': :'freeformTags',
83
+ 'id': :'id',
84
+ 'lifecycle_state': :'lifecycleState',
85
+ 'size_in_mbs': :'sizeInMBs',
86
+ 'source_details': :'sourceDetails',
87
+ 'time_created': :'timeCreated',
88
+ 'volume_ids': :'volumeIds'
89
+ # rubocop:enable Style/SymbolLiteral
90
+ }
91
+ end
92
+
93
+ # Attribute type mapping.
94
+ def self.swagger_types
95
+ {
96
+ # rubocop:disable Style/SymbolLiteral
97
+ 'availability_domain': :'String',
98
+ 'compartment_id': :'String',
99
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
100
+ 'display_name': :'String',
101
+ 'freeform_tags': :'Hash<String, String>',
102
+ 'id': :'String',
103
+ 'lifecycle_state': :'String',
104
+ 'size_in_mbs': :'Integer',
105
+ 'source_details': :'OCI::Core::Models::VolumeGroupSourceDetails',
106
+ 'time_created': :'DateTime',
107
+ 'volume_ids': :'Array<String>'
108
+ # rubocop:enable Style/SymbolLiteral
109
+ }
110
+ end
111
+
112
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
113
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
114
+
115
+
116
+ # Initializes the object
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @option attributes [String] :availability_domain The value to assign to the {#availability_domain} property
119
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
120
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
121
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
122
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
123
+ # @option attributes [String] :id The value to assign to the {#id} property
124
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
125
+ # @option attributes [Integer] :size_in_mbs The value to assign to the {#size_in_mbs} property
126
+ # @option attributes [OCI::Core::Models::VolumeGroupSourceDetails] :source_details The value to assign to the {#source_details} property
127
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
128
+ # @option attributes [Array<String>] :volume_ids The value to assign to the {#volume_ids} property
129
+ def initialize(attributes = {})
130
+ return unless attributes.is_a?(Hash)
131
+
132
+ # convert string to symbol for hash key
133
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
134
+
135
+ self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']
136
+
137
+ raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
138
+
139
+ self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain']
140
+
141
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
142
+
143
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
144
+
145
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
146
+
147
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
148
+
149
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
150
+
151
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
152
+
153
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
154
+
155
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
156
+
157
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
158
+
159
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
160
+
161
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
162
+
163
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
164
+
165
+ self.id = attributes[:'id'] if attributes[:'id']
166
+
167
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
168
+
169
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
170
+
171
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
172
+
173
+ self.size_in_mbs = attributes[:'sizeInMBs'] if attributes[:'sizeInMBs']
174
+
175
+ raise 'You cannot provide both :sizeInMBs and :size_in_mbs' if attributes.key?(:'sizeInMBs') && attributes.key?(:'size_in_mbs')
176
+
177
+ self.size_in_mbs = attributes[:'size_in_mbs'] if attributes[:'size_in_mbs']
178
+
179
+ self.source_details = attributes[:'sourceDetails'] if attributes[:'sourceDetails']
180
+
181
+ raise 'You cannot provide both :sourceDetails and :source_details' if attributes.key?(:'sourceDetails') && attributes.key?(:'source_details')
182
+
183
+ self.source_details = attributes[:'source_details'] if attributes[:'source_details']
184
+
185
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
186
+
187
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
188
+
189
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
190
+
191
+ self.volume_ids = attributes[:'volumeIds'] if attributes[:'volumeIds']
192
+
193
+ raise 'You cannot provide both :volumeIds and :volume_ids' if attributes.key?(:'volumeIds') && attributes.key?(:'volume_ids')
194
+
195
+ self.volume_ids = attributes[:'volume_ids'] if attributes[:'volume_ids']
196
+ end
197
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
198
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
199
+
200
+ # Custom attribute writer method checking allowed values (enum).
201
+ # @param [Object] lifecycle_state Object to be assigned
202
+ def lifecycle_state=(lifecycle_state)
203
+ # rubocop:disable Style/ConditionalAssignment
204
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
205
+ # rubocop: disable Metrics/LineLength
206
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
207
+ # rubocop: enable Metrics/LineLength
208
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
209
+ else
210
+ @lifecycle_state = lifecycle_state
211
+ end
212
+ # rubocop:enable Style/ConditionalAssignment
213
+ end
214
+
215
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
216
+
217
+
218
+ # Checks equality by comparing each attribute.
219
+ # @param [Object] other the other object to be compared
220
+ def ==(other)
221
+ return true if equal?(other)
222
+ self.class == other.class &&
223
+ availability_domain == other.availability_domain &&
224
+ compartment_id == other.compartment_id &&
225
+ defined_tags == other.defined_tags &&
226
+ display_name == other.display_name &&
227
+ freeform_tags == other.freeform_tags &&
228
+ id == other.id &&
229
+ lifecycle_state == other.lifecycle_state &&
230
+ size_in_mbs == other.size_in_mbs &&
231
+ source_details == other.source_details &&
232
+ time_created == other.time_created &&
233
+ volume_ids == other.volume_ids
234
+ end
235
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
236
+
237
+ # @see the `==` method
238
+ # @param [Object] other the other object to be compared
239
+ def eql?(other)
240
+ self == other
241
+ end
242
+
243
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
244
+
245
+
246
+ # Calculates hash code according to all attributes.
247
+ # @return [Fixnum] Hash code
248
+ def hash
249
+ [availability_domain, compartment_id, defined_tags, display_name, freeform_tags, id, lifecycle_state, size_in_mbs, source_details, time_created, volume_ids].hash
250
+ end
251
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
252
+
253
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
254
+
255
+
256
+ # Builds the object from hash
257
+ # @param [Hash] attributes Model attributes in the form of hash
258
+ # @return [Object] Returns the model itself
259
+ def build_from_hash(attributes)
260
+ return nil unless attributes.is_a?(Hash)
261
+ self.class.swagger_types.each_pair do |key, type|
262
+ if type =~ /^Array<(.*)>/i
263
+ # check to ensure the input is an array given that the the attribute
264
+ # is documented as an array but the input is not
265
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
266
+ public_method("#{key}=").call(
267
+ attributes[self.class.attribute_map[key]]
268
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
269
+ )
270
+ end
271
+ elsif !attributes[self.class.attribute_map[key]].nil?
272
+ public_method("#{key}=").call(
273
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
274
+ )
275
+ end
276
+ # or else data not found in attributes(hash), not an issue as the data can be optional
277
+ end
278
+
279
+ self
280
+ end
281
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # Returns the object in the form of hash
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_hash
292
+ hash = {}
293
+ self.class.attribute_map.each_pair do |attr, param|
294
+ value = public_method(attr).call
295
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
296
+ hash[param] = _to_hash(value)
297
+ end
298
+ hash
299
+ end
300
+
301
+ private
302
+
303
+ # Outputs non-array value in the form of hash
304
+ # For object, use to_hash. Otherwise, just return the value
305
+ # @param [Object] value Any valid value
306
+ # @return [Hash] Returns the value in the form of hash
307
+ def _to_hash(value)
308
+ if value.is_a?(Array)
309
+ value.compact.map { |v| _to_hash(v) }
310
+ elsif value.is_a?(Hash)
311
+ {}.tap do |hash|
312
+ value.each { |k, v| hash[k] = _to_hash(v) }
313
+ end
314
+ elsif value.respond_to? :to_hash
315
+ value.to_hash
316
+ else
317
+ value
318
+ end
319
+ end
320
+ end
321
+ end
322
+ # rubocop:enable Lint/UnneededCopDisableDirective