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
@@ -1,11 +1,12 @@
1
1
  # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
+ require_relative 'launch_db_system_base'
4
5
 
5
6
  # rubocop:disable Lint/UnneededCopDisableDirective
6
7
  module OCI
7
8
  # LaunchDbSystemDetails model.
8
- class Database::Models::LaunchDbSystemDetails # rubocop:disable Metrics/LineLength
9
+ class Database::Models::LaunchDbSystemDetails < Database::Models::LaunchDbSystemBase # rubocop:disable Metrics/LineLength
9
10
  DATABASE_EDITION_ENUM = [
10
11
  DATABASE_EDITION_STANDARD_EDITION = 'STANDARD_EDITION'.freeze,
11
12
  DATABASE_EDITION_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION'.freeze,
@@ -23,48 +24,7 @@ module OCI
23
24
  LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze
24
25
  ].freeze
25
26
 
26
- # **[Required]** The Availability Domain where the DB System is located.
27
- # @return [String]
28
- attr_accessor :availability_domain
29
-
30
- # The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata.
31
- #
32
- # **Subnet Restrictions:** See above subnetId's **Subnet Restriction**.
33
- #
34
- # @return [String]
35
- attr_accessor :backup_subnet_id
36
-
37
- # Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.
38
- #
39
- # @return [String]
40
- attr_accessor :cluster_name
41
-
42
- # **[Required]** The Oracle Cloud ID (OCID) of the compartment the DB System belongs in.
43
- # @return [String]
44
- attr_accessor :compartment_id
45
-
46
- # **[Required]** The number of CPU cores to enable. The valid values depend on the specified shape:
47
- #
48
- # - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36.
49
- # - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72.
50
- # - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84.
51
- # - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168.
52
- # - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336.
53
- #
54
- # For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used.
55
- #
56
- # @return [Integer]
57
- attr_accessor :cpu_core_count
58
-
59
- # The percentage assigned to DATA storage (user data and database files).
60
- # The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups).
61
- # Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems.
62
- #
63
- # @return [Integer]
64
- attr_accessor :data_storage_percentage
65
-
66
27
  # **[Required]** The Oracle Database Edition that applies to all the databases on the DB System.
67
- #
68
28
  # Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE.
69
29
  #
70
30
  # @return [String]
@@ -74,14 +34,6 @@ module OCI
74
34
  # @return [OCI::Database::Models::CreateDbHomeDetails]
75
35
  attr_accessor :db_home
76
36
 
77
- # Defined tags for this resource. Each key is predefined and scoped to a namespace.
78
- # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
79
- #
80
- # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
81
- #
82
- # @return [Hash<String, Hash<String, Object>>]
83
- attr_accessor :defined_tags
84
-
85
37
  # The type of redundancy configured for the DB System.
86
38
  # Normal is 2-way redundancy, recommended for test and development systems.
87
39
  # High is 3-way redundancy, recommended for production systems.
@@ -89,72 +41,11 @@ module OCI
89
41
  # @return [String]
90
42
  attr_reader :disk_redundancy
91
43
 
92
- # The user-friendly name for the DB System. It does not have to be unique.
93
- # @return [String]
94
- attr_accessor :display_name
95
-
96
- # A domain name used for the DB System. If the Oracle-provided Internet and VCN
97
- # Resolver is enabled for the specified subnet, the domain name for the subnet is used
98
- # (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted.
99
- #
100
- # @return [String]
101
- attr_accessor :domain
102
-
103
- # Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
104
- # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
105
- #
106
- # Example: `{\"Department\": \"Finance\"}`
107
- #
108
- # @return [Hash<String, String>]
109
- attr_accessor :freeform_tags
110
-
111
- # **[Required]** The host name for the DB System. The host name must begin with an alphabetic character and
112
- # can contain a maximum of 30 alphanumeric characters, including hyphens (-).
113
- #
114
- # The maximum length of the combined hostname and domain is 63 characters.
115
- #
116
- # **Note:** The hostname must be unique within the subnet. If it is not unique,
117
- # the DB System will fail to provision.
118
- #
119
- # @return [String]
120
- attr_accessor :hostname
121
-
122
- # Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume.
123
- #
124
- # @return [Integer]
125
- attr_accessor :initial_data_storage_size_in_gb
126
-
127
44
  # The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED.
