Class: MistApi::ResponseSiteSearchItem

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

Overview

ResponseSiteSearchItem 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(auto_upgrade_enabled = nil, auto_upgrade_version = nil, honeypot_enabled = nil, id = nil, name = nil, org_id = nil, site_id = nil, timestamp = nil, timezone = nil, vna_enabled = nil, wifi_enabled = nil, country_code = SKIP) ⇒ ResponseSiteSearchItem

Returns a new instance of ResponseSiteSearchItem.



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/mist_api/models/response_site_search_item.rb', line 92

def initialize(auto_upgrade_enabled = nil, auto_upgrade_version = nil,
               honeypot_enabled = nil, id = nil, name = nil, org_id = nil,
               site_id = nil, timestamp = nil, timezone = nil,
               vna_enabled = nil, wifi_enabled = nil, country_code = SKIP)
  @auto_upgrade_enabled = auto_upgrade_enabled
  @auto_upgrade_version = auto_upgrade_version
  @country_code = country_code unless country_code == SKIP
  @honeypot_enabled = honeypot_enabled
  @id = id
  @name = name
  @org_id = org_id
  @site_id = site_id
  @timestamp = timestamp
  @timezone = timezone
  @vna_enabled = vna_enabled
  @wifi_enabled = wifi_enabled
end

Instance Attribute Details

#auto_upgrade_enabledTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


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

def auto_upgrade_enabled
  @auto_upgrade_enabled
end

#auto_upgrade_versionString

TODO: Write general description for this method

Returns:

  • (String)


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

def auto_upgrade_version
  @auto_upgrade_version
end

#country_codeString

TODO: Write general description for this method

Returns:

  • (String)


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

def country_code
  @country_code
end

#honeypot_enabledTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


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

def honeypot_enabled
  @honeypot_enabled
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def id
  @id
end

#nameString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


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

def name
  @name
end

#org_idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def org_id
  @org_id
end

#site_idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def site_id
  @site_id
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


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

def timestamp
  @timestamp
end

#timezoneString

Epoch (seconds)

Returns:

  • (String)


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

def timezone
  @timezone
end

#vna_enabledTrueClass | FalseClass

Epoch (seconds)

Returns:

  • (TrueClass | FalseClass)


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

def vna_enabled
  @vna_enabled
end

#wifi_enabledTrueClass | FalseClass

Epoch (seconds)

Returns:

  • (TrueClass | FalseClass)


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

def wifi_enabled
  @wifi_enabled
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



111
112
113
114
115
116
117
118
119
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
# File 'lib/mist_api/models/response_site_search_item.rb', line 111

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  auto_upgrade_enabled =
    hash.key?('auto_upgrade_enabled') ? hash['auto_upgrade_enabled'] : nil
  auto_upgrade_version =
    hash.key?('auto_upgrade_version') ? hash['auto_upgrade_version'] : nil
  honeypot_enabled =
    hash.key?('honeypot_enabled') ? hash['honeypot_enabled'] : nil
  id = hash.key?('id') ? hash['id'] : nil
  name = hash.key?('name') ? hash['name'] : nil
  org_id = hash.key?('org_id') ? hash['org_id'] : nil
  site_id = hash.key?('site_id') ? hash['site_id'] : nil
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : nil
  timezone = hash.key?('timezone') ? hash['timezone'] : nil
  vna_enabled = hash.key?('vna_enabled') ? hash['vna_enabled'] : nil
  wifi_enabled = hash.key?('wifi_enabled') ? hash['wifi_enabled'] : nil
  country_code = hash.key?('country_code') ? hash['country_code'] : SKIP

  # Create object from extracted values.
  ResponseSiteSearchItem.new(auto_upgrade_enabled,
                             auto_upgrade_version,
                             honeypot_enabled,
                             id,
                             name,
                             org_id,
                             site_id,
                             timestamp,
                             timezone,
                             vna_enabled,
                             wifi_enabled,
                             country_code)
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/response_site_search_item.rb', line 61

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['auto_upgrade_enabled'] = 'auto_upgrade_enabled'
  @_hash['auto_upgrade_version'] = 'auto_upgrade_version'
  @_hash['country_code'] = 'country_code'
  @_hash['honeypot_enabled'] = 'honeypot_enabled'
  @_hash['id'] = 'id'
  @_hash['name'] = 'name'
  @_hash['org_id'] = 'org_id'
  @_hash['site_id'] = 'site_id'
  @_hash['timestamp'] = 'timestamp'
  @_hash['timezone'] = 'timezone'
  @_hash['vna_enabled'] = 'vna_enabled'
  @_hash['wifi_enabled'] = 'wifi_enabled'
  @_hash
end

.nullablesObject

An array for nullable fields



86
87
88
89
90
# File 'lib/mist_api/models/response_site_search_item.rb', line 86

def self.nullables
  %w[
    country_code
  ]
end

.optionalsObject

An array for optional fields



79
80
81
82
83
# File 'lib/mist_api/models/response_site_search_item.rb', line 79

def self.optionals
  %w[
    country_code
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



157
158
159
160
161
162
163
164
165
# File 'lib/mist_api/models/response_site_search_item.rb', line 157

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} auto_upgrade_enabled: #{@auto_upgrade_enabled.inspect},"\
  " auto_upgrade_version: #{@auto_upgrade_version.inspect}, country_code:"\
  " #{@country_code.inspect}, honeypot_enabled: #{@honeypot_enabled.inspect}, id:"\
  " #{@id.inspect}, name: #{@name.inspect}, org_id: #{@org_id.inspect}, site_id:"\
  " #{@site_id.inspect}, timestamp: #{@timestamp.inspect}, timezone: #{@timezone.inspect},"\
  " vna_enabled: #{@vna_enabled.inspect}, wifi_enabled: #{@wifi_enabled.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



147
148
149
150
151
152
153
154
# File 'lib/mist_api/models/response_site_search_item.rb', line 147

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} auto_upgrade_enabled: #{@auto_upgrade_enabled}, auto_upgrade_version:"\
  " #{@auto_upgrade_version}, country_code: #{@country_code}, honeypot_enabled:"\
  " #{@honeypot_enabled}, id: #{@id}, name: #{@name}, org_id: #{@org_id}, site_id:"\
  " #{@site_id}, timestamp: #{@timestamp}, timezone: #{@timezone}, vna_enabled:"\
  " #{@vna_enabled}, wifi_enabled: #{@wifi_enabled}>"
end