Class SlackTextFile

java.lang.Object
com.hubspot.slack.client.models.files.SlackTextFile
All Implemented Interfaces:
SlackFile, SlackTextFileCore, SlackTextFileIF

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

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

  • Method Details

    • getId

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

      public long getCreatedEpochSeconds()
      Specified by:
      getCreatedEpochSeconds in interface SlackFile
      Returns:
      The value of the createdEpochSeconds attribute
    • getTimestampEpochSeconds

      public long getTimestampEpochSeconds()
      Specified by:
      getTimestampEpochSeconds in interface SlackFile
      Returns:
      The value of the timestampEpochSeconds attribute
    • getName

      public String getName()
      Specified by:
      getName in interface SlackFile
      Returns:
      The value of the name attribute
    • getTitle

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

      public String getMimetype()
      Specified by:
      getMimetype in interface SlackFile
      Returns:
      The value of the mimetype attribute
    • getPrettyType

      public String getPrettyType()
      Specified by:
      getPrettyType in interface SlackFile
      Returns:
      The value of the prettyType attribute
    • getUserId

      public String getUserId()
      Specified by:
      getUserId in interface SlackFile
      Returns:
      The value of the userId attribute
    • isEditable

      public boolean isEditable()
      Specified by:
      isEditable in interface SlackFile
      Returns:
      The value of the editable attribute
    • getSize

      public long getSize()
      Specified by:
      getSize in interface SlackFile
      Returns:
      The value of the size attribute
    • getMode

      public String getMode()
      Specified by:
      getMode in interface SlackFile
      Returns:
      The value of the mode attribute
    • isExternal

      public boolean isExternal()
      Specified by:
      isExternal in interface SlackFile
      Returns:
      The value of the external attribute
    • isPublic

      public boolean isPublic()
      Specified by:
      isPublic in interface SlackFile
      Returns:
      The value of the isPublic attribute
    • isPublicUrlShared

      public boolean isPublicUrlShared()
      Specified by:
      isPublicUrlShared in interface SlackFile
      Returns:
      The value of the publicUrlShared attribute
    • getDisplayAsBot

      public boolean getDisplayAsBot()
      Specified by:
      getDisplayAsBot in interface SlackFile
      Returns:
      The value of the displayAsBot attribute
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface SlackFile
      Returns:
      The value of the username attribute
    • getUrlPrivate

      public String getUrlPrivate()
      Specified by:
      getUrlPrivate in interface SlackFile
      Returns:
      The value of the urlPrivate attribute
    • getUrlPrivateDownload

      public Optional<String> getUrlPrivateDownload()
      Specified by:
      getUrlPrivateDownload in interface SlackFile
      Returns:
      The value of the urlPrivateDownload attribute
    • getPermalink

      public String getPermalink()
      Specified by:
      getPermalink in interface SlackFile
      Returns:
      The value of the permalink attribute
    • getPermalinkPublic

      public Optional<String> getPermalinkPublic()
      Specified by:
      getPermalinkPublic in interface SlackFile
      Returns:
      The value of the permalinkPublic attribute
    • getCommentsCount

      public int getCommentsCount()
      Specified by:
      getCommentsCount in interface SlackFile
      Returns:
      The value of the commentsCount attribute
    • isStarred

      public Optional<Boolean> isStarred()
      Specified by:
      isStarred in interface SlackFile
      Returns:
      The value of the starred attribute
    • getChannelIds

      public List<String> getChannelIds()
      Specified by:
      getChannelIds in interface SlackFile
      Returns:
      The value of the channelIds attribute
    • getGroupIds

      public List<String> getGroupIds()
      Specified by:
      getGroupIds in interface SlackFile
      Returns:
      The value of the groupIds attribute
    • getImIds

      public List<String> getImIds()
      Specified by:
      getImIds in interface SlackFile
      Returns:
      The value of the imIds attribute
    • getEditLink

      public Optional<String> getEditLink()
      Specified by:
      getEditLink in interface SlackTextFileCore
      Returns:
      The value of the editLink attribute
    • getPreview

      public Optional<String> getPreview()
      Specified by:
      getPreview in interface SlackTextFileCore
      Returns:
      The value of the preview attribute
    • getPreviewHighlight

      public Optional<String> getPreviewHighlight()
      Specified by:
      getPreviewHighlight in interface SlackTextFileCore
      Returns:
      The value of the previewHighlight attribute
    • getLines

      public Optional<String> getLines()
      Specified by:
      getLines in interface SlackTextFileCore
      Returns:
      The value of the lines attribute
    • getLinesMore

      public Optional<String> getLinesMore()
      Specified by:
      getLinesMore in interface SlackTextFileCore
      Returns:
      The value of the linesMore attribute
    • isPreviewTruncated

      public Optional<Boolean> isPreviewTruncated()
      Specified by:
      isPreviewTruncated in interface SlackTextFileCore
      Returns:
      The value of the previewTruncated attribute
    • getFiletype

      public SlackFileType getFiletype()
      Specified by:
      getFiletype in interface SlackFile
      Specified by:
      getFiletype in interface SlackTextFileIF
      Returns:
      The value of the filetype attribute
    • withId

      public final SlackTextFile 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
    • withCreatedEpochSeconds

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

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

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

      public final SlackTextFile 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
    • withMimetype

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public final SlackTextFile withCommentsCount(int value)
      Copy the current immutable object by setting a value for the commentsCount attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for commentsCount
      Returns:
      A modified copy or the this object
    • withStarred

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

      public final SlackTextFile withStarred(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the starred 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 starred
      Returns:
      A modified copy or this if not changed
    • withChannelIds

      public final SlackTextFile withChannelIds(String... elements)
      Copy the current immutable object with elements that replace the content of channelIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withChannelIds

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

      public final SlackTextFile withGroupIds(String... elements)
      Copy the current immutable object with elements that replace the content of groupIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withGroupIds

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

      public final SlackTextFile withImIds(String... elements)
      Copy the current immutable object with elements that replace the content of imIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withImIds

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

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

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

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

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

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

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

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

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

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

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

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

      public final SlackTextFile withPreviewTruncated(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the previewTruncated 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 previewTruncated
      Returns:
      A modified copy or this if not changed
    • withFiletype

      public final SlackTextFile withFiletype(SlackFileType value)
      Copy the current immutable object by setting a value for the filetype attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for filetype
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlackTextFile 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: id, createdEpochSeconds, timestampEpochSeconds, name, title, mimetype, prettyType, userId, editable, size, mode, external, isPublic, publicUrlShared, displayAsBot, username, urlPrivate, urlPrivateDownload, permalink, permalinkPublic, commentsCount, starred, channelIds, groupIds, imIds, editLink, preview, previewHighlight, lines, linesMore, previewTruncated, filetype.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlackTextFile.Builder builder()
      Creates a builder for SlackTextFile.
       SlackTextFile.builder()
          .setId(String) // required id
          .setCreatedEpochSeconds(long) // required createdEpochSeconds
          .setTimestampEpochSeconds(long) // required timestampEpochSeconds
          .setName(String) // required name
          .setTitle(String) // required title
          .setMimetype(String) // required mimetype
          .setPrettyType(String) // required prettyType
          .setUserId(String) // required userId
          .setEditable(boolean) // required editable
          .setSize(long) // required size
          .setMode(String) // required mode
          .setExternal(boolean) // required external
          .setPublic(boolean) // required public
          .setPublicUrlShared(boolean) // required publicUrlShared
          .setDisplayAsBot(boolean) // required displayAsBot
          .setUsername(String) // required username
          .setUrlPrivate(String) // required urlPrivate
          .setUrlPrivateDownload(Optional<String>) // optional urlPrivateDownload
          .setPermalink(String) // required permalink
          .setPermalinkPublic(Optional<String>) // optional permalinkPublic
          .setCommentsCount(int) // optional commentsCount
          .setStarred(Optional<Boolean>) // optional starred
          .addChannelIds|addAllChannelIds(String) // channelIds elements
          .addGroupIds|addAllGroupIds(String) // groupIds elements
          .addImIds|addAllImIds(String) // imIds elements
          .setEditLink(Optional<String>) // optional editLink
          .setPreview(Optional<String>) // optional preview
          .setPreviewHighlight(Optional<String>) // optional previewHighlight
          .setLines(Optional<String>) // optional lines
          .setLinesMore(Optional<String>) // optional linesMore
          .setPreviewTruncated(Optional<Boolean>) // optional previewTruncated
          .setFiletype(com.hubspot.slack.client.models.files.SlackFileType) // optional filetype
          .build();
       
      Returns:
      A new SlackTextFile builder