Class SlackPngFile.Builder

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

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

      public final SlackPngFile.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
    • from

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

      public final SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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 SlackPngFile.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
    • setThumb64Url

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

      public final SlackPngFile.Builder setThumb64Url(Optional<String> thumb64Url)
      Initializes the optional value thumb64Url to thumb64Url.
      Parameters:
      thumb64Url - The value for thumb64Url
      Returns:
      this builder for use in a chained invocation
    • setThumb80Url

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

      public final SlackPngFile.Builder setThumb80Url(Optional<String> thumb80Url)
      Initializes the optional value thumb80Url to thumb80Url.
      Parameters:
      thumb80Url - The value for thumb80Url
      Returns:
      this builder for use in a chained invocation
    • setThumb160Url

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

      public final SlackPngFile.Builder setThumb160Url(Optional<String> thumb160Url)
      Initializes the optional value thumb160Url to thumb160Url.
      Parameters:
      thumb160Url - The value for thumb160Url
      Returns:
      this builder for use in a chained invocation
    • setThumb360Url

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

      public final SlackPngFile.Builder setThumb360Url(Optional<String> thumb360Url)
      Initializes the optional value thumb360Url to thumb360Url.
      Parameters:
      thumb360Url - The value for thumb360Url
      Returns:
      this builder for use in a chained invocation
    • setThumb360Width

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

      public final SlackPngFile.Builder setThumb360Width(Optional<Integer> thumb360Width)
      Initializes the optional value thumb360Width to thumb360Width.
      Parameters:
      thumb360Width - The value for thumb360Width
      Returns:
      this builder for use in a chained invocation
    • setThumb360Height

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

      public final SlackPngFile.Builder setThumb360Height(Optional<Integer> thumb360Height)
      Initializes the optional value thumb360Height to thumb360Height.
      Parameters:
      thumb360Height - The value for thumb360Height
      Returns:
      this builder for use in a chained invocation
    • setThumb480Url

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

      public final SlackPngFile.Builder setThumb480Url(Optional<String> thumb480Url)
      Initializes the optional value thumb480Url to thumb480Url.
      Parameters:
      thumb480Url - The value for thumb480Url
      Returns:
      this builder for use in a chained invocation
    • setThumb480Width

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

      public final SlackPngFile.Builder setThumb480Width(Optional<Integer> thumb480Width)
      Initializes the optional value thumb480Width to thumb480Width.
      Parameters:
      thumb480Width - The value for thumb480Width
      Returns:
      this builder for use in a chained invocation
    • setThumb480Height

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

      public final SlackPngFile.Builder setThumb480Height(Optional<Integer> thumb480Height)
      Initializes the optional value thumb480Height to thumb480Height.
      Parameters:
      thumb480Height - The value for thumb480Height
      Returns:
      this builder for use in a chained invocation
    • setImageExifRotation

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

      public final SlackPngFile.Builder setImageExifRotation(Optional<Integer> imageExifRotation)
      Initializes the optional value imageExifRotation to imageExifRotation.
      Parameters:
      imageExifRotation - The value for imageExifRotation
      Returns:
      this builder for use in a chained invocation
    • setOriginalWidth

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

      public final SlackPngFile.Builder setOriginalWidth(Optional<Integer> originalWidth)
      Initializes the optional value originalWidth to originalWidth.
      Parameters:
      originalWidth - The value for originalWidth
      Returns:
      this builder for use in a chained invocation
    • setOriginalHeight

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

      public final SlackPngFile.Builder setOriginalHeight(Optional<Integer> originalHeight)
      Initializes the optional value originalHeight to originalHeight.
      Parameters:
      originalHeight - The value for originalHeight
      Returns:
      this builder for use in a chained invocation
    • setHasRichPreview

      public final SlackPngFile.Builder setHasRichPreview(boolean hasRichPreview)
      Initializes the value for the hasRichPreview attribute.
      Parameters:
      hasRichPreview - The value for hasRichPreview
      Returns:
      this builder for use in a chained invocation
    • setFiletype

      public final SlackPngFile.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 SlackPngFile build()
      Builds a new SlackPngFile.
      Returns:
      An immutable instance of SlackPngFile
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing