java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.Metadata.Builder
Enclosing class:
Metadata

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

      public final Metadata.Builder addEntities(WorkObject element)
      Adds one element to entities list.
      Parameters:
      element - A entities element
      Returns:
      this builder for use in a chained invocation
    • addEntities

      public final Metadata.Builder addEntities(WorkObject... elements)
      Adds elements to entities list.
      Parameters:
      elements - An array of entities elements
      Returns:
      this builder for use in a chained invocation
    • setEntities

      public final Metadata.Builder setEntities(Iterable<? extends WorkObject> elements)
      Sets or replaces all elements for entities list.
      Parameters:
      elements - An iterable of entities elements
      Returns:
      this builder for use in a chained invocation
    • addAllEntities

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

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