java.lang.Object
com.hubspot.slack.client.models.bookmarks.Bookmark
All Implemented Interfaces:
BookmarkIF

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

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

  • Method Details

    • getType

      public BookmarkType getType()
      Specified by:
      getType in interface BookmarkIF
      Returns:
      The value of the type attribute
    • getId

      public String getId()
      Specified by:
      getId in interface BookmarkIF
      Returns:
      The value of the id attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface BookmarkIF
      Returns:
      The value of the channelId attribute
    • getTitle

      public String getTitle()
      Specified by:
      getTitle in interface BookmarkIF
      Returns:
      The value of the title attribute
    • getLink

      public Optional<String> getLink()
      Specified by:
      getLink in interface BookmarkIF
      Returns:
      The value of the link attribute
    • getEmoji

      public Optional<String> getEmoji()
      Specified by:
      getEmoji in interface BookmarkIF
      Returns:
      The value of the emoji attribute
    • getIconUrl

      public Optional<String> getIconUrl()
      Specified by:
      getIconUrl in interface BookmarkIF
      Returns:
      The value of the iconUrl attribute
    • getEntityId

      public Optional<String> getEntityId()
      Specified by:
      getEntityId in interface BookmarkIF
      Returns:
      The value of the entityId attribute
    • getDateCreatedEpochSeconds

      public long getDateCreatedEpochSeconds()
      Specified by:
      getDateCreatedEpochSeconds in interface BookmarkIF
      Returns:
      The value of the dateCreatedEpochSeconds attribute
    • getCreatedAt

      public Instant getCreatedAt()
      Specified by:
      getCreatedAt in interface BookmarkIF
      Returns:
      The computed-at-construction value of the createdAt attribute
    • getDateUpdatedEpochSeconds

      public long getDateUpdatedEpochSeconds()
      Specified by:
      getDateUpdatedEpochSeconds in interface BookmarkIF
      Returns:
      The value of the dateUpdatedEpochSeconds attribute
    • getUpdatedAt

      public Instant getUpdatedAt()
      Specified by:
      getUpdatedAt in interface BookmarkIF
      Returns:
      The computed-at-construction value of the updatedAt attribute
    • getRank

      public Optional<String> getRank()
      Specified by:
      getRank in interface BookmarkIF
      Returns:
      The value of the rank attribute
    • getLastUpdatedByUserId

      public Optional<String> getLastUpdatedByUserId()
      Specified by:
      getLastUpdatedByUserId in interface BookmarkIF
      Returns:
      The value of the lastUpdatedByUserId attribute
    • getLastUpdatedByTeamId

      public Optional<String> getLastUpdatedByTeamId()
      Specified by:
      getLastUpdatedByTeamId in interface BookmarkIF
      Returns:
      The value of the lastUpdatedByTeamId attribute
    • getShortcutId

      public Optional<String> getShortcutId()
      Specified by:
      getShortcutId in interface BookmarkIF
      Returns:
      The value of the shortcutId attribute
    • getAppId

      public Optional<String> getAppId()
      Specified by:
      getAppId in interface BookmarkIF
      Returns:
      The value of the appId attribute
    • withType

      public final Bookmark withType(BookmarkType value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withId

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

      public final Bookmark 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
    • withTitle

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

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

      public final Bookmark withLink(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the link 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 link
      Returns:
      A modified copy or this if not changed
    • withEmoji

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

      public final Bookmark withEmoji(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the emoji 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 emoji
      Returns:
      A modified copy or this if not changed
    • withIconUrl

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

      public final Bookmark withIconUrl(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the iconUrl 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 iconUrl
      Returns:
      A modified copy or this if not changed
    • withEntityId

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

      public final Bookmark withEntityId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the entityId 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 entityId
      Returns:
      A modified copy or this if not changed
    • withDateCreatedEpochSeconds

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

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

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

      public final Bookmark withRank(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the rank 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 rank
      Returns:
      A modified copy or this if not changed
    • withLastUpdatedByUserId

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

      public final Bookmark withLastUpdatedByUserId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the lastUpdatedByUserId 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 lastUpdatedByUserId
      Returns:
      A modified copy or this if not changed
    • withLastUpdatedByTeamId

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

      public final Bookmark withLastUpdatedByTeamId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the lastUpdatedByTeamId 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 lastUpdatedByTeamId
      Returns:
      A modified copy or this if not changed
    • withShortcutId

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

      public final Bookmark withShortcutId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the shortcutId 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 shortcutId
      Returns:
      A modified copy or this if not changed
    • withAppId

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

      public final Bookmark withAppId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the appId 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 appId
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Bookmark 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: type, id, channelId, title, link, emoji, iconUrl, entityId, dateCreatedEpochSeconds, createdAt, dateUpdatedEpochSeconds, updatedAt, rank, lastUpdatedByUserId, lastUpdatedByTeamId, shortcutId, appId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static Bookmark copyOf(BookmarkIF instance)
      Creates an immutable copy of a BookmarkIF 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 Bookmark instance
    • builder

      public static Bookmark.Builder builder()
      Creates a builder for Bookmark.
       Bookmark.builder()
          .setType(com.hubspot.slack.client.models.bookmarks.BookmarkType) // required type
          .setId(String) // required id
          .setChannelId(String) // required channelId
          .setTitle(String) // required title
          .setLink(Optional<String>) // optional link
          .setEmoji(Optional<String>) // optional emoji
          .setIconUrl(Optional<String>) // optional iconUrl
          .setEntityId(Optional<String>) // optional entityId
          .setDateCreatedEpochSeconds(long) // required dateCreatedEpochSeconds
          .setDateUpdatedEpochSeconds(long) // required dateUpdatedEpochSeconds
          .setRank(Optional<String>) // optional rank
          .setLastUpdatedByUserId(Optional<String>) // optional lastUpdatedByUserId
          .setLastUpdatedByTeamId(Optional<String>) // optional lastUpdatedByTeamId
          .setShortcutId(Optional<String>) // optional shortcutId
          .setAppId(Optional<String>) // optional appId
          .build();
       
      Returns:
      A new Bookmark builder