Class: PrivilegeGrantInfo

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/thrift/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 => ::PrincipalType},
  GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



132
# File 'lib/thrift/hive_metastore_types.rb', line 132

def struct_fields; FIELDS; end

#validateObject



134
135
136
137
138
# File 'lib/thrift/hive_metastore_types.rb', line 134

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