Class: MistApi::WebhookClientLatencyEvent

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

Overview

WebhookClientLatencyEvent 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(avg_auth = SKIP, avg_dhcp = SKIP, avg_dns = SKIP, max_auth = SKIP, max_dhcp = SKIP, max_dns = SKIP, min_auth = SKIP, min_dhcp = SKIP, min_dns = SKIP, org_id = SKIP, site_id = SKIP, timestamp = SKIP) ⇒ WebhookClientLatencyEvent

Returns a new instance of WebhookClientLatencyEvent.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/mist_api/models/webhook_client_latency_event.rb', line 101

def initialize(avg_auth = SKIP, avg_dhcp = SKIP, avg_dns = SKIP,
               max_auth = SKIP, max_dhcp = SKIP, max_dns = SKIP,
               min_auth = SKIP, min_dhcp = SKIP, min_dns = SKIP,
               org_id = SKIP, site_id = SKIP, timestamp = SKIP)
  @avg_auth = avg_auth unless avg_auth == SKIP
  @avg_dhcp = avg_dhcp unless avg_dhcp == SKIP
  @avg_dns = avg_dns unless avg_dns == SKIP
  @max_auth = max_auth unless max_auth == SKIP
  @max_dhcp = max_dhcp unless max_dhcp == SKIP
  @max_dns = max_dns unless max_dns == SKIP
  @min_auth = min_auth unless min_auth == SKIP
  @min_dhcp = min_dhcp unless min_dhcp == SKIP
  @min_dns = min_dns unless min_dns == SKIP
  @org_id = org_id unless org_id == SKIP
  @site_id = site_id unless site_id == SKIP
  @timestamp = timestamp unless timestamp == SKIP
end

Instance Attribute Details

#avg_authFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def avg_auth
  @avg_auth
end

#avg_dhcpFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def avg_dhcp
  @avg_dhcp
end

#avg_dnsFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def avg_dns
  @avg_dns
end

#max_authFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def max_auth
  @max_auth
end

#max_dhcpFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def max_dhcp
  @max_dhcp
end

#max_dnsFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def max_dns
  @max_dns
end

#min_authFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def min_auth
  @min_auth
end

#min_dhcpFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def min_dhcp
  @min_dhcp
end

#min_dnsFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def min_dns
  @min_dns
end

#org_idUUID | String

TODO: Write general description for this method

Returns:

  • (UUID | String)


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

def org_id
  @org_id
end

#site_idUUID | String

TODO: Write general description for this method

Returns:

  • (UUID | String)


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

def site_id
  @site_id
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


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

def timestamp
  @timestamp
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/webhook_client_latency_event.rb', line 120

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  avg_auth = hash.key?('avg_auth') ? hash['avg_auth'] : SKIP
  avg_dhcp = hash.key?('avg_dhcp') ? hash['avg_dhcp'] : SKIP
  avg_dns = hash.key?('avg_dns') ? hash['avg_dns'] : SKIP
  max_auth = hash.key?('max_auth') ? hash['max_auth'] : SKIP
  max_dhcp = hash.key?('max_dhcp') ? hash['max_dhcp'] : SKIP
  max_dns = hash.key?('max_dns') ? hash['max_dns'] : SKIP
  min_auth = hash.key?('min_auth') ? hash['min_auth'] : SKIP
  min_dhcp = hash.key?('min_dhcp') ? hash['min_dhcp'] : SKIP
  min_dns = hash.key?('min_dns') ? hash['min_dns'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP

  # Create object from extracted values.
  WebhookClientLatencyEvent.new(avg_auth,
                                avg_dhcp,
                                avg_dns,
                                max_auth,
                                max_dhcp,
                                max_dns,
                                min_auth,
                                min_dhcp,
                                min_dns,
                                org_id,
                                site_id,
                                timestamp)
end

.namesObject

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/webhook_client_latency_event.rb', line 61

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['avg_auth'] = 'avg_auth'
  @_hash['avg_dhcp'] = 'avg_dhcp'
  @_hash['avg_dns'] = 'avg_dns'
  @_hash['max_auth'] = 'max_auth'
  @_hash['max_dhcp'] = 'max_dhcp'
  @_hash['max_dns'] = 'max_dns'
  @_hash['min_auth'] = 'min_auth'
  @_hash['min_dhcp'] = 'min_dhcp'
  @_hash['min_dns'] = 'min_dns'
  @_hash['org_id'] = 'org_id'
  @_hash['site_id'] = 'site_id'
  @_hash['timestamp'] = 'timestamp'
  @_hash
end

.nullablesObject

An array for nullable fields



97
98
99
# File 'lib/mist_api/models/webhook_client_latency_event.rb', line 97

def self.nullables
  []
end

.optionalsObject

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/webhook_client_latency_event.rb', line 79

def self.optionals
  %w[
    avg_auth
    avg_dhcp
    avg_dns
    max_auth
    max_dhcp
    max_dns
    min_auth
    min_dhcp
    min_dns
    org_id
    site_id
    timestamp
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



154
155
156
157
158
159
160
# File 'lib/mist_api/models/webhook_client_latency_event.rb', line 154

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} avg_auth: #{@avg_auth.inspect}, avg_dhcp: #{@avg_dhcp.inspect}, avg_dns:"\
  " #{@avg_dns.inspect}, max_auth: #{@max_auth.inspect}, max_dhcp: #{@max_dhcp.inspect},"\
  " max_dns: #{@max_dns.inspect}, min_auth: #{@min_auth.inspect}, min_dhcp:"\
  " #{@min_dhcp.inspect}, min_dns: #{@min_dns.inspect}, org_id: #{@org_id.inspect}, site_id:"\
  " #{@site_id.inspect}, timestamp: #{@timestamp.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



163
164
165
166
167
168
169
# File 'lib/mist_api/models/webhook_client_latency_event.rb', line 163

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} avg_auth: #{@avg_auth}, avg_dhcp: #{@avg_dhcp}, avg_dns: #{@avg_dns},"\
  " max_auth: #{@max_auth}, max_dhcp: #{@max_dhcp}, max_dns: #{@max_dns}, min_auth:"\
  " #{@min_auth}, min_dhcp: #{@min_dhcp}, min_dns: #{@min_dns}, org_id: #{@org_id}, site_id:"\
  " #{@site_id}, timestamp: #{@timestamp}>"
end