Class: MistApi::OspfPeerStatsSearchResultsItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::OspfPeerStatsSearchResultsItems
- Defined in:
- lib/mist_api/models/ospf_peer_stats_search_results_items.rb
Overview
OspfPeerStatsSearchResultsItems Model.
Instance Attribute Summary collapse
-
#dead_time ⇒ Integer
Activity timer.
-
#mac ⇒ String
Router MAC address.
-
#org_id ⇒ UUID | String
Router org ID.
-
#peer_ip ⇒ String
Neighbor address (IP).
-
#port_id ⇒ String
Interface name.
-
#priority ⇒ Integer
Neighbor priority, 0-255.
-
#site_id ⇒ UUID | String
Router site ID.
-
#state ⇒ String
Eg.
-
#timestamp ⇒ Float
Sampling time (in epoch seconds).
-
#up ⇒ TrueClass | FalseClass
True if state is full.
-
#vrf_name ⇒ String
Instance name, e.g.
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(dead_time = SKIP, mac = SKIP, org_id = SKIP, peer_ip = SKIP, port_id = SKIP, priority = SKIP, site_id = SKIP, state = SKIP, timestamp = SKIP, up = SKIP, vrf_name = SKIP) ⇒ OspfPeerStatsSearchResultsItems
constructor
A new instance of OspfPeerStatsSearchResultsItems.
-
#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(dead_time = SKIP, mac = SKIP, org_id = SKIP, peer_ip = SKIP, port_id = SKIP, priority = SKIP, site_id = SKIP, state = SKIP, timestamp = SKIP, up = SKIP, vrf_name = SKIP) ⇒ OspfPeerStatsSearchResultsItems
Returns a new instance of OspfPeerStatsSearchResultsItems.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 95 def initialize(dead_time = SKIP, mac = SKIP, org_id = SKIP, peer_ip = SKIP, port_id = SKIP, priority = SKIP, site_id = SKIP, state = SKIP, = SKIP, up = SKIP, vrf_name = SKIP) @dead_time = dead_time unless dead_time == SKIP @mac = mac unless mac == SKIP @org_id = org_id unless org_id == SKIP @peer_ip = peer_ip unless peer_ip == SKIP @port_id = port_id unless port_id == SKIP @priority = priority unless priority == SKIP @site_id = site_id unless site_id == SKIP @state = state unless state == SKIP @timestamp = unless == SKIP @up = up unless up == SKIP @vrf_name = vrf_name unless vrf_name == SKIP end |
Instance Attribute Details
#dead_time ⇒ Integer
Activity timer
14 15 16 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 14 def dead_time @dead_time end |
#mac ⇒ String
Router MAC address
18 19 20 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 18 def mac @mac end |
#org_id ⇒ UUID | String
Router org ID
22 23 24 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 22 def org_id @org_id end |
#peer_ip ⇒ String
Neighbor address (IP)
26 27 28 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 26 def peer_ip @peer_ip end |
#port_id ⇒ String
Interface name
30 31 32 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 30 def port_id @port_id end |
#priority ⇒ Integer
Neighbor priority, 0-255
34 35 36 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 34 def priority @priority end |
#site_id ⇒ UUID | String
Router site ID
38 39 40 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 38 def site_id @site_id end |
#state ⇒ String
Eg. full, down, 2way, init, exstart, exchange, loading
42 43 44 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 42 def state @state end |
#timestamp ⇒ Float
Sampling time (in epoch seconds)
46 47 48 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 46 def @timestamp end |
#up ⇒ TrueClass | FalseClass
True if state is full
50 51 52 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 50 def up @up end |
#vrf_name ⇒ String
Instance name, e.g. master
54 55 56 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 54 def vrf_name @vrf_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 112 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. dead_time = hash.key?('dead_time') ? hash['dead_time'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP peer_ip = hash.key?('peer_ip') ? hash['peer_ip'] : SKIP port_id = hash.key?('port_id') ? hash['port_id'] : SKIP priority = hash.key?('priority') ? hash['priority'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP up = hash.key?('up') ? hash['up'] : SKIP vrf_name = hash.key?('vrf_name') ? hash['vrf_name'] : SKIP # Create object from extracted values. OspfPeerStatsSearchResultsItems.new(dead_time, mac, org_id, peer_ip, port_id, priority, site_id, state, , up, vrf_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 57 def self.names @_hash = {} if @_hash.nil? @_hash['dead_time'] = 'dead_time' @_hash['mac'] = 'mac' @_hash['org_id'] = 'org_id' @_hash['peer_ip'] = 'peer_ip' @_hash['port_id'] = 'port_id' @_hash['priority'] = 'priority' @_hash['site_id'] = 'site_id' @_hash['state'] = 'state' @_hash['timestamp'] = 'timestamp' @_hash['up'] = 'up' @_hash['vrf_name'] = 'vrf_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
91 92 93 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 91 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 74 def self.optionals %w[ dead_time mac org_id peer_ip port_id priority site_id state timestamp up vrf_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
151 152 153 154 155 156 157 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 151 def inspect class_name = self.class.name.split('::').last "<#{class_name} dead_time: #{@dead_time.inspect}, mac: #{@mac.inspect}, org_id:"\ " #{@org_id.inspect}, peer_ip: #{@peer_ip.inspect}, port_id: #{@port_id.inspect}, priority:"\ " #{@priority.inspect}, site_id: #{@site_id.inspect}, state: #{@state.inspect}, timestamp:"\ " #{@timestamp.inspect}, up: #{@up.inspect}, vrf_name: #{@vrf_name.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
143 144 145 146 147 148 |
# File 'lib/mist_api/models/ospf_peer_stats_search_results_items.rb', line 143 def to_s class_name = self.class.name.split('::').last "<#{class_name} dead_time: #{@dead_time}, mac: #{@mac}, org_id: #{@org_id}, peer_ip:"\ " #{@peer_ip}, port_id: #{@port_id}, priority: #{@priority}, site_id: #{@site_id}, state:"\ " #{@state}, timestamp: #{@timestamp}, up: #{@up}, vrf_name: #{@vrf_name}>" end |