Class: Svix::SinkStatus
- Inherits:
-
Object
- Object
- Svix::SinkStatus
- Defined in:
- lib/svix/models/sink_status.rb
Constant Summary collapse
- ENABLED =
"enabled".freeze
- PAUSED =
"paused".freeze
- DISABLED =
"disabled".freeze
- RETRYING =
"retrying".freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ SinkStatus
constructor
A new instance of SinkStatus.
- #serialize ⇒ Object
Constructor Details
#initialize(value) ⇒ SinkStatus
Returns a new instance of SinkStatus.
14 15 16 17 18 19 20 |
# File 'lib/svix/models/sink_status.rb', line 14 def initialize(value) unless SinkStatus.all_vars.include?(value) raise "Invalid ENUM value '#{value}' for class #SinkStatus" end @value = value end |
Class Method Details
.all_vars ⇒ Object
10 11 12 |
# File 'lib/svix/models/sink_status.rb', line 10 def self.all_vars @all_vars ||= [ENABLED, PAUSED, DISABLED, RETRYING].freeze end |
.deserialize(value) ⇒ Object
22 23 24 25 |
# File 'lib/svix/models/sink_status.rb', line 22 def self.deserialize(value) return value if SinkStatus.all_vars.include?(value) raise "Invalid ENUM value '#{value}' for class #SinkStatus" end |
Instance Method Details
#serialize ⇒ Object
27 28 29 |
# File 'lib/svix/models/sink_status.rb', line 27 def serialize @value end |