Class: MistApi::WebhookClientInfoEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookClientInfoEvent
- Defined in:
- lib/mist_api/models/webhook_client_info_event.rb
Overview
WebhookClientInfoEvent Model.
Instance Attribute Summary collapse
-
#hostname ⇒ String
Hostname of client.
-
#ip ⇒ String
IP address of client.
-
#mac ⇒ String
client’s MAC Address.
-
#org_id ⇒ UUID | String
client’s MAC Address.
-
#site_id ⇒ UUID | String
client’s MAC Address.
-
#timestamp ⇒ Float
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(hostname = SKIP, ip = SKIP, mac = SKIP, org_id = SKIP, site_id = SKIP, timestamp = SKIP) ⇒ WebhookClientInfoEvent
constructor
A new instance of WebhookClientInfoEvent.
-
#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(hostname = SKIP, ip = SKIP, mac = SKIP, org_id = SKIP, site_id = SKIP, timestamp = SKIP) ⇒ WebhookClientInfoEvent
Returns a new instance of WebhookClientInfoEvent.
65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 65 def initialize(hostname = SKIP, ip = SKIP, mac = SKIP, org_id = SKIP, site_id = SKIP, = SKIP) @hostname = hostname unless hostname == SKIP @ip = ip unless ip == SKIP @mac = mac unless mac == SKIP @org_id = org_id unless org_id == SKIP @site_id = site_id unless site_id == SKIP @timestamp = unless == SKIP end |
Instance Attribute Details
#hostname ⇒ String
Hostname of client
14 15 16 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 14 def hostname @hostname end |
#ip ⇒ String
IP address of client
18 19 20 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 18 def ip @ip end |
#mac ⇒ String
client’s MAC Address
22 23 24 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 22 def mac @mac end |
#org_id ⇒ UUID | String
client’s MAC Address
26 27 28 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 26 def org_id @org_id end |
#site_id ⇒ UUID | String
client’s MAC Address
30 31 32 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 30 def site_id @site_id end |
#timestamp ⇒ Float
Epoch (seconds)
34 35 36 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 34 def @timestamp end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. hostname = hash.key?('hostname') ? hash['hostname'] : SKIP ip = hash.key?('ip') ? hash['ip'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP # Create object from extracted values. WebhookClientInfoEvent.new(hostname, ip, mac, org_id, site_id, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['hostname'] = 'hostname' @_hash['ip'] = 'ip' @_hash['mac'] = 'mac' @_hash['org_id'] = 'org_id' @_hash['site_id'] = 'site_id' @_hash['timestamp'] = 'timestamp' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 49 def self.optionals %w[ hostname ip mac org_id site_id timestamp ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
98 99 100 101 102 103 104 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 98 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.
114 115 116 117 118 119 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} hostname: #{@hostname.inspect}, ip: #{@ip.inspect}, mac: #{@mac.inspect},"\ " org_id: #{@org_id.inspect}, site_id: #{@site_id.inspect}, timestamp:"\ " #{@timestamp.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
107 108 109 110 111 |
# File 'lib/mist_api/models/webhook_client_info_event.rb', line 107 def to_s class_name = self.class.name.split('::').last "<#{class_name} hostname: #{@hostname}, ip: #{@ip}, mac: #{@mac}, org_id: #{@org_id},"\ " site_id: #{@site_id}, timestamp: #{@timestamp}>" end |