128
45
  #
129
46
  # @return [String]
130
47
  attr_reader :license_model
131
48
 
132
- # Number of nodes to launch for a VM-shape based RAC DB system.
133
- #
134
- # @return [Integer]
135
- attr_accessor :node_count
136
-
137
- # **[Required]** The shape of the DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the {#list_db_system_shapes list_db_system_shapes} operation.
138
- # @return [String]
139
- attr_accessor :shape
140
-
141
- # **[Required]** The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters.
142
- # @return [Array<String>]
143
- attr_accessor :ssh_public_keys
144
-
145
- # **[Required]** The OCID of the subnet the DB System is associated with.
146
- #
147
- # **Subnet Restrictions:**
148
- # - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28
149
- # - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20
150
- #
151
- # These subnets are used by the Oracle Clusterware private interconnect on the database instance.
152
- # Specifying an overlapping subnet will cause the private interconnect to malfunction.
153
- # This restriction applies to both the client subnet and backup subnet.
154
- #
155
- # @return [String]
156
- attr_accessor :subnet_id
157
-
158
49
  # Attribute mapping from ruby-style variable name to JSON key.
159
50
  def self.attribute_map
160
51
  {
@@ -165,20 +56,21 @@ module OCI
165
56
  'compartment_id': :'compartmentId',
166
57
  'cpu_core_count': :'cpuCoreCount',
167
58
  'data_storage_percentage': :'dataStoragePercentage',
168
- 'database_edition': :'databaseEdition',
169
- 'db_home': :'dbHome',
170
59
  'defined_tags': :'definedTags',
171
- 'disk_redundancy': :'diskRedundancy',
172
60
  'display_name': :'displayName',
173
61
  'domain': :'domain',
174
62
  'freeform_tags': :'freeformTags',
175
63
  'hostname': :'hostname',
176
64
  'initial_data_storage_size_in_gb': :'initialDataStorageSizeInGB',
177
- 'license_model': :'licenseModel',
178
65
  'node_count': :'nodeCount',
179
66
  'shape': :'shape',
67
+ 'source': :'source',
180
68
  'ssh_public_keys': :'sshPublicKeys',
181
- 'subnet_id': :'subnetId'
69
+ 'subnet_id': :'subnetId',
70
+ 'database_edition': :'databaseEdition',
71
+ 'db_home': :'dbHome',
72
+ 'disk_redundancy': :'diskRedundancy',
73
+ 'license_model': :'licenseModel'
182
74
  # rubocop:enable Style/SymbolLiteral
183
75
  }
184
76
  end
@@ -193,20 +85,21 @@ module OCI
193
85
  'compartment_id': :'String',
194
86
  'cpu_core_count': :'Integer',
195
87
  'data_storage_percentage': :'Integer',
196
- 'database_edition': :'String',
197
- 'db_home': :'OCI::Database::Models::CreateDbHomeDetails',
198
88
  'defined_tags': :'Hash<String, Hash<String, Object>>',
199
- 'disk_redundancy': :'String',
200
89
  'display_name': :'String',
201
90
  'domain': :'String',
202
91
  'freeform_tags': :'Hash<String, String>',
203
92
  'hostname': :'String',
204
93
  'initial_data_storage_size_in_gb': :'Integer',
205
- 'license_model': :'String',
206
94
  'node_count': :'Integer',
207
95
  'shape': :'String',
96
+ 'source': :'String',
208
97
  'ssh_public_keys': :'Array<String>',
209
- 'subnet_id': :'String'
98
+ 'subnet_id': :'String',
99
+ 'database_edition': :'String',
100
+ 'db_home': :'OCI::Database::Models::CreateDbHomeDetails',
101
+ 'disk_redundancy': :'String',
102
+ 'license_model': :'String'
210
103
  # rubocop:enable Style/SymbolLiteral
211
104
  }
212
105
  end
