Class: TaskStatusChangeRequestEvent
- Inherits:
-
Object
- Object
- TaskStatusChangeRequestEvent
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/messaging_events_types.rb
Constant Summary collapse
- STATE =
1
- TASKIDENTITY =
2
- FIELDS =
{ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::TaskState}, TASKIDENTITY => {:type => ::Thrift::Types::STRUCT, :name => 'taskIdentity', :class => ::TaskIdentifier} }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
144 |
# File 'lib/messaging_events_types.rb', line 144 def struct_fields; FIELDS; end |
#validate ⇒ Object
146 147 148 149 150 151 152 |
# File 'lib/messaging_events_types.rb', line 146 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field taskIdentity is unset!') unless @taskIdentity unless @state.nil? || ::TaskState::VALID_VALUES.include?(@state) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') end end |