Class: Hive2::Thrift::TOpenSessionReq

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

Constant Summary collapse

CLIENT_PROTOCOL =
1
USERNAME =
2
PASSWORD =
3
CONFIGURATION =
4
FIELDS =
{
  CLIENT_PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'client_protocol', :default =>         5, :enum_class => ::Hive2::Thrift::TProtocolVersion},
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
  PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true},
  CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



958
# File 'lib/thrift/t_c_l_i_service_types.rb', line 958

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


960
961
962
963
964
965
# File 'lib/thrift/t_c_l_i_service_types.rb', line 960

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field client_protocol is unset!') unless @client_protocol
  unless @client_protocol.nil? || ::Hive2::Thrift::TProtocolVersion::VALID_VALUES.include?(@client_protocol)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field client_protocol!')
  end
end