Class: UntitledApi::ApiV1OrgsStatsOtherdevicesResponse1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb

Overview

ApiV1OrgsStatsOtherdevicesResponse1 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(vendor = SKIP, mac = SKIP, uptime = SKIP, last_seen = SKIP, version = SKIP, vendor_specific = SKIP, cached_stats = SKIP) ⇒ ApiV1OrgsStatsOtherdevicesResponse1

Returns a new instance of ApiV1OrgsStatsOtherdevicesResponse1.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 71

def initialize(vendor = SKIP,
               mac = SKIP,
               uptime = SKIP,
               last_seen = SKIP,
               version = SKIP,
               vendor_specific = SKIP,
               cached_stats = SKIP)
  @vendor = vendor unless vendor == SKIP
  @mac = mac unless mac == SKIP
  @uptime = uptime unless uptime == SKIP
  @last_seen = last_seen unless last_seen == SKIP
  @version = version unless version == SKIP
  @vendor_specific = vendor_specific unless vendor_specific == SKIP
  @cached_stats = cached_stats unless cached_stats == SKIP
end

Instance Attribute Details

#cached_statsObject

TODO: Write general description for this method

Returns:

  • (Object)


38
39
40
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 38

def cached_stats
  @cached_stats
end

#last_seenFloat

TODO: Write general description for this method

Returns:

  • (Float)


26
27
28
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 26

def last_seen
  @last_seen
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 18

def mac
  @mac
end

#uptimeFloat

TODO: Write general description for this method

Returns:

  • (Float)


22
23
24
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 22

def uptime
  @uptime
end

#vendorString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 14

def vendor
  @vendor
end

#vendor_specificObject

TODO: Write general description for this method

Returns:

  • (Object)


34
35
36
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 34

def vendor_specific
  @vendor_specific
end

#versionString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 30

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 88

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  vendor = hash.key?('vendor') ? hash['vendor'] : SKIP
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  uptime = hash.key?('uptime') ? hash['uptime'] : SKIP
  last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP
  version = hash.key?('version') ? hash['version'] : SKIP
  vendor_specific =
    hash.key?('vendor_specific') ? hash['vendor_specific'] : SKIP
  cached_stats = hash.key?('cached_stats') ? hash['cached_stats'] : SKIP

  # Create object from extracted values.
  ApiV1OrgsStatsOtherdevicesResponse1.new(vendor,
                                          mac,
                                          uptime,
                                          last_seen,
                                          version,
                                          vendor_specific,
                                          cached_stats)
end

.namesObject

A mapping from model property names to API property names.



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 41

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['vendor'] = 'vendor'
  @_hash['mac'] = 'mac'
  @_hash['uptime'] = 'uptime'
  @_hash['last_seen'] = 'last_seen'
  @_hash['version'] = 'version'
  @_hash['vendor_specific'] = 'vendor_specific'
  @_hash['cached_stats'] = 'cached_stats'
  @_hash
end

.nullablesObject

An array for nullable fields



67
68
69
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 67

def self.nullables
  []
end

.optionalsObject

An array for optional fields



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/untitled_api/models/api_v1_orgs_stats_otherdevices_response1.rb', line 54

def self.optionals
  %w[
    vendor
    mac
    uptime
    last_seen
    version
    vendor_specific
    cached_stats
  ]
end