Class: TaskStatus
- Inherits:
-
Object
- Object
- TaskStatus
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/status_models_types.rb
Constant Summary collapse
- STATE =
1
- TIMEOFSTATECHANGE =
2
- REASON =
3
- STATUSID =
4
- FIELDS =
{ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::TaskState}, 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
143 |
# File 'lib/status_models_types.rb', line 143 def struct_fields; FIELDS; end |
#validate ⇒ Object
145 146 147 148 149 150 |
# File 'lib/status_models_types.rb', line 145 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state unless @state.nil? || ::TaskState::VALID_VALUES.include?(@state) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') end end |