@@ -217,67 +110,35 @@ module OCI
217
110
 
218
111
  # Initializes the object
219
112
  # @param [Hash] attributes Model attributes in the form of hash
220
- # @option attributes [String] :availability_domain The value to assign to the {#availability_domain} property
221
- # @option attributes [String] :backup_subnet_id The value to assign to the {#backup_subnet_id} property
222
- # @option attributes [String] :cluster_name The value to assign to the {#cluster_name} property
223
- # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
224
- # @option attributes [Integer] :cpu_core_count The value to assign to the {#cpu_core_count} property
225
- # @option attributes [Integer] :data_storage_percentage The value to assign to the {#data_storage_percentage} property
113
+ # @option attributes [String] :availability_domain The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#availability_domain #availability_domain} proprety
114
+ # @option attributes [String] :backup_subnet_id The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#backup_subnet_id #backup_subnet_id} proprety
115
+ # @option attributes [String] :cluster_name The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#cluster_name #cluster_name} proprety
116
+ # @option attributes [String] :compartment_id The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#compartment_id #compartment_id} proprety
117
+ # @option attributes [Integer] :cpu_core_count The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#cpu_core_count #cpu_core_count} proprety
118
+ # @option attributes [Integer] :data_storage_percentage The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#data_storage_percentage #data_storage_percentage} proprety
119
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#defined_tags #defined_tags} proprety
120
+ # @option attributes [String] :display_name The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#display_name #display_name} proprety
121
+ # @option attributes [String] :domain The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#domain #domain} proprety
122
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#freeform_tags #freeform_tags} proprety
123
+ # @option attributes [String] :hostname The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#hostname #hostname} proprety
124
+ # @option attributes [Integer] :initial_data_storage_size_in_gb The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#initial_data_storage_size_in_gb #initial_data_storage_size_in_gb} proprety
125
+ # @option attributes [Integer] :node_count The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#node_count #node_count} proprety
126
+ # @option attributes [String] :shape The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#shape #shape} proprety
127
+ # @option attributes [Array<String>] :ssh_public_keys The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#ssh_public_keys #ssh_public_keys} proprety
128
+ # @option attributes [String] :subnet_id The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#subnet_id #subnet_id} proprety
226
129
  # @option attributes [String] :database_edition The value to assign to the {#database_edition} property
227
130
  # @option attributes [OCI::Database::Models::CreateDbHomeDetails] :db_home The value to assign to the {#db_home} property
228
- # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
229
131
  # @option attributes [String] :disk_redundancy The value to assign to the {#disk_redundancy} property
230
- # @option attributes [String] :display_name The value to assign to the {#display_name} property
231
- # @option attributes [String] :domain The value to assign to the {#domain} property
232
- # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
233
- # @option attributes [String] :hostname The value to assign to the {#hostname} property
234
- # @option attributes [Integer] :initial_data_storage_size_in_gb The value to assign to the {#initial_data_storage_size_in_gb} property
235
132
  # @option attributes [String] :license_model The value to assign to the {#license_model} property
236
- # @option attributes [Integer] :node_count The value to assign to the {#node_count} property
237
- # @option attributes [String] :shape The value to assign to the {#shape} property
238
- # @option attributes [Array<String>] :ssh_public_keys The value to assign to the {#ssh_public_keys} property
239
- # @option attributes [String] :subnet_id The value to assign to the {#subnet_id} property
240
133
  def initialize(attributes = {})
241
134
  return unless attributes.is_a?(Hash)
242
135
 
243
- # convert string to symbol for hash key
244
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
245
-
246
- self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']
247
-
248
- raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
249
-
250
- self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain']
251
-
252
- self.backup_subnet_id = attributes[:'backupSubnetId'] if attributes[:'backupSubnetId']
253
-
254
- raise 'You cannot provide both :backupSubnetId and :backup_subnet_id' if attributes.key?(:'backupSubnetId') && attributes.key?(:'backup_subnet_id')
255
-
256
- self.backup_subnet_id = attributes[:'backup_subnet_id'] if attributes[:'backup_subnet_id']
257
-
258
- self.cluster_name = attributes[:'clusterName'] if attributes[:'clusterName']
259
-
260
- raise 'You cannot provide both :clusterName and :cluster_name' if attributes.key?(:'clusterName') && attributes.key?(:'cluster_name')
136
+ attributes['source'] = 'NONE'
261
137
 
