Class ImmutableMessageStartEventSubscriptionRecordValue

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableMessageStartEventSubscriptionRecordValue
All Implemented Interfaces:
JsonSerializable, RecordValue, RecordValueWithVariables, MessageStartEventSubscriptionRecordValue, TenantOwned

public final class ImmutableMessageStartEventSubscriptionRecordValue extends Object implements MessageStartEventSubscriptionRecordValue
Immutable implementation of MessageStartEventSubscriptionRecordValue.

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

  • Method Details

    • getVariables

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

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

      public long getProcessDefinitionKey()
      Specified by:
      getProcessDefinitionKey in interface MessageStartEventSubscriptionRecordValue
      Returns:
      the process key tied to the subscription
    • getBpmnProcessId

      public String getBpmnProcessId()
      Specified by:
      getBpmnProcessId in interface MessageStartEventSubscriptionRecordValue
      Returns:
      the BPMN process id tied to the subscription
    • getStartEventId

      public String getStartEventId()
      Specified by:
      getStartEventId in interface MessageStartEventSubscriptionRecordValue
      Returns:
      the id of the start event tied to the subscription
    • getMessageName

      public String getMessageName()
      Specified by:
      getMessageName in interface MessageStartEventSubscriptionRecordValue
      Returns:
      the name of the message
    • getProcessInstanceKey

      public long getProcessInstanceKey()
      Specified by:
      getProcessInstanceKey in interface MessageStartEventSubscriptionRecordValue
      Returns:
      the key of the process instance that was created by this message. It is only set when a message is correlated to this subscription. Otherwise, it returns -1.
    • getCorrelationKey

      public String getCorrelationKey()
      Specified by:
      getCorrelationKey in interface MessageStartEventSubscriptionRecordValue
      Returns:
      the correlation key of the message. It is only set when a message is correlated to this subscription. Otherwise, it returns an empty string.
    • getMessageKey

      public long getMessageKey()
      Specified by:
      getMessageKey in interface MessageStartEventSubscriptionRecordValue
      Returns:
      the key of the message. It is only set when a message is correlated to this subscription. Otherwise, it returns -1.
    • withVariables

      public final ImmutableMessageStartEventSubscriptionRecordValue 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
    • withTenantId

      public final ImmutableMessageStartEventSubscriptionRecordValue 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
    • withProcessDefinitionKey

      public final ImmutableMessageStartEventSubscriptionRecordValue 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
    • withBpmnProcessId

      public final ImmutableMessageStartEventSubscriptionRecordValue 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
    • withStartEventId

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

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

      public final ImmutableMessageStartEventSubscriptionRecordValue 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
    • withCorrelationKey

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

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

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableMessageStartEventSubscriptionRecordValue 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, tenantId, processDefinitionKey, bpmnProcessId, startEventId, messageName, processInstanceKey, correlationKey, messageKey.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a MessageStartEventSubscriptionRecordValue 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 MessageStartEventSubscriptionRecordValue instance
    • builder

      Creates a builder for ImmutableMessageStartEventSubscriptionRecordValue.
       ImmutableMessageStartEventSubscriptionRecordValue.builder()
          .putVariable|putAllVariables(String => Object) // variables mappings
          .withTenantId(String | null) // nullable tenantId
          .withProcessDefinitionKey(long) // optional processDefinitionKey
          .withBpmnProcessId(String | null) // nullable bpmnProcessId
          .withStartEventId(String | null) // nullable startEventId
          .withMessageName(String | null) // nullable messageName
          .withProcessInstanceKey(long) // optional processInstanceKey
          .withCorrelationKey(String | null) // nullable correlationKey
          .withMessageKey(long) // optional messageKey
          .build();
       
      Returns:
      A new ImmutableMessageStartEventSubscriptionRecordValue builder