Class: ProcessedDocumentPersistenceDTO

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/gen-rb/relevanced_protocol_types.rb

Constant Summary collapse

METADATA =
1
SCOREDWORDS =
2
MAGNITUDE =
3
FIELDS =
{
  METADATA => {:type => ::Thrift::Types::STRUCT, :name => 'metadata', :class => ::ProcessedDocumentMetadataDTO},
  SCOREDWORDS => {:type => ::Thrift::Types::LIST, :name => 'scoredWords', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ScoredWordDTO}},
  MAGNITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'magnitude'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



148
# File 'lib/gen-rb/relevanced_protocol_types.rb', line 148

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


150
151
152
153
154
# File 'lib/gen-rb/relevanced_protocol_types.rb', line 150

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