Class: MistApi::SynthetictestInfo

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

Overview

SynthetictestInfo 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(by = SKIP, device_type = SKIP, failed = SKIP, latency = SKIP, mac = SKIP, port_id = SKIP, reason = SKIP, rx_mbps = SKIP, start_time = SKIP, status = SKIP, timestamp = SKIP, tx_mbps = SKIP, type = SKIP, vlan_id = SKIP) ⇒ SynthetictestInfo

Returns a new instance of SynthetictestInfo.



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/mist_api/models/synthetictest_info.rb', line 115

def initialize(by = SKIP, device_type = SKIP, failed = SKIP, latency = SKIP,
               mac = SKIP, port_id = SKIP, reason = SKIP, rx_mbps = SKIP,
               start_time = SKIP, status = SKIP, timestamp = SKIP,
               tx_mbps = SKIP, type = SKIP, vlan_id = SKIP)
  @by = by unless by == SKIP
  @device_type = device_type unless device_type == SKIP
  @failed = failed unless failed == SKIP
  @latency = latency unless latency == SKIP
  @mac = mac unless mac == SKIP
  @port_id = port_id unless port_id == SKIP
  @reason = reason unless reason == SKIP
  @rx_mbps = rx_mbps unless rx_mbps == SKIP
  @start_time = start_time unless start_time == SKIP
  @status = status unless status == SKIP
  @timestamp = timestamp unless timestamp == SKIP
  @tx_mbps = tx_mbps unless tx_mbps == SKIP
  @type = type unless type == SKIP
  @vlan_id = vlan_id unless vlan_id == SKIP
end

Instance Attribute Details

#byString

TODO: Write general description for this method

Returns:

  • (String)


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

def by
  @by
end

#device_typeDeviceTypeEnum

enum: ‘ap`, `gateway`, `switch`

Returns:



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

def device_type
  @device_type
end

#failedTrueClass | FalseClass

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (TrueClass | FalseClass)


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

def failed
  @failed
end

#latencyInteger

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (Integer)


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

def latency
  @latency
end

#macString

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (String)


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

def mac
  @mac
end

#port_idString

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (String)


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

def port_id
  @port_id
end

#reasonString

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (String)


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

def reason
  @reason
end

#rx_mbpsInteger

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (Integer)


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

def rx_mbps
  @rx_mbps
end

#start_timeInteger

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (Integer)


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

def start_time
  @start_time
end

#statusString

enum: ‘ap`, `gateway`, `switch`

Returns:

  • (String)


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

def status
  @status
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


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

def timestamp
  @timestamp
end

#tx_mbpsInteger

Epoch (seconds)

Returns:

  • (Integer)


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

def tx_mbps
  @tx_mbps
end

#typeSynthetictestTypeEnum

enum: ‘arp`, `curl`, `dhcp`, `dhcp6`, `dns`, `lan_connectivity`, `radius`, `speedtest`



63
64
65
# File 'lib/mist_api/models/synthetictest_info.rb', line 63

def type
  @type
end

#vlan_idInteger

enum: ‘arp`, `curl`, `dhcp`, `dhcp6`, `dns`, `lan_connectivity`, `radius`, `speedtest`

Returns:

  • (Integer)


68
69
70
# File 'lib/mist_api/models/synthetictest_info.rb', line 68

def vlan_id
  @vlan_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/mist_api/models/synthetictest_info.rb', line 136

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  by = hash.key?('by') ? hash['by'] : SKIP
  device_type = hash.key?('device_type') ? hash['device_type'] : SKIP
  failed = hash.key?('failed') ? hash['failed'] : SKIP
  latency = hash.key?('latency') ? hash['latency'] : SKIP
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  port_id = hash.key?('port_id') ? hash['port_id'] : SKIP
  reason = hash.key?('reason') ? hash['reason'] : SKIP
  rx_mbps = hash.key?('rx_mbps') ? hash['rx_mbps'] : SKIP
  start_time = hash.key?('start_time') ? hash['start_time'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
  tx_mbps = hash.key?('tx_mbps') ? hash['tx_mbps'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  vlan_id = hash.key?('vlan_id') ? hash['vlan_id'] : SKIP

  # Create object from extracted values.
  SynthetictestInfo.new(by,
                        device_type,
                        failed,
                        latency,
                        mac,
                        port_id,
                        reason,
                        rx_mbps,
                        start_time,
                        status,
                        timestamp,
                        tx_mbps,
                        type,
                        vlan_id)
end

.namesObject

A mapping from model property names to API property names.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/mist_api/models/synthetictest_info.rb', line 71

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['by'] = 'by'
  @_hash['device_type'] = 'device_type'
  @_hash['failed'] = 'failed'
  @_hash['latency'] = 'latency'
  @_hash['mac'] = 'mac'
  @_hash['port_id'] = 'port_id'
  @_hash['reason'] = 'reason'
  @_hash['rx_mbps'] = 'rx_mbps'
  @_hash['start_time'] = 'start_time'
  @_hash['status'] = 'status'
  @_hash['timestamp'] = 'timestamp'
  @_hash['tx_mbps'] = 'tx_mbps'
  @_hash['type'] = 'type'
  @_hash['vlan_id'] = 'vlan_id'
  @_hash
end

.nullablesObject

An array for nullable fields



111
112
113
# File 'lib/mist_api/models/synthetictest_info.rb', line 111

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    by
    device_type
    failed
    latency
    mac
    port_id
    reason
    rx_mbps
    start_time
    status
    timestamp
    tx_mbps
    type
    vlan_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



182
183
184
185
186
187
188
189
# File 'lib/mist_api/models/synthetictest_info.rb', line 182

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} by: #{@by.inspect}, device_type: #{@device_type.inspect}, failed:"\
  " #{@failed.inspect}, latency: #{@latency.inspect}, mac: #{@mac.inspect}, port_id:"\
  " #{@port_id.inspect}, reason: #{@reason.inspect}, rx_mbps: #{@rx_mbps.inspect}, start_time:"\
  " #{@start_time.inspect}, status: #{@status.inspect}, timestamp: #{@timestamp.inspect},"\
  " tx_mbps: #{@tx_mbps.inspect}, type: #{@type.inspect}, vlan_id: #{@vlan_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



173
174
175
176
177
178
179
# File 'lib/mist_api/models/synthetictest_info.rb', line 173

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} by: #{@by}, device_type: #{@device_type}, failed: #{@failed}, latency:"\
  " #{@latency}, mac: #{@mac}, port_id: #{@port_id}, reason: #{@reason}, rx_mbps: #{@rx_mbps},"\
  " start_time: #{@start_time}, status: #{@status}, timestamp: #{@timestamp}, tx_mbps:"\
  " #{@tx_mbps}, type: #{@type}, vlan_id: #{@vlan_id}>"
end