Class: OCI::Database::Models::DbNode
- Inherits:
-
Object
- Object
- OCI::Database::Models::DbNode
- Defined in:
- lib/oci/database/models/db_node.rb
Overview
A server where Oracle database software is running.
To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator. If you’re an administrator who needs to write policies to give users access, see [Getting Started with Policies](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING', LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE', LIFECYCLE_STATE_UPDATING = 'UPDATING', LIFECYCLE_STATE_STOPPING = 'STOPPING', LIFECYCLE_STATE_STOPPED = 'STOPPED', LIFECYCLE_STATE_STARTING = 'STARTING', LIFECYCLE_STATE_TERMINATING = 'TERMINATING', LIFECYCLE_STATE_TERMINATED = 'TERMINATED', LIFECYCLE_STATE_FAILED = 'FAILED', LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
Instance Attribute Summary collapse
-
#backup_vnic_id ⇒ String
The OCID of the backup VNIC.
-
#db_system_id ⇒ String
[Required] The OCID of the DB System.
-
#hostname ⇒ String
The host name for the DB Node.
-
#id ⇒ String
[Required] The OCID of the DB Node.
-
#lifecycle_state ⇒ String
[Required] The current state of the database node.
-
#software_storage_size_in_gb ⇒ Integer
Storage size, in GBs, of the software volume that is allocated to the DB system.
-
#time_created ⇒ DateTime
[Required] The date and time that the DB Node was created.
-
#vnic_id ⇒ String
[Required] The OCID of the VNIC.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DbNode
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ DbNode
Initializes the object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/database/models/db_node.rb', line 67 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes[:'backupVnicId'] self.backup_vnic_id = attributes[:'backupVnicId'] end raise 'You cannot provide both :backupVnicId and :backup_vnic_id' if attributes.key?(:'backupVnicId') && attributes.key?(:'backup_vnic_id') if attributes[:'backup_vnic_id'] self.backup_vnic_id = attributes[:'backup_vnic_id'] end if attributes[:'dbSystemId'] self.db_system_id = attributes[:'dbSystemId'] end raise 'You cannot provide both :dbSystemId and :db_system_id' if attributes.key?(:'dbSystemId') && attributes.key?(:'db_system_id') if attributes[:'db_system_id'] self.db_system_id = attributes[:'db_system_id'] end if attributes[:'hostname'] self.hostname = attributes[:'hostname'] end if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'lifecycleState'] self.lifecycle_state = attributes[:'lifecycleState'] end raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') if attributes[:'lifecycle_state'] self.lifecycle_state = attributes[:'lifecycle_state'] end if attributes[:'softwareStorageSizeInGB'] self.software_storage_size_in_gb = attributes[:'softwareStorageSizeInGB'] end raise 'You cannot provide both :softwareStorageSizeInGB and :software_storage_size_in_gb' if attributes.key?(:'softwareStorageSizeInGB') && attributes.key?(:'software_storage_size_in_gb') if attributes[:'software_storage_size_in_gb'] self.software_storage_size_in_gb = attributes[:'software_storage_size_in_gb'] end if attributes[:'timeCreated'] self.time_created = attributes[:'timeCreated'] end raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') if attributes[:'time_created'] self.time_created = attributes[:'time_created'] end if attributes[:'vnicId'] self.vnic_id = attributes[:'vnicId'] end raise 'You cannot provide both :vnicId and :vnic_id' if attributes.key?(:'vnicId') && attributes.key?(:'vnic_id') if attributes[:'vnic_id'] self.vnic_id = attributes[:'vnic_id'] end end |
Instance Attribute Details
#backup_vnic_id ⇒ String
The OCID of the backup VNIC.
25 26 27 |
# File 'lib/oci/database/models/db_node.rb', line 25 def backup_vnic_id @backup_vnic_id end |
#db_system_id ⇒ String
[Required] The OCID of the DB System.
29 30 31 |
# File 'lib/oci/database/models/db_node.rb', line 29 def db_system_id @db_system_id end |
#hostname ⇒ String
The host name for the DB Node.
33 34 35 |
# File 'lib/oci/database/models/db_node.rb', line 33 def hostname @hostname end |
#id ⇒ String
[Required] The OCID of the DB Node.
37 38 39 |
# File 'lib/oci/database/models/db_node.rb', line 37 def id @id end |
#lifecycle_state ⇒ String
[Required] The current state of the database node.
41 42 43 |
# File 'lib/oci/database/models/db_node.rb', line 41 def lifecycle_state @lifecycle_state end |
#software_storage_size_in_gb ⇒ Integer
Storage size, in GBs, of the software volume that is allocated to the DB system. This is applicable only for VM-based DBs.
46 47 48 |
# File 'lib/oci/database/models/db_node.rb', line 46 def software_storage_size_in_gb @software_storage_size_in_gb end |
#time_created ⇒ DateTime
[Required] The date and time that the DB Node was created.
50 51 52 |
# File 'lib/oci/database/models/db_node.rb', line 50 def time_created @time_created end |
#vnic_id ⇒ String
[Required] The OCID of the VNIC.
54 55 56 |
# File 'lib/oci/database/models/db_node.rb', line 54 def vnic_id @vnic_id end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/oci/database/models/db_node.rb', line 155 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && backup_vnic_id == other_object.backup_vnic_id && db_system_id == other_object.db_system_id && hostname == other_object.hostname && id == other_object.id && lifecycle_state == other_object.lifecycle_state && software_storage_size_in_gb == other_object.software_storage_size_in_gb && time_created == other_object.time_created && vnic_id == other_object.vnic_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/oci/database/models/db_node.rb', line 183 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other_object) ⇒ Boolean
170 171 172 |
# File 'lib/oci/database/models/db_node.rb', line 170 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
176 177 178 |
# File 'lib/oci/database/models/db_node.rb', line 176 def hash [backup_vnic_id, db_system_id, hostname, id, lifecycle_state, software_storage_size_in_gb, time_created, vnic_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/database/models/db_node.rb', line 208 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
202 203 204 |
# File 'lib/oci/database/models/db_node.rb', line 202 def to_s to_hash.to_s end |