Class: MistApi::GwRoutingPolicyTermMatching
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::GwRoutingPolicyTermMatching
- Defined in:
- lib/mist_api/models/gw_routing_policy_term_matching.rb
Overview
zero or more criteria/filter can be specified to match the term, all criteria have to be met
Instance Attribute Summary collapse
-
#as_path ⇒ Array[Object]
TODO: Write general description for this method.
-
#community ⇒ Array[String]
TODO: Write general description for this method.
-
#network ⇒ Array[String]
TODO: Write general description for this method.
-
#prefix ⇒ Array[String]
zero or more criteria/filter can be specified to match the term, all criteria have to be met.
-
#protocol ⇒ Array[GwRoutingPolicyTermMatchingProtocolEnum]
zero or more criteria/filter can be specified to match the term, all criteria have to be met.
-
#route_exists ⇒ GwRoutingPolicyTermMatchingRouteExists
zero or more criteria/filter can be specified to match the term, all criteria have to be met.
-
#vpn_neighbor_mac ⇒ Array[String]
overlay-facing criteria (used for bgp_config where via=vpn).
-
#vpn_path ⇒ Array[String]
overlay-facing criteria (used for bgp_config where via=vpn).
-
#vpn_path_sla ⇒ GwRoutingPolicyTermMatchingVpnPathSla
overlay-facing criteria (used for bgp_config where via=vpn).
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(as_path = SKIP, community = SKIP, network = SKIP, prefix = SKIP, protocol = SKIP, route_exists = SKIP, vpn_neighbor_mac = SKIP, vpn_path = SKIP, vpn_path_sla = SKIP) ⇒ GwRoutingPolicyTermMatching
constructor
A new instance of GwRoutingPolicyTermMatching.
-
#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_path = SKIP, community = SKIP, network = SKIP, prefix = SKIP, protocol = SKIP, route_exists = SKIP, vpn_neighbor_mac = SKIP, vpn_path = SKIP, vpn_path_sla = SKIP) ⇒ GwRoutingPolicyTermMatching
Returns a new instance of GwRoutingPolicyTermMatching.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 87 def initialize(as_path = SKIP, community = SKIP, network = SKIP, prefix = SKIP, protocol = SKIP, route_exists = SKIP, vpn_neighbor_mac = SKIP, vpn_path = SKIP, vpn_path_sla = SKIP) @as_path = as_path unless as_path == SKIP @community = community unless community == SKIP @network = network unless network == SKIP @prefix = prefix unless prefix == SKIP @protocol = protocol unless protocol == SKIP @route_exists = route_exists unless route_exists == SKIP @vpn_neighbor_mac = vpn_neighbor_mac unless vpn_neighbor_mac == SKIP @vpn_path = vpn_path unless vpn_path == SKIP @vpn_path_sla = vpn_path_sla unless vpn_path_sla == SKIP end |
Instance Attribute Details
#as_path ⇒ Array[Object]
TODO: Write general description for this method
15 16 17 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 15 def as_path @as_path end |
#community ⇒ Array[String]
TODO: Write general description for this method
19 20 21 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 19 def community @community end |
#network ⇒ Array[String]
TODO: Write general description for this method
23 24 25 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 23 def network @network end |
#prefix ⇒ Array[String]
zero or more criteria/filter can be specified to match the term, all criteria have to be met
28 29 30 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 28 def prefix @prefix end |
#protocol ⇒ Array[GwRoutingPolicyTermMatchingProtocolEnum]
zero or more criteria/filter can be specified to match the term, all criteria have to be met
33 34 35 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 33 def protocol @protocol end |
#route_exists ⇒ GwRoutingPolicyTermMatchingRouteExists
zero or more criteria/filter can be specified to match the term, all criteria have to be met
38 39 40 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 38 def route_exists @route_exists end |
#vpn_neighbor_mac ⇒ Array[String]
overlay-facing criteria (used for bgp_config where via=vpn)
42 43 44 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 42 def vpn_neighbor_mac @vpn_neighbor_mac end |
#vpn_path ⇒ Array[String]
overlay-facing criteria (used for bgp_config where via=vpn). ordered-
46 47 48 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 46 def vpn_path @vpn_path end |
#vpn_path_sla ⇒ GwRoutingPolicyTermMatchingVpnPathSla
overlay-facing criteria (used for bgp_config where via=vpn). ordered-
50 51 52 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 50 def vpn_path_sla @vpn_path_sla end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 131 132 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 103 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. as_path = hash.key?('as_path') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:BgpAs3), hash['as_path'] ) : SKIP community = hash.key?('community') ? hash['community'] : SKIP network = hash.key?('network') ? hash['network'] : SKIP prefix = hash.key?('prefix') ? hash['prefix'] : SKIP protocol = hash.key?('protocol') ? hash['protocol'] : SKIP route_exists = GwRoutingPolicyTermMatchingRouteExists.from_hash(hash['route_exists']) if hash['route_exists'] vpn_neighbor_mac = hash.key?('vpn_neighbor_mac') ? hash['vpn_neighbor_mac'] : SKIP vpn_path = hash.key?('vpn_path') ? hash['vpn_path'] : SKIP vpn_path_sla = GwRoutingPolicyTermMatchingVpnPathSla.from_hash(hash['vpn_path_sla']) if hash['vpn_path_sla'] # Create object from extracted values. GwRoutingPolicyTermMatching.new(as_path, community, network, prefix, protocol, route_exists, vpn_neighbor_mac, vpn_path, vpn_path_sla) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['as_path'] = 'as_path' @_hash['community'] = 'community' @_hash['network'] = 'network' @_hash['prefix'] = 'prefix' @_hash['protocol'] = 'protocol' @_hash['route_exists'] = 'route_exists' @_hash['vpn_neighbor_mac'] = 'vpn_neighbor_mac' @_hash['vpn_path'] = 'vpn_path' @_hash['vpn_path_sla'] = 'vpn_path_sla' @_hash end |
.nullables ⇒ Object
An array for nullable fields
83 84 85 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 83 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 68 def self.optionals %w[ as_path community network prefix protocol route_exists vpn_neighbor_mac vpn_path vpn_path_sla ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
136 137 138 139 140 141 142 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 136 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.
154 155 156 157 158 159 160 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 154 def inspect class_name = self.class.name.split('::').last "<#{class_name} as_path: #{@as_path.inspect}, community: #{@community.inspect}, network:"\ " #{@network.inspect}, prefix: #{@prefix.inspect}, protocol: #{@protocol.inspect},"\ " route_exists: #{@route_exists.inspect}, vpn_neighbor_mac: #{@vpn_neighbor_mac.inspect},"\ " vpn_path: #{@vpn_path.inspect}, vpn_path_sla: #{@vpn_path_sla.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
145 146 147 148 149 150 151 |
# File 'lib/mist_api/models/gw_routing_policy_term_matching.rb', line 145 def to_s class_name = self.class.name.split('::').last "<#{class_name} as_path: #{@as_path}, community: #{@community}, network: #{@network},"\ " prefix: #{@prefix}, protocol: #{@protocol}, route_exists: #{@route_exists},"\ " vpn_neighbor_mac: #{@vpn_neighbor_mac}, vpn_path: #{@vpn_path}, vpn_path_sla:"\ " #{@vpn_path_sla}>" end |