Class: Hive2::Thrift::TOpenSessionResp

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

STATUS =
1
SERVERPROTOCOLVERSION =
2
SESSIONHANDLE =
3
CONFIGURATION =
4
FIELDS =
{
  STATUS => {:type => ::Thrift::Types::STRUCT, :name => 'status', :class => ::Hive2::Thrift::TStatus},
  SERVERPROTOCOLVERSION => {:type => ::Thrift::Types::I32, :name => 'serverProtocolVersion', :default =>         5, :enum_class => ::Hive2::Thrift::TProtocolVersion},
  SESSIONHANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'sessionHandle', :class => ::Hive2::Thrift::TSessionHandle, :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


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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)

986
987
988
989
990
991
992
# File 'lib/thrift/t_c_l_i_service_types.rb', line 986

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