262
- self.cluster_name = attributes[:'cluster_name'] if attributes[:'cluster_name']
138
+ super(attributes)
263
139
 
264
- self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
265
-
266
- raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
267
-
268
- self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
269
-
270
- self.cpu_core_count = attributes[:'cpuCoreCount'] if attributes[:'cpuCoreCount']
271
-
272
- raise 'You cannot provide both :cpuCoreCount and :cpu_core_count' if attributes.key?(:'cpuCoreCount') && attributes.key?(:'cpu_core_count')
273
-
274
- self.cpu_core_count = attributes[:'cpu_core_count'] if attributes[:'cpu_core_count']
275
-
276
- self.data_storage_percentage = attributes[:'dataStoragePercentage'] if attributes[:'dataStoragePercentage']
277
-
278
- raise 'You cannot provide both :dataStoragePercentage and :data_storage_percentage' if attributes.key?(:'dataStoragePercentage') && attributes.key?(:'data_storage_percentage')
279
-
280
- self.data_storage_percentage = attributes[:'data_storage_percentage'] if attributes[:'data_storage_percentage']
140
+ # convert string to symbol for hash key
141
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
281
142
 
282
143
  self.database_edition = attributes[:'databaseEdition'] if attributes[:'databaseEdition']
283
144
 
@@ -291,65 +152,17 @@ module OCI
291
152
 
292
153
  self.db_home = attributes[:'db_home'] if attributes[:'db_home']
293
154
 
294
- self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
295
-
296
- raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
297
-
298
- self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
299
-
300
155
  self.disk_redundancy = attributes[:'diskRedundancy'] if attributes[:'diskRedundancy']
301
156
 
302
157
  raise 'You cannot provide both :diskRedundancy and :disk_redundancy' if attributes.key?(:'diskRedundancy') && attributes.key?(:'disk_redundancy')
303
158
 
304
159
  self.disk_redundancy = attributes[:'disk_redundancy'] if attributes[:'disk_redundancy']
305
160
 
306
- self.display_name = attributes[:'displayName'] if attributes[:'displayName']
307
-
308
- raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
309
-
310
- self.display_name = attributes[:'display_name'] if attributes[:'display_name']
311
-
312
- self.domain = attributes[:'domain'] if attributes[:'domain']
313
-
314
- self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
315
-
316
- raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
317
-
318
- self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
319
-
320
- self.hostname = attributes[:'hostname'] if attributes[:'hostname']
321
-
322
- self.initial_data_storage_size_in_gb = attributes[:'initialDataStorageSizeInGB'] if attributes[:'initialDataStorageSizeInGB']
323
-
324
- raise 'You cannot provide both :initialDataStorageSizeInGB and :initial_data_storage_size_in_gb' if attributes.key?(:'initialDataStorageSizeInGB') && attributes.key?(:'initial_data_storage_size_in_gb')
325
-
326
- self.initial_data_storage_size_in_gb = attributes[:'initial_data_storage_size_in_gb'] if attributes[:'initial_data_storage_size_in_gb']
327
-
328
161
  self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']
329
162
 
330
163
  raise 'You cannot provide both :licenseModel and :license_model' if attributes.key?(:'licenseModel') && attributes.key?(:'license_model')
331
164
 
332
165
  self.license_model = attributes[:'license_model'] if attributes[:'license_model']
