Class: WordVectorDTO

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

Constant Summary collapse

MAGNITUDE =
1
DOCUMENTWEIGHT =
2
SCORES =
3
FIELDS =
{
  MAGNITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'magnitude'},
  DOCUMENTWEIGHT => {:type => ::Thrift::Types::DOUBLE, :name => 'documentWeight'},
  SCORES => {:type => ::Thrift::Types::MAP, :name => 'scores', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::DOUBLE}}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


35
36
37
38
39
# File 'lib/gen-rb/relevanced_protocol_types.rb', line 35

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