Class: Messagebus::Thrift::MessageInternal

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/messagebus/messagebus_types.rb

Constant Summary collapse

MESSAGEID =
1
PAYLOAD =
2
PROPERTIES =
3
FIELDS =
{
  MESSAGEID => {:type => ::Thrift::Types::STRING, :name => 'messageId'},
  PAYLOAD => {:type => ::Thrift::Types::STRUCT, :name => 'payload', :class => Messagebus::Thrift::MessagePayload},
  PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



96
# File 'lib/messagebus/messagebus_types.rb', line 96

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


98
99
100
101
# File 'lib/messagebus/messagebus_types.rb', line 98

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field messageId is unset!') unless @messageId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field payload is unset!') unless @payload
end