Class: MistApi::RfDiagInfoItem

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

Overview

RfDiagInfoItem 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(duration = nil, end_time = nil, frame_count = nil, map_id = nil, name = nil, raw_events = nil, ready = nil, start_time = nil, type = nil, url = nil, asset_id = SKIP, asset_name = SKIP, client_name = SKIP, id = SKIP, mac = SKIP, mnext = SKIP, sdkclient_id = SKIP, sdkclient_name = SKIP, sdkclient_uuid = SKIP) ⇒ RfDiagInfoItem

Returns a new instance of RfDiagInfoItem.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 134

def initialize(duration = nil, end_time = nil, frame_count = nil,
               map_id = nil, name = nil, raw_events = nil, ready = nil,
               start_time = nil, type = nil, url = nil, asset_id = SKIP,
               asset_name = SKIP, client_name = SKIP, id = SKIP, mac = SKIP,
               mnext = SKIP, sdkclient_id = SKIP, sdkclient_name = SKIP,
               sdkclient_uuid = SKIP)
  @asset_id = asset_id unless asset_id == SKIP
  @asset_name = asset_name unless asset_name == SKIP
  @client_name = client_name unless client_name == SKIP
  @duration = duration
  @end_time = end_time
  @frame_count = frame_count
  @id = id unless id == SKIP
  @mac = mac unless mac == SKIP
  @map_id = map_id
  @name = name
  @mnext = mnext unless mnext == SKIP
  @raw_events = raw_events
  @ready = ready
  @sdkclient_id = sdkclient_id unless sdkclient_id == SKIP
  @sdkclient_name = sdkclient_name unless sdkclient_name == SKIP
  @sdkclient_uuid = sdkclient_uuid unless sdkclient_uuid == SKIP
  @start_time = start_time
  @type = type
  @url = url
end

Instance Attribute Details

#asset_idUUID | String

If ‘type`==`asset`, id of the asset

Returns:

  • (UUID | String)


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

def asset_id
  @asset_id
end

#asset_nameString

If ‘type`==`asset`, name of the asset

Returns:

  • (String)


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

def asset_name
  @asset_name
end

#client_nameString

If ‘type`==`client`, hostname of the client

Returns:

  • (String)


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

def client_name
  @client_name
end

#durationInteger

recording length in seconds, max is 120

Returns:

  • (Integer)


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

def duration
  @duration
end

#end_timeInteger

Timestamp of end of recording

Returns:

  • (Integer)


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

def end_time
  @end_time
end

#frame_countInteger

Number of frames in the output

Returns:

  • (Integer)


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

def frame_count
  @frame_count
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def id
  @id
end

#macString

If ‘type`==`client` or `asset`, mac of the device

Returns:

  • (String)


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

def mac
  @mac
end

#map_idUUID | String

If ‘type`==`client` or `asset`, mac of the device

Returns:

  • (UUID | String)


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

def map_id
  @map_id
end

#mnextString

Optional. id of the next recoding if present. Only valid for site survey.

Returns:

  • (String)


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

def mnext
  @mnext
end

#nameString

If ‘type`==`client` or `asset`, mac of the device

Returns:

  • (String)


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

def name
  @name
end

#raw_eventsString

URL to a JSON file that contains array of raw location diag events

Returns:

  • (String)


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

def raw_events
  @raw_events
end

#readyTrueClass | FalseClass

Whether it’s ready for playback

Returns:

  • (TrueClass | FalseClass)


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

def ready
  @ready
end

#sdkclient_idUUID | String

If ‘type`==`sdkclient`, sdkclient_id of this recording

Returns:

  • (UUID | String)


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

def sdkclient_id
  @sdkclient_id
end

#sdkclient_nameString

If ‘type`==`sdkclient`, name of the sdkclient

Returns:

  • (String)


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

def sdkclient_name
  @sdkclient_name
end

#sdkclient_uuidUUID | String

If ‘type`==`sdkclient`, device_id of sdkclient

Returns:

  • (UUID | String)


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

def sdkclient_uuid
  @sdkclient_uuid
end

#start_timeInteger

Timestamp of the recording (the start)

Returns:

  • (Integer)


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

def start_time
  @start_time
end

#typeRfClientTypeEnum

enum: ‘asset`, `client`, `sdkclient`

Returns:



82
83
84
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 82

def type
  @type
end

#urlString

URL to a JSON file that contains an array of frames, each frame is the same format

Returns:

  • (String)


