Class: MistApi::StatsDeviceOtherInterface

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/stats_device_other_interface.rb

Overview

StatsDeviceOtherInterface Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(bytes_in = SKIP, bytes_out = SKIP, carrier = SKIP, imei = SKIP, imsi = SKIP, ip = SKIP, link = SKIP, mode = SKIP, mtu = SKIP, rsrp = SKIP, rsrq = SKIP, rssi = SKIP, service_mode = SKIP, sinr = SKIP, state = SKIP, type = SKIP, uptime = SKIP) ⇒ StatsDeviceOtherInterface

Returns a new instance of StatsDeviceOtherInterface.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 131

def initialize(bytes_in = SKIP, bytes_out = SKIP, carrier = SKIP,
               imei = SKIP, imsi = SKIP, ip = SKIP, link = SKIP,
               mode = SKIP, mtu = SKIP, rsrp = SKIP, rsrq = SKIP,
               rssi = SKIP, service_mode = SKIP, sinr = SKIP, state = SKIP,
               type = SKIP, uptime = SKIP)
  @bytes_in = bytes_in unless bytes_in == SKIP
  @bytes_out = bytes_out unless bytes_out == SKIP
  @carrier = carrier unless carrier == SKIP
  @imei = imei unless imei == SKIP
  @imsi = imsi unless imsi == SKIP
  @ip = ip unless ip == SKIP
  @link = link unless link == SKIP
  @mode = mode unless mode == SKIP
  @mtu = mtu unless mtu == SKIP
  @rsrp = rsrp unless rsrp == SKIP
  @rsrq = rsrq unless rsrq == SKIP
  @rssi = rssi unless rssi == SKIP
  @service_mode = service_mode unless service_mode == SKIP
  @sinr = sinr unless sinr == SKIP
  @state = state unless state == SKIP
  @type = type unless type == SKIP
  @uptime = uptime unless uptime == SKIP
end

Instance Attribute Details

#bytes_inInteger

TODO: Write general description for this method

Returns:

  • (Integer)


14
15
16
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 14

def bytes_in
  @bytes_in
end

#bytes_outInteger

TODO: Write general description for this method

Returns:

  • (Integer)


18
19
20
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 18

def bytes_out
  @bytes_out
end

#carrierString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 22

def carrier
  @carrier
end

#imeiString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 26

def imei
  @imei
end

#imsiString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 30

def imsi
  @imsi
end

#ipString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 34

def ip
  @ip
end

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


38
39
40
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 38

def link
  @link
end

#modeString

TODO: Write general description for this method

Returns:

  • (String)


42
43
44
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 42

def mode
  @mode
end

#mtuInteger

TODO: Write general description for this method

Returns:

  • (Integer)


46
47
48
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 46

def mtu
  @mtu
end

#rsrpFloat

TODO: Write general description for this method

Returns:

  • (Float)


50
51
52
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 50

def rsrp
  @rsrp
end

#rsrqFloat

TODO: Write general description for this method

Returns:

  • (Float)


54
55
56
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 54

def rsrq
  @rsrq
end

#rssiInteger

TODO: Write general description for this method

Returns:

  • (Integer)


58
59
60
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 58

def rssi
  @rssi
end

#service_modeString

TODO: Write general description for this method

Returns:

  • (String)


62
63
64
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 62

def service_mode
  @service_mode
end

#sinrFloat

TODO: Write general description for this method

Returns:

  • (Float)


66
67
68
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 66

def sinr
  @sinr
end

#stateString

TODO: Write general description for this method

Returns:

  • (String)


70
71
72
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 70

def state
  @state
end

#typeString

TODO: Write general description for this method

Returns:

  • (String)


74
75
76
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 74

def type
  @type
end

#uptimeInteger

TODO: Write general description for this method

Returns:

  • (Integer)


78
79
80
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 78

