Interface SendChannelMessageRequest.Builder

    • Method Detail

      • channelArn

        SendChannelMessageRequest.Builder channelArn​(String channelArn)

        The ARN of the channel.

        Parameters:
        channelArn - The ARN of the channel.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • content

        SendChannelMessageRequest.Builder content​(String content)

        The content of the channel message.

        Parameters:
        content - The content of the channel message.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • type

        SendChannelMessageRequest.Builder type​(String type)

        The type of message, STANDARD or CONTROL.

        STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment.

        CONTROL messages are limited to 30 bytes and do not contain metadata.

        Parameters:
        type - The type of message, STANDARD or CONTROL.

        STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment.

        CONTROL messages are limited to 30 bytes and do not contain metadata.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ChannelMessageType, ChannelMessageType
      • type

        SendChannelMessageRequest.Builder type​(ChannelMessageType type)

        The type of message, STANDARD or CONTROL.

        STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment.

        CONTROL messages are limited to 30 bytes and do not contain metadata.

        Parameters:
        type - The type of message, STANDARD or CONTROL.

        STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment.

        CONTROL messages are limited to 30 bytes and do not contain metadata.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ChannelMessageType, ChannelMessageType
      • metadata

        SendChannelMessageRequest.Builder metadata​(String metadata)

        The optional metadata for each message.

        Parameters:
        metadata - The optional metadata for each message.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • clientRequestToken

        SendChannelMessageRequest.Builder clientRequestToken​(String clientRequestToken)

        The Idempotency token for each client request.

        Parameters:
        clientRequestToken - The Idempotency token for each client request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • chimeBearer

        SendChannelMessageRequest.Builder chimeBearer​(String chimeBearer)

        The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

        Parameters:
        chimeBearer - The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • pushNotification

        SendChannelMessageRequest.Builder pushNotification​(PushNotificationConfiguration pushNotification)

        The push notification configuration of the message.

        Parameters:
        pushNotification - The push notification configuration of the message.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • messageAttributes

        SendChannelMessageRequest.Builder messageAttributes​(Map<String,​MessageAttributeValue> messageAttributes)

        The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences.

        Parameters:
        messageAttributes - The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • subChannelId

        SendChannelMessageRequest.Builder subChannelId​(String subChannelId)

        The ID of the SubChannel in the request.

        Parameters:
        subChannelId - The ID of the SubChannel in the request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • contentType

        SendChannelMessageRequest.Builder contentType​(String contentType)

        The content type of the channel message.

        Parameters:
        contentType - The content type of the channel message.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • target

        SendChannelMessageRequest.Builder target​(Collection<Target> target)

        The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

        Parameters:
        target - The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • target

        SendChannelMessageRequest.Builder target​(Target... target)

        The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

        Parameters:
        target - The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • target

        SendChannelMessageRequest.Builder target​(Consumer<Target.Builder>... target)

        The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

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

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #target(List).

        Parameters:
        target - a consumer that will call methods on Target.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #target(java.util.Collection)