Class: Relevanced::CreateDocumentWithID_args

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

Constant Summary collapse

ID =
1
TEXT =
2
LANGUAGE =
3
FIELDS =
{
  ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
  TEXT => {:type => ::Thrift::Types::STRING, :name => 'text'},
  LANGUAGE => {:type => ::Thrift::Types::I32, :name => 'language', :enum_class => ::Language}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



1179
# File 'lib/gen-rb/relevanced.rb', line 1179

def struct_fields; FIELDS; end

#validateObject



1181
1182
1183
1184
1185
# File 'lib/gen-rb/relevanced.rb', line 1181

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