Class FilesUploadParams.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.files.FilesUploadParams.Builder
Enclosing class:
FilesUploadParams

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

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

      public final FilesUploadParams.Builder addChannels(String... elements)
      Adds elements to channels list.
      Parameters:
      elements - An array of channels elements
      Returns:
      this builder for use in a chained invocation
    • setChannels

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

      public final FilesUploadParams.Builder addAllChannels(Iterable<String> elements)
      Adds elements to channels list.
      Parameters:
      elements - An iterable of channels elements
      Returns:
      this builder for use in a chained invocation
    • setContent

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

      public final FilesUploadParams.Builder setContent(Optional<String> content)
      Initializes the optional value content to content.
      Parameters:
      content - The value for content
      Returns:
      this builder for use in a chained invocation
    • setFile

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

      public final FilesUploadParams.Builder setFile(Optional<? extends File> file)
      Initializes the optional value file to file.
      Parameters:
      file - The value for file
      Returns:
      this builder for use in a chained invocation
    • setFilename

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

      public final FilesUploadParams.Builder setFilename(Optional<String> filename)
      Initializes the optional value filename to filename.
      Parameters:
      filename - The value for filename
      Returns:
      this builder for use in a chained invocation
    • setFiletype

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

      public final FilesUploadParams.Builder setFiletype(Optional<? extends SlackFileType> filetype)
      Initializes the optional value filetype to filetype.
      Parameters:
      filetype - The value for filetype
      Returns:
      this builder for use in a chained invocation
    • setInitialComment

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

      public final FilesUploadParams.Builder setInitialComment(Optional<String> initialComment)
      Initializes the optional value initialComment to initialComment.
      Parameters:
      initialComment - The value for initialComment
      Returns:
      this builder for use in a chained invocation
    • setThreadTs

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

      public final FilesUploadParams.Builder setThreadTs(Optional<String> threadTs)
      Initializes the optional value threadTs to threadTs.
      Parameters:
      threadTs - The value for threadTs
      Returns:
      this builder for use in a chained invocation
    • setTitle

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

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

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