Package org.apache.gravitino.dto.policy
Class PolicyDTO.Builder
java.lang.Object
org.apache.gravitino.dto.policy.PolicyDTO.Builder
- Enclosing class:
- PolicyDTO
Builder class for constructing PolicyDTO instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Sets the audit information for the policy.withComment
(String comment) Sets the comment associated with the policy.withContent
(PolicyContentDTO content) Sets the content of the policy.withEnabled
(boolean enabled) Sets whether the policy is enabled or not.withInherited
(Optional<Boolean> inherited) Sets whether the policy is inherited.Sets the name of the policy.withPolicyType
(String policyType) Sets the type of the policy.
-
Method Details
-
withName
Sets the name of the policy.- Parameters:
name
- The name of the policy.- Returns:
- The builder instance.
-
withComment
Sets the comment associated with the policy.- Parameters:
comment
- The comment associated with the policy.- Returns:
- The builder instance.
-
withPolicyType
Sets the type of the policy.- Parameters:
policyType
- The type of the policy.- Returns:
- The builder instance.
-
withEnabled
Sets whether the policy is enabled or not.- Parameters:
enabled
- Whether the policy is enabled.- Returns:
- The builder instance.
-
withContent
Sets the content of the policy.- Parameters:
content
- The content of the policy.- Returns:
- The builder instance.
-
withAudit
Sets the audit information for the policy.- Parameters:
audit
- The audit information for the policy.- Returns:
- The builder instance.
-
withInherited
Sets whether the policy is inherited.- Parameters:
inherited
- Whether the policy is inherited.- Returns:
- The builder instance.
-
build
- Returns:
- The constructed Policy DTO.
-