Package com.gpudb.protocol
Class GrantPermissionRequest
- java.lang.Object
-
- com.gpudb.protocol.GrantPermissionRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class GrantPermissionRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.grantPermission.Grant user or role the specified permission on the specified object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGrantPermissionRequest.ObjectTypeA set of string constants for theGrantPermissionRequestparameterobjectType.static classGrantPermissionRequest.OptionsA set of string constants for theGrantPermissionRequestparameteroptions.static classGrantPermissionRequest.PermissionA set of string constants for theGrantPermissionRequestparameterpermission.
-
Constructor Summary
Constructors Constructor Description GrantPermissionRequest()Constructs a GrantPermissionRequest object with default parameters.GrantPermissionRequest(String principal, String object, String objectType, String permission, Map<String,String> options)Constructs a GrantPermissionRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetObject()Name of object permission is being granted to.StringgetObjectType()The type of object being granted to.Map<String,String>getOptions()Optional parameters.StringgetPermission()Permission being granted.StringgetPrincipal()Name of the user or role for which the permission is being granted.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.GrantPermissionRequestsetObject(String object)Name of object permission is being granted to.GrantPermissionRequestsetObjectType(String objectType)The type of object being granted to.GrantPermissionRequestsetOptions(Map<String,String> options)Optional parameters.GrantPermissionRequestsetPermission(String permission)Permission being granted.GrantPermissionRequestsetPrincipal(String principal)Name of the user or role for which the permission is being granted.StringtoString()
-
-
-
Constructor Detail
-
GrantPermissionRequest
public GrantPermissionRequest()
Constructs a GrantPermissionRequest object with default parameters.
-
GrantPermissionRequest
public GrantPermissionRequest(String principal, String object, String objectType, String permission, Map<String,String> options)
Constructs a GrantPermissionRequest object with the specified parameters.- Parameters:
principal- Name of the user or role for which the permission is being granted. Must be an existing user or role. The default value is ''.object- Name of object permission is being granted to. It is recommended to use a fully-qualified name when possible.objectType- The type of object being granted to. Supported values:CATALOG: CatalogCONTEXT: ContextCREDENTIAL: CredentialDATASINK: Data SinkDATASOURCE: Data SourceDIRECTORY: KIFS File DirectoryGRAPH: A Graph objectPROC: UDF ProcedureSCHEMA: SchemaSQL_PROC: SQL ProcedureSYSTEM: System-level accessTABLE: Database TableTABLE_MONITOR: Table monitor
permission- Permission being granted. Supported values:ADMIN: Full read/write and administrative access on the object.CONNECT: Connect access on the given data source or data sink.CREATE: Ability to create new objects of this type.DELETE: Delete rows from tables.EXECUTE: Ability to Execute the Procedure object.INSERT: Insert access to tables.MONITOR: Monitor logs and statistics.READ: Ability to read, list and use the object.SEND_ALERT: Ability to send system alerts.UPDATE: Update access to the table.USER_ADMIN: Access to administer users and roles that do not have system_admin permission.WRITE: Access to write, change and delete objects.
options- Optional parameters.COLUMNS: Apply table security to these columns, comma-separated. The default value is ''.FILTER_EXPRESSION: Optional filter expression to apply to this grant. Only rows that match the filter will be affected. The default value is ''.WITH_GRANT_OPTION: Allow the recipient to grant the same permission (or subset) to others. Supported values: The default value isFALSE.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getPrincipal
public String getPrincipal()
Name of the user or role for which the permission is being granted. Must be an existing user or role. The default value is ''.- Returns:
- The current value of
principal.
-
setPrincipal
public GrantPermissionRequest setPrincipal(String principal)
Name of the user or role for which the permission is being granted. Must be an existing user or role. The default value is ''.- Parameters:
principal- The new value forprincipal.- Returns:
thisto mimic the builder pattern.
-
getObject
public String getObject()
Name of object permission is being granted to. It is recommended to use a fully-qualified name when possible.- Returns:
- The current value of
object.
-
setObject
public GrantPermissionRequest setObject(String object)
Name of object permission is being granted to. It is recommended to use a fully-qualified name when possible.- Parameters:
object- The new value forobject.- Returns:
thisto mimic the builder pattern.
-
getObjectType
public String getObjectType()
The type of object being granted to. Supported values:CATALOG: CatalogCONTEXT: ContextCREDENTIAL: CredentialDATASINK: Data SinkDATASOURCE: Data SourceDIRECTORY: KIFS File DirectoryGRAPH: A Graph objectPROC: UDF ProcedureSCHEMA: SchemaSQL_PROC: SQL ProcedureSYSTEM: System-level accessTABLE: Database TableTABLE_MONITOR: Table monitor
- Returns:
- The current value of
objectType.
-
setObjectType
public GrantPermissionRequest setObjectType(String objectType)
The type of object being granted to. Supported values:CATALOG: CatalogCONTEXT: ContextCREDENTIAL: CredentialDATASINK: Data SinkDATASOURCE: Data SourceDIRECTORY: KIFS File DirectoryGRAPH: A Graph objectPROC: UDF ProcedureSCHEMA: SchemaSQL_PROC: SQL ProcedureSYSTEM: System-level accessTABLE: Database TableTABLE_MONITOR: Table monitor
- Parameters:
objectType- The new value forobjectType.- Returns:
thisto mimic the builder pattern.
-
getPermission
public String getPermission()
Permission being granted. Supported values:ADMIN: Full read/write and administrative access on the object.CONNECT: Connect access on the given data source or data sink.CREATE: Ability to create new objects of this type.DELETE: Delete rows from tables.EXECUTE: Ability to Execute the Procedure object.INSERT: Insert access to tables.MONITOR: Monitor logs and statistics.READ: Ability to read, list and use the object.SEND_ALERT: Ability to send system alerts.UPDATE: Update access to the table.USER_ADMIN: Access to administer users and roles that do not have system_admin permission.WRITE: Access to write, change and delete objects.
- Returns:
- The current value of
permission.
-
setPermission
public GrantPermissionRequest setPermission(String permission)
Permission being granted. Supported values:ADMIN: Full read/write and administrative access on the object.CONNECT: Connect access on the given data source or data sink.CREATE: Ability to create new objects of this type.DELETE: Delete rows from tables.EXECUTE: Ability to Execute the Procedure object.INSERT: Insert access to tables.MONITOR: Monitor logs and statistics.READ: Ability to read, list and use the object.SEND_ALERT: Ability to send system alerts.UPDATE: Update access to the table.USER_ADMIN: Access to administer users and roles that do not have system_admin permission.WRITE: Access to write, change and delete objects.
- Parameters:
permission- The new value forpermission.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.COLUMNS: Apply table security to these columns, comma-separated. The default value is ''.FILTER_EXPRESSION: Optional filter expression to apply to this grant. Only rows that match the filter will be affected. The default value is ''.WITH_GRANT_OPTION: Allow the recipient to grant the same permission (or subset) to others. Supported values: The default value isFALSE.
Map.- Returns:
- The current value of
options.
-
setOptions
public GrantPermissionRequest setOptions(Map<String,String> options)
Optional parameters.COLUMNS: Apply table security to these columns, comma-separated. The default value is ''.FILTER_EXPRESSION: Optional filter expression to apply to this grant. Only rows that match the filter will be affected. The default value is ''.WITH_GRANT_OPTION: Allow the recipient to grant the same permission (or subset) to others. Supported values: The default value isFALSE.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-