Interface Message.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Message.Builder,Message>, SdkBuilder<Message.Builder,Message>, SdkPojo
Enclosing class:
Message

public static interface Message.Builder extends SdkPojo, CopyableBuilder<Message.Builder,Message>
  • Method Details

    • messageId

      Message.Builder messageId(String messageId)

      The ID to assign to the message. Within each batch sent, each "messageId" must be unique.

      Parameters:
      messageId - The ID to assign to the message. Within each batch sent, each "messageId" must be unique.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inputName

      Message.Builder inputName(String inputName)

      The name of the input into which the message payload is transformed.

      Parameters:
      inputName - The name of the input into which the message payload is transformed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • payload

      Message.Builder payload(SdkBytes payload)

      The payload of the message. This can be a JSON string or a Base-64-encoded string representing binary data (in which case you must decode it).

      Parameters:
      payload - The payload of the message. This can be a JSON string or a Base-64-encoded string representing binary data (in which case you must decode it).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • timestamp

      Message.Builder timestamp(TimestampValue timestamp)

      The timestamp associated with the message.

      Parameters:
      timestamp - The timestamp associated with the message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • timestamp

      default Message.Builder timestamp(Consumer<TimestampValue.Builder> timestamp)

      The timestamp associated with the message.

      This is a convenience method that creates an instance of the TimestampValue.Builder avoiding the need to create one manually via TimestampValue.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to timestamp(TimestampValue).

      Parameters:
      timestamp - a consumer that will call methods on TimestampValue.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: