Class: Impala::Protocol::HiveMetastore::PrivilegeGrantInfo

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/impala/protocol/hive_metastore_types.rb

Constant Summary collapse

PRIVILEGE =
1
CREATETIME =
2
GRANTOR =
3
GRANTORTYPE =
4
GRANTOPTION =
5
FIELDS =
{
PRIVILEGE => { :type => ::Thrift::Types::STRING, :name => 'privilege' },
CREATETIME => { :type => ::Thrift::Types::I32, :name => 'createTime' },
GRANTOR => { :type => ::Thrift::Types::STRING, :name => 'grantor' },
GRANTORTYPE => { :type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => Impala::Protocol::HiveMetastore::PrincipalType },
GRANTOPTION => { :type => ::Thrift::Types::BOOL, :name => 'grantOption' }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



138
# File 'lib/impala/protocol/hive_metastore_types.rb', line 138

def struct_fields; FIELDS; end

#validateObject



140
141
142
143
144
# File 'lib/impala/protocol/hive_metastore_types.rb', line 140

def validate
  unless @grantorType.nil? || Impala::Protocol::HiveMetastore::PrincipalType::VALID_VALUES.include?(@grantorType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!')
  end
end