Class PolicyDTO.Builder

java.lang.Object
org.apache.gravitino.dto.policy.PolicyDTO.Builder
Enclosing class:
PolicyDTO

public static class PolicyDTO.Builder extends Object
Builder class for constructing PolicyDTO instances.
  • Method Details

    • withName

      public PolicyDTO.Builder withName(String name)
      Sets the name of the policy.
      Parameters:
      name - The name of the policy.
      Returns:
      The builder instance.
    • withComment

      public PolicyDTO.Builder withComment(String comment)
      Sets the comment associated with the policy.
      Parameters:
      comment - The comment associated with the policy.
      Returns:
      The builder instance.
    • withPolicyType

      public PolicyDTO.Builder withPolicyType(String policyType)
      Sets the type of the policy.
      Parameters:
      policyType - The type of the policy.
      Returns:
      The builder instance.
    • withEnabled

      public PolicyDTO.Builder withEnabled(boolean enabled)
      Sets whether the policy is enabled or not.
      Parameters:
      enabled - Whether the policy is enabled.
      Returns:
      The builder instance.
    • withContent

      public PolicyDTO.Builder withContent(PolicyContentDTO content)
      Sets the content of the policy.
      Parameters:
      content - The content of the policy.
      Returns:
      The builder instance.
    • withAudit

      public PolicyDTO.Builder withAudit(AuditDTO audit)
      Sets the audit information for the policy.
      Parameters:
      audit - The audit information for the policy.
      Returns:
      The builder instance.
    • withInherited

      public PolicyDTO.Builder withInherited(Optional<Boolean> inherited)
      Sets whether the policy is inherited.
      Parameters:
      inherited - Whether the policy is inherited.
      Returns:
      The builder instance.
    • build

      public PolicyDTO build()
      Returns:
      The constructed Policy DTO.