Class: OCI::Database::Models::NodeDetails
- Inherits:
- 
      Object
      
        - Object
- OCI::Database::Models::NodeDetails
 
- Defined in:
- lib/oci/database/models/node_details.rb
Overview
Node details associated with a network.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
- [ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_REQUIRES_VALIDATION = 'REQUIRES_VALIDATION'.freeze, LIFECYCLE_STATE_VALIDATING = 'VALIDATING'.freeze, LIFECYCLE_STATE_VALIDATED = 'VALIDATED'.freeze, LIFECYCLE_STATE_VALIDATION_FAILED = 'VALIDATION_FAILED'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ALLOCATED = 'ALLOCATED'.freeze, LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze, LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
Instance Attribute Summary collapse
- 
  
    
      #db_server_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The Db server associated with the node. 
- 
  
    
      #hostname  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The node host name. 
- 
  
    
      #ip  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The node IP address. 
- 
  
    
      #lifecycle_state  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The current state of the VM cluster network nodes. 
- 
  
    
      #vip  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The node virtual IP (VIP) address. 
- 
  
    
      #vip_hostname  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The node virtual IP (VIP) host name. 
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute mapping from ruby-style variable name to JSON key. 
- 
  
    
      .swagger_types  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute type mapping. 
Instance Method Summary collapse
- 
  
    
      #==(other)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Checks equality by comparing each attribute. 
- 
  
    
      #build_from_hash(attributes)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Builds the object from hash. 
- #eql?(other) ⇒ Boolean
- 
  
    
      #hash  ⇒ Fixnum 
    
    
  
  
  
  
  
  
  
  
  
    Calculates hash code according to all attributes. 
- 
  
    
      #initialize(attributes = {})  ⇒ NodeDetails 
    
    
  
  
  
    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 = {}) ⇒ NodeDetails
Initializes the object
| 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 | # File 'lib/oci/database/models/node_details.rb', line 101 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 } self.hostname = attributes[:'hostname'] if attributes[:'hostname'] self.ip = attributes[:'ip'] if attributes[:'ip'] self.vip_hostname = attributes[:'vipHostname'] if attributes[:'vipHostname'] raise 'You cannot provide both :vipHostname and :vip_hostname' if attributes.key?(:'vipHostname') && attributes.key?(:'vip_hostname') self.vip_hostname = attributes[:'vip_hostname'] if attributes[:'vip_hostname'] self.vip = attributes[:'vip'] if attributes[:'vip'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.db_server_id = attributes[:'dbServerId'] if attributes[:'dbServerId'] raise 'You cannot provide both :dbServerId and :db_server_id' if attributes.key?(:'dbServerId') && attributes.key?(:'db_server_id') self.db_server_id = attributes[:'db_server_id'] if attributes[:'db_server_id'] end | 
Instance Attribute Details
#db_server_id ⇒ String
The Db server associated with the node.
| 59 60 61 | # File 'lib/oci/database/models/node_details.rb', line 59 def db_server_id @db_server_id end | 
#hostname ⇒ String
[Required] The node host name.
| 28 29 30 | # File 'lib/oci/database/models/node_details.rb', line 28 def hostname @hostname end | 
#ip ⇒ String
[Required] The node IP address.
| 32 33 34 | # File 'lib/oci/database/models/node_details.rb', line 32 def ip @ip end | 
#lifecycle_state ⇒ String
The current state of the VM cluster network nodes. CREATING - The resource is being created REQUIRES_VALIDATION - The resource is created and may not be usable until it is validated. VALIDATING - The resource is being validated and not available to use. VALIDATED - The resource is validated and is available for consumption by VM cluster. VALIDATION_FAILED - The resource validation has failed and might require user input to be corrected. UPDATING - The resource is being updated and not available to use. ALLOCATED - The resource is currently being used by VM cluster. TERMINATING - The resource is being deleted and not available to use. TERMINATED - The resource is deleted and unavailable. FAILED - The resource is in a failed state due to validation or other errors.
| 55 56 57 | # File 'lib/oci/database/models/node_details.rb', line 55 def lifecycle_state @lifecycle_state end | 
#vip ⇒ String
The node virtual IP (VIP) address.
| 40 41 42 | # File 'lib/oci/database/models/node_details.rb', line 40 def vip @vip end | 
#vip_hostname ⇒ String
The node virtual IP (VIP) host name.
| 36 37 38 | # File 'lib/oci/database/models/node_details.rb', line 36 def vip_hostname @vip_hostname end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 62 63 64 65 66 67 68 69 70 71 72 73 | # File 'lib/oci/database/models/node_details.rb', line 62 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'hostname': :'hostname', 'ip': :'ip', 'vip_hostname': :'vipHostname', 'vip': :'vip', 'lifecycle_state': :'lifecycleState', 'db_server_id': :'dbServerId' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 76 77 78 79 80 81 82 83 84 85 86 87 | # File 'lib/oci/database/models/node_details.rb', line 76 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'hostname': :'String', 'ip': :'String', 'vip_hostname': :'String', 'vip': :'String', 'lifecycle_state': :'String', 'db_server_id': :'String' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 152 153 154 155 156 157 158 159 160 161 162 | # File 'lib/oci/database/models/node_details.rb', line 152 def ==(other) return true if equal?(other) self.class == other.class && hostname == other.hostname && ip == other.ip && vip_hostname == other.vip_hostname && vip == other.vip && lifecycle_state == other.lifecycle_state && db_server_id == other.db_server_id end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | # File 'lib/oci/database/models/node_details.rb', line 187 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) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? 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) ⇒ Boolean
| 167 168 169 | # File 'lib/oci/database/models/node_details.rb', line 167 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 176 177 178 | # File 'lib/oci/database/models/node_details.rb', line 176 def hash [hostname, ip, vip_hostname, vip, lifecycle_state, db_server_id].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 220 221 222 223 224 225 226 227 228 229 | # File 'lib/oci/database/models/node_details.rb', line 220 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
| 214 215 216 | # File 'lib/oci/database/models/node_details.rb', line 214 def to_s to_hash.to_s end |