Class: NetboxClientRuby::IPAM::VlanStatus
- Inherits:
-
Object
- Object
- NetboxClientRuby::IPAM::VlanStatus
- Defined in:
- lib/netbox_client_ruby/api/ipam/vlan.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(status_value) ⇒ VlanStatus
constructor
A new instance of VlanStatus.
Constructor Details
#initialize(status_value) ⇒ VlanStatus
Returns a new instance of VlanStatus.
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/netbox_client_ruby/api/ipam/vlan.rb', line 29 def initialize(status_value) @value = status_value @label = case status_value when 1 then 'Active'.freeze when 2 then 'Reserved'.freeze when 3 then 'Deprecated'.freeze else 'UNDEFINED'.freeze end end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
27 28 29 |
# File 'lib/netbox_client_ruby/api/ipam/vlan.rb', line 27 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
27 28 29 |
# File 'lib/netbox_client_ruby/api/ipam/vlan.rb', line 27 def value @value end |