Class: Hive2::Thrift::TStatus

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

STATUSCODE =
1
INFOMESSAGES =
2
SQLSTATE =
3
ERRORCODE =
4
ERRORMESSAGE =
5
FIELDS =
{
  STATUSCODE => {:type => ::Thrift::Types::I32, :name => 'statusCode', :enum_class => ::Hive2::Thrift::TStatusCode},
  INFOMESSAGES => {:type => ::Thrift::Types::LIST, :name => 'infoMessages', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
  SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'sqlState', :optional => true},
  ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :optional => true},
  ERRORMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'errorMessage', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject


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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)

869
870
871
872
873
874
# File 'lib/thrift/t_c_l_i_service_types.rb', line 869

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