Class: MistApi::RouteSummaryStats
- Defined in:
- lib/mist_api/models/route_summary_stats.rb
Overview
RouteSummaryStats Model.
Instance Attribute Summary collapse
-
#fib_routes ⇒ Integer
TODO: Write general description for this method.
-
#max_unicast_routes_supported ⇒ Integer
TODO: Write general description for this method.
-
#rib_routes ⇒ Integer
TODO: Write general description for this method.
-
#total_routes ⇒ Integer
TODO: Write general description for this method.
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(fib_routes = SKIP, max_unicast_routes_supported = SKIP, rib_routes = SKIP, total_routes = SKIP) ⇒ RouteSummaryStats
constructor
A new instance of RouteSummaryStats.
-
#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(fib_routes = SKIP, max_unicast_routes_supported = SKIP, rib_routes = SKIP, total_routes = SKIP) ⇒ RouteSummaryStats
Returns a new instance of RouteSummaryStats.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 53 def initialize(fib_routes = SKIP, max_unicast_routes_supported = SKIP, rib_routes = SKIP, total_routes = SKIP) @fib_routes = fib_routes unless fib_routes == SKIP unless max_unicast_routes_supported == SKIP @max_unicast_routes_supported = max_unicast_routes_supported end @rib_routes = rib_routes unless rib_routes == SKIP @total_routes = total_routes unless total_routes == SKIP end |
Instance Attribute Details
#fib_routes ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 14 def fib_routes @fib_routes end |
#max_unicast_routes_supported ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 18 def max_unicast_routes_supported @max_unicast_routes_supported end |
#rib_routes ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 22 def rib_routes @rib_routes end |
#total_routes ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 26 def total_routes @total_routes end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. fib_routes = hash.key?('fib_routes') ? hash['fib_routes'] : SKIP max_unicast_routes_supported = hash.key?('max_unicast_routes_supported') ? hash['max_unicast_routes_supported'] : SKIP rib_routes = hash.key?('rib_routes') ? hash['rib_routes'] : SKIP total_routes = hash.key?('total_routes') ? hash['total_routes'] : SKIP # Create object from extracted values. RouteSummaryStats.new(fib_routes, max_unicast_routes_supported, rib_routes, total_routes) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['fib_routes'] = 'fib_routes' @_hash['max_unicast_routes_supported'] = 'max_unicast_routes_supported' @_hash['rib_routes'] = 'rib_routes' @_hash['total_routes'] = 'total_routes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 39 def self.optionals %w[ fib_routes max_unicast_routes_supported rib_routes total_routes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 96 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} fib_routes: #{@fib_routes.inspect}, max_unicast_routes_supported:"\ " #{@max_unicast_routes_supported.inspect}, rib_routes: #{@rib_routes.inspect},"\ " total_routes: #{@total_routes.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 88 |
# File 'lib/mist_api/models/route_summary_stats.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} fib_routes: #{@fib_routes}, max_unicast_routes_supported:"\ " #{@max_unicast_routes_supported}, rib_routes: #{@rib_routes}, total_routes:"\ " #{@total_routes}>" end |