Class: MistApi::StatsApUsbStat
- Defined in:
- lib/mist_api/models/stats_ap_usb_stat.rb
Overview
StatsApUsbStat Model.
Instance Attribute Summary collapse
-
#channel ⇒ Integer
TODO: Write general description for this method.
-
#connected ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#last_activity ⇒ Integer
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
-
#up ⇒ TrueClass | FalseClass
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(channel = SKIP, connected = SKIP, last_activity = SKIP, type = SKIP, up = SKIP) ⇒ StatsApUsbStat
constructor
A new instance of StatsApUsbStat.
-
#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(channel = SKIP, connected = SKIP, last_activity = SKIP, type = SKIP, up = SKIP) ⇒ StatsApUsbStat
Returns a new instance of StatsApUsbStat.
65 66 67 68 69 70 71 72 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 65 def initialize(channel = SKIP, connected = SKIP, last_activity = SKIP, type = SKIP, up = SKIP) @channel = channel unless channel == SKIP @connected = connected unless connected == SKIP @last_activity = last_activity unless last_activity == SKIP @type = type unless type == SKIP @up = up unless up == SKIP end |
Instance Attribute Details
#channel ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 14 def channel @channel end |
#connected ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 18 def connected @connected end |
#last_activity ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 22 def last_activity @last_activity end |
#type ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 26 def type @type end |
#up ⇒ TrueClass | FalseClass
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 30 def up @up 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 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. channel = hash.key?('channel') ? hash['channel'] : SKIP connected = hash.key?('connected') ? hash['connected'] : SKIP last_activity = hash.key?('last_activity') ? hash['last_activity'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP up = hash.key?('up') ? hash['up'] : SKIP # Create object from extracted values. StatsApUsbStat.new(channel, connected, last_activity, type, up) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['channel'] = 'channel' @_hash['connected'] = 'connected' @_hash['last_activity'] = 'last_activity' @_hash['type'] = 'type' @_hash['up'] = 'up' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 58 59 60 61 62 63 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 55 def self.nullables %w[ channel connected last_activity type up ] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 44 def self.optionals %w[ channel connected last_activity type up ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
101 102 103 104 105 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 101 def inspect class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel.inspect}, connected: #{@connected.inspect},"\ " last_activity: #{@last_activity.inspect}, type: #{@type.inspect}, up: #{@up.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 |
# File 'lib/mist_api/models/stats_ap_usb_stat.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel}, connected: #{@connected}, last_activity:"\ " #{@last_activity}, type: #{@type}, up: #{@up}>" end |