Class UserDTO.Builder<S extends UserDTO.Builder>
java.lang.Object
org.apache.gravitino.dto.authorization.UserDTO.Builder<S>
- Type Parameters:
S
- The type of the builder instance.
- Enclosing class:
- UserDTO
Builder class for constructing a UserDTO instance.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
name
The name of the user. -
roles
The roles of the user. -
audit
The audit information of the user.
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withName
Sets the name of the user.- Parameters:
name
- The name of the user.- Returns:
- The builder instance.
-
withRoles
Sets the roles of the user.- Parameters:
roles
- The roles of the user.- Returns:
- The builder instance.
-
withAudit
Sets the audit information of the user.- Parameters:
audit
- The audit information of the user.- Returns:
- The builder instance.
-
build
Builds an instance of UserDTO using the builder's properties.- Returns:
- An instance of UserDTO.
- Throws:
IllegalArgumentException
- If the name or audit are not set.
-