def uptime
  @uptime
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 156

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  bytes_in = hash.key?('bytes_in') ? hash['bytes_in'] : SKIP
  bytes_out = hash.key?('bytes_out') ? hash['bytes_out'] : SKIP
  carrier = hash.key?('carrier') ? hash['carrier'] : SKIP
  imei = hash.key?('imei') ? hash['imei'] : SKIP
  imsi = hash.key?('imsi') ? hash['imsi'] : SKIP
  ip = hash.key?('ip') ? hash['ip'] : SKIP
  link = hash.key?('link') ? hash['link'] : SKIP
  mode = hash.key?('mode') ? hash['mode'] : SKIP
  mtu = hash.key?('mtu') ? hash['mtu'] : SKIP
  rsrp = hash.key?('rsrp') ? hash['rsrp'] : SKIP
  rsrq = hash.key?('rsrq') ? hash['rsrq'] : SKIP
  rssi = hash.key?('rssi') ? hash['rssi'] : SKIP
  service_mode = hash.key?('service_mode') ? hash['service_mode'] : SKIP
  sinr = hash.key?('sinr') ? hash['sinr'] : SKIP
  state = hash.key?('state') ? hash['state'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  uptime = hash.key?('uptime') ? hash['uptime'] : SKIP

  # Create object from extracted values.
  StatsDeviceOtherInterface.new(bytes_in,
                                bytes_out,
                                carrier,
                                imei,
                                imsi,
                                ip,
                                link,
                                mode,
                                mtu,
                                rsrp,
                                rsrq,
                                rssi,
                                service_mode,
                                sinr,
                                state,
                                type,
                                uptime)
end

.namesObject

A mapping from model property names to API property names.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 81

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['bytes_in'] = 'bytes_in'
  @_hash['bytes_out'] = 'bytes_out'
  @_hash['carrier'] = 'carrier'
  @_hash['imei'] = 'imei'
  @_hash['imsi'] = 'imsi'
  @_hash['ip'] = 'ip'
  @_hash['link'] = 'link'
  @_hash['mode'] = 'mode'
  @_hash['mtu'] = 'mtu'
  @_hash['rsrp'] = 'rsrp'
  @_hash['rsrq'] = 'rsrq'
  @_hash['rssi'] = 'rssi'
  @_hash['service_mode'] = 'service_mode'
  @_hash['sinr'] = 'sinr'
  @_hash['state'] = 'state'
  @_hash['type'] = 'type'
  @_hash['uptime'] = 'uptime'
  @_hash
end

.nullablesObject

An array for nullable fields



127
128
129
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 127

def self.nullables
  []
end

.optionalsObject

An array for optional fields



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 104

def self.optionals
  %w[
    bytes_in
    bytes_out
    carrier
    imei
    imsi
    ip
    link
    mode
    mtu
    rsrp
    rsrq
    rssi
    service_mode
    sinr
    state
    type
    uptime
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



208
209
210
211
212
213
214
215
216
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 208

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} bytes_in: #{@bytes_in.inspect}, bytes_out: #{@bytes_out.inspect}, carrier:"\
  " #{@carrier.inspect}, imei: #{@imei.inspect}, imsi: #{@imsi.inspect}, ip: #{@ip.inspect},"\
  " link: #{@link.inspect}, mode: #{@mode.inspect}, mtu: #{@mtu.inspect}, rsrp:"\
  " #{@rsrp.inspect}, rsrq: #{@rsrq.inspect}, rssi: #{@rssi.inspect}, service_mode:"\
  " #{@service_mode.inspect}, sinr: #{@sinr.inspect}, state: #{@state.inspect}, type:"\
  " #{@type.inspect}, uptime: #{@uptime.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



199
200
201
202
203
204
205
# File 'lib/mist_api/models/stats_device_other_interface.rb', line 199

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} bytes_in: #{@bytes_in}, bytes_out: #{@bytes_out}, carrier: #{@carrier},"\
  " imei: #{@imei}, imsi: #{@imsi}, ip: #{@ip}, link: #{@link}, mode: #{@mode}, mtu: #{@mtu},"\
  " rsrp: #{@rsrp}, rsrq: #{@rsrq}, rssi: #{@rssi}, service_mode: #{@service_mode}, sinr:"\
  " #{@sinr}, state: #{@state}, type: #{@type}, uptime: #{@uptime}>"
end