333
-
334
- self.node_count = attributes[:'nodeCount'] if attributes[:'nodeCount']
335
-
336
- raise 'You cannot provide both :nodeCount and :node_count' if attributes.key?(:'nodeCount') && attributes.key?(:'node_count')
337
-
338
- self.node_count = attributes[:'node_count'] if attributes[:'node_count']
339
-
340
- self.shape = attributes[:'shape'] if attributes[:'shape']
341
-
342
- self.ssh_public_keys = attributes[:'sshPublicKeys'] if attributes[:'sshPublicKeys']
343
-
344
- raise 'You cannot provide both :sshPublicKeys and :ssh_public_keys' if attributes.key?(:'sshPublicKeys') && attributes.key?(:'ssh_public_keys')
345
-
346
- self.ssh_public_keys = attributes[:'ssh_public_keys'] if attributes[:'ssh_public_keys']
347
-
348
- self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId']
349
-
350
- raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id')
351
-
352
- self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id']
353
166
  end
354
167
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
355
168
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -395,20 +208,21 @@ module OCI
395
208
  compartment_id == other.compartment_id &&
396
209
  cpu_core_count == other.cpu_core_count &&
397
210
  data_storage_percentage == other.data_storage_percentage &&
398
- database_edition == other.database_edition &&
399
- db_home == other.db_home &&
400
211
  defined_tags == other.defined_tags &&
401
- disk_redundancy == other.disk_redundancy &&
402
212
  display_name == other.display_name &&
403
213
  domain == other.domain &&
404
214
  freeform_tags == other.freeform_tags &&
405
215
  hostname == other.hostname &&
406
216
  initial_data_storage_size_in_gb == other.initial_data_storage_size_in_gb &&
407
- license_model == other.license_model &&
408
217
  node_count == other.node_count &&
409
218
  shape == other.shape &&
219
+ source == other.source &&
410
220
  ssh_public_keys == other.ssh_public_keys &&
411
- subnet_id == other.subnet_id
221
+ subnet_id == other.subnet_id &&
222
+ database_edition == other.database_edition &&
223
+ db_home == other.db_home &&
224
+ disk_redundancy == other.disk_redundancy &&
225
+ license_model == other.license_model
412
226
  end
413
227
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
414
228
 
@@ -424,7 +238,7 @@ module OCI
424
238
  # Calculates hash code according to all attributes.
425
239
  # @return [Fixnum] Hash code
426
240
  def hash
427
- [availability_domain, backup_subnet_id, cluster_name, compartment_id, cpu_core_count, data_storage_percentage, database_edition, db_home, defined_tags, disk_redundancy, display_name, domain, freeform_tags, hostname, initial_data_storage_size_in_gb, license_model, node_count, shape, ssh_public_keys, subnet_id].hash
241
+ [availability_domain, backup_subnet_id, cluster_name, compartment_id, cpu_core_count, data_storage_percentage, defined_tags, display_name, domain, freeform_tags, hostname, initial_data_storage_size_in_gb, node_count, shape, source, ssh_public_keys, subnet_id, database_edition, db_home, disk_redundancy, license_model].hash
428
242
  end
429
243
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
430
244
 
