Class FilesUploadParams

java.lang.Object
com.hubspot.slack.client.methods.params.files.FilesUploadParams
All Implemented Interfaces:
FilesUploadParamsIF

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

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

  • Method Details

    • getChannels

      public List<String> getChannels()
      Specified by:
      getChannels in interface FilesUploadParamsIF
      Returns:
      The value of the channels attribute
    • getContent

      public Optional<String> getContent()
      Specified by:
      getContent in interface FilesUploadParamsIF
      Returns:
      The value of the content attribute
    • getFile

      public Optional<File> getFile()
      Specified by:
      getFile in interface FilesUploadParamsIF
      Returns:
      The value of the file attribute
    • getFilename

      public Optional<String> getFilename()
      Specified by:
      getFilename in interface FilesUploadParamsIF
      Returns:
      The value of the filename attribute
    • getFiletype

      public Optional<SlackFileType> getFiletype()
      Specified by:
      getFiletype in interface FilesUploadParamsIF
      Returns:
      The value of the filetype attribute
    • getInitialComment

      public Optional<String> getInitialComment()
      Specified by:
      getInitialComment in interface FilesUploadParamsIF
      Returns:
      The value of the initialComment attribute
    • getThreadTs

      public Optional<String> getThreadTs()
      Specified by:
      getThreadTs in interface FilesUploadParamsIF
      Returns:
      The value of the threadTs attribute
    • getTitle

      public Optional<String> getTitle()
      Specified by:
      getTitle in interface FilesUploadParamsIF
      Returns:
      The value of the title attribute
    • withChannels

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

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

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

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

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

      public final FilesUploadParams withFile(Optional<? extends File> optional)
      Copy the current immutable object by setting an optional value for the file attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for file
      Returns:
      A modified copy or this if not changed
    • withFilename

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

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

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

      public final FilesUploadParams withFiletype(Optional<? extends SlackFileType> optional)
      Copy the current immutable object by setting an optional value for the filetype 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 filetype
      Returns:
      A modified copy or this if not changed
    • withInitialComment

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

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

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of FilesUploadParams 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: channels, content, file, filename, filetype, initialComment, threadTs, title.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static FilesUploadParams.Builder builder()
      Creates a builder for FilesUploadParams.
       FilesUploadParams.builder()
          .addChannels|addAllChannels(String) // channels elements
          .setContent(Optional<String>) // optional content
          .setFile(Optional<java.io.File>) // optional file
          .setFilename(Optional<String>) // optional filename
          .setFiletype(Optional<com.hubspot.slack.client.models.files.SlackFileType>) // optional filetype
          .setInitialComment(Optional<String>) // optional initialComment
          .setThreadTs(Optional<String>) // optional threadTs
          .setTitle(Optional<String>) // optional title
          .build();
       
      Returns:
      A new FilesUploadParams builder