Class CompleteUploadExternalParams.Builder

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

@Generated(from="CompleteUploadExternalParamsIF", generator="Immutables") @NotThreadSafe public static final class CompleteUploadExternalParams.Builder extends Object
Builds instances of type CompleteUploadExternalParams. 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

      Fill a builder with attribute values from the provided CompleteUploadExternalParamsIF 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
    • addFiles

      public final CompleteUploadExternalParams.Builder addFiles(FileInfo element)
      Adds one element to files list.
      Parameters:
      element - A files element
      Returns:
      this builder for use in a chained invocation
    • addFiles

      public final CompleteUploadExternalParams.Builder addFiles(FileInfo... elements)
      Adds elements to files list.
      Parameters:
      elements - An array of files elements
      Returns:
      this builder for use in a chained invocation
    • setFiles

      public final CompleteUploadExternalParams.Builder setFiles(Iterable<? extends FileInfo> elements)
      Sets or replaces all elements for files list.
      Parameters:
      elements - An iterable of files elements
      Returns:
      this builder for use in a chained invocation
    • addAllFiles

      public final CompleteUploadExternalParams.Builder addAllFiles(Iterable<? extends FileInfo> elements)
      Adds elements to files list.
      Parameters:
      elements - An iterable of files elements
      Returns:
      this builder for use in a chained invocation
    • setChannelId

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

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

      public final CompleteUploadExternalParams.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 CompleteUploadExternalParams.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
    • setInitialComment

      public final CompleteUploadExternalParams.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 CompleteUploadExternalParams.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
    • build

      Returns:
      An immutable instance of CompleteUploadExternalParams
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing