public class HasRoleRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.hasRole(HasRoleRequest)
.
Checks if the specified user has the specified role.
Modifier and Type | Class and Description |
---|---|
static class |
HasRoleRequest.Options
Optional parameters.
|
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() |
String |
getPrincipal() |
String |
getRole() |
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) |
HasRoleRequest |
setPrincipal(String principal) |
HasRoleRequest |
setRole(String role) |
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()
public HasRoleRequest setPrincipal(String principal)
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 ''.this
to mimic the builder pattern.public String getRole()
public HasRoleRequest setRole(String role)
role
- Name of role to check for membership.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
.public HasRoleRequest setOptions(Map<String,String> options)
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
.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 © 2024. All rights reserved.