Class ChatScheduleMessageParams

java.lang.Object
com.hubspot.slack.client.methods.params.chat.ChatScheduleMessageParams
All Implemented Interfaces:
HasChannel, ChatScheduleMessageParamsIF, MessageParams

@Generated(from="ChatScheduleMessageParamsIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ChatScheduleMessageParams extends Object implements ChatScheduleMessageParamsIF
Immutable implementation of ChatScheduleMessageParamsIF.

Use the builder to create immutable instances: ChatScheduleMessageParams.builder().

  • Method Details

    • getText

      public Optional<String> getText()
      Specified by:
      getText in interface MessageParams
      Returns:
      The value of the text attribute
    • getAttachments

      public List<Attachment> getAttachments()
      Specified by:
      getAttachments in interface MessageParams
      Returns:
      The value of the attachments attribute
    • getBlocks

      public List<Block> getBlocks()
      Specified by:
      getBlocks in interface MessageParams
      Returns:
      The value of the blocks attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface ChatScheduleMessageParamsIF
      Specified by:
      getChannelId in interface HasChannel
      Returns:
      The value of the channelId attribute
    • getPostAt

      public long getPostAt()
      Specified by:
      getPostAt in interface ChatScheduleMessageParamsIF
      Returns:
      The value of the postAt attribute
    • getShouldLinkNames

      public boolean getShouldLinkNames()
      Specified by:
      getShouldLinkNames in interface ChatScheduleMessageParamsIF
      Returns:
      The value of the shouldLinkNames attribute
    • getParseMode

      public String getParseMode()
      Specified by:
      getParseMode in interface ChatScheduleMessageParamsIF
      Returns:
      The value of the parseMode attribute
    • getThreadTs

      public String getThreadTs()
      Specified by:
      getThreadTs in interface ChatScheduleMessageParamsIF
      Returns:
      The value of the threadTs attribute
    • getUnfurlLinks

      public Optional<Boolean> getUnfurlLinks()
      Specified by:
      getUnfurlLinks in interface ChatScheduleMessageParamsIF
      Returns:
      The value of the unfurlLinks attribute
    • getUnfurlMedia

      public Optional<Boolean> getUnfurlMedia()
      Specified by:
      getUnfurlMedia in interface ChatScheduleMessageParamsIF
      Returns:
      The value of the unfurlMedia attribute
    • withText

      public final ChatScheduleMessageParams withText(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional text attribute.
      Parameters:
      value - The value for text, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withText

      public final ChatScheduleMessageParams withText(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the text attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for text
      Returns:
      A modified copy or this if not changed
    • withAttachments

      public final ChatScheduleMessageParams withAttachments(Attachment... elements)
      Copy the current immutable object with elements that replace the content of attachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAttachments

      public final ChatScheduleMessageParams withAttachments(Iterable<? extends Attachment> elements)
      Copy the current immutable object with elements that replace the content of attachments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of attachments elements to set
      Returns:
      A modified copy or this if not changed
    • withBlocks

      public final ChatScheduleMessageParams withBlocks(Block... elements)
      Copy the current immutable object with elements that replace the content of blocks.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withBlocks

      public final ChatScheduleMessageParams withBlocks(Iterable<? extends Block> elements)
      Copy the current immutable object with elements that replace the content of blocks. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of blocks elements to set
      Returns:
      A modified copy or this if not changed
    • withChannelId

      public final ChatScheduleMessageParams withChannelId(String value)
      Copy the current immutable object by setting a value for the channelId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for channelId
      Returns:
      A modified copy or the this object
    • withPostAt

      public final ChatScheduleMessageParams withPostAt(long value)
      Copy the current immutable object by setting a value for the postAt attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for postAt
      Returns:
      A modified copy or the this object
    • withShouldLinkNames

      public final ChatScheduleMessageParams withShouldLinkNames(boolean value)
      Copy the current immutable object by setting a value for the shouldLinkNames attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for shouldLinkNames
      Returns:
      A modified copy or the this object
    • withParseMode

      public final ChatScheduleMessageParams withParseMode(String value)
      Copy the current immutable object by setting a value for the parseMode attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for parseMode
      Returns:
      A modified copy or the this object
    • withThreadTs

      public final ChatScheduleMessageParams withThreadTs(String value)
      Copy the current immutable object by setting a value for the threadTs attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for threadTs
      Returns:
      A modified copy or the this object
    • withUnfurlLinks

      public final ChatScheduleMessageParams withUnfurlLinks(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional unfurlLinks attribute.
      Parameters:
      value - The value for unfurlLinks, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUnfurlLinks

      public final ChatScheduleMessageParams withUnfurlLinks(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the unfurlLinks attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for unfurlLinks
      Returns:
      A modified copy or this if not changed
    • withUnfurlMedia

      public final ChatScheduleMessageParams withUnfurlMedia(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional unfurlMedia attribute.
      Parameters:
      value - The value for unfurlMedia, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUnfurlMedia

      public final ChatScheduleMessageParams withUnfurlMedia(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the unfurlMedia attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for unfurlMedia
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ChatScheduleMessageParams that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: text, attachments, blocks, channelId, postAt, shouldLinkNames, parseMode, threadTs, unfurlLinks, unfurlMedia.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ChatScheduleMessageParams with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ChatScheduleMessageParams copyOf(ChatScheduleMessageParamsIF instance)
      Creates an immutable copy of a ChatScheduleMessageParamsIF value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ChatScheduleMessageParams instance
    • builder

      public static ChatScheduleMessageParams.Builder builder()
      Creates a builder for ChatScheduleMessageParams.
       ChatScheduleMessageParams.builder()
          .setText(Optional<String>) // optional text
          .addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) // attachments elements
          .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) // blocks elements
          .setChannelId(String) // required channelId
          .setPostAt(long) // required postAt
          .setShouldLinkNames(boolean) // optional shouldLinkNames
          .setParseMode(String) // optional parseMode
          .setThreadTs(String) // optional threadTs
          .setUnfurlLinks(Optional<Boolean>) // optional unfurlLinks
          .setUnfurlMedia(Optional<Boolean>) // optional unfurlMedia
          .build();
       
      Returns:
      A new ChatScheduleMessageParams builder