Class: Composio::GetLogsDtoStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/composio/models/get_logs_dto_status.rb

Constant Summary collapse

ALL =
"all".freeze
SUCCESS =
"success".freeze
ERROR =
"error".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



18
19
20
# File 'lib/composio/models/get_logs_dto_status.rb', line 18

def self.all_vars
  @all_vars ||= [ALL, SUCCESS, ERROR].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string



25
26
27
# File 'lib/composio/models/get_logs_dto_status.rb', line 25

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string



32
33
34
35
# File 'lib/composio/models/get_logs_dto_status.rb', line 32

def build_from_hash(value)
  return value if GetLogsDtoStatus.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #GetLogsDtoStatus"
end