# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # module Priority FATAL = 0 ERROR = 1 WARN = 2 INFO = 3 DEBUG = 4 TRACE = 5 VALUE_MAP = {0 => "FATAL", 1 => "ERROR", 2 => "WARN", 3 => "INFO", 4 => "DEBUG", 5 => "TRACE"} VALID_VALUES = Set.new([FATAL, ERROR, WARN, INFO, DEBUG, TRACE]).freeze end module EventStatus ACK = 0 COMMITED = 1 ERR = 2 VALUE_MAP = {0 => "ACK", 1 => "COMMITED", 2 => "ERR"} VALID_VALUES = Set.new([ACK, COMMITED, ERR]).freeze end class ThriftFlumeEvent include ::Thrift::Struct, ::Thrift::Struct_Union TIMESTAMP = 1 PRIORITY = 2 BODY = 3 NANOS = 4 HOST = 5 FIELDSS = 6 FIELDS = { TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}, PRIORITY => {:type => ::Thrift::Types::I32, :name => 'priority', :enum_class => Priority}, BODY => {:type => ::Thrift::Types::STRING, :name => 'body', :binary => true}, NANOS => {:type => ::Thrift::Types::I64, :name => 'nanos'}, HOST => {:type => ::Thrift::Types::STRING, :name => 'host'}, FIELDSS => {:type => ::Thrift::Types::MAP, :name => 'fieldss', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} } def struct_fields; FIELDS; end def validate unless @priority.nil? || Priority::VALID_VALUES.include?(@priority) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field priority!') end end ::Thrift::Struct.generate_accessors self end class RawEvent include ::Thrift::Struct, ::Thrift::Struct_Union RAW = 1 FIELDS = { RAW => {:type => ::Thrift::Types::STRING, :name => 'raw', :binary => true} } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end