@@ -0,0 +1,314 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require_relative 'launch_db_system_base'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective
7
+ module OCI
8
+ # LaunchDbSystemFromBackupDetails model.
9
+ class Database::Models::LaunchDbSystemFromBackupDetails < Database::Models::LaunchDbSystemBase # rubocop:disable Metrics/LineLength
10
+ DATABASE_EDITION_ENUM = [
11
+ DATABASE_EDITION_STANDARD_EDITION = 'STANDARD_EDITION'.freeze,
12
+ DATABASE_EDITION_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION'.freeze,
13
+ DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = 'ENTERPRISE_EDITION_EXTREME_PERFORMANCE'.freeze,
14
+ DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = 'ENTERPRISE_EDITION_HIGH_PERFORMANCE'.freeze
15
+ ].freeze
16
+
17
+ DISK_REDUNDANCY_ENUM = [
18
+ DISK_REDUNDANCY_HIGH = 'HIGH'.freeze,
19
+ DISK_REDUNDANCY_NORMAL = 'NORMAL'.freeze
20
+ ].freeze
21
+
22
+ LICENSE_MODEL_ENUM = [
23
+ LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
24
+ LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze
25
+ ].freeze
26
+
27
+ # **[Required]** The Oracle Database Edition that applies to all the databases on the DB System.
28
+ # Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE.
29
+ #
30
+ # @return [String]
31
+ attr_reader :database_edition
32
+
33
+ # This attribute is required.
34
+ # @return [OCI::Database::Models::CreateDbHomeFromBackupDetails]
35
+ attr_accessor :db_home
36
+
37
+ # The type of redundancy configured for the DB System.
38
+ # Normal is 2-way redundancy, recommended for test and development systems.
39
+ # High is 3-way redundancy, recommended for production systems.
40
+ #
41
+ # @return [String]
42
+ attr_reader :disk_redundancy
43
+
44
+ # The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED.
45
+ #
46
+ # @return [String]
47
+ attr_reader :license_model
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ # rubocop:disable Style/SymbolLiteral
53
+ 'availability_domain': :'availabilityDomain',
54
+ 'backup_subnet_id': :'backupSubnetId',
55
+ 'cluster_name': :'clusterName',
56
+ 'compartment_id': :'compartmentId',
57
+ 'cpu_core_count': :'cpuCoreCount',
58
+ 'data_storage_percentage': :'dataStoragePercentage',
59
+ 'defined_tags': :'definedTags',
60
+ 'display_name': :'displayName',
61
+ 'domain': :'domain',
62
+ 'freeform_tags': :'freeformTags',
63
+ 'hostname': :'hostname',
64
+ 'initial_data_storage_size_in_gb': :'initialDataStorageSizeInGB',
65
+ 'node_count': :'nodeCount',
66
+ 'shape': :'shape',
67
+ 'source': :'source',
68
+ 'ssh_public_keys': :'sshPublicKeys',
69
+ 'subnet_id': :'subnetId',
70
+ 'database_edition': :'databaseEdition',
71
+ 'db_home': :'dbHome',
72
+ 'disk_redundancy': :'diskRedundancy',
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
+ 'availability_domain': :'String',
83
+ 'backup_subnet_id': :'String',
84
+ 'cluster_name': :'String',
85
+ 'compartment_id': :'String',
86
+ 'cpu_core_count': :'Integer',
87
+ 'data_storage_percentage': :'Integer',
88
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
89
+ 'display_name': :'String',
90
+ 'domain': :'String',
91
+ 'freeform_tags': :'Hash<String, String>',
92
+ 'hostname': :'String',
93
+ 'initial_data_storage_size_in_gb': :'Integer',
94
+ 'node_count': :'Integer',
95
+ 'shape': :'String',
96
+ 'source': :'String',
97
+ 'ssh_public_keys': :'Array<String>',
98
+ 'subnet_id': :'String',
99
+ 'database_edition': :'String',
100
+ 'db_home': :'OCI::Database::Models::CreateDbHomeFromBackupDetails',
101
+ 'disk_redundancy': :'String',
102
+ 'license_model': :'String'
103
+ # rubocop:enable Style/SymbolLiteral
104
+ }
105
+ end
106
+
107
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
108
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
109
+
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @option attributes [String] :availability_domain The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#availability_domain #availability_domain} proprety
114
+ # @option attributes [String] :backup_subnet_id The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#backup_subnet_id #backup_subnet_id} proprety
115
+ # @option attributes [String] :cluster_name The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#cluster_name #cluster_name} proprety
116
+ # @option attributes [String] :compartment_id The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#compartment_id #compartment_id} proprety
117
+ # @option attributes [Integer] :cpu_core_count The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#cpu_core_count #cpu_core_count} proprety
118
+ # @option attributes [Integer] :data_storage_percentage The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#data_storage_percentage #data_storage_percentage} proprety
119
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#defined_tags #defined_tags} proprety
120
+ # @option attributes [String] :display_name The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#display_name #display_name} proprety
121
+ # @option attributes [String] :domain The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#domain #domain} proprety
122
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#freeform_tags #freeform_tags} proprety
123
+ # @option attributes [String] :hostname The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#hostname #hostname} proprety
124
+ # @option attributes [Integer] :initial_data_storage_size_in_gb The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#initial_data_storage_size_in_gb #initial_data_storage_size_in_gb} proprety
125
+ # @option attributes [Integer] :node_count The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#node_count #node_count} proprety
126
+ # @option attributes [String] :shape The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#shape #shape} proprety
127
+ # @option attributes [Array<String>] :ssh_public_keys The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#ssh_public_keys #ssh_public_keys} proprety
128
+ # @option attributes [String] :subnet_id The value to assign to the {OCI::Database::Models::LaunchDbSystemBase#subnet_id #subnet_id} proprety
129
+ # @option attributes [String] :database_edition The value to assign to the {#database_edition} property
130
+ # @option attributes [OCI::Database::Models::CreateDbHomeFromBackupDetails] :db_home The value to assign to the {#db_home} property
131
+ # @option attributes [String] :disk_redundancy The value to assign to the {#disk_redundancy} property
132
+ # @option attributes [String] :license_model The value to assign to the {#license_model} property
133
+ def initialize(attributes = {})
134
+ return unless attributes.is_a?(Hash)
135
+
136
+ attributes['source'] = 'DB_BACKUP'
137
+
138
+ super(attributes)
139
+
140
+ # convert string to symbol for hash key
141
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
142
+
143
+ self.database_edition = attributes[:'databaseEdition'] if attributes[:'databaseEdition']
144
+
145
+ raise 'You cannot provide both :databaseEdition and :database_edition' if attributes.key?(:'databaseEdition') && attributes.key?(:'database_edition')
146
+
147
+ self.database_edition = attributes[:'database_edition'] if attributes[:'database_edition']
148
+
149
+ self.db_home = attributes[:'dbHome'] if attributes[:'dbHome']
150
+
151
+ raise 'You cannot provide both :dbHome and :db_home' if attributes.key?(:'dbHome') && attributes.key?(:'db_home')
152
+
153
+ self.db_home = attributes[:'db_home'] if attributes[:'db_home']
154
+
155
+ self.disk_redundancy = attributes[:'diskRedundancy'] if attributes[:'diskRedundancy']
156
+
157
+ raise 'You cannot provide both :diskRedundancy and :disk_redundancy' if attributes.key?(:'diskRedundancy') && attributes.key?(:'disk_redundancy')
158
+
159
+ self.disk_redundancy = attributes[:'disk_redundancy'] if attributes[:'disk_redundancy']
160
+
161
+ self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']
162
+
163
+ raise 'You cannot provide both :licenseModel and :license_model' if attributes.key?(:'licenseModel') && attributes.key?(:'license_model')
164
+
165
+ self.license_model = attributes[:'license_model'] if attributes[:'license_model']
166
+ end
167
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
168
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
169
+
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] database_edition Object to be assigned
172
+ def database_edition=(database_edition)
173
+ # rubocop: disable Metrics/LineLength
174
+ raise "Invalid value for 'database_edition': this must be one of the values in DATABASE_EDITION_ENUM." if database_edition && !DATABASE_EDITION_ENUM.include?(database_edition)
175
+ # rubocop: enable Metrics/LineLength
176
+ @database_edition = database_edition
177
+ end
178
+
179
+ # Custom attribute writer method checking allowed values (enum).
180
+ # @param [Object] disk_redundancy Object to be assigned
181
+ def disk_redundancy=(disk_redundancy)
182
+ # rubocop: disable Metrics/LineLength
183
+ raise "Invalid value for 'disk_redundancy': this must be one of the values in DISK_REDUNDANCY_ENUM." if disk_redundancy && !DISK_REDUNDANCY_ENUM.include?(disk_redundancy)
184
+ # rubocop: enable Metrics/LineLength
185
+ @disk_redundancy = disk_redundancy
186
+ end
187
+
188
+ # Custom attribute writer method checking allowed values (enum).
189
+ # @param [Object] license_model Object to be assigned
190
+ def license_model=(license_model)
191
+ # rubocop: disable Metrics/LineLength
192
+ 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)
193
+ # rubocop: enable Metrics/LineLength
194
+ @license_model = license_model
195
+ end
196
+
197
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
198
+
199
+
200
+ # Checks equality by comparing each attribute.
201
+ # @param [Object] other the other object to be compared
202
+ def ==(other)
203
+ return true if equal?(other)
204
+ self.class == other.class &&
205
+ availability_domain == other.availability_domain &&
206
+ backup_subnet_id == other.backup_subnet_id &&
207
+ cluster_name == other.cluster_name &&
208
+ compartment_id == other.compartment_id &&
209
+ cpu_core_count == other.cpu_core_count &&
210
+ data_storage_percentage == other.data_storage_percentage &&
211
+ defined_tags == other.defined_tags &&
212
+ display_name == other.display_name &&
213
+ domain == other.domain &&
214
+ freeform_tags == other.freeform_tags &&
215
+ hostname == other.hostname &&
216
+ initial_data_storage_size_in_gb == other.initial_data_storage_size_in_gb &&
217
+ node_count == other.node_count &&
218
+ shape == other.shape &&
219
+ source == other.source &&
220
+ ssh_public_keys == other.ssh_public_keys &&
221
+ subnet_id == other.subnet_id &&
222
+ database_edition == other.database_edition &&
223
+ db_home == other.db_home &&
224
+ disk_redundancy == other.disk_redundancy &&
225
+ license_model == other.license_model
226
+ end
227
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
228
+
229
+ # @see the `==` method
230
+ # @param [Object] other the other object to be compared
231
+ def eql?(other)
232
+ self == other
233
+ end
234
+
235
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
236
+
237
+
238
+ # Calculates hash code according to all attributes.
239
+ # @return [Fixnum] Hash code
240
+ def hash
241
+ [availability_domain, backup_subnet_id, cluster_name, compartment_id, cpu_core_count, data_storage_percentage, defined_tags, display_name, domain, freeform_tags, hostname, initial_data_storage_size_in_gb, node_count, shape, source, ssh_public_keys, subnet_id, database_edition, db_home, disk_redundancy, license_model].hash
242
+ end
243
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
244
+
245
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
246
+
247
+
248
+ # Builds the object from hash
249
+ # @param [Hash] attributes Model attributes in the form of hash
250
+ # @return [Object] Returns the model itself
251
+ def build_from_hash(attributes)
252
+ return nil unless attributes.is_a?(Hash)
253
+ self.class.swagger_types.each_pair do |key, type|
254
+ if type =~ /^Array<(.*)>/i
255
+ # check to ensure the input is an array given that the the attribute
256
+ # is documented as an array but the input is not
257
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
258
+ public_method("#{key}=").call(
259
+ attributes[self.class.attribute_map[key]]
260
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
261
+ )
262
+ end
263
+ elsif !attributes[self.class.attribute_map[key]].nil?
264
+ public_method("#{key}=").call(
265
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
266
+ )
267
+ end
268
+ # or else data not found in attributes(hash), not an issue as the data can be optional
269
+ end
270
+
271
+ self
272
+ end
273
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
274
+
275
+ # Returns the string representation of the object
276
+ # @return [String] String presentation of the object
277
+ def to_s
278
+ to_hash.to_s
279
+ end
280
+
281
+ # Returns the object in the form of hash
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_hash
284
+ hash = {}
285
+ self.class.attribute_map.each_pair do |attr, param|
286
+ value = public_method(attr).call
287
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
288
+ hash[param] = _to_hash(value)
289
+ end
290
+ hash
291
+ end
292
+
293
+ private
294
+
295
+ # Outputs non-array value in the form of hash
296
+ # For object, use to_hash. Otherwise, just return the value
297
+ # @param [Object] value Any valid value
298
+ # @return [Hash] Returns the value in the form of hash
299
+ def _to_hash(value)
300
+ if value.is_a?(Array)
301
+ value.compact.map { |v| _to_hash(v) }
302
+ elsif value.is_a?(Hash)
303
+ {}.tap do |hash|
304
+ value.each { |k, v| hash[k] = _to_hash(v) }
305
+ end
306
+ elsif value.respond_to? :to_hash
307
+ value.to_hash
308
+ else
309
+ value
310
+ end
311
+ end
312
+ end
313
+ end
314
+ # rubocop:enable Lint/UnneededCopDisableDirective