Class: OCI::Database::Models::NetworkBondingModeDetails
- Inherits:
-
Object
- Object
- OCI::Database::Models::NetworkBondingModeDetails
- Defined in:
- lib/oci/database/models/network_bonding_mode_details.rb
Overview
Details of bonding mode for Client and Backup and DR networks of an Exadata infrastructure.
Constant Summary collapse
- CLIENT_NETWORK_BONDING_MODE_ENUM =
[ CLIENT_NETWORK_BONDING_MODE_ACTIVE_BACKUP = 'ACTIVE_BACKUP'.freeze, CLIENT_NETWORK_BONDING_MODE_LACP = 'LACP'.freeze, CLIENT_NETWORK_BONDING_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- BACKUP_NETWORK_BONDING_MODE_ENUM =
[ BACKUP_NETWORK_BONDING_MODE_ACTIVE_BACKUP = 'ACTIVE_BACKUP'.freeze, BACKUP_NETWORK_BONDING_MODE_LACP = 'LACP'.freeze, BACKUP_NETWORK_BONDING_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DR_NETWORK_BONDING_MODE_ENUM =
[ DR_NETWORK_BONDING_MODE_ACTIVE_BACKUP = 'ACTIVE_BACKUP'.freeze, DR_NETWORK_BONDING_MODE_LACP = 'LACP'.freeze, DR_NETWORK_BONDING_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#backup_network_bonding_mode ⇒ String
The network bonding mode for the Exadata infrastructure.
-
#client_network_bonding_mode ⇒ String
The network bonding mode for the Exadata infrastructure.
-
#dr_network_bonding_mode ⇒ String
The network bonding mode for the Exadata infrastructure.
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 = {}) ⇒ NetworkBondingModeDetails
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 = {}) ⇒ NetworkBondingModeDetails
Initializes the object
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 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 74 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.client_network_bonding_mode = attributes[:'clientNetworkBondingMode'] if attributes[:'clientNetworkBondingMode'] self.client_network_bonding_mode = "" if client_network_bonding_mode.nil? && !attributes.key?(:'clientNetworkBondingMode') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :clientNetworkBondingMode and :client_network_bonding_mode' if attributes.key?(:'clientNetworkBondingMode') && attributes.key?(:'client_network_bonding_mode') self.client_network_bonding_mode = attributes[:'client_network_bonding_mode'] if attributes[:'client_network_bonding_mode'] self.client_network_bonding_mode = "" if client_network_bonding_mode.nil? && !attributes.key?(:'clientNetworkBondingMode') && !attributes.key?(:'client_network_bonding_mode') # rubocop:disable Style/StringLiterals self.backup_network_bonding_mode = attributes[:'backupNetworkBondingMode'] if attributes[:'backupNetworkBondingMode'] self.backup_network_bonding_mode = "" if backup_network_bonding_mode.nil? && !attributes.key?(:'backupNetworkBondingMode') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :backupNetworkBondingMode and :backup_network_bonding_mode' if attributes.key?(:'backupNetworkBondingMode') && attributes.key?(:'backup_network_bonding_mode') self.backup_network_bonding_mode = attributes[:'backup_network_bonding_mode'] if attributes[:'backup_network_bonding_mode'] self.backup_network_bonding_mode = "" if backup_network_bonding_mode.nil? && !attributes.key?(:'backupNetworkBondingMode') && !attributes.key?(:'backup_network_bonding_mode') # rubocop:disable Style/StringLiterals self.dr_network_bonding_mode = attributes[:'drNetworkBondingMode'] if attributes[:'drNetworkBondingMode'] self.dr_network_bonding_mode = "" if dr_network_bonding_mode.nil? && !attributes.key?(:'drNetworkBondingMode') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :drNetworkBondingMode and :dr_network_bonding_mode' if attributes.key?(:'drNetworkBondingMode') && attributes.key?(:'dr_network_bonding_mode') self.dr_network_bonding_mode = attributes[:'dr_network_bonding_mode'] if attributes[:'dr_network_bonding_mode'] self.dr_network_bonding_mode = "" if dr_network_bonding_mode.nil? && !attributes.key?(:'drNetworkBondingMode') && !attributes.key?(:'dr_network_bonding_mode') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#backup_network_bonding_mode ⇒ String
The network bonding mode for the Exadata infrastructure.
37 38 39 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 37 def backup_network_bonding_mode @backup_network_bonding_mode end |
#client_network_bonding_mode ⇒ String
The network bonding mode for the Exadata infrastructure.
33 34 35 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 33 def client_network_bonding_mode @client_network_bonding_mode end |
#dr_network_bonding_mode ⇒ String
The network bonding mode for the Exadata infrastructure.
41 42 43 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 41 def dr_network_bonding_mode @dr_network_bonding_mode end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'client_network_bonding_mode': :'clientNetworkBondingMode', 'backup_network_bonding_mode': :'backupNetworkBondingMode', 'dr_network_bonding_mode': :'drNetworkBondingMode' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'client_network_bonding_mode': :'String', 'backup_network_bonding_mode': :'String', 'dr_network_bonding_mode': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
151 152 153 154 155 156 157 158 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 151 def ==(other) return true if equal?(other) self.class == other.class && client_network_bonding_mode == other.client_network_bonding_mode && backup_network_bonding_mode == other.backup_network_bonding_mode && dr_network_bonding_mode == other.dr_network_bonding_mode 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 199 200 201 202 203 204 205 |
# File 'lib/oci/database/models/network_bonding_mode_details.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) 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
163 164 165 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 172 def hash [client_network_bonding_mode, backup_network_bonding_mode, dr_network_bonding_mode].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 216 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
210 211 212 |
# File 'lib/oci/database/models/network_bonding_mode_details.rb', line 210 def to_s to_hash.to_s end |