Class SlackCsvFile.Builder

java.lang.Object
com.hubspot.slack.client.models.files.SlackCsvFile.Builder
Enclosing class:
SlackCsvFile

@Generated(from="SlackCsvFileIF", generator="Immutables") @NotThreadSafe public static final class SlackCsvFile.Builder extends Object
Builds instances of type SlackCsvFile. 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 SlackCsvFile.Builder from(SlackTextFileCore instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.files.SlackTextFileCore instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

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

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

      public final SlackCsvFile.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
    • setCreatedEpochSeconds

      public final SlackCsvFile.Builder setCreatedEpochSeconds(long createdEpochSeconds)
      Initializes the value for the createdEpochSeconds attribute.
      Parameters:
      createdEpochSeconds - The value for createdEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setTimestampEpochSeconds

      public final SlackCsvFile.Builder setTimestampEpochSeconds(long timestampEpochSeconds)
      Initializes the value for the timestampEpochSeconds attribute.
      Parameters:
      timestampEpochSeconds - The value for timestampEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setName

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

      public final SlackCsvFile.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
    • setMimetype

      public final SlackCsvFile.Builder setMimetype(String mimetype)
      Initializes the value for the mimetype attribute.
      Parameters:
      mimetype - The value for mimetype
      Returns:
      this builder for use in a chained invocation
    • setPrettyType

      public final SlackCsvFile.Builder setPrettyType(String prettyType)
      Initializes the value for the prettyType attribute.
      Parameters:
      prettyType - The value for prettyType
      Returns:
      this builder for use in a chained invocation
    • setUserId

      public final SlackCsvFile.Builder setUserId(String userId)
      Initializes the value for the userId attribute.
      Parameters:
      userId - The value for userId
      Returns:
      this builder for use in a chained invocation
    • setEditable

      public final SlackCsvFile.Builder setEditable(boolean editable)
      Initializes the value for the editable attribute.
      Parameters:
      editable - The value for editable
      Returns:
      this builder for use in a chained invocation
    • setSize

      public final SlackCsvFile.Builder setSize(long size)
      Initializes the value for the size attribute.
      Parameters:
      size - The value for size
      Returns:
      this builder for use in a chained invocation
    • setMode

      public final SlackCsvFile.Builder setMode(String mode)
      Initializes the value for the mode attribute.
      Parameters:
      mode - The value for mode
      Returns:
      this builder for use in a chained invocation
    • setExternal

      public final SlackCsvFile.Builder setExternal(boolean external)
      Initializes the value for the external attribute.
      Parameters:
      external - The value for external
      Returns:
      this builder for use in a chained invocation
    • setPublic

      public final SlackCsvFile.Builder setPublic(boolean isPublic)
      Initializes the value for the public attribute.
      Parameters:
      isPublic - The value for isPublic
      Returns:
      this builder for use in a chained invocation
    • setPublicUrlShared

      public final SlackCsvFile.Builder setPublicUrlShared(boolean publicUrlShared)
      Initializes the value for the publicUrlShared attribute.
      Parameters:
      publicUrlShared - The value for publicUrlShared
      Returns:
      this builder for use in a chained invocation
    • setDisplayAsBot

      public final SlackCsvFile.Builder setDisplayAsBot(boolean displayAsBot)
      Initializes the value for the displayAsBot attribute.
      Parameters:
      displayAsBot - The value for displayAsBot
      Returns:
      this builder for use in a chained invocation
    • setUsername

      public final SlackCsvFile.Builder setUsername(String username)
      Initializes the value for the username attribute.
      Parameters:
      username - The value for username
      Returns:
      this builder for use in a chained invocation
    • setUrlPrivate

      public final SlackCsvFile.Builder setUrlPrivate(String urlPrivate)
      Initializes the value for the urlPrivate attribute.
      Parameters:
      urlPrivate - The value for urlPrivate
      Returns:
      this builder for use in a chained invocation
    • setUrlPrivateDownload

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

      public final SlackCsvFile.Builder setUrlPrivateDownload(Optional<String> urlPrivateDownload)
      Initializes the optional value urlPrivateDownload to urlPrivateDownload.
      Parameters:
      urlPrivateDownload - The value for urlPrivateDownload
      Returns:
      this builder for use in a chained invocation
    • setPermalink

      public final SlackCsvFile.Builder setPermalink(String permalink)
      Initializes the value for the permalink attribute.
      Parameters:
      permalink - The value for permalink
      Returns:
      this builder for use in a chained invocation
    • setPermalinkPublic

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

      public final SlackCsvFile.Builder setPermalinkPublic(Optional<String> permalinkPublic)
      Initializes the optional value permalinkPublic to permalinkPublic.
      Parameters:
      permalinkPublic - The value for permalinkPublic
      Returns:
      this builder for use in a chained invocation
    • setCommentsCount

      public final SlackCsvFile.Builder setCommentsCount(int commentsCount)
      Initializes the value for the commentsCount attribute.

      If not set, this attribute will have a default value as returned by the initializer of commentsCount.

      Parameters:
      commentsCount - The value for commentsCount
      Returns:
      this builder for use in a chained invocation
    • setStarred

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

      public final SlackCsvFile.Builder setStarred(Optional<Boolean> starred)
      Initializes the optional value starred to starred.
      Parameters:
      starred - The value for starred
      Returns:
      this builder for use in a chained invocation
    • addChannelIds

      public final SlackCsvFile.Builder addChannelIds(String element)
      Adds one element to channelIds list.
      Parameters:
      element - A channelIds element
      Returns:
      this builder for use in a chained invocation
    • addChannelIds

      public final SlackCsvFile.Builder addChannelIds(String... elements)
      Adds elements to channelIds list.
      Parameters:
      elements - An array of channelIds elements
      Returns:
      this builder for use in a chained invocation
    • setChannelIds

      public final SlackCsvFile.Builder setChannelIds(Iterable<String> elements)
      Sets or replaces all elements for channelIds list.
      Parameters:
      elements - An iterable of channelIds elements
      Returns:
      this builder for use in a chained invocation
    • addAllChannelIds

      public final SlackCsvFile.Builder addAllChannelIds(Iterable<String> elements)
      Adds elements to channelIds list.
      Parameters:
      elements - An iterable of channelIds elements
      Returns:
      this builder for use in a chained invocation
    • addGroupIds

      public final SlackCsvFile.Builder addGroupIds(String element)
      Adds one element to groupIds list.
      Parameters:
      element - A groupIds element
      Returns:
      this builder for use in a chained invocation
    • addGroupIds

      public final SlackCsvFile.Builder addGroupIds(String... elements)
      Adds elements to groupIds list.
      Parameters:
      elements - An array of groupIds elements
      Returns:
      this builder for use in a chained invocation
    • setGroupIds

      public final SlackCsvFile.Builder setGroupIds(Iterable<String> elements)
      Sets or replaces all elements for groupIds list.
      Parameters:
      elements - An iterable of groupIds elements
      Returns:
      this builder for use in a chained invocation
    • addAllGroupIds

      public final SlackCsvFile.Builder addAllGroupIds(Iterable<String> elements)
      Adds elements to groupIds list.
      Parameters:
      elements - An iterable of groupIds elements
      Returns:
      this builder for use in a chained invocation
    • addImIds

      public final SlackCsvFile.Builder addImIds(String element)
      Adds one element to imIds list.
      Parameters:
      element - A imIds element
      Returns:
      this builder for use in a chained invocation
    • addImIds

      public final SlackCsvFile.Builder addImIds(String... elements)
      Adds elements to imIds list.
      Parameters:
      elements - An array of imIds elements
      Returns:
      this builder for use in a chained invocation
    • setImIds

      public final SlackCsvFile.Builder setImIds(Iterable<String> elements)
      Sets or replaces all elements for imIds list.
      Parameters:
      elements - An iterable of imIds elements
      Returns:
      this builder for use in a chained invocation
    • addAllImIds

      public final SlackCsvFile.Builder addAllImIds(Iterable<String> elements)
      Adds elements to imIds list.
      Parameters:
      elements - An iterable of imIds elements
      Returns:
      this builder for use in a chained invocation
    • setEditLink

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

      public final SlackCsvFile.Builder setEditLink(Optional<String> editLink)
      Initializes the optional value editLink to editLink.
      Parameters:
      editLink - The value for editLink
      Returns:
      this builder for use in a chained invocation
    • setPreview

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

      public final SlackCsvFile.Builder setPreview(Optional<String> preview)
      Initializes the optional value preview to preview.
      Parameters:
      preview - The value for preview
      Returns:
      this builder for use in a chained invocation
    • setPreviewHighlight

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

      public final SlackCsvFile.Builder setPreviewHighlight(Optional<String> previewHighlight)
      Initializes the optional value previewHighlight to previewHighlight.
      Parameters:
      previewHighlight - The value for previewHighlight
      Returns:
      this builder for use in a chained invocation
    • setLines

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

      public final SlackCsvFile.Builder setLines(Optional<String> lines)
      Initializes the optional value lines to lines.
      Parameters:
      lines - The value for lines
      Returns:
      this builder for use in a chained invocation
    • setLinesMore

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

      public final SlackCsvFile.Builder setLinesMore(Optional<String> linesMore)
      Initializes the optional value linesMore to linesMore.
      Parameters:
      linesMore - The value for linesMore
      Returns:
      this builder for use in a chained invocation
    • setPreviewTruncated

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

      public final SlackCsvFile.Builder setPreviewTruncated(Optional<Boolean> previewTruncated)
      Initializes the optional value previewTruncated to previewTruncated.
      Parameters:
      previewTruncated - The value for previewTruncated
      Returns:
      this builder for use in a chained invocation
    • setFiletype

      public final SlackCsvFile.Builder setFiletype(SlackFileType filetype)
      Initializes the value for the filetype attribute.

      If not set, this attribute will have a default value as returned by the initializer of filetype.

      Parameters:
      filetype - The value for filetype
      Returns:
      this builder for use in a chained invocation
    • build

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