87
88
89
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 87

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 162

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  duration = hash.key?('duration') ? hash['duration'] : nil
  end_time = hash.key?('end_time') ? hash['end_time'] : nil
  frame_count = hash.key?('frame_count') ? hash['frame_count'] : nil
  map_id = hash.key?('map_id') ? hash['map_id'] : nil
  name = hash.key?('name') ? hash['name'] : nil
  raw_events = hash.key?('raw_events') ? hash['raw_events'] : nil
  ready = hash.key?('ready') ? hash['ready'] : nil
  start_time = hash.key?('start_time') ? hash['start_time'] : nil
  type = hash.key?('type') ? hash['type'] : nil
  url = hash.key?('url') ? hash['url'] : nil
  asset_id = hash.key?('asset_id') ? hash['asset_id'] : SKIP
  asset_name = hash.key?('asset_name') ? hash['asset_name'] : SKIP
  client_name = hash.key?('client_name') ? hash['client_name'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  mnext = hash.key?('next') ? hash['next'] : SKIP
  sdkclient_id = hash.key?('sdkclient_id') ? hash['sdkclient_id'] : SKIP
  sdkclient_name =
    hash.key?('sdkclient_name') ? hash['sdkclient_name'] : SKIP
  sdkclient_uuid =
    hash.key?('sdkclient_uuid') ? hash['sdkclient_uuid'] : SKIP

  # Create object from extracted values.
  RfDiagInfoItem.new(duration,
                     end_time,
                     frame_count,
                     map_id,
                     name,
                     raw_events,
                     ready,
                     start_time,
                     type,
                     url,
                     asset_id,
                     asset_name,
                     client_name,
                     id,
                     mac,
                     mnext,
                     sdkclient_id,
                     sdkclient_name,
                     sdkclient_uuid)
end

.namesObject

A mapping from model property names to API property names.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 90

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['asset_id'] = 'asset_id'
  @_hash['asset_name'] = 'asset_name'
  @_hash['client_name'] = 'client_name'
  @_hash['duration'] = 'duration'
  @_hash['end_time'] = 'end_time'
  @_hash['frame_count'] = 'frame_count'
  @_hash['id'] = 'id'
  @_hash['mac'] = 'mac'
  @_hash['map_id'] = 'map_id'
  @_hash['name'] = 'name'
  @_hash['mnext'] = 'next'
  @_hash['raw_events'] = 'raw_events'
  @_hash['ready'] = 'ready'
  @_hash['sdkclient_id'] = 'sdkclient_id'
  @_hash['sdkclient_name'] = 'sdkclient_name'
  @_hash['sdkclient_uuid'] = 'sdkclient_uuid'
  @_hash['start_time'] = 'start_time'
  @_hash['type'] = 'type'
  @_hash['url'] = 'url'
  @_hash
end

.nullablesObject

An array for nullable fields



130
131
132
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 130

def self.nullables
  []
end

.optionalsObject

An array for optional fields



115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 115

def self.optionals
  %w[
    asset_id
    asset_name
    client_name
    id
    mac
    mnext
    sdkclient_id
    sdkclient_name
    sdkclient_uuid
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



222
223
224
225
226
227
228
229
230
231
232
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 222

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} asset_id: #{@asset_id.inspect}, asset_name: #{@asset_name.inspect},"\
  " client_name: #{@client_name.inspect}, duration: #{@duration.inspect}, end_time:"\
  " #{@end_time.inspect}, frame_count: #{@frame_count.inspect}, id: #{@id.inspect}, mac:"\
  " #{@mac.inspect}, map_id: #{@map_id.inspect}, name: #{@name.inspect}, mnext:"\
  " #{@mnext.inspect}, raw_events: #{@raw_events.inspect}, ready: #{@ready.inspect},"\
  " sdkclient_id: #{@sdkclient_id.inspect}, sdkclient_name: #{@sdkclient_name.inspect},"\
  " sdkclient_uuid: #{@sdkclient_uuid.inspect}, start_time: #{@start_time.inspect}, type:"\
  " #{@type.inspect}, url: #{@url.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



211
212
213
214
215
216
217
218
219
# File 'lib/mist_api/models/rf_diag_info_item.rb', line 211

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} asset_id: #{@asset_id}, asset_name: #{@asset_name}, client_name:"\
  " #{@client_name}, duration: #{@duration}, end_time: #{@end_time}, frame_count:"\
  " #{@frame_count}, id: #{@id}, mac: #{@mac}, map_id: #{@map_id}, name: #{@name}, mnext:"\
  " #{@mnext}, raw_events: #{@raw_events}, ready: #{@ready}, sdkclient_id: #{@sdkclient_id},"\
  " sdkclient_name: #{@sdkclient_name}, sdkclient_uuid: #{@sdkclient_uuid}, start_time:"\
  " #{@start_time}, type: #{@type}, url: #{@url}>"
end