Class: ProcessStatus
- Inherits:
-
Object
- Object
- ProcessStatus
- 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 => ::ProcessState}, 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
117 |
# File 'lib/status_models_types.rb', line 117 def struct_fields; FIELDS; end |
#validate ⇒ Object
119 120 121 122 123 124 |
# File 'lib/status_models_types.rb', line 119 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state unless @state.nil? || ::ProcessState::VALID_VALUES.include?(@state) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') end end |