Class: MistApi::StatsWanClient

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

Overview

StatsWanClient 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(dhcp_expire_time = SKIP, dhcp_start_time = SKIP, hostname = SKIP, ip = SKIP, ip_src = SKIP, last_hostname = SKIP, last_ip = SKIP, mfg = SKIP, network = SKIP, org_id = SKIP, site_id = SKIP, timestamp = SKIP, wcid = SKIP) ⇒ StatsWanClient

Returns a new instance of StatsWanClient.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/mist_api/models/stats_wan_client.rb', line 107

def initialize(dhcp_expire_time = SKIP, dhcp_start_time = SKIP,
               hostname = SKIP, ip = SKIP, ip_src = SKIP,
               last_hostname = SKIP, last_ip = SKIP, mfg = SKIP,
               network = SKIP, org_id = SKIP, site_id = SKIP,
               timestamp = SKIP, wcid = SKIP)
  @dhcp_expire_time = dhcp_expire_time unless dhcp_expire_time == SKIP
  @dhcp_start_time = dhcp_start_time unless dhcp_start_time == SKIP
  @hostname = hostname unless hostname == SKIP
  @ip = ip unless ip == SKIP
  @ip_src = ip_src unless ip_src == SKIP
  @last_hostname = last_hostname unless last_hostname == SKIP
  @last_ip = last_ip unless last_ip == SKIP
  @mfg = mfg unless mfg == SKIP
  @network = network unless network == SKIP
  @org_id = org_id unless org_id == SKIP
  @site_id = site_id unless site_id == SKIP
  @timestamp = timestamp unless timestamp == SKIP
  @wcid = wcid unless wcid == SKIP
end

Instance Attribute Details

#dhcp_expire_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def dhcp_expire_time
  @dhcp_expire_time
end

#dhcp_start_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def dhcp_start_time
  @dhcp_start_time
end

#hostnameArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


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

def hostname
  @hostname
end

#ipArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


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

def ip
  @ip
end

#ip_srcString

TODO: Write general description for this method

Returns:

  • (String)


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

def ip_src
  @ip_src
end

#last_hostnameString

TODO: Write general description for this method

Returns:

  • (String)


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

def last_hostname
  @last_hostname
end

#last_ipString

TODO: Write general description for this method

Returns:

  • (String)


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

def last_ip
  @last_ip
end

#mfgString

TODO: Write general description for this method

Returns:

  • (String)


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

def mfg
  @mfg
end

#networkString

TODO: Write general description for this method

Returns:

  • (String)


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

def network
  @network
end

#org_idUUID | String

TODO: Write general description for this method

Returns:

  • (UUID | String)


50
51
52
# File 'lib/mist_api/models/stats_wan_client.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/stats_wan_client.rb', line 54

def site_id
  @site_id
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


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

def timestamp
  @timestamp
end

#wcidString

Epoch (seconds)

Returns:

  • (String)


62
63
64
# File 'lib/mist_api/models/stats_wan_client.rb', line 62

def wcid
  @wcid
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



128
129
130
131
132
133
134
135
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
# File 'lib/mist_api/models/stats_wan_client.rb', line 128

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  dhcp_expire_time =
    hash.key?('dhcp_expire_time') ? hash['dhcp_expire_time'] : SKIP
  dhcp_start_time =
    hash.key?('dhcp_start_time') ? hash['dhcp_start_time'] : SKIP
  hostname = hash.key?('hostname') ? hash['hostname'] : SKIP
  ip = hash.key?('ip') ? hash['ip'] : SKIP
  ip_src = hash.key?('ip_src') ? hash['ip_src'] : SKIP
  last_hostname = hash.key?('last_hostname') ? hash['last_hostname'] : SKIP
  last_ip = hash.key?('last_ip') ? hash['last_ip'] : SKIP
  mfg = hash.key?('mfg') ? hash['mfg'] : SKIP
  network = hash.key?('network') ? hash['network'] : 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
  wcid = hash.key?('wcid') ? hash['wcid'] : SKIP

  # Create object from extracted values.
  StatsWanClient.new(dhcp_expire_time,
                     dhcp_start_time,
                     hostname,
                     ip,
                     ip_src,
                     last_hostname,
                     last_ip,
                     mfg,
                     network,
                     org_id,
                     site_id,
                     timestamp,
                     wcid)
end

.namesObject

A mapping from model property names to API property names.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/mist_api/models/stats_wan_client.rb', line 65

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['dhcp_expire_time'] = 'dhcp_expire_time'
  @_hash['dhcp_start_time'] = 'dhcp_start_time'
  @_hash['hostname'] = 'hostname'
  @_hash['ip'] = 'ip'
  @_hash['ip_src'] = 'ip_src'
  @_hash['last_hostname'] = 'last_hostname'
  @_hash['last_ip'] = 'last_ip'
  @_hash['mfg'] = 'mfg'
  @_hash['network'] = 'network'
  @_hash['org_id'] = 'org_id'
  @_hash['site_id'] = 'site_id'
  @_hash['timestamp'] = 'timestamp'
  @_hash['wcid'] = 'wcid'
  @_hash
end

.nullablesObject

An array for nullable fields



103
104
105
# File 'lib/mist_api/models/stats_wan_client.rb', line 103

def self.nullables
  []
end

.optionalsObject

An array for optional fields



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/mist_api/models/stats_wan_client.rb', line 84

def self.optionals
  %w[
    dhcp_expire_time
    dhcp_start_time
    hostname
    ip
    ip_src
    last_hostname
    last_ip
    mfg
    network
    org_id
    site_id
    timestamp
    wcid
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



175
176
177
178
179
180
181
182
183
# File 'lib/mist_api/models/stats_wan_client.rb', line 175

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} dhcp_expire_time: #{@dhcp_expire_time.inspect}, dhcp_start_time:"\
  " #{@dhcp_start_time.inspect}, hostname: #{@hostname.inspect}, ip: #{@ip.inspect}, ip_src:"\
  " #{@ip_src.inspect}, last_hostname: #{@last_hostname.inspect}, last_ip:"\
  " #{@last_ip.inspect}, mfg: #{@mfg.inspect}, network: #{@network.inspect}, org_id:"\
  " #{@org_id.inspect}, site_id: #{@site_id.inspect}, timestamp: #{@timestamp.inspect}, wcid:"\
  " #{@wcid.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



165
166
167
168
169
170
171
172
# File 'lib/mist_api/models/stats_wan_client.rb', line 165

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} dhcp_expire_time: #{@dhcp_expire_time}, dhcp_start_time:"\
  " #{@dhcp_start_time}, hostname: #{@hostname}, ip: #{@ip}, ip_src: #{@ip_src},"\
  " last_hostname: #{@last_hostname}, last_ip: #{@last_ip}, mfg: #{@mfg}, network:"\
  " #{@network}, org_id: #{@org_id}, site_id: #{@site_id}, timestamp: #{@timestamp}, wcid:"\
  " #{@wcid}>"
end