Class: Scribe::Log_result

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/fluent/plugin/thrift/scribe.rb

Constant Summary collapse

SUCCESS =
0
FIELDS =
{
  SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ResultCode}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



70
# File 'lib/fluent/plugin/thrift/scribe.rb', line 70

def struct_fields; FIELDS; end

#validateObject



72
73
74
75
76
# File 'lib/fluent/plugin/thrift/scribe.rb', line 72

def validate
  unless @success.nil? || ResultCode::VALID_VALUES.include?(@success)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
  end
end