Class: OCI::Core::Models::DefaultDrgRouteTables
- Inherits:
-
Object
- Object
- OCI::Core::Models::DefaultDrgRouteTables
- Defined in:
- lib/oci/core/models/default_drg_route_tables.rb
Overview
The default DRG route table for this DRG. Each network type has a default DRG route table.
You can update a network type to use a different DRG route table, but each network type must have a default DRG route table. You cannot delete a default DRG route table.
Instance Attribute Summary collapse
-
#ipsec_tunnel ⇒ String
The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
-
#remote_peering_connection ⇒ String
The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
-
#vcn ⇒ String
The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
-
#virtual_circuit ⇒ String
The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
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 = {}) ⇒ DefaultDrgRouteTables
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 = {}) ⇒ DefaultDrgRouteTables
Initializes the object
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 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 75 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.vcn = attributes[:'vcn'] if attributes[:'vcn'] self.ipsec_tunnel = attributes[:'ipsecTunnel'] if attributes[:'ipsecTunnel'] raise 'You cannot provide both :ipsecTunnel and :ipsec_tunnel' if attributes.key?(:'ipsecTunnel') && attributes.key?(:'ipsec_tunnel') self.ipsec_tunnel = attributes[:'ipsec_tunnel'] if attributes[:'ipsec_tunnel'] self.virtual_circuit = attributes[:'virtualCircuit'] if attributes[:'virtualCircuit'] raise 'You cannot provide both :virtualCircuit and :virtual_circuit' if attributes.key?(:'virtualCircuit') && attributes.key?(:'virtual_circuit') self.virtual_circuit = attributes[:'virtual_circuit'] if attributes[:'virtual_circuit'] self.remote_peering_connection = attributes[:'remotePeeringConnection'] if attributes[:'remotePeeringConnection'] raise 'You cannot provide both :remotePeeringConnection and :remote_peering_connection' if attributes.key?(:'remotePeeringConnection') && attributes.key?(:'remote_peering_connection') self.remote_peering_connection = attributes[:'remote_peering_connection'] if attributes[:'remote_peering_connection'] end |
Instance Attribute Details
#ipsec_tunnel ⇒ String
The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.
27 28 29 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 27 def ipsec_tunnel @ipsec_tunnel end |
#remote_peering_connection ⇒ String
The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.
39 40 41 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 39 def remote_peering_connection @remote_peering_connection end |
#vcn ⇒ String
The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.
21 22 23 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 21 def vcn @vcn end |
#virtual_circuit ⇒ String
The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.
33 34 35 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 33 def virtual_circuit @virtual_circuit end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'vcn': :'vcn', 'ipsec_tunnel': :'ipsecTunnel', 'virtual_circuit': :'virtualCircuit', 'remote_peering_connection': :'remotePeeringConnection' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 54 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'vcn': :'String', 'ipsec_tunnel': :'String', 'virtual_circuit': :'String', 'remote_peering_connection': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
109 110 111 112 113 114 115 116 117 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 109 def ==(other) return true if equal?(other) self.class == other.class && vcn == other.vcn && ipsec_tunnel == other.ipsec_tunnel && virtual_circuit == other.virtual_circuit && remote_peering_connection == other.remote_peering_connection end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 142 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
122 123 124 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 122 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
131 132 133 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 131 def hash [vcn, ipsec_tunnel, virtual_circuit, remote_peering_connection].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 175 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
169 170 171 |
# File 'lib/oci/core/models/default_drg_route_tables.rb', line 169 def to_s to_hash.to_s end |