Class: MistApi::SearchMxedge

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

Overview

SearchMxedge 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(distro = SKIP, last_seen = SKIP, model = SKIP, mxcluster_id = SKIP, mxedge_id = SKIP, name = SKIP, org_id = SKIP, site_id = SKIP, tunterm_version = SKIP, uptime = SKIP) ⇒ SearchMxedge

Returns a new instance of SearchMxedge.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/mist_api/models/search_mxedge.rb', line 89

def initialize(distro = SKIP, last_seen = SKIP, model = SKIP,
               mxcluster_id = SKIP, mxedge_id = SKIP, name = SKIP,
               org_id = SKIP, site_id = SKIP, tunterm_version = SKIP,
               uptime = SKIP)
  @distro = distro unless distro == SKIP
  @last_seen = last_seen unless last_seen == SKIP
  @model = model unless model == SKIP
  @mxcluster_id = mxcluster_id unless mxcluster_id == SKIP
  @mxedge_id = mxedge_id unless mxedge_id == SKIP
  @name = name unless name == SKIP
  @org_id = org_id unless org_id == SKIP
  @site_id = site_id unless site_id == SKIP
  @tunterm_version = tunterm_version unless tunterm_version == SKIP
  @uptime = uptime unless uptime == SKIP
end

Instance Attribute Details

#distroString

TODO: Write general description for this method

Returns:

  • (String)


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

def distro
  @distro
end

#last_seenFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def last_seen
  @last_seen
end

#modelString

TODO: Write general description for this method

Returns:

  • (String)


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

def model
  @model
end

#mxcluster_idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def mxcluster_id
  @mxcluster_id
end

#mxedge_idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def mxedge_id
  @mxedge_id
end

#nameString

The name of the tunnel

Returns:

  • (String)


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

def name
  @name
end

#org_idUUID | String

The name of the tunnel

Returns:

  • (UUID | String)


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

def org_id
  @org_id
end

#site_idUUID | String

The name of the tunnel

Returns:

  • (UUID | String)


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

def site_id
  @site_id
end

#tunterm_versionString

The name of the tunnel

Returns:

  • (String)


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

def tunterm_version
  @tunterm_version
end

#uptimeInteger

The name of the tunnel

Returns:

  • (Integer)


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

def uptime
  @uptime
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/mist_api/models/search_mxedge.rb', line 106

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  distro = hash.key?('distro') ? hash['distro'] : SKIP
  last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  mxcluster_id = hash.key?('mxcluster_id') ? hash['mxcluster_id'] : SKIP
  mxedge_id = hash.key?('mxedge_id') ? hash['mxedge_id'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  tunterm_version =
    hash.key?('tunterm_version') ? hash['tunterm_version'] : SKIP
  uptime = hash.key?('uptime') ? hash['uptime'] : SKIP

  # Create object from extracted values.
  SearchMxedge.new(distro,
                   last_seen,
                   model,
                   mxcluster_id,
                   mxedge_id,
                   name,
                   org_id,
                   site_id,
                   tunterm_version,
                   uptime)
end

.namesObject

A mapping from model property names to API property names.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/mist_api/models/search_mxedge.rb', line 53

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['distro'] = 'distro'
  @_hash['last_seen'] = 'last_seen'
  @_hash['model'] = 'model'
  @_hash['mxcluster_id'] = 'mxcluster_id'
  @_hash['mxedge_id'] = 'mxedge_id'
  @_hash['name'] = 'name'
  @_hash['org_id'] = 'org_id'
  @_hash['site_id'] = 'site_id'
  @_hash['tunterm_version'] = 'tunterm_version'
  @_hash['uptime'] = 'uptime'
  @_hash
end

.nullablesObject

An array for nullable fields



85
86
87
# File 'lib/mist_api/models/search_mxedge.rb', line 85

def self.nullables
  []
end

.optionalsObject

An array for optional fields



69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/mist_api/models/search_mxedge.rb', line 69

def self.optionals
  %w[
    distro
    last_seen
    model
    mxcluster_id
    mxedge_id
    name
    org_id
    site_id
    tunterm_version
    uptime
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



145
146
147
148
149
150
151
152
# File 'lib/mist_api/models/search_mxedge.rb', line 145

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} distro: #{@distro.inspect}, last_seen: #{@last_seen.inspect}, model:"\
  " #{@model.inspect}, mxcluster_id: #{@mxcluster_id.inspect}, mxedge_id:"\
  " #{@mxedge_id.inspect}, name: #{@name.inspect}, org_id: #{@org_id.inspect}, site_id:"\
  " #{@site_id.inspect}, tunterm_version: #{@tunterm_version.inspect}, uptime:"\
  " #{@uptime.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



136
137
138
139
140
141
142
# File 'lib/mist_api/models/search_mxedge.rb', line 136

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} distro: #{@distro}, last_seen: #{@last_seen}, model: #{@model},"\
  " mxcluster_id: #{@mxcluster_id}, mxedge_id: #{@mxedge_id}, name: #{@name}, org_id:"\
  " #{@org_id}, site_id: #{@site_id}, tunterm_version: #{@tunterm_version}, uptime:"\
  " #{@uptime}>"
end