Class ImmutableUserTaskRecordValue

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableUserTaskRecordValue
All Implemented Interfaces:
JsonSerializable, RecordValue, RecordValueWithVariables, ProcessInstanceRelated, TenantOwned, UserTaskRecordValue

public final class ImmutableUserTaskRecordValue extends Object implements UserTaskRecordValue
Immutable implementation of UserTaskRecordValue.

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

  • Method Details

    • getVariables

      public Map<String,Object> getVariables()
      Specified by:
      getVariables in interface RecordValueWithVariables
      Returns:
      the variables of this record. Can be empty.
    • getProcessInstanceKey

      public long getProcessInstanceKey()
      Specified by:
      getProcessInstanceKey in interface ProcessInstanceRelated
      Returns:
      the key of the corresponding process instance
    • getTenantId

      public String getTenantId()
      Returns the identifier of the tenant that owns this entity.
      Specified by:
      getTenantId in interface TenantOwned
    • getUserTaskKey

      public long getUserTaskKey()
      Specified by:
      getUserTaskKey in interface UserTaskRecordValue
      Returns:
      The value of the userTaskKey attribute
    • getAssignee

      public String getAssignee()
      Specified by:
      getAssignee in interface UserTaskRecordValue
      Returns:
      The value of the assignee attribute
    • getCandidateGroupsList

      public List<String> getCandidateGroupsList()
      Specified by:
      getCandidateGroupsList in interface UserTaskRecordValue
      Returns:
      The value of the candidateGroupsList attribute
    • getCandidateUsersList

      public List<String> getCandidateUsersList()
      Specified by:
      getCandidateUsersList in interface UserTaskRecordValue
      Returns:
      The value of the candidateUsersList attribute
    • getDueDate

      public String getDueDate()
      Specified by:
      getDueDate in interface UserTaskRecordValue
      Returns:
      The value of the dueDate attribute
    • getFollowUpDate

      public String getFollowUpDate()
      Specified by:
      getFollowUpDate in interface UserTaskRecordValue
      Returns:
      The value of the followUpDate attribute
    • getFormKey

      public long getFormKey()
      Specified by:
      getFormKey in interface UserTaskRecordValue
      Returns:
      The value of the formKey attribute
    • getChangedAttributes

      public List<String> getChangedAttributes()
      Specified by:
      getChangedAttributes in interface UserTaskRecordValue
      Returns:
      The value of the changedAttributes attribute
    • getAction

      public String getAction()
      Specified by:
      getAction in interface UserTaskRecordValue
      Returns:
      The value of the action attribute
    • getExternalFormReference

      public String getExternalFormReference()
      Specified by:
      getExternalFormReference in interface UserTaskRecordValue
      Returns:
      The value of the externalFormReference attribute
    • getCustomHeaders

      public Map<String,String> getCustomHeaders()
      Specified by:
      getCustomHeaders in interface UserTaskRecordValue
      Returns:
      The value of the customHeaders attribute
    • getCreationTimestamp

      public long getCreationTimestamp()
      Specified by:
      getCreationTimestamp in interface UserTaskRecordValue
      Returns:
      The value of the creationTimestamp attribute
    • getElementId

      public String getElementId()
      Specified by:
      getElementId in interface UserTaskRecordValue
      Returns:
      the element id of the corresponding user task
    • getElementInstanceKey

      public long getElementInstanceKey()
      Specified by:
      getElementInstanceKey in interface UserTaskRecordValue
      Returns:
      the element instance key of the corresponding user task
    • getBpmnProcessId

      public String getBpmnProcessId()
      Specified by:
      getBpmnProcessId in interface UserTaskRecordValue
      Returns:
      the bpmn process id of the corresponding process definition
    • getProcessDefinitionVersion

      public int getProcessDefinitionVersion()
      Specified by:
      getProcessDefinitionVersion in interface UserTaskRecordValue
      Returns:
      the version of the corresponding process definition
    • getProcessDefinitionKey

      public long getProcessDefinitionKey()
      Specified by:
      getProcessDefinitionKey in interface UserTaskRecordValue
      Returns:
      the process key of the corresponding process definition
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface UserTaskRecordValue
      Returns:
      The value of the priority attribute
    • withVariables

      public final ImmutableUserTaskRecordValue withVariables(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the variables map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the variables map
      Returns:
      A modified copy of this object
    • withProcessInstanceKey

      public final ImmutableUserTaskRecordValue withProcessInstanceKey(long value)
      Copy the current immutable object by setting a value for the processInstanceKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for processInstanceKey
      Returns:
      A modified copy of the this object
    • withTenantId

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

      public final ImmutableUserTaskRecordValue withUserTaskKey(long value)
      Copy the current immutable object by setting a value for the userTaskKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for userTaskKey
      Returns:
      A modified copy of the this object
    • withAssignee

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

      public final ImmutableUserTaskRecordValue withCandidateGroupsList(String... elements)
      Copy the current immutable object with elements that replace the content of candidateGroupsList.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCandidateGroupsList

      public final ImmutableUserTaskRecordValue withCandidateGroupsList(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of candidateGroupsList. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of candidateGroupsList elements to set
      Returns:
      A modified copy of this object
    • withCandidateUsersList

      public final ImmutableUserTaskRecordValue withCandidateUsersList(String... elements)
      Copy the current immutable object with elements that replace the content of candidateUsersList.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCandidateUsersList

      public final ImmutableUserTaskRecordValue withCandidateUsersList(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of candidateUsersList. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of candidateUsersList elements to set
      Returns:
      A modified copy of this object
    • withDueDate

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

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

      public final ImmutableUserTaskRecordValue withFormKey(long value)
      Copy the current immutable object by setting a value for the formKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for formKey
      Returns:
      A modified copy of the this object
    • withChangedAttributes

      public final ImmutableUserTaskRecordValue withChangedAttributes(String... elements)
      Copy the current immutable object with elements that replace the content of changedAttributes.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withChangedAttributes

      public final ImmutableUserTaskRecordValue withChangedAttributes(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of changedAttributes. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of changedAttributes elements to set
      Returns:
      A modified copy of this object
    • withAction

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

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

      public final ImmutableUserTaskRecordValue withCustomHeaders(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the customHeaders map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the customHeaders map
      Returns:
      A modified copy of this object
    • withCreationTimestamp

      public final ImmutableUserTaskRecordValue withCreationTimestamp(long value)
      Copy the current immutable object by setting a value for the creationTimestamp attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for creationTimestamp
      Returns:
      A modified copy of the this object
    • withElementId

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

      public final ImmutableUserTaskRecordValue withElementInstanceKey(long value)
      Copy the current immutable object by setting a value for the elementInstanceKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for elementInstanceKey
      Returns:
      A modified copy of the this object
    • withBpmnProcessId

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

      public final ImmutableUserTaskRecordValue withProcessDefinitionVersion(int value)
      Copy the current immutable object by setting a value for the processDefinitionVersion attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for processDefinitionVersion
      Returns:
      A modified copy of the this object
    • withProcessDefinitionKey

      public final ImmutableUserTaskRecordValue withProcessDefinitionKey(long value)
      Copy the current immutable object by setting a value for the processDefinitionKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for processDefinitionKey
      Returns:
      A modified copy of the this object
    • withPriority

      public final ImmutableUserTaskRecordValue withPriority(int value)
      Copy the current immutable object by setting a value for the priority attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for priority
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableUserTaskRecordValue 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: variables, processInstanceKey, tenantId, userTaskKey, assignee, candidateGroupsList, candidateUsersList, dueDate, followUpDate, formKey, changedAttributes, action, externalFormReference, customHeaders, creationTimestamp, elementId, elementInstanceKey, bpmnProcessId, processDefinitionVersion, processDefinitionKey, priority.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableUserTaskRecordValue copyOf(UserTaskRecordValue instance)
      Creates an immutable copy of a UserTaskRecordValue 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 UserTaskRecordValue instance
    • builder

      public static ImmutableUserTaskRecordValue.Builder builder()
      Creates a builder for ImmutableUserTaskRecordValue.
       ImmutableUserTaskRecordValue.builder()
          .putVariable|putAllVariables(String => Object) // variables mappings
          .withProcessInstanceKey(long) // optional processInstanceKey
          .withTenantId(String | null) // nullable tenantId
          .withUserTaskKey(long) // optional userTaskKey
          .withAssignee(String | null) // nullable assignee
          .addCandidateGroupsList|addAllCandidateGroupsList(String) // candidateGroupsList elements
          .addCandidateUsersList|addAllCandidateUsersList(String) // candidateUsersList elements
          .withDueDate(String | null) // nullable dueDate
          .withFollowUpDate(String | null) // nullable followUpDate
          .withFormKey(long) // optional formKey
          .addChangedAttribute|addAllChangedAttributes(String) // changedAttributes elements
          .withAction(String | null) // nullable action
          .withExternalFormReference(String | null) // nullable externalFormReference
          .putCustomHeader|putAllCustomHeaders(String => String) // customHeaders mappings
          .withCreationTimestamp(long) // optional creationTimestamp
          .withElementId(String | null) // nullable elementId
          .withElementInstanceKey(long) // optional elementInstanceKey
          .withBpmnProcessId(String | null) // nullable bpmnProcessId
          .withProcessDefinitionVersion(int) // optional processDefinitionVersion
          .withProcessDefinitionKey(long) // optional processDefinitionKey
          .withPriority(int) // optional priority
          .build();
       
      Returns:
      A new ImmutableUserTaskRecordValue builder