Class ImmutableUserRecordValue.Builder

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableUserRecordValue.Builder
Enclosing class:
ImmutableUserRecordValue

public static final class ImmutableUserRecordValue.Builder extends Object
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 Details

    • from

      public final ImmutableUserRecordValue.Builder from(UserRecordValue instance)
      Fill a builder with attribute values from the provided UserRecordValue instance. 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:
      this builder for use in a chained invocation
    • withUserKey

      public final ImmutableUserRecordValue.Builder withUserKey(Long userKey)
      Initializes the value for the userKey attribute.
      Parameters:
      userKey - The value for userKey (can be null)
      Returns:
      this builder for use in a chained invocation
    • withUsername

      public final ImmutableUserRecordValue.Builder withUsername(String username)
      Initializes the value for the username attribute.
      Parameters:
      username - The value for username (can be null)
      Returns:
      this builder for use in a chained invocation
    • withName

      public final ImmutableUserRecordValue.Builder withName(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name (can be null)
      Returns:
      this builder for use in a chained invocation
    • withEmail

      public final ImmutableUserRecordValue.Builder withEmail(String email)
      Initializes the value for the email attribute.
      Parameters:
      email - The value for email (can be null)
      Returns:
      this builder for use in a chained invocation
    • withPassword

      public final ImmutableUserRecordValue.Builder withPassword(String password)
      Initializes the value for the password attribute.
      Parameters:
      password - The value for password (can be null)
      Returns:
      this builder for use in a chained invocation
    • withUserType

      public final ImmutableUserRecordValue.Builder withUserType(UserType userType)
      Initializes the value for the userType attribute.
      Parameters:
      userType - The value for userType (can be null)
      Returns:
      this builder for use in a chained invocation
    • clear

      Clear the builder to the initial state.
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableUserRecordValue build()
      Returns:
      An immutable instance of UserRecordValue
      Throws:
      IllegalStateException - if any required attributes are missing