Class: ExperimentStatus
- Inherits:
-
Object
- Object
- ExperimentStatus
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/status_models_types.rb
Overview
Status: A generic status object.
state:
State .
timeOfStateChange:
time the status was last updated.
reason:
User friendly reason on how the state is inferred.
Constant Summary collapse
- STATE =
1
- TIMEOFSTATECHANGE =
2
- REASON =
3
- STATUSID =
4
- FIELDS =
{ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::ExperimentState}, TIMEOFSTATECHANGE => {:type => ::Thrift::Types::I64, :name => 'timeOfStateChange', :optional => true}, REASON => {:type => ::Thrift::Types::STRING, :name => 'reason', :optional => true}, STATUSID => {:type => ::Thrift::Types::STRING, :name => 'statusId', :optional => true} }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
91 |
# File 'lib/status_models_types.rb', line 91 def struct_fields; FIELDS; end |
#validate ⇒ Object
93 94 95 96 97 98 |
# File 'lib/status_models_types.rb', line 93 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state unless @state.nil? || ::ExperimentState::VALID_VALUES.include?(@state) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') end end |