Class: MistApi::EvpnTopologyResponse

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

Overview

EvpnTopologyResponse 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(created_time = SKIP, evpn_options = SKIP, for_site = SKIP, id = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, overwrite = SKIP, pod_names = SKIP, site_id = SKIP) ⇒ EvpnTopologyResponse

Returns a new instance of EvpnTopologyResponse.



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

def initialize(created_time = SKIP, evpn_options = SKIP, for_site = SKIP,
               id = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP,
               overwrite = SKIP, pod_names = SKIP, site_id = SKIP)
  @created_time = created_time unless created_time == SKIP
  @evpn_options = evpn_options unless evpn_options == SKIP
  @for_site = for_site unless for_site == SKIP
  @id = id unless id == SKIP
  @modified_time = modified_time unless modified_time == SKIP
  @name = name unless name == SKIP
  @org_id = org_id unless org_id == SKIP
  @overwrite = overwrite unless overwrite == SKIP
  @pod_names = pod_names unless pod_names == SKIP
  @site_id = site_id unless site_id == SKIP
end

Instance Attribute Details

#created_timeFloat

When the object has been created, in epoch

Returns:

  • (Float)


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

def created_time
  @created_time
end

#evpn_optionsEvpnOptions

EVPN Options

Returns:



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

def evpn_options
  @evpn_options
end

#for_siteTrueClass | FalseClass

EVPN Options

Returns:

  • (TrueClass | FalseClass)


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

def for_site
  @for_site
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def id
  @id
end

#modified_timeFloat

When the object has been modified for the last time, in epoch

Returns:

  • (Float)


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

def modified_time
  @modified_time
end

#nameString

When the object has been modified for the last time, in epoch

Returns:

  • (String)


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

def name
  @name
end

#org_idUUID | String

When the object has been modified for the last time, in epoch

Returns:

  • (UUID | String)


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

def org_id
  @org_id
end

#overwriteTrueClass | FalseClass

When the object has been modified for the last time, in epoch

Returns:

  • (TrueClass | FalseClass)


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

def overwrite
  @overwrite
end

#pod_namesHash[String, String]

Property key is the pod number

Returns:

  • (Hash[String, String])


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

def pod_names
  @pod_names
end

#site_idUUID | String

Property key is the pod number

Returns:

  • (UUID | String)


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

def site_id
  @site_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



105
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
# File 'lib/mist_api/models/evpn_topology_response.rb', line 105

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  created_time = hash.key?('created_time') ? hash['created_time'] : SKIP
  evpn_options = EvpnOptions.from_hash(hash['evpn_options']) if hash['evpn_options']
  for_site = hash.key?('for_site') ? hash['for_site'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  overwrite = hash.key?('overwrite') ? hash['overwrite'] : SKIP
  pod_names = hash.key?('pod_names') ? hash['pod_names'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP

  # Create object from extracted values.
  EvpnTopologyResponse.new(created_time,
                           evpn_options,
                           for_site,
                           id,
                           modified_time,
                           name,
                           org_id,
                           overwrite,
                           pod_names,
                           site_id)
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/evpn_topology_response.rb', line 53

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['created_time'] = 'created_time'
  @_hash['evpn_options'] = 'evpn_options'
  @_hash['for_site'] = 'for_site'
  @_hash['id'] = 'id'
  @_hash['modified_time'] = 'modified_time'
  @_hash['name'] = 'name'
  @_hash['org_id'] = 'org_id'
  @_hash['overwrite'] = 'overwrite'
  @_hash['pod_names'] = 'pod_names'
  @_hash['site_id'] = 'site_id'
  @_hash
end

.nullablesObject

An array for nullable fields



85
86
87
# File 'lib/mist_api/models/evpn_topology_response.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/evpn_topology_response.rb', line 69

def self.optionals
  %w[
    created_time
    evpn_options
    for_site
    id
    modified_time
    name
    org_id
    overwrite
    pod_names
    site_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



142
143
144
145
146
147
148
149
# File 'lib/mist_api/models/evpn_topology_response.rb', line 142

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} created_time: #{@created_time.inspect}, evpn_options:"\
  " #{@evpn_options.inspect}, for_site: #{@for_site.inspect}, id: #{@id.inspect},"\
  " modified_time: #{@modified_time.inspect}, name: #{@name.inspect}, org_id:"\
  " #{@org_id.inspect}, overwrite: #{@overwrite.inspect}, pod_names: #{@pod_names.inspect},"\
  " site_id: #{@site_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



134
135
136
137
138
139
# File 'lib/mist_api/models/evpn_topology_response.rb', line 134

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} created_time: #{@created_time}, evpn_options: #{@evpn_options}, for_site:"\
  " #{@for_site}, id: #{@id}, modified_time: #{@modified_time}, name: #{@name}, org_id:"\
  " #{@org_id}, overwrite: #{@overwrite}, pod_names: #{@pod_names}, site_id: #{@site_id}>"
end