Class: MistApi::MxedgeEvent
- Defined in:
- lib/mist_api/models/mxedge_event.rb
Overview
MxedgeEvent Model.
Instance Attribute Summary collapse
-
#audit_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#component ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#device_id ⇒ UUID | String
Device id.
-
#device_type ⇒ String
Device id.
-
#from_version ⇒ String
Device id.
-
#mac ⇒ String
Device id.
-
#mxcluster_id ⇒ String
Device id.
-
#mxedge_id ⇒ String
Device id.
-
#mxedge_name ⇒ String
Device id.
-
#org_id ⇒ UUID | String
Device id.
-
#package ⇒ String
Device id.
-
#service ⇒ String
Device id.
-
#severity ⇒ EventSeverityEnum
Device id.
-
#sys_info_usage ⇒ MxedgeEventSysInfo
Device id.
-
#text ⇒ String
Device id.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#to_version ⇒ String
Epoch (seconds).
-
#type ⇒ String
Epoch (seconds).
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(audit_id = SKIP, component = SKIP, device_id = SKIP, device_type = SKIP, from_version = SKIP, mac = SKIP, mxcluster_id = SKIP, mxedge_id = SKIP, mxedge_name = SKIP, org_id = SKIP, package = SKIP, service = SKIP, severity = SKIP, sys_info_usage = SKIP, text = SKIP, timestamp = SKIP, to_version = SKIP, type = SKIP) ⇒ MxedgeEvent
constructor
A new instance of MxedgeEvent.
-
#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(audit_id = SKIP, component = SKIP, device_id = SKIP, device_type = SKIP, from_version = SKIP, mac = SKIP, mxcluster_id = SKIP, mxedge_id = SKIP, mxedge_name = SKIP, org_id = SKIP, package = SKIP, service = SKIP, severity = SKIP, sys_info_usage = SKIP, text = SKIP, timestamp = SKIP, to_version = SKIP, type = SKIP) ⇒ MxedgeEvent
Returns a new instance of MxedgeEvent.
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 |
# File 'lib/mist_api/models/mxedge_event.rb', line 140 def initialize(audit_id = SKIP, component = SKIP, device_id = SKIP, device_type = SKIP, from_version = SKIP, mac = SKIP, mxcluster_id = SKIP, mxedge_id = SKIP, mxedge_name = SKIP, org_id = SKIP, package = SKIP, service = SKIP, severity = SKIP, sys_info_usage = SKIP, text = SKIP, = SKIP, to_version = SKIP, type = SKIP) @audit_id = audit_id unless audit_id == SKIP @component = component unless component == SKIP @device_id = device_id unless device_id == SKIP @device_type = device_type unless device_type == SKIP @from_version = from_version unless from_version == SKIP @mac = mac unless mac == SKIP @mxcluster_id = mxcluster_id unless mxcluster_id == SKIP @mxedge_id = mxedge_id unless mxedge_id == SKIP @mxedge_name = mxedge_name unless mxedge_name == SKIP @org_id = org_id unless org_id == SKIP @package = package unless package == SKIP @service = service unless service == SKIP @severity = severity unless severity == SKIP @sys_info_usage = sys_info_usage unless sys_info_usage == SKIP @text = text unless text == SKIP @timestamp = unless == SKIP @to_version = to_version unless to_version == SKIP @type = type unless type == SKIP end |
Instance Attribute Details
#audit_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
14 15 16 |
# File 'lib/mist_api/models/mxedge_event.rb', line 14 def audit_id @audit_id end |
#component ⇒ String
Unique ID of the object instance in the Mist Organization
18 19 20 |
# File 'lib/mist_api/models/mxedge_event.rb', line 18 def component @component end |
#device_id ⇒ UUID | String
Device id
22 23 24 |
# File 'lib/mist_api/models/mxedge_event.rb', line 22 def device_id @device_id end |
#device_type ⇒ String
Device id
26 27 28 |
# File 'lib/mist_api/models/mxedge_event.rb', line 26 def device_type @device_type end |
#from_version ⇒ String
Device id
30 31 32 |
# File 'lib/mist_api/models/mxedge_event.rb', line 30 def from_version @from_version end |
#mac ⇒ String
Device id
34 35 36 |
# File 'lib/mist_api/models/mxedge_event.rb', line 34 def mac @mac end |
#mxcluster_id ⇒ String
Device id
38 39 40 |
# File 'lib/mist_api/models/mxedge_event.rb', line 38 def mxcluster_id @mxcluster_id end |
#mxedge_id ⇒ String
Device id
42 43 44 |
# File 'lib/mist_api/models/mxedge_event.rb', line 42 def mxedge_id @mxedge_id end |
#mxedge_name ⇒ String
Device id
46 47 48 |
# File 'lib/mist_api/models/mxedge_event.rb', line 46 def mxedge_name @mxedge_name end |
#org_id ⇒ UUID | String
Device id
50 51 52 |
# File 'lib/mist_api/models/mxedge_event.rb', line 50 def org_id @org_id end |
#package ⇒ String
Device id
54 55 56 |
# File 'lib/mist_api/models/mxedge_event.rb', line 54 def package @package end |
#service ⇒ String
Device id
58 59 60 |
# File 'lib/mist_api/models/mxedge_event.rb', line 58 def service @service end |
#severity ⇒ EventSeverityEnum
Device id
62 63 64 |
# File 'lib/mist_api/models/mxedge_event.rb', line 62 def severity @severity end |
#sys_info_usage ⇒ MxedgeEventSysInfo
Device id
66 67 68 |
# File 'lib/mist_api/models/mxedge_event.rb', line 66 def sys_info_usage @sys_info_usage end |
#text ⇒ String
Device id
70 71 72 |
# File 'lib/mist_api/models/mxedge_event.rb', line 70 def text @text end |
#timestamp ⇒ Float
Epoch (seconds)
74 75 76 |
# File 'lib/mist_api/models/mxedge_event.rb', line 74 def @timestamp end |
#to_version ⇒ String
Epoch (seconds)
78 79 80 |
# File 'lib/mist_api/models/mxedge_event.rb', line 78 def to_version @to_version end |
#type ⇒ String
Epoch (seconds)
82 83 84 |
# File 'lib/mist_api/models/mxedge_event.rb', line 82 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 209 210 |
# File 'lib/mist_api/models/mxedge_event.rb', line 167 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. audit_id = hash.key?('audit_id') ? hash['audit_id'] : SKIP component = hash.key?('component') ? hash['component'] : SKIP device_id = hash.key?('device_id') ? hash['device_id'] : SKIP device_type = hash.key?('device_type') ? hash['device_type'] : SKIP from_version = hash.key?('from_version') ? hash['from_version'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP mxcluster_id = hash.key?('mxcluster_id') ? hash['mxcluster_id'] : SKIP mxedge_id = hash.key?('mxedge_id') ? hash['mxedge_id'] : SKIP mxedge_name = hash.key?('mxedge_name') ? hash['mxedge_name'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP package = hash.key?('package') ? hash['package'] : SKIP service = hash.key?('service') ? hash['service'] : SKIP severity = hash.key?('severity') ? hash['severity'] : SKIP sys_info_usage = MxedgeEventSysInfo.from_hash(hash['sys_info.usage']) if hash['sys_info.usage'] text = hash.key?('text') ? hash['text'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP to_version = hash.key?('to_version') ? hash['to_version'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP # Create object from extracted values. MxedgeEvent.new(audit_id, component, device_id, device_type, from_version, mac, mxcluster_id, mxedge_id, mxedge_name, org_id, package, service, severity, sys_info_usage, text, , to_version, type) end |
.names ⇒ Object
A mapping from model property names to API property names.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/mist_api/models/mxedge_event.rb', line 85 def self.names @_hash = {} if @_hash.nil? @_hash['audit_id'] = 'audit_id' @_hash['component'] = 'component' @_hash['device_id'] = 'device_id' @_hash['device_type'] = 'device_type' @_hash['from_version'] = 'from_version' @_hash['mac'] = 'mac' @_hash['mxcluster_id'] = 'mxcluster_id' @_hash['mxedge_id'] = 'mxedge_id' @_hash['mxedge_name'] = 'mxedge_name' @_hash['org_id'] = 'org_id' @_hash['package'] = 'package' @_hash['service'] = 'service' @_hash['severity'] = 'severity' @_hash['sys_info_usage'] = 'sys_info.usage' @_hash['text'] = 'text' @_hash['timestamp'] = 'timestamp' @_hash['to_version'] = 'to_version' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
133 134 135 136 137 138 |
# File 'lib/mist_api/models/mxedge_event.rb', line 133 def self.nullables %w[ component device_id ] end |
.optionals ⇒ Object
An array for optional fields
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/mist_api/models/mxedge_event.rb', line 109 def self.optionals %w[ audit_id component device_id device_type from_version mac mxcluster_id mxedge_id mxedge_name org_id package service severity sys_info_usage text timestamp to_version type ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
214 215 216 217 218 219 220 |
# File 'lib/mist_api/models/mxedge_event.rb', line 214 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/mist_api/models/mxedge_event.rb', line 234 def inspect class_name = self.class.name.split('::').last "<#{class_name} audit_id: #{@audit_id.inspect}, component: #{@component.inspect},"\ " device_id: #{@device_id.inspect}, device_type: #{@device_type.inspect}, from_version:"\ " #{@from_version.inspect}, mac: #{@mac.inspect}, mxcluster_id: #{@mxcluster_id.inspect},"\ " mxedge_id: #{@mxedge_id.inspect}, mxedge_name: #{@mxedge_name.inspect}, org_id:"\ " #{@org_id.inspect}, package: #{@package.inspect}, service: #{@service.inspect}, severity:"\ " #{@severity.inspect}, sys_info_usage: #{@sys_info_usage.inspect}, text: #{@text.inspect},"\ " timestamp: #{@timestamp.inspect}, to_version: #{@to_version.inspect}, type:"\ " #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
223 224 225 226 227 228 229 230 231 |
# File 'lib/mist_api/models/mxedge_event.rb', line 223 def to_s class_name = self.class.name.split('::').last "<#{class_name} audit_id: #{@audit_id}, component: #{@component}, device_id: #{@device_id},"\ " device_type: #{@device_type}, from_version: #{@from_version}, mac: #{@mac}, mxcluster_id:"\ " #{@mxcluster_id}, mxedge_id: #{@mxedge_id}, mxedge_name: #{@mxedge_name}, org_id:"\ " #{@org_id}, package: #{@package}, service: #{@service}, severity: #{@severity},"\ " sys_info_usage: #{@sys_info_usage}, text: #{@text}, timestamp: #{@timestamp}, to_version:"\ " #{@to_version}, type: #{@type}>" end |