Class ImmutableUserRecordValue

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableUserRecordValue
All Implemented Interfaces:
JsonSerializable, RecordValue, UserRecordValue

public final class ImmutableUserRecordValue extends Object implements UserRecordValue
Immutable implementation of UserRecordValue.

Use the builder to create immutable instances: ImmutableUserRecordValue.builder().

  • Method Details

    • getUserKey

      public Long getUserKey()
      Specified by:
      getUserKey in interface UserRecordValue
      Returns:
      The value of the userKey attribute
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface UserRecordValue
      Returns:
      The value of the username attribute
    • getName

      public String getName()
      Specified by:
      getName in interface UserRecordValue
      Returns:
      The value of the name attribute
    • getEmail

      public String getEmail()
      Specified by:
      getEmail in interface UserRecordValue
      Returns:
      The value of the email attribute
    • getPassword

      public String getPassword()
      Specified by:
      getPassword in interface UserRecordValue
      Returns:
      The value of the password attribute
    • getUserType

      public UserType getUserType()
      Specified by:
      getUserType in interface UserRecordValue
      Returns:
      The value of the userType attribute
    • withUserKey

      public final ImmutableUserRecordValue withUserKey(Long value)
      Copy the current immutable object by setting a value for the userKey attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for userKey (can be null)
      Returns:
      A modified copy of the this object
    • withUsername

      public final ImmutableUserRecordValue withUsername(String value)
      Copy the current immutable object by setting a value for the username attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for username (can be null)
      Returns:
      A modified copy of the this object
    • withName

      public final ImmutableUserRecordValue withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name (can be null)
      Returns:
      A modified copy of the this object
    • withEmail

      public final ImmutableUserRecordValue withEmail(String value)
      Copy the current immutable object by setting a value for the email attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for email (can be null)
      Returns:
      A modified copy of the this object
    • withPassword

      public final ImmutableUserRecordValue withPassword(String value)
      Copy the current immutable object by setting a value for the password attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for password (can be null)
      Returns:
      A modified copy of the this object
    • withUserType

      public final ImmutableUserRecordValue withUserType(UserType value)
      Copy the current immutable object by setting a value for the userType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for userType (can be null)
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableUserRecordValue that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Returns a lazily computed hash code from attributes: userKey, username, name, email, password, userType.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value UserRecordValue with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableUserRecordValue copyOf(UserRecordValue instance)
      Creates an immutable copy of a UserRecordValue value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable UserRecordValue instance
    • builder

      public static ImmutableUserRecordValue.Builder builder()
      Creates a builder for ImmutableUserRecordValue.
       ImmutableUserRecordValue.builder()
          .withUserKey(Long | null) // nullable userKey
          .withUsername(String | null) // nullable username
          .withName(String | null) // nullable name
          .withEmail(String | null) // nullable email
          .withPassword(String | null) // nullable password
          .withUserType(io.camunda.zeebe.protocol.record.value.UserType | null) // nullable userType
          .build();
       
      Returns:
      A new ImmutableUserRecordValue builder