Class: HiveObjectPrivilege

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

Constant Summary collapse

HIVEOBJECT =
1
PRINCIPALNAME =
2
PRINCIPALTYPE =
3
GRANTINFO =
4
FIELDS =
{
  HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => ::HiveObjectRef},
  PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'},
  PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType},
  GRANTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'grantInfo', :class => ::PrivilegeGrantInfo}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject


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

def struct_fields; FIELDS; end

#validateObject


159
160
161
162
163
# File 'lib/thrift/hive_metastore_types.rb', line 159

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