Class: MistApi::EvpnOptionsUnderlay
- Defined in:
- lib/mist_api/models/evpn_options_underlay.rb
Overview
EvpnOptionsUnderlay Model.
Instance Attribute Summary collapse
-
#as_base ⇒ Integer
Underlay BGP Base AS Number.
-
#routed_id_prefix ⇒ String
Underlay BGP Base AS Number.
-
#subnet ⇒ String
Underlay subnet, by default, ‘10.255.240.0/20`, or `fd31:5700::/64` for ipv6.
-
#use_ipv6 ⇒ TrueClass | FalseClass
If v6 is desired for underlay.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(as_base = 65001, routed_id_prefix = SKIP, subnet = SKIP, use_ipv6 = false) ⇒ EvpnOptionsUnderlay
constructor
A new instance of EvpnOptionsUnderlay.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(as_base = 65001, routed_id_prefix = SKIP, subnet = SKIP, use_ipv6 = false) ⇒ EvpnOptionsUnderlay
Returns a new instance of EvpnOptionsUnderlay.
54 55 56 57 58 59 60 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 54 def initialize(as_base = 65001, routed_id_prefix = SKIP, subnet = SKIP, use_ipv6 = false) @as_base = as_base unless as_base == SKIP @routed_id_prefix = routed_id_prefix unless routed_id_prefix == SKIP @subnet = subnet unless subnet == SKIP @use_ipv6 = use_ipv6 unless use_ipv6 == SKIP end |
Instance Attribute Details
#as_base ⇒ Integer
Underlay BGP Base AS Number
14 15 16 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 14 def as_base @as_base end |
#routed_id_prefix ⇒ String
Underlay BGP Base AS Number
18 19 20 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 18 def routed_id_prefix @routed_id_prefix end |
#subnet ⇒ String
Underlay subnet, by default, ‘10.255.240.0/20`, or `fd31:5700::/64` for ipv6
23 24 25 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 23 def subnet @subnet end |
#use_ipv6 ⇒ TrueClass | FalseClass
If v6 is desired for underlay
27 28 29 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 27 def use_ipv6 @use_ipv6 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. as_base = hash['as_base'] ||= 65001 routed_id_prefix = hash.key?('routed_id_prefix') ? hash['routed_id_prefix'] : SKIP subnet = hash.key?('subnet') ? hash['subnet'] : SKIP use_ipv6 = hash['use_ipv6'] ||= false # Create object from extracted values. EvpnOptionsUnderlay.new(as_base, routed_id_prefix, subnet, use_ipv6) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['as_base'] = 'as_base' @_hash['routed_id_prefix'] = 'routed_id_prefix' @_hash['subnet'] = 'subnet' @_hash['use_ipv6'] = 'use_ipv6' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 40 def self.optionals %w[ as_base routed_id_prefix subnet use_ipv6 ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
88 89 90 91 92 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 88 def inspect class_name = self.class.name.split('::').last "<#{class_name} as_base: #{@as_base.inspect}, routed_id_prefix:"\ " #{@routed_id_prefix.inspect}, subnet: #{@subnet.inspect}, use_ipv6: #{@use_ipv6.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
81 82 83 84 85 |
# File 'lib/mist_api/models/evpn_options_underlay.rb', line 81 def to_s class_name = self.class.name.split('::').last "<#{class_name} as_base: #{@as_base}, routed_id_prefix: #{@routed_id_prefix}, subnet:"\ " #{@subnet}, use_ipv6: #{@use_ipv6}>" end |