Class ChatPostMessageResponse.Builder

java.lang.Object
com.hubspot.slack.client.models.response.chat.ChatPostMessageResponse.Builder
Enclosing class:
ChatPostMessageResponse

@Generated(from="ChatPostMessageResponseIF", generator="Immutables") @NotThreadSafe public static final class ChatPostMessageResponse.Builder extends Object
Builds instances of type ChatPostMessageResponse. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final ChatPostMessageResponse.Builder from(SlackResponse instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.response.SlackResponse instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.response.chat.ChatPostMessageResponseIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setOk

      public final ChatPostMessageResponse.Builder setOk(boolean ok)
      Initializes the value for the ok attribute.
      Parameters:
      ok - The value for ok
      Returns:
      this builder for use in a chained invocation
    • setResponseMetadata

      public final ChatPostMessageResponse.Builder setResponseMetadata(@Nullable ResponseMetadata responseMetadata)
      Initializes the optional value responseMetadata to responseMetadata.
      Parameters:
      responseMetadata - The value for responseMetadata, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setResponseMetadata

      public final ChatPostMessageResponse.Builder setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata)
      Initializes the optional value responseMetadata to responseMetadata.
      Parameters:
      responseMetadata - The value for responseMetadata
      Returns:
      this builder for use in a chained invocation
    • setTs

      public final ChatPostMessageResponse.Builder setTs(String ts)
      Initializes the value for the ts attribute.
      Parameters:
      ts - The value for ts
      Returns:
      this builder for use in a chained invocation
    • setChannel

      public final ChatPostMessageResponse.Builder setChannel(String channel)
      Initializes the value for the channel attribute.
      Parameters:
      channel - The value for channel
      Returns:
      this builder for use in a chained invocation
    • putMessage

      public final ChatPostMessageResponse.Builder putMessage(String key, Object value)
      Put one entry to the message map.
      Parameters:
      key - The key in the message map
      value - The associated value in the message map
      Returns:
      this builder for use in a chained invocation
    • putMessage

      public final ChatPostMessageResponse.Builder putMessage(Map.Entry<String,? extends Object> entry)
      Put one entry to the message map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • setMessage

      public final ChatPostMessageResponse.Builder setMessage(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the message map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the message map
      Returns:
      this builder for use in a chained invocation
    • putAllMessage

      public final ChatPostMessageResponse.Builder putAllMessage(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to message map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the message map
      Returns:
      this builder for use in a chained invocation
    • build

      public ChatPostMessageResponse build()
      Returns:
      An immutable instance of ChatPostMessageResponse
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing