Class Bookmark.Builder

java.lang.Object
com.hubspot.slack.client.models.bookmarks.Bookmark.Builder
Enclosing class:
Bookmark

@Generated(from="BookmarkIF", generator="Immutables") @NotThreadSafe public static final class Bookmark.Builder extends Object
Builds instances of type Bookmark. 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 Bookmark.Builder from(BookmarkIF instance)
      Fill a builder with attribute values from the provided BookmarkIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setType

      public final Bookmark.Builder setType(BookmarkType type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • setId

      public final Bookmark.Builder setId(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • setChannelId

      public final Bookmark.Builder setChannelId(String channelId)
      Initializes the value for the channelId attribute.
      Parameters:
      channelId - The value for channelId
      Returns:
      this builder for use in a chained invocation
    • setTitle

      public final Bookmark.Builder setTitle(String title)
      Initializes the value for the title attribute.
      Parameters:
      title - The value for title
      Returns:
      this builder for use in a chained invocation
    • setLink

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

      public final Bookmark.Builder setLink(Optional<String> link)
      Initializes the optional value link to link.
      Parameters:
      link - The value for link
      Returns:
      this builder for use in a chained invocation
    • setEmoji

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

      public final Bookmark.Builder setEmoji(Optional<String> emoji)
      Initializes the optional value emoji to emoji.
      Parameters:
      emoji - The value for emoji
      Returns:
      this builder for use in a chained invocation
    • setIconUrl

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

      public final Bookmark.Builder setIconUrl(Optional<String> iconUrl)
      Initializes the optional value iconUrl to iconUrl.
      Parameters:
      iconUrl - The value for iconUrl
      Returns:
      this builder for use in a chained invocation
    • setEntityId

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

      public final Bookmark.Builder setEntityId(Optional<String> entityId)
      Initializes the optional value entityId to entityId.
      Parameters:
      entityId - The value for entityId
      Returns:
      this builder for use in a chained invocation
    • setDateCreatedEpochSeconds

      public final Bookmark.Builder setDateCreatedEpochSeconds(long dateCreatedEpochSeconds)
      Initializes the value for the dateCreatedEpochSeconds attribute.
      Parameters:
      dateCreatedEpochSeconds - The value for dateCreatedEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setDateUpdatedEpochSeconds

      public final Bookmark.Builder setDateUpdatedEpochSeconds(long dateUpdatedEpochSeconds)
      Initializes the value for the dateUpdatedEpochSeconds attribute.
      Parameters:
      dateUpdatedEpochSeconds - The value for dateUpdatedEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setRank

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

      public final Bookmark.Builder setRank(Optional<String> rank)
      Initializes the optional value rank to rank.
      Parameters:
      rank - The value for rank
      Returns:
      this builder for use in a chained invocation
    • setLastUpdatedByUserId

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

      public final Bookmark.Builder setLastUpdatedByUserId(Optional<String> lastUpdatedByUserId)
      Initializes the optional value lastUpdatedByUserId to lastUpdatedByUserId.
      Parameters:
      lastUpdatedByUserId - The value for lastUpdatedByUserId
      Returns:
      this builder for use in a chained invocation
    • setLastUpdatedByTeamId

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

      public final Bookmark.Builder setLastUpdatedByTeamId(Optional<String> lastUpdatedByTeamId)
      Initializes the optional value lastUpdatedByTeamId to lastUpdatedByTeamId.
      Parameters:
      lastUpdatedByTeamId - The value for lastUpdatedByTeamId
      Returns:
      this builder for use in a chained invocation
    • setShortcutId

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

      public final Bookmark.Builder setShortcutId(Optional<String> shortcutId)
      Initializes the optional value shortcutId to shortcutId.
      Parameters:
      shortcutId - The value for shortcutId
      Returns:
      this builder for use in a chained invocation
    • setAppId

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

      public final Bookmark.Builder setAppId(Optional<String> appId)
      Initializes the optional value appId to appId.
      Parameters:
      appId - The value for appId
      Returns:
      this builder for use in a chained invocation
    • build

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