Class: MistApi::ServicePathEvent
- Defined in:
- lib/mist_api/models/service_path_event.rb
Overview
ServicePathEvent Model.
Instance Attribute Summary collapse
-
#mac ⇒ String
TODO: Write general description for this method.
-
#model ⇒ String
TODO: Write general description for this method.
-
#org_id ⇒ UUID | String
TODO: Write general description for this method.
-
#policy ⇒ String
TODO: Write general description for this method.
-
#port_id ⇒ String
TODO: Write general description for this method.
-
#site_id ⇒ UUID | String
TODO: Write general description for this method.
-
#text ⇒ String
TODO: Write general description for this method.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#type ⇒ String
Epoch (seconds).
-
#version ⇒ String
Epoch (seconds).
-
#vpn_name ⇒ String
Epoch (seconds).
-
#vpn_path ⇒ 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.
Instance Method Summary collapse
-
#initialize(mac = SKIP, model = SKIP, org_id = SKIP, policy = SKIP, port_id = SKIP, site_id = SKIP, text = SKIP, timestamp = SKIP, type = SKIP, version = SKIP, vpn_name = SKIP, vpn_path = SKIP) ⇒ ServicePathEvent
constructor
A new instance of ServicePathEvent.
-
#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(mac = SKIP, model = SKIP, org_id = SKIP, policy = SKIP, port_id = SKIP, site_id = SKIP, text = SKIP, timestamp = SKIP, type = SKIP, version = SKIP, vpn_name = SKIP, vpn_path = SKIP) ⇒ ServicePathEvent
Returns a new instance of ServicePathEvent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/mist_api/models/service_path_event.rb', line 101 def initialize(mac = SKIP, model = SKIP, org_id = SKIP, policy = SKIP, port_id = SKIP, site_id = SKIP, text = SKIP, = SKIP, type = SKIP, version = SKIP, vpn_name = SKIP, vpn_path = SKIP) @mac = mac unless mac == SKIP @model = model unless model == SKIP @org_id = org_id unless org_id == SKIP @policy = policy unless policy == SKIP @port_id = port_id unless port_id == SKIP @site_id = site_id unless site_id == SKIP @text = text unless text == SKIP @timestamp = unless == SKIP @type = type unless type == SKIP @version = version unless version == SKIP @vpn_name = vpn_name unless vpn_name == SKIP @vpn_path = vpn_path unless vpn_path == SKIP end |
Instance Attribute Details
#mac ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/service_path_event.rb', line 14 def mac @mac end |
#model ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/service_path_event.rb', line 18 def model @model end |
#org_id ⇒ UUID | String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/service_path_event.rb', line 22 def org_id @org_id end |
#policy ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/service_path_event.rb', line 26 def policy @policy end |
#port_id ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/service_path_event.rb', line 30 def port_id @port_id end |
#site_id ⇒ UUID | String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/service_path_event.rb', line 34 def site_id @site_id end |
#text ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/service_path_event.rb', line 38 def text @text end |
#timestamp ⇒ Float
Epoch (seconds)
42 43 44 |
# File 'lib/mist_api/models/service_path_event.rb', line 42 def @timestamp end |
#type ⇒ String
Epoch (seconds)
46 47 48 |
# File 'lib/mist_api/models/service_path_event.rb', line 46 def type @type end |
#version ⇒ String
Epoch (seconds)
50 51 52 |
# File 'lib/mist_api/models/service_path_event.rb', line 50 def version @version end |
#vpn_name ⇒ String
Epoch (seconds)
54 55 56 |
# File 'lib/mist_api/models/service_path_event.rb', line 54 def vpn_name @vpn_name end |
#vpn_path ⇒ String
Epoch (seconds)
58 59 60 |
# File 'lib/mist_api/models/service_path_event.rb', line 58 def vpn_path @vpn_path end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/mist_api/models/service_path_event.rb', line 120 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mac = hash.key?('mac') ? hash['mac'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP policy = hash.key?('policy') ? hash['policy'] : SKIP port_id = hash.key?('port_id') ? hash['port_id'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP text = hash.key?('text') ? hash['text'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP vpn_name = hash.key?('vpn_name') ? hash['vpn_name'] : SKIP vpn_path = hash.key?('vpn_path') ? hash['vpn_path'] : SKIP # Create object from extracted values. ServicePathEvent.new(mac, model, org_id, policy, port_id, site_id, text, , type, version, vpn_name, vpn_path) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/service_path_event.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['mac'] = 'mac' @_hash['model'] = 'model' @_hash['org_id'] = 'org_id' @_hash['policy'] = 'policy' @_hash['port_id'] = 'port_id' @_hash['site_id'] = 'site_id' @_hash['text'] = 'text' @_hash['timestamp'] = 'timestamp' @_hash['type'] = 'type' @_hash['version'] = 'version' @_hash['vpn_name'] = 'vpn_name' @_hash['vpn_path'] = 'vpn_path' @_hash end |
.nullables ⇒ Object
An array for nullable fields
97 98 99 |
# File 'lib/mist_api/models/service_path_event.rb', line 97 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/service_path_event.rb', line 79 def self.optionals %w[ mac model org_id policy port_id site_id text timestamp type version vpn_name vpn_path ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
161 162 163 164 165 166 167 |
# File 'lib/mist_api/models/service_path_event.rb', line 161 def inspect class_name = self.class.name.split('::').last "<#{class_name} mac: #{@mac.inspect}, model: #{@model.inspect}, org_id: #{@org_id.inspect},"\ " policy: #{@policy.inspect}, port_id: #{@port_id.inspect}, site_id: #{@site_id.inspect},"\ " text: #{@text.inspect}, timestamp: #{@timestamp.inspect}, type: #{@type.inspect}, version:"\ " #{@version.inspect}, vpn_name: #{@vpn_name.inspect}, vpn_path: #{@vpn_path.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
153 154 155 156 157 158 |
# File 'lib/mist_api/models/service_path_event.rb', line 153 def to_s class_name = self.class.name.split('::').last "<#{class_name} mac: #{@mac}, model: #{@model}, org_id: #{@org_id}, policy: #{@policy},"\ " port_id: #{@port_id}, site_id: #{@site_id}, text: #{@text}, timestamp: #{@timestamp},"\ " type: #{@type}, version: #{@version}, vpn_name: #{@vpn_name}, vpn_path: #{@vpn_path}>" end |