Class: MistApi::StatsGatewaySpuItem
- Defined in:
- lib/mist_api/models/stats_gateway_spu_item.rb
Overview
StatsGatewaySpuItem Model.
Instance Attribute Summary collapse
-
#spu_cpu ⇒ Integer
TODO: Write general description for this method.
-
#spu_current_session ⇒ Integer
TODO: Write general description for this method.
-
#spu_max_session ⇒ Integer
TODO: Write general description for this method.
-
#spu_memory ⇒ Integer
TODO: Write general description for this method.
-
#spu_pending_session ⇒ Integer
TODO: Write general description for this method.
-
#spu_uptime ⇒ Integer
TODO: Write general description for this method.
-
#spu_valid_session ⇒ 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(spu_cpu = SKIP, spu_current_session = SKIP, spu_max_session = SKIP, spu_memory = SKIP, spu_pending_session = SKIP, spu_uptime = SKIP, spu_valid_session = SKIP) ⇒ StatsGatewaySpuItem
constructor
A new instance of StatsGatewaySpuItem.
-
#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(spu_cpu = SKIP, spu_current_session = SKIP, spu_max_session = SKIP, spu_memory = SKIP, spu_pending_session = SKIP, spu_uptime = SKIP, spu_valid_session = SKIP) ⇒ StatsGatewaySpuItem
Returns a new instance of StatsGatewaySpuItem.
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 71 def initialize(spu_cpu = SKIP, spu_current_session = SKIP, spu_max_session = SKIP, spu_memory = SKIP, spu_pending_session = SKIP, spu_uptime = SKIP, spu_valid_session = SKIP) @spu_cpu = spu_cpu unless spu_cpu == SKIP @spu_current_session = spu_current_session unless spu_current_session == SKIP @spu_max_session = spu_max_session unless spu_max_session == SKIP @spu_memory = spu_memory unless spu_memory == SKIP @spu_pending_session = spu_pending_session unless spu_pending_session == SKIP @spu_uptime = spu_uptime unless spu_uptime == SKIP @spu_valid_session = spu_valid_session unless spu_valid_session == SKIP end |
Instance Attribute Details
#spu_cpu ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 14 def spu_cpu @spu_cpu end |
#spu_current_session ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 18 def spu_current_session @spu_current_session end |
#spu_max_session ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 22 def spu_max_session @spu_max_session end |
#spu_memory ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 26 def spu_memory @spu_memory end |
#spu_pending_session ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 30 def spu_pending_session @spu_pending_session end |
#spu_uptime ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 34 def spu_uptime @spu_uptime end |
#spu_valid_session ⇒ Integer
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 38 def spu_valid_session @spu_valid_session end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 85 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. spu_cpu = hash.key?('spu_cpu') ? hash['spu_cpu'] : SKIP spu_current_session = hash.key?('spu_current_session') ? hash['spu_current_session'] : SKIP spu_max_session = hash.key?('spu_max_session') ? hash['spu_max_session'] : SKIP spu_memory = hash.key?('spu_memory') ? hash['spu_memory'] : SKIP spu_pending_session = hash.key?('spu_pending_session') ? hash['spu_pending_session'] : SKIP spu_uptime = hash.key?('spu_uptime') ? hash['spu_uptime'] : SKIP spu_valid_session = hash.key?('spu_valid_session') ? hash['spu_valid_session'] : SKIP # Create object from extracted values. StatsGatewaySpuItem.new(spu_cpu, spu_current_session, spu_max_session, spu_memory, spu_pending_session, spu_uptime, spu_valid_session) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['spu_cpu'] = 'spu_cpu' @_hash['spu_current_session'] = 'spu_current_session' @_hash['spu_max_session'] = 'spu_max_session' @_hash['spu_memory'] = 'spu_memory' @_hash['spu_pending_session'] = 'spu_pending_session' @_hash['spu_uptime'] = 'spu_uptime' @_hash['spu_valid_session'] = 'spu_valid_session' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 54 def self.optionals %w[ spu_cpu spu_current_session spu_max_session spu_memory spu_pending_session spu_uptime spu_valid_session ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
121 122 123 124 125 126 127 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 121 def inspect class_name = self.class.name.split('::').last "<#{class_name} spu_cpu: #{@spu_cpu.inspect}, spu_current_session:"\ " #{@spu_current_session.inspect}, spu_max_session: #{@spu_max_session.inspect}, spu_memory:"\ " #{@spu_memory.inspect}, spu_pending_session: #{@spu_pending_session.inspect}, spu_uptime:"\ " #{@spu_uptime.inspect}, spu_valid_session: #{@spu_valid_session.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
112 113 114 115 116 117 118 |
# File 'lib/mist_api/models/stats_gateway_spu_item.rb', line 112 def to_s class_name = self.class.name.split('::').last "<#{class_name} spu_cpu: #{@spu_cpu}, spu_current_session: #{@spu_current_session},"\ " spu_max_session: #{@spu_max_session}, spu_memory: #{@spu_memory}, spu_pending_session:"\ " #{@spu_pending_session}, spu_uptime: #{@spu_uptime}, spu_valid_session:"\ " #{@spu_valid_session}>" end |