Class ImmutableUserRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableUserRecordValue.Builder
- Enclosing class:
ImmutableUserRecordValue
Builds instances of type
ImmutableUserRecordValue.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableUserRecordValue.clear()Clear the builder to the initial state.from(UserRecordValue instance) Fill a builder with attribute values from the providedUserRecordValueinstance.Initializes the value for theemailattribute.Initializes the value for thenameattribute.withPassword(String password) Initializes the value for thepasswordattribute.withUserKey(Long userKey) Initializes the value for theuserKeyattribute.withUsername(String username) Initializes the value for theusernameattribute.withUserType(UserType userType) Initializes the value for theuserTypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedUserRecordValueinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withUserKey
Initializes the value for theuserKeyattribute.- Parameters:
userKey- The value for userKey (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withUsername
Initializes the value for theusernameattribute.- Parameters:
username- The value for username (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withName
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withEmail
Initializes the value for theemailattribute.- Parameters:
email- The value for email (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withPassword
Initializes the value for thepasswordattribute.- Parameters:
password- The value for password (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withUserType
Initializes the value for theuserTypeattribute.- Parameters:
userType- The value for userType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableUserRecordValue.- Returns:
- An immutable instance of UserRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-