Interface BatchPutMessageRequest.Builder

    • Method Detail

      • channelName

        BatchPutMessageRequest.Builder channelName​(String channelName)

        The name of the channel where the messages are sent.

        Parameters:
        channelName - The name of the channel where the messages are sent.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • messages

        BatchPutMessageRequest.Builder messages​(Collection<Message> messages)

        The list of messages to be sent. Each message has the format: { "messageId": "string", "payload": "string"}.

        The field names of message payloads (data) that you send to IoT Analytics:

        • Must contain only alphanumeric characters and undescores (_). No other special characters are allowed.

        • Must begin with an alphabetic character or single underscore (_).

        • Cannot contain hyphens (-).

        • In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$".

        • Cannot be more than 255 characters.

        • Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)

        For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads.

        Parameters:
        messages - The list of messages to be sent. Each message has the format: { "messageId": "string", "payload": "string"}.

        The field names of message payloads (data) that you send to IoT Analytics:

        • Must contain only alphanumeric characters and undescores (_). No other special characters are allowed.

        • Must begin with an alphabetic character or single underscore (_).

        • Cannot contain hyphens (-).

        • In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$".

        • Cannot be more than 255 characters.

        • Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)

        For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • messages

        BatchPutMessageRequest.Builder messages​(Message... messages)

        The list of messages to be sent. Each message has the format: { "messageId": "string", "payload": "string"}.

        The field names of message payloads (data) that you send to IoT Analytics:

        • Must contain only alphanumeric characters and undescores (_). No other special characters are allowed.

        • Must begin with an alphabetic character or single underscore (_).

        • Cannot contain hyphens (-).

        • In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$".

        • Cannot be more than 255 characters.

        • Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)

        For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads.

        Parameters:
        messages - The list of messages to be sent. Each message has the format: { "messageId": "string", "payload": "string"}.

        The field names of message payloads (data) that you send to IoT Analytics:

        • Must contain only alphanumeric characters and undescores (_). No other special characters are allowed.

        • Must begin with an alphabetic character or single underscore (_).

        • Cannot contain hyphens (-).

        • In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$".

        • Cannot be more than 255 characters.

        • Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)

        For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • messages

        BatchPutMessageRequest.Builder messages​(Consumer<Message.Builder>... messages)

        The list of messages to be sent. Each message has the format: { "messageId": "string", "payload": "string"}.

        The field names of message payloads (data) that you send to IoT Analytics:

        • Must contain only alphanumeric characters and undescores (_). No other special characters are allowed.

        • Must begin with an alphabetic character or single underscore (_).

        • Cannot contain hyphens (-).

        • In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$".

        • Cannot be more than 255 characters.

        • Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)

        For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads.

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

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

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