Skip to main content

Class RevokePermissionRequest

java.lang.Object
com.gpudb.protocol.RevokePermissionRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

public class RevokePermissionRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for GPUdb.revokePermission.

Revoke user or role the specified permission on the specified object.

  • Constructor Details

    • RevokePermissionRequest

      public RevokePermissionRequest()
      Constructs a RevokePermissionRequest object with default parameters.
    • RevokePermissionRequest

      public RevokePermissionRequest(String principal, String object, String objectType, String permission, Map<String,String> options)
      Constructs a RevokePermissionRequest object with the specified parameters.
      Parameters:
      principal - Name of the user or role for which the permission is being revoked. Must be an existing user or role. The default value is ”.
      object - Name of object permission is being revoked from. It is recommended to use a fully-qualified name when possible.
      objectType - The type of object being revoked. Supported values:
      permission - Permission being revoked. 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: Revoke table security from these columns, comma-separated. The default value is ”.
      The default value is an empty Map.
  • Method Details

    • 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 revoked. Must be an existing user or role. The default value is ”.
      Returns:
      The current value of principal.
    • setPrincipal

      public RevokePermissionRequest setPrincipal(String principal)
      Name of the user or role for which the permission is being revoked. Must be an existing user or role. The default value is ”.
      Parameters:
      principal - The new value for principal.
      Returns:
      this to mimic the builder pattern.
    • getObject

      public String getObject()
      Name of object permission is being revoked from. It is recommended to use a fully-qualified name when possible.
      Returns:
      The current value of object.
    • setObject

      public RevokePermissionRequest setObject(String object)
      Name of object permission is being revoked from. It is recommended to use a fully-qualified name when possible.
      Parameters:
      object - The new value for object.
      Returns:
      this to mimic the builder pattern.
    • getObjectType

      public String getObjectType()
      The type of object being revoked. Supported values:
      Returns:
      The current value of objectType.
    • setObjectType

      public RevokePermissionRequest setObjectType(String objectType)
      The type of object being revoked. Supported values:
      Parameters:
      objectType - The new value for objectType.
      Returns:
      this to mimic the builder pattern.
    • getPermission

      public String getPermission()
      Permission being revoked. 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 RevokePermissionRequest setPermission(String permission)
      Permission being revoked. 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 for permission.
      Returns:
      this to mimic the builder pattern.
    • getOptions

      public Map<String,String> getOptions()
      Optional parameters.
      • COLUMNS: Revoke table security from these columns, comma-separated. The default value is ”.
      The default value is an empty Map.
      Returns:
      The current value of options.
    • setOptions

      public RevokePermissionRequest setOptions(Map<String,String> options)
      Optional parameters.
      • COLUMNS: Revoke table security from these columns, comma-separated. The default value is ”.
      The default value is an empty Map.
      Parameters:
      options - The new value for options.
      Returns:
      this to 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:
      getSchema in interface org.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:
      get in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to get
      Returns:
      value of the field with the given index.
      Throws:
    • 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:
      put in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to set
      value - the value to set
      Throws:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object