oci 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/oci.rb +8 -0
- data/lib/oci/api_client.rb +11 -5
- data/lib/oci/config.rb +3 -2
- data/lib/oci/config_file_loader.rb +5 -5
- data/lib/oci/core/blockstorage_client.rb +1 -1
- data/lib/oci/core/compute_client.rb +58 -4
- data/lib/oci/core/core.rb +1 -0
- data/lib/oci/core/models/capture_console_history_details.rb +13 -1
- data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
- data/lib/oci/core/models/create_vnic_details.rb +18 -1
- data/lib/oci/core/models/create_volume_details.rb +14 -1
- data/lib/oci/core/models/instance_console_connection.rb +6 -6
- data/lib/oci/core/models/route_rule.rb +4 -1
- data/lib/oci/core/models/update_console_history_details.rb +121 -0
- data/lib/oci/core/models/update_vnic_details.rb +21 -4
- data/lib/oci/core/models/vnic.rb +18 -1
- data/lib/oci/core/models/volume.rb +13 -2
- data/lib/oci/core/models/volume_backup.rb +29 -2
- data/lib/oci/core/virtual_network_client.rb +7 -1
- data/lib/oci/database/database.rb +43 -0
- data/lib/oci/database/database_client.rb +1246 -0
- data/lib/oci/database/models/create_data_guard_association_details.rb +225 -0
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +138 -0
- data/lib/oci/database/models/create_database_details.rb +194 -0
- data/lib/oci/database/models/create_db_home_details.rb +141 -0
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +152 -0
- data/lib/oci/database/models/data_guard_association.rb +374 -0
- data/lib/oci/database/models/database.rb +261 -0
- data/lib/oci/database/models/database_summary.rb +261 -0
- data/lib/oci/database/models/db_home.rb +216 -0
- data/lib/oci/database/models/db_home_summary.rb +216 -0
- data/lib/oci/database/models/db_node.rb +220 -0
- data/lib/oci/database/models/db_node_summary.rb +220 -0
- data/lib/oci/database/models/db_system.rb +518 -0
- data/lib/oci/database/models/db_system_shape_summary.rb +142 -0
- data/lib/oci/database/models/db_system_summary.rb +518 -0
- data/lib/oci/database/models/db_version_summary.rb +131 -0
- data/lib/oci/database/models/failover_data_guard_association_details.rb +120 -0
- data/lib/oci/database/models/launch_db_system_details.rb +394 -0
- data/lib/oci/database/models/patch.rb +247 -0
- data/lib/oci/database/models/patch_details.rb +144 -0
- data/lib/oci/database/models/patch_history_entry.rb +218 -0
- data/lib/oci/database/models/patch_history_entry_summary.rb +218 -0
- data/lib/oci/database/models/patch_summary.rb +247 -0
- data/lib/oci/database/models/reinstate_data_guard_association_details.rb +120 -0
- data/lib/oci/database/models/switchover_data_guard_association_details.rb +120 -0
- data/lib/oci/database/models/update_db_home_details.rb +119 -0
- data/lib/oci/database/models/update_db_system_details.rb +153 -0
- data/lib/oci/database/util.rb +1 -0
- data/lib/oci/errors.rb +3 -4
- data/lib/oci/regions.rb +4 -2
- data/lib/oci/response_headers.rb +0 -1
- data/lib/oci/signer.rb +8 -7
- data/lib/oci/version.rb +1 -1
- data/lib/oraclebmc.rb +3 -1
- metadata +33 -2
@@ -0,0 +1,131 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Database::Models::DbVersionSummary
|
7
|
+
# True if this version of the Oracle database software supports pluggable dbs.
|
8
|
+
# @return [BOOLEAN]
|
9
|
+
attr_accessor :supports_pdb
|
10
|
+
|
11
|
+
# A valid Oracle database version.
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :version
|
14
|
+
|
15
|
+
|
16
|
+
# Initializes the object
|
17
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
18
|
+
def initialize(attributes = {})
|
19
|
+
return unless attributes.is_a?(Hash)
|
20
|
+
|
21
|
+
# convert string to symbol for hash key
|
22
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
23
|
+
|
24
|
+
if attributes[:'supportsPdb']
|
25
|
+
self.supports_pdb = attributes[:'supportsPdb']
|
26
|
+
end
|
27
|
+
|
28
|
+
if attributes[:'version']
|
29
|
+
self.version = attributes[:'version']
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
# Checks equality by comparing each attribute.
|
35
|
+
# @param [Object] other_object to be compared
|
36
|
+
def ==(other_object)
|
37
|
+
return true if self.equal?(other_object)
|
38
|
+
self.class == other_object.class &&
|
39
|
+
supports_pdb == other_object.supports_pdb &&
|
40
|
+
version == other_object.version
|
41
|
+
end
|
42
|
+
|
43
|
+
# @see the `==` method
|
44
|
+
# @param [Object] other_object to be compared
|
45
|
+
def eql?(other_object)
|
46
|
+
self == other_object
|
47
|
+
end
|
48
|
+
|
49
|
+
# Calculates hash code according to all attributes.
|
50
|
+
# @return [Fixnum] Hash code
|
51
|
+
def hash
|
52
|
+
[supports_pdb, version].hash
|
53
|
+
end
|
54
|
+
|
55
|
+
# Builds the object from hash
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
# @return [Object] Returns the model itself
|
58
|
+
def build_from_hash(attributes)
|
59
|
+
return nil unless attributes.is_a?(Hash)
|
60
|
+
self.class.swagger_types.each_pair do |key, type|
|
61
|
+
if type =~ /^Array<(.*)>/i
|
62
|
+
# check to ensure the input is an array given that the the attribute
|
63
|
+
# is documented as an array but the input is not
|
64
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
65
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
66
|
+
end
|
67
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
68
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
69
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
70
|
+
end
|
71
|
+
|
72
|
+
self
|
73
|
+
end
|
74
|
+
|
75
|
+
# Returns the string representation of the object
|
76
|
+
# @return [String] String presentation of the object
|
77
|
+
def to_s
|
78
|
+
to_hash.to_s
|
79
|
+
end
|
80
|
+
|
81
|
+
# Returns the object in the form of hash
|
82
|
+
# @return [Hash] Returns the object in the form of hash
|
83
|
+
def to_hash
|
84
|
+
hash = {}
|
85
|
+
self.class.attribute_map.each_pair do |attr, param|
|
86
|
+
value = self.send(attr)
|
87
|
+
next if value.nil?
|
88
|
+
hash[param] = _to_hash(value)
|
89
|
+
end
|
90
|
+
hash
|
91
|
+
end
|
92
|
+
|
93
|
+
private
|
94
|
+
|
95
|
+
# Outputs non-array value in the form of hash
|
96
|
+
# For object, use to_hash. Otherwise, just return the value
|
97
|
+
# @param [Object] value Any valid value
|
98
|
+
# @return [Hash] Returns the value in the form of hash
|
99
|
+
def _to_hash(value)
|
100
|
+
if value.is_a?(Array)
|
101
|
+
value.compact.map{ |v| _to_hash(v) }
|
102
|
+
elsif value.is_a?(Hash)
|
103
|
+
{}.tap do |hash|
|
104
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
105
|
+
end
|
106
|
+
elsif value.respond_to? :to_hash
|
107
|
+
value.to_hash
|
108
|
+
else
|
109
|
+
value
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
116
|
+
def self.attribute_map
|
117
|
+
{
|
118
|
+
:'supports_pdb' => :'supportsPdb',
|
119
|
+
:'version' => :'version'
|
120
|
+
}
|
121
|
+
end
|
122
|
+
|
123
|
+
# Attribute type mapping.
|
124
|
+
def self.swagger_types
|
125
|
+
{
|
126
|
+
:'supports_pdb' => :'BOOLEAN',
|
127
|
+
:'version' => :'String'
|
128
|
+
}
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Database::Models::FailoverDataGuardAssociationDetails
|
7
|
+
# The DB System administrator password.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :database_admin_password
|
10
|
+
|
11
|
+
|
12
|
+
# Initializes the object
|
13
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
14
|
+
def initialize(attributes = {})
|
15
|
+
return unless attributes.is_a?(Hash)
|
16
|
+
|
17
|
+
# convert string to symbol for hash key
|
18
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
19
|
+
|
20
|
+
if attributes[:'databaseAdminPassword']
|
21
|
+
self.database_admin_password = attributes[:'databaseAdminPassword']
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
# Checks equality by comparing each attribute.
|
27
|
+
# @param [Object] other_object to be compared
|
28
|
+
def ==(other_object)
|
29
|
+
return true if self.equal?(other_object)
|
30
|
+
self.class == other_object.class &&
|
31
|
+
database_admin_password == other_object.database_admin_password
|
32
|
+
end
|
33
|
+
|
34
|
+
# @see the `==` method
|
35
|
+
# @param [Object] other_object to be compared
|
36
|
+
def eql?(other_object)
|
37
|
+
self == other_object
|
38
|
+
end
|
39
|
+
|
40
|
+
# Calculates hash code according to all attributes.
|
41
|
+
# @return [Fixnum] Hash code
|
42
|
+
def hash
|
43
|
+
[database_admin_password].hash
|
44
|
+
end
|
45
|
+
|
46
|
+
# Builds the object from hash
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
# @return [Object] Returns the model itself
|
49
|
+
def build_from_hash(attributes)
|
50
|
+
return nil unless attributes.is_a?(Hash)
|
51
|
+
self.class.swagger_types.each_pair do |key, type|
|
52
|
+
if type =~ /^Array<(.*)>/i
|
53
|
+
# check to ensure the input is an array given that the the attribute
|
54
|
+
# is documented as an array but the input is not
|
55
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
56
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
57
|
+
end
|
58
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
59
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
60
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
61
|
+
end
|
62
|
+
|
63
|
+
self
|
64
|
+
end
|
65
|
+
|
66
|
+
# Returns the string representation of the object
|
67
|
+
# @return [String] String presentation of the object
|
68
|
+
def to_s
|
69
|
+
to_hash.to_s
|
70
|
+
end
|
71
|
+
|
72
|
+
# Returns the object in the form of hash
|
73
|
+
# @return [Hash] Returns the object in the form of hash
|
74
|
+
def to_hash
|
75
|
+
hash = {}
|
76
|
+
self.class.attribute_map.each_pair do |attr, param|
|
77
|
+
value = self.send(attr)
|
78
|
+
next if value.nil?
|
79
|
+
hash[param] = _to_hash(value)
|
80
|
+
end
|
81
|
+
hash
|
82
|
+
end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
# Outputs non-array value in the form of hash
|
87
|
+
# For object, use to_hash. Otherwise, just return the value
|
88
|
+
# @param [Object] value Any valid value
|
89
|
+
# @return [Hash] Returns the value in the form of hash
|
90
|
+
def _to_hash(value)
|
91
|
+
if value.is_a?(Array)
|
92
|
+
value.compact.map{ |v| _to_hash(v) }
|
93
|
+
elsif value.is_a?(Hash)
|
94
|
+
{}.tap do |hash|
|
95
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
96
|
+
end
|
97
|
+
elsif value.respond_to? :to_hash
|
98
|
+
value.to_hash
|
99
|
+
else
|
100
|
+
value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
107
|
+
def self.attribute_map
|
108
|
+
{
|
109
|
+
:'database_admin_password' => :'databaseAdminPassword'
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
113
|
+
# Attribute type mapping.
|
114
|
+
def self.swagger_types
|
115
|
+
{
|
116
|
+
:'database_admin_password' => :'String'
|
117
|
+
}
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,394 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Database::Models::LaunchDbSystemDetails
|
7
|
+
|
8
|
+
DATABASE_EDITION_ENUM = [DATABASE_EDITION_STANDARD_EDITION = 'STANDARD_EDITION',
|
9
|
+
DATABASE_EDITION_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION',
|
10
|
+
DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = 'ENTERPRISE_EDITION_EXTREME_PERFORMANCE',
|
11
|
+
DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = 'ENTERPRISE_EDITION_HIGH_PERFORMANCE']
|
12
|
+
|
13
|
+
|
14
|
+
DISK_REDUNDANCY_ENUM = [DISK_REDUNDANCY_HIGH = 'HIGH',
|
15
|
+
DISK_REDUNDANCY_NORMAL = 'NORMAL']
|
16
|
+
|
17
|
+
|
18
|
+
LICENSE_MODEL_ENUM = [LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED',
|
19
|
+
LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE']
|
20
|
+
|
21
|
+
# The Availability Domain where the DB System is located.
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :availability_domain
|
24
|
+
|
25
|
+
# The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata.
|
26
|
+
#
|
27
|
+
# **Subnet Restrictions:** See above subnetId's **Subnet Restriction**.
|
28
|
+
#
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :backup_subnet_id
|
31
|
+
|
32
|
+
# 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.
|
33
|
+
#
|
34
|
+
# @return [String]
|
35
|
+
attr_accessor :cluster_name
|
36
|
+
|
37
|
+
# The Oracle Cloud ID (OCID) of the compartment the DB System belongs in.
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :compartment_id
|
40
|
+
|
41
|
+
# The number of CPU cores to enable. The valid values depend on the specified shape:
|
42
|
+
#
|
43
|
+
# - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36.
|
44
|
+
# - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72.
|
45
|
+
# - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84.
|
46
|
+
# - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168.
|
47
|
+
# - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336.
|
48
|
+
#
|
49
|
+
# For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used.
|
50
|
+
#
|
51
|
+
# @return [Integer]
|
52
|
+
attr_accessor :cpu_core_count
|
53
|
+
|
54
|
+
# The percentage assigned to DATA storage (user data and database files).
|
55
|
+
# The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups).
|
56
|
+
# Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems.
|
57
|
+
#
|
58
|
+
# @return [Integer]
|
59
|
+
attr_accessor :data_storage_percentage
|
60
|
+
|
61
|
+
# The Oracle Database Edition that applies to all the databases on the DB System.
|
62
|
+
#
|
63
|
+
# Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE.
|
64
|
+
#
|
65
|
+
# @return [String]
|
66
|
+
attr_accessor :database_edition
|
67
|
+
|
68
|
+
# @return [OCI::Database::Models::CreateDbHomeDetails]
|
69
|
+
attr_accessor :db_home
|
70
|
+
|
71
|
+
# The type of redundancy configured for the DB System.
|
72
|
+
# Normal is 2-way redundancy, recommended for test and development systems.
|
73
|
+
# High is 3-way redundancy, recommended for production systems.
|
74
|
+
#
|
75
|
+
# @return [String]
|
76
|
+
attr_accessor :disk_redundancy
|
77
|
+
|
78
|
+
# The user-friendly name for the DB System. It does not have to be unique.
|
79
|
+
# @return [String]
|
80
|
+
attr_accessor :display_name
|
81
|
+
|
82
|
+
# A domain name used for the DB System. If the Oracle-provided Internet and VCN
|
83
|
+
# Resolver is enabled for the specified subnet, the domain name for the subnet is used
|
84
|
+
# (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted.
|
85
|
+
#
|
86
|
+
# @return [String]
|
87
|
+
attr_accessor :domain
|
88
|
+
|
89
|
+
# The host name for the DB System. The host name must begin with an alphabetic character and
|
90
|
+
# can contain a maximum of 30 alphanumeric characters, including hyphens (-).
|
91
|
+
#
|
92
|
+
# The maximum length of the combined hostname and domain is 63 characters.
|
93
|
+
#
|
94
|
+
# **Note:** The hostname must be unique within the subnet. If it is not unique,
|
95
|
+
# the DB System will fail to provision.
|
96
|
+
#
|
97
|
+
# @return [String]
|
98
|
+
attr_accessor :hostname
|
99
|
+
|
100
|
+
# 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.
|
101
|
+
#
|
102
|
+
# @return [Integer]
|
103
|
+
attr_accessor :initial_data_storage_size_in_gb
|
104
|
+
|
105
|
+
# The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED.
|
106
|
+
#
|
107
|
+
# @return [String]
|
108
|
+
attr_accessor :license_model
|
109
|
+
|
110
|
+
# Number of nodes to launch for a VM-shape based RAC DB system.
|
111
|
+
#
|
112
|
+
# @return [Integer]
|
113
|
+
attr_accessor :node_count
|
114
|
+
|
115
|
+
# 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.
|
116
|
+
# @return [String]
|
117
|
+
attr_accessor :shape
|
118
|
+
|
119
|
+
# 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.
|
120
|
+
# @return [Array<String>]
|
121
|
+
attr_accessor :ssh_public_keys
|
122
|
+
|
123
|
+
# The OCID of the subnet the DB System is associated with.
|
124
|
+
#
|
125
|
+
# **Subnet Restrictions:**
|
126
|
+
# - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28
|
127
|
+
# - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20
|
128
|
+
#
|
129
|
+
# These subnets are used by the Oracle Clusterware private interconnect on the database instance.
|
130
|
+
# Specifying an overlapping subnet will cause the private interconnect to malfunction.
|
131
|
+
# This restriction applies to both the client subnet and backup subnet.
|
132
|
+
#
|
133
|
+
# @return [String]
|
134
|
+
attr_accessor :subnet_id
|
135
|
+
|
136
|
+
|
137
|
+
# Initializes the object
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
def initialize(attributes = {})
|
140
|
+
return unless attributes.is_a?(Hash)
|
141
|
+
|
142
|
+
# convert string to symbol for hash key
|
143
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
144
|
+
|
145
|
+
if attributes[:'availabilityDomain']
|
146
|
+
self.availability_domain = attributes[:'availabilityDomain']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes[:'backupSubnetId']
|
150
|
+
self.backup_subnet_id = attributes[:'backupSubnetId']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes[:'clusterName']
|
154
|
+
self.cluster_name = attributes[:'clusterName']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes[:'compartmentId']
|
158
|
+
self.compartment_id = attributes[:'compartmentId']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes[:'cpuCoreCount']
|
162
|
+
self.cpu_core_count = attributes[:'cpuCoreCount']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes[:'dataStoragePercentage']
|
166
|
+
self.data_storage_percentage = attributes[:'dataStoragePercentage']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes[:'databaseEdition']
|
170
|
+
self.database_edition = attributes[:'databaseEdition']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes[:'dbHome']
|
174
|
+
self.db_home = attributes[:'dbHome']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes[:'diskRedundancy']
|
178
|
+
self.disk_redundancy = attributes[:'diskRedundancy']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes[:'displayName']
|
182
|
+
self.display_name = attributes[:'displayName']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes[:'domain']
|
186
|
+
self.domain = attributes[:'domain']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes[:'hostname']
|
190
|
+
self.hostname = attributes[:'hostname']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes[:'initialDataStorageSizeInGB']
|
194
|
+
self.initial_data_storage_size_in_gb = attributes[:'initialDataStorageSizeInGB']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes[:'licenseModel']
|
198
|
+
self.license_model = attributes[:'licenseModel']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes[:'nodeCount']
|
202
|
+
self.node_count = attributes[:'nodeCount']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes[:'shape']
|
206
|
+
self.shape = attributes[:'shape']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes[:'sshPublicKeys']
|
210
|
+
self.ssh_public_keys = attributes[:'sshPublicKeys']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes[:'subnetId']
|
214
|
+
self.subnet_id = attributes[:'subnetId']
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
# Custom attribute writer method checking allowed values (enum).
|
220
|
+
# @param [Object] database_edition Object to be assigned
|
221
|
+
def database_edition=(database_edition)
|
222
|
+
if database_edition && !DATABASE_EDITION_ENUM.include?(database_edition)
|
223
|
+
fail "Invalid value for 'database_edition': this must be one of the values in DATABASE_EDITION_ENUM."
|
224
|
+
else
|
225
|
+
@database_edition = database_edition
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# Custom attribute writer method checking allowed values (enum).
|
230
|
+
# @param [Object] disk_redundancy Object to be assigned
|
231
|
+
def disk_redundancy=(disk_redundancy)
|
232
|
+
if disk_redundancy && !DISK_REDUNDANCY_ENUM.include?(disk_redundancy)
|
233
|
+
fail "Invalid value for 'disk_redundancy': this must be one of the values in DISK_REDUNDANCY_ENUM."
|
234
|
+
else
|
235
|
+
@disk_redundancy = disk_redundancy
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# Custom attribute writer method checking allowed values (enum).
|
240
|
+
# @param [Object] license_model Object to be assigned
|
241
|
+
def license_model=(license_model)
|
242
|
+
if license_model && !LICENSE_MODEL_ENUM.include?(license_model)
|
243
|
+
fail "Invalid value for 'license_model': this must be one of the values in LICENSE_MODEL_ENUM."
|
244
|
+
else
|
245
|
+
@license_model = license_model
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
# Checks equality by comparing each attribute.
|
250
|
+
# @param [Object] other_object to be compared
|
251
|
+
def ==(other_object)
|
252
|
+
return true if self.equal?(other_object)
|
253
|
+
self.class == other_object.class &&
|
254
|
+
availability_domain == other_object.availability_domain &&
|
255
|
+
backup_subnet_id == other_object.backup_subnet_id &&
|
256
|
+
cluster_name == other_object.cluster_name &&
|
257
|
+
compartment_id == other_object.compartment_id &&
|
258
|
+
cpu_core_count == other_object.cpu_core_count &&
|
259
|
+
data_storage_percentage == other_object.data_storage_percentage &&
|
260
|
+
database_edition == other_object.database_edition &&
|
261
|
+
db_home == other_object.db_home &&
|
262
|
+
disk_redundancy == other_object.disk_redundancy &&
|
263
|
+
display_name == other_object.display_name &&
|
264
|
+
domain == other_object.domain &&
|
265
|
+
hostname == other_object.hostname &&
|
266
|
+
initial_data_storage_size_in_gb == other_object.initial_data_storage_size_in_gb &&
|
267
|
+
license_model == other_object.license_model &&
|
268
|
+
node_count == other_object.node_count &&
|
269
|
+
shape == other_object.shape &&
|
270
|
+
ssh_public_keys == other_object.ssh_public_keys &&
|
271
|
+
subnet_id == other_object.subnet_id
|
272
|
+
end
|
273
|
+
|
274
|
+
# @see the `==` method
|
275
|
+
# @param [Object] other_object to be compared
|
276
|
+
def eql?(other_object)
|
277
|
+
self == other_object
|
278
|
+
end
|
279
|
+
|
280
|
+
# Calculates hash code according to all attributes.
|
281
|
+
# @return [Fixnum] Hash code
|
282
|
+
def hash
|
283
|
+
[availability_domain, backup_subnet_id, cluster_name, compartment_id, cpu_core_count, data_storage_percentage, database_edition, db_home, disk_redundancy, display_name, domain, hostname, initial_data_storage_size_in_gb, license_model, node_count, shape, ssh_public_keys, subnet_id].hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Builds the object from hash
|
287
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
288
|
+
# @return [Object] Returns the model itself
|
289
|
+
def build_from_hash(attributes)
|
290
|
+
return nil unless attributes.is_a?(Hash)
|
291
|
+
self.class.swagger_types.each_pair do |key, type|
|
292
|
+
if type =~ /^Array<(.*)>/i
|
293
|
+
# check to ensure the input is an array given that the the attribute
|
294
|
+
# is documented as an array but the input is not
|
295
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
296
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
297
|
+
end
|
298
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
299
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
300
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
301
|
+
end
|
302
|
+
|
303
|
+
self
|
304
|
+
end
|
305
|
+
|
306
|
+
# Returns the string representation of the object
|
307
|
+
# @return [String] String presentation of the object
|
308
|
+
def to_s
|
309
|
+
to_hash.to_s
|
310
|
+
end
|
311
|
+
|
312
|
+
# Returns the object in the form of hash
|
313
|
+
# @return [Hash] Returns the object in the form of hash
|
314
|
+
def to_hash
|
315
|
+
hash = {}
|
316
|
+
self.class.attribute_map.each_pair do |attr, param|
|
317
|
+
value = self.send(attr)
|
318
|
+
next if value.nil?
|
319
|
+
hash[param] = _to_hash(value)
|
320
|
+
end
|
321
|
+
hash
|
322
|
+
end
|
323
|
+
|
324
|
+
private
|
325
|
+
|
326
|
+
# Outputs non-array value in the form of hash
|
327
|
+
# For object, use to_hash. Otherwise, just return the value
|
328
|
+
# @param [Object] value Any valid value
|
329
|
+
# @return [Hash] Returns the value in the form of hash
|
330
|
+
def _to_hash(value)
|
331
|
+
if value.is_a?(Array)
|
332
|
+
value.compact.map{ |v| _to_hash(v) }
|
333
|
+
elsif value.is_a?(Hash)
|
334
|
+
{}.tap do |hash|
|
335
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
336
|
+
end
|
337
|
+
elsif value.respond_to? :to_hash
|
338
|
+
value.to_hash
|
339
|
+
else
|
340
|
+
value
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
347
|
+
def self.attribute_map
|
348
|
+
{
|
349
|
+
:'availability_domain' => :'availabilityDomain',
|
350
|
+
:'backup_subnet_id' => :'backupSubnetId',
|
351
|
+
:'cluster_name' => :'clusterName',
|
352
|
+
:'compartment_id' => :'compartmentId',
|
353
|
+
:'cpu_core_count' => :'cpuCoreCount',
|
354
|
+
:'data_storage_percentage' => :'dataStoragePercentage',
|
355
|
+
:'database_edition' => :'databaseEdition',
|
356
|
+
:'db_home' => :'dbHome',
|
357
|
+
:'disk_redundancy' => :'diskRedundancy',
|
358
|
+
:'display_name' => :'displayName',
|
359
|
+
:'domain' => :'domain',
|
360
|
+
:'hostname' => :'hostname',
|
361
|
+
:'initial_data_storage_size_in_gb' => :'initialDataStorageSizeInGB',
|
362
|
+
:'license_model' => :'licenseModel',
|
363
|
+
:'node_count' => :'nodeCount',
|
364
|
+
:'shape' => :'shape',
|
365
|
+
:'ssh_public_keys' => :'sshPublicKeys',
|
366
|
+
:'subnet_id' => :'subnetId'
|
367
|
+
}
|
368
|
+
end
|
369
|
+
|
370
|
+
# Attribute type mapping.
|
371
|
+
def self.swagger_types
|
372
|
+
{
|
373
|
+
:'availability_domain' => :'String',
|
374
|
+
:'backup_subnet_id' => :'String',
|
375
|
+
:'cluster_name' => :'String',
|
376
|
+
:'compartment_id' => :'String',
|
377
|
+
:'cpu_core_count' => :'Integer',
|
378
|
+
:'data_storage_percentage' => :'Integer',
|
379
|
+
:'database_edition' => :'String',
|
380
|
+
:'db_home' => :'OCI::Database::Models::CreateDbHomeDetails',
|
381
|
+
:'disk_redundancy' => :'String',
|
382
|
+
:'display_name' => :'String',
|
383
|
+
:'domain' => :'String',
|
384
|
+
:'hostname' => :'String',
|
385
|
+
:'initial_data_storage_size_in_gb' => :'Integer',
|
386
|
+
:'license_model' => :'String',
|
387
|
+
:'node_count' => :'Integer',
|
388
|
+
:'shape' => :'String',
|
389
|
+
:'ssh_public_keys' => :'Array<String>',
|
390
|
+
:'subnet_id' => :'String'
|
391
|
+
}
|
392
|
+
end
|
393
|
+
end
|
394
|
+
end
|