Class: MistApi::OrgSiteSleWiredResult
- Defined in:
- lib/mist_api/models/org_site_sle_wired_result.rb
Overview
OrgSiteSleWiredResult Model.
Instance Attribute Summary collapse
-
#num_clients ⇒ Float
TODO: Write general description for this method.
-
#num_switches ⇒ Float
TODO: Write general description for this method.
-
#site_id ⇒ UUID | String
TODO: Write general description for this method.
-
#switch_bandwidth ⇒ Float
TODO: Write general description for this method.
-
#switch_health ⇒ Float
TODO: Write general description for this method.
-
#switch_throughput ⇒ Float
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(site_id = nil, switch_health = nil, num_clients = SKIP, num_switches = SKIP, switch_bandwidth = SKIP, switch_throughput = SKIP) ⇒ OrgSiteSleWiredResult
constructor
A new instance of OrgSiteSleWiredResult.
-
#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(site_id = nil, switch_health = nil, num_clients = SKIP, num_switches = SKIP, switch_bandwidth = SKIP, switch_throughput = SKIP) ⇒ OrgSiteSleWiredResult
Returns a new instance of OrgSiteSleWiredResult.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 63 def initialize(site_id = nil, switch_health = nil, num_clients = SKIP, num_switches = SKIP, switch_bandwidth = SKIP, switch_throughput = SKIP) @num_clients = num_clients unless num_clients == SKIP @num_switches = num_switches unless num_switches == SKIP @site_id = site_id @switch_bandwidth = switch_bandwidth unless switch_bandwidth == SKIP @switch_health = switch_health @switch_throughput = switch_throughput unless switch_throughput == SKIP end |
Instance Attribute Details
#num_clients ⇒ Float
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 14 def num_clients @num_clients end |
#num_switches ⇒ Float
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 18 def num_switches @num_switches end |
#site_id ⇒ UUID | String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 22 def site_id @site_id end |
#switch_bandwidth ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 26 def switch_bandwidth @switch_bandwidth end |
#switch_health ⇒ Float
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 30 def switch_health @switch_health end |
#switch_throughput ⇒ Float
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 34 def switch_throughput @switch_throughput 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 94 95 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. site_id = hash.key?('site_id') ? hash['site_id'] : nil switch_health = hash.key?('switch-health') ? hash['switch-health'] : nil num_clients = hash.key?('num_clients') ? hash['num_clients'] : SKIP num_switches = hash.key?('num_switches') ? hash['num_switches'] : SKIP switch_bandwidth = hash.key?('switch-bandwidth') ? hash['switch-bandwidth'] : SKIP switch_throughput = hash.key?('switch-throughput') ? hash['switch-throughput'] : SKIP # Create object from extracted values. OrgSiteSleWiredResult.new(site_id, switch_health, num_clients, num_switches, switch_bandwidth, switch_throughput) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['num_clients'] = 'num_clients' @_hash['num_switches'] = 'num_switches' @_hash['site_id'] = 'site_id' @_hash['switch_bandwidth'] = 'switch-bandwidth' @_hash['switch_health'] = 'switch-health' @_hash['switch_throughput'] = 'switch-throughput' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 49 def self.optionals %w[ num_clients num_switches switch_bandwidth switch_throughput ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
106 107 108 109 110 111 112 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 106 def inspect class_name = self.class.name.split('::').last "<#{class_name} num_clients: #{@num_clients.inspect}, num_switches:"\ " #{@num_switches.inspect}, site_id: #{@site_id.inspect}, switch_bandwidth:"\ " #{@switch_bandwidth.inspect}, switch_health: #{@switch_health.inspect}, switch_throughput:"\ " #{@switch_throughput.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
98 99 100 101 102 103 |
# File 'lib/mist_api/models/org_site_sle_wired_result.rb', line 98 def to_s class_name = self.class.name.split('::').last "<#{class_name} num_clients: #{@num_clients}, num_switches: #{@num_switches}, site_id:"\ " #{@site_id}, switch_bandwidth: #{@switch_bandwidth}, switch_health: #{@switch_health},"\ " switch_throughput: #{@switch_throughput}>" end |