Class TaskUpdateChunk.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.stream.chunks.TaskUpdateChunk.Builder
Enclosing class:
TaskUpdateChunk

@Generated(from="TaskUpdateChunkIF", generator="Immutables") @NotThreadSafe public static final class TaskUpdateChunk.Builder extends Object
Builds instances of type TaskUpdateChunk. 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 TaskUpdateChunk.Builder from(TaskUpdateChunkIF instance)
      Fill a builder with attribute values from the provided TaskUpdateChunkIF 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
    • setId

      public final TaskUpdateChunk.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
    • setTitle

      public final TaskUpdateChunk.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
    • setStatus

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

      public final TaskUpdateChunk.Builder setStatus(Optional<? extends TaskCardBlockStatus> status)
      Initializes the optional value status to status.
      Parameters:
      status - The value for status
      Returns:
      this builder for use in a chained invocation
    • setDetails

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

      public final TaskUpdateChunk.Builder setDetails(Optional<String> details)
      Initializes the optional value details to details.
      Parameters:
      details - The value for details
      Returns:
      this builder for use in a chained invocation
    • setOutput

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

      public final TaskUpdateChunk.Builder setOutput(Optional<String> output)
      Initializes the optional value output to output.
      Parameters:
      output - The value for output
      Returns:
      this builder for use in a chained invocation
    • addSources

      public final TaskUpdateChunk.Builder addSources(UrlSource element)
      Adds one element to sources list.
      Parameters:
      element - A sources element
      Returns:
      this builder for use in a chained invocation
    • addSources

      public final TaskUpdateChunk.Builder addSources(UrlSource... elements)
      Adds elements to sources list.
      Parameters:
      elements - An array of sources elements
      Returns:
      this builder for use in a chained invocation
    • setSources

      public final TaskUpdateChunk.Builder setSources(Iterable<? extends UrlSource> elements)
      Sets or replaces all elements for sources list.
      Parameters:
      elements - An iterable of sources elements
      Returns:
      this builder for use in a chained invocation
    • addAllSources

      public final TaskUpdateChunk.Builder addAllSources(Iterable<? extends UrlSource> elements)
      Adds elements to sources list.
      Parameters:
      elements - An iterable of sources elements
      Returns:
      this builder for use in a chained invocation
    • build

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