Class Message
-
- All Implemented Interfaces:
public final class MessageRepresents a single message that was generated by a workflow for a given channel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMessage.BuilderA builder for Message.
public final classMessage.DataData associated with the message’s workflow run. Includes the workflow trigger request’s
datapayload merged with any additional data returned by a /designing-workflows/fetch-function. For messages produced after a /designing-workflows/batch-function, includes the payloaddatafrom the most-recent trigger request (the finalactivityin the batch).public final classMessage.EngagementStatusAn engagement status for a message. Can be one of: read, seen, interacted, link_clicked, archived.
public final classMessage.MetadataThe metadata associated with the message.
public final classMessage.SourceThe workflow that triggered the message.
public final classMessage.StatusThe message delivery status.
-
Method Summary
Modifier and Type Method Description final Optional<String>id()The unique identifier for the message. final Optional<String>_typename()The typename of the schema. final Optional<List<RecipientReference>>actors()One or more actors that are associated with this message. final Optional<OffsetDateTime>archivedAt()Timestamp when the message was archived. final Optional<String>channelId()The ID for the channel the message was sent through. final Optional<OffsetDateTime>clickedAt()Timestamp when the message was clicked. final Optional<Message.Data>data()Data associated with the message’s workflow run. final Optional<List<Message.EngagementStatus>>engagementStatuses()A list of engagement statuses. final Optional<OffsetDateTime>insertedAt()Timestamp when the resource was created. final Optional<OffsetDateTime>interactedAt()Timestamp when the message was interacted with. final Optional<OffsetDateTime>linkClickedAt()Timestamp when a link in the message was clicked. final Optional<Message.Metadata>metadata()The metadata associated with the message. final Optional<OffsetDateTime>readAt()Timestamp when the message was read. final Optional<RecipientReference>recipient()A reference to a recipient, either a user identifier (string) or an object reference (ID, collection). final Optional<OffsetDateTime>scheduledAt()Timestamp when the message was scheduled to be sent. final Optional<OffsetDateTime>seenAt()Timestamp when the message was seen. final Optional<Message.Source>source()The workflow that triggered the message. final Optional<Message.Status>status()The message delivery status. final Optional<String>tenant()The ID of the tenantassociated with the message.final Optional<OffsetDateTime>updatedAt()The timestamp when the resource was last updated. final Optional<String>workflow()The key of the workflow that generated the message. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>__typename()Returns the raw JSON value of _typename. final JsonField<List<RecipientReference>>_actors()Returns the raw JSON value of actors. final JsonField<OffsetDateTime>_archivedAt()Returns the raw JSON value of archivedAt. final JsonField<String>_channelId()Returns the raw JSON value of channelId. final JsonField<OffsetDateTime>_clickedAt()Returns the raw JSON value of clickedAt. final JsonField<Message.Data>_data()Returns the raw JSON value of data. final JsonField<List<Message.EngagementStatus>>_engagementStatuses()Returns the raw JSON value of engagementStatuses. final JsonField<OffsetDateTime>_insertedAt()Returns the raw JSON value of insertedAt. final JsonField<OffsetDateTime>_interactedAt()Returns the raw JSON value of interactedAt. final JsonField<OffsetDateTime>_linkClickedAt()Returns the raw JSON value of linkClickedAt. final JsonField<Message.Metadata>_metadata()Returns the raw JSON value of metadata. final JsonField<OffsetDateTime>_readAt()Returns the raw JSON value of readAt. final JsonField<RecipientReference>_recipient()Returns the raw JSON value of recipient. final JsonField<OffsetDateTime>_scheduledAt()Returns the raw JSON value of scheduledAt. final JsonField<OffsetDateTime>_seenAt()Returns the raw JSON value of seenAt. final JsonField<Message.Source>_source()Returns the raw JSON value of source. final JsonField<Message.Status>_status()Returns the raw JSON value of status. final JsonField<String>_tenant()Returns the raw JSON value of tenant. final JsonField<OffsetDateTime>_updatedAt()Returns the raw JSON value of updatedAt. final JsonField<String>_workflow()Returns the raw JSON value of workflow. final Map<String, JsonValue>_additionalProperties()final Message.BuildertoBuilder()final Messagevalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Message.Builderbuilder()Returns a mutable builder for constructing an instance of Message. -
-
Method Detail
-
actors
final Optional<List<RecipientReference>> actors()
One or more actors that are associated with this message. Note: this is a list that can contain up to 10 actors if the message is produced from a /designing-workflows/batch-function.
-
archivedAt
final Optional<OffsetDateTime> archivedAt()
Timestamp when the message was archived.
-
clickedAt
final Optional<OffsetDateTime> clickedAt()
Timestamp when the message was clicked.
-
data
final Optional<Message.Data> data()
Data associated with the message’s workflow run. Includes the workflow trigger request’s
datapayload merged with any additional data returned by a /designing-workflows/fetch-function. For messages produced after a /designing-workflows/batch-function, includes the payloaddatafrom the most-recent trigger request (the finalactivityin the batch).
-
engagementStatuses
final Optional<List<Message.EngagementStatus>> engagementStatuses()
A list of engagement statuses.
-
insertedAt
final Optional<OffsetDateTime> insertedAt()
Timestamp when the resource was created.
-
interactedAt
final Optional<OffsetDateTime> interactedAt()
Timestamp when the message was interacted with.
-
linkClickedAt
final Optional<OffsetDateTime> linkClickedAt()
Timestamp when a link in the message was clicked.
-
metadata
final Optional<Message.Metadata> metadata()
The metadata associated with the message.
-
readAt
final Optional<OffsetDateTime> readAt()
Timestamp when the message was read.
-
recipient
final Optional<RecipientReference> recipient()
A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
-
scheduledAt
final Optional<OffsetDateTime> scheduledAt()
Timestamp when the message was scheduled to be sent.
-
seenAt
final Optional<OffsetDateTime> seenAt()
Timestamp when the message was seen.
-
source
final Optional<Message.Source> source()
The workflow that triggered the message.
-
status
final Optional<Message.Status> status()
The message delivery status.
-
tenant
final Optional<String> tenant()
The ID of the
tenantassociated with the message. Only present when atenantis provided on a workflow trigger request.
-
updatedAt
final Optional<OffsetDateTime> updatedAt()
The timestamp when the resource was last updated.
-
workflow
@Deprecated(message = "deprecated") final Optional<String> workflow()
The key of the workflow that generated the message.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
__typename
final JsonField<String> __typename()
Returns the raw JSON value of _typename.
Unlike _typename, this method doesn't throw if the JSON field has an unexpected type.
-
_actors
final JsonField<List<RecipientReference>> _actors()
Returns the raw JSON value of actors.
Unlike actors, this method doesn't throw if the JSON field has an unexpected type.
-
_archivedAt
final JsonField<OffsetDateTime> _archivedAt()
Returns the raw JSON value of archivedAt.
Unlike archivedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_channelId
final JsonField<String> _channelId()
Returns the raw JSON value of channelId.
Unlike channelId, this method doesn't throw if the JSON field has an unexpected type.
-
_clickedAt
final JsonField<OffsetDateTime> _clickedAt()
Returns the raw JSON value of clickedAt.
Unlike clickedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_data
final JsonField<Message.Data> _data()
Returns the raw JSON value of data.
Unlike data, this method doesn't throw if the JSON field has an unexpected type.
-
_engagementStatuses
final JsonField<List<Message.EngagementStatus>> _engagementStatuses()
Returns the raw JSON value of engagementStatuses.
Unlike engagementStatuses, this method doesn't throw if the JSON field has an unexpected type.
-
_insertedAt
final JsonField<OffsetDateTime> _insertedAt()
Returns the raw JSON value of insertedAt.
Unlike insertedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_interactedAt
final JsonField<OffsetDateTime> _interactedAt()
Returns the raw JSON value of interactedAt.
Unlike interactedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_linkClickedAt
final JsonField<OffsetDateTime> _linkClickedAt()
Returns the raw JSON value of linkClickedAt.
Unlike linkClickedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_metadata
final JsonField<Message.Metadata> _metadata()
Returns the raw JSON value of metadata.
Unlike metadata, this method doesn't throw if the JSON field has an unexpected type.
-
_readAt
final JsonField<OffsetDateTime> _readAt()
Returns the raw JSON value of readAt.
Unlike readAt, this method doesn't throw if the JSON field has an unexpected type.
-
_recipient
final JsonField<RecipientReference> _recipient()
Returns the raw JSON value of recipient.
Unlike recipient, this method doesn't throw if the JSON field has an unexpected type.
-
_scheduledAt
final JsonField<OffsetDateTime> _scheduledAt()
Returns the raw JSON value of scheduledAt.
Unlike scheduledAt, this method doesn't throw if the JSON field has an unexpected type.
-
_seenAt
final JsonField<OffsetDateTime> _seenAt()
Returns the raw JSON value of seenAt.
Unlike seenAt, this method doesn't throw if the JSON field has an unexpected type.
-
_source
final JsonField<Message.Source> _source()
Returns the raw JSON value of source.
Unlike source, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<Message.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_tenant
final JsonField<String> _tenant()
Returns the raw JSON value of tenant.
Unlike tenant, this method doesn't throw if the JSON field has an unexpected type.
-
_updatedAt
final JsonField<OffsetDateTime> _updatedAt()
Returns the raw JSON value of updatedAt.
Unlike updatedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_workflow
@Deprecated(message = "deprecated") final JsonField<String> _workflow()
Returns the raw JSON value of workflow.
Unlike workflow, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final Message.Builder toBuilder()
-
builder
final static Message.Builder builder()
Returns a mutable builder for constructing an instance of Message.
-
-
-
-