Class: MistApi::GatewayPortVpnPath
- Defined in:
- lib/mist_api/models/gateway_port_vpn_path.rb
Overview
GatewayPortVpnPath Model.
Instance Attribute Summary collapse
-
#bfd_profile ⇒ GatewayPortVpnPathBfdProfileEnum
Only if the VPN ‘type`==`hub_spoke`.
-
#bfd_use_tunnel_mode ⇒ TrueClass | FalseClass
Only if the VPN ‘type`==`hub_spoke`.
-
#preference ⇒ Integer
Only if the VPN ‘type`==`hub_spoke`.
-
#role ⇒ GatewayPortVpnPathRoleEnum
If the VPN ‘type`==`hub_spoke`, enum: `hub`, `spoke`.
-
#traffic_shaping ⇒ GatewayTrafficShaping
If the VPN ‘type`==`hub_spoke`, enum: `hub`, `spoke`.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(bfd_profile = GatewayPortVpnPathBfdProfileEnum::BROADBAND, bfd_use_tunnel_mode = false, preference = SKIP, role = GatewayPortVpnPathRoleEnum::SPOKE, traffic_shaping = SKIP) ⇒ GatewayPortVpnPath
constructor
A new instance of GatewayPortVpnPath.
-
#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(bfd_profile = GatewayPortVpnPathBfdProfileEnum::BROADBAND, bfd_use_tunnel_mode = false, preference = SKIP, role = GatewayPortVpnPathRoleEnum::SPOKE, traffic_shaping = SKIP) ⇒ GatewayPortVpnPath
Returns a new instance of GatewayPortVpnPath.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 63 def initialize(bfd_profile = GatewayPortVpnPathBfdProfileEnum::BROADBAND, bfd_use_tunnel_mode = false, preference = SKIP, role = GatewayPortVpnPathRoleEnum::SPOKE, traffic_shaping = SKIP) @bfd_profile = bfd_profile unless bfd_profile == SKIP @bfd_use_tunnel_mode = bfd_use_tunnel_mode unless bfd_use_tunnel_mode == SKIP @preference = preference unless preference == SKIP @role = role unless role == SKIP @traffic_shaping = traffic_shaping unless traffic_shaping == SKIP end |
Instance Attribute Details
#bfd_profile ⇒ GatewayPortVpnPathBfdProfileEnum
Only if the VPN ‘type`==`hub_spoke`. enum: `broadband`, `lte`
14 15 16 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 14 def bfd_profile @bfd_profile end |
#bfd_use_tunnel_mode ⇒ TrueClass | FalseClass
Only if the VPN ‘type`==`hub_spoke`. Whether to use tunnel mode. SSR only
18 19 20 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 18 def bfd_use_tunnel_mode @bfd_use_tunnel_mode end |
#preference ⇒ Integer
Only if the VPN ‘type`==`hub_spoke`. For a given VPN, when `path_selection.strategy`==`simple`, the preference for a path (lower is preferred)
24 25 26 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 24 def preference @preference end |
#role ⇒ GatewayPortVpnPathRoleEnum
If the VPN ‘type`==`hub_spoke`, enum: `hub`, `spoke`. If the VPN `type`==`mesh`, enum: `mesh`
29 30 31 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 29 def role @role end |
#traffic_shaping ⇒ GatewayTrafficShaping
If the VPN ‘type`==`hub_spoke`, enum: `hub`, `spoke`. If the VPN `type`==`mesh`, enum: `mesh`
34 35 36 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 34 def traffic_shaping @traffic_shaping end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bfd_profile = hash['bfd_profile'] ||= GatewayPortVpnPathBfdProfileEnum::BROADBAND bfd_use_tunnel_mode = hash['bfd_use_tunnel_mode'] ||= false preference = hash.key?('preference') ? hash['preference'] : SKIP role = hash['role'] ||= GatewayPortVpnPathRoleEnum::SPOKE traffic_shaping = GatewayTrafficShaping.from_hash(hash['traffic_shaping']) if hash['traffic_shaping'] # Create object from extracted values. GatewayPortVpnPath.new(bfd_profile, bfd_use_tunnel_mode, preference, role, traffic_shaping) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['bfd_profile'] = 'bfd_profile' @_hash['bfd_use_tunnel_mode'] = 'bfd_use_tunnel_mode' @_hash['preference'] = 'preference' @_hash['role'] = 'role' @_hash['traffic_shaping'] = 'traffic_shaping' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
48 49 50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 48 def self.optionals %w[ bfd_profile bfd_use_tunnel_mode preference role traffic_shaping ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
97 98 99 100 101 102 103 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 97 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
113 114 115 116 117 118 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 113 def inspect class_name = self.class.name.split('::').last "<#{class_name} bfd_profile: #{@bfd_profile.inspect}, bfd_use_tunnel_mode:"\ " #{@bfd_use_tunnel_mode.inspect}, preference: #{@preference.inspect}, role:"\ " #{@role.inspect}, traffic_shaping: #{@traffic_shaping.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
106 107 108 109 110 |
# File 'lib/mist_api/models/gateway_port_vpn_path.rb', line 106 def to_s class_name = self.class.name.split('::').last "<#{class_name} bfd_profile: #{@bfd_profile}, bfd_use_tunnel_mode: #{@bfd_use_tunnel_mode},"\ " preference: #{@preference}, role: #{@role}, traffic_shaping: #{@traffic_shaping}>" end |