Class PrivilegeDTO.Builder

java.lang.Object
org.apache.gravitino.dto.authorization.PrivilegeDTO.Builder
Enclosing class:
PrivilegeDTO

public static class PrivilegeDTO.Builder extends Object
Builder for PrivilegeDTO.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • withName

      public PrivilegeDTO.Builder withName(Privilege.Name name)
      Sets the name of the privilege.
      Parameters:
      name - The name of the privilege.
      Returns:
      The builder instance.
    • withCondition

      public PrivilegeDTO.Builder withCondition(Privilege.Condition condition)
      Sets the condition of the privilege.
      Parameters:
      condition - The condition of the privilege.
      Returns:
      The builder instance.
    • build

      public PrivilegeDTO build()
      Builds an instance of PrivilegeDTO using the builder's properties.
      Returns:
      An instance of PrivilegeDTO.
      Throws:
      IllegalArgumentException - If the name or condition are not set.