public class HasRoleRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.hasRole
.
Checks if the specified user has the specified role.
Modifier and Type | Class and Description |
---|---|
static class |
HasRoleRequest.Options
A set of string constants for the
HasRoleRequest parameter
options . |
Constructor and Description |
---|
HasRoleRequest()
Constructs a HasRoleRequest object with default parameters.
|
HasRoleRequest(String principal,
String role,
Map<String,String> options)
Constructs a HasRoleRequest object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
Map<String,String> |
getOptions()
Optional parameters.
|
String |
getPrincipal()
Name of the user for which role membersih is being checked.
|
String |
getRole()
Name of role to check for membership.
|
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
HasRoleRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
HasRoleRequest |
setPrincipal(String principal)
Name of the user for which role membersih is being checked.
|
HasRoleRequest |
setRole(String role)
Name of role to check for membership.
|
String |
toString() |
public HasRoleRequest()
public HasRoleRequest(String principal, String role, Map<String,String> options)
principal
- Name of the user for which role membersih is being
checked. Must be an existing user. If blank, will use
the current user. The default value is ''.role
- Name of role to check for membership.options
- Optional parameters.
NO_ERROR_IF_NOT_EXISTS
: If FALSE
will return an error if the provided
role
does not exist or is blank. If
TRUE
then it will return
FALSE
for hasRole
.
Supported values:
The default value is FALSE
.
ONLY_DIRECT
: If
FALSE
will search
recursively if the principal
is a member
of role
. If TRUE
then principal
must directly be a member
of role
.
Supported values:
The default value is FALSE
.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getPrincipal()
principal
.public HasRoleRequest setPrincipal(String principal)
principal
- The new value for principal
.this
to mimic the builder pattern.public String getRole()
role
.public HasRoleRequest setRole(String role)
role
- The new value for role
.this
to mimic the builder pattern.public Map<String,String> getOptions()
NO_ERROR_IF_NOT_EXISTS
:
If FALSE
will return an error if the
provided role
does not exist or is blank. If
TRUE
then it will return FALSE
for
hasRole
.
Supported values:
The default value is FALSE
.
ONLY_DIRECT
: If FALSE
will search recursively if the principal
is a member of role
. If TRUE
then principal
must
directly be a member of role
.
Supported values:
The default value is FALSE
.
Map
.options
.public HasRoleRequest setOptions(Map<String,String> options)
NO_ERROR_IF_NOT_EXISTS
:
If FALSE
will return an error if the
provided role
does not exist or is blank. If
TRUE
then it will return FALSE
for
hasRole
.
Supported values:
The default value is FALSE
.
ONLY_DIRECT
: If FALSE
will search recursively if the principal
is a member of role
. If TRUE
then principal
must
directly be a member of role
.
Supported values:
The default value is FALSE
.
Map
.options
- The new value for options
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2025. All rights reserved.