Class StreamMetadata.Builder

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

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

      public final StreamMetadata.Builder setEventType(String eventType)
      Initializes the value for the eventType attribute.
      Parameters:
      eventType - The value for eventType
      Returns:
      this builder for use in a chained invocation
    • putEventPayload

      public final StreamMetadata.Builder putEventPayload(String key, Object value)
      Put one entry to the eventPayload map.
      Parameters:
      key - The key in the eventPayload map
      value - The associated value in the eventPayload map
      Returns:
      this builder for use in a chained invocation
    • putEventPayload

      public final StreamMetadata.Builder putEventPayload(Map.Entry<String,? extends Object> entry)
      Put one entry to the eventPayload map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • setEventPayload

      public final StreamMetadata.Builder setEventPayload(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the eventPayload map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the eventPayload map
      Returns:
      this builder for use in a chained invocation
    • putAllEventPayload

      public final StreamMetadata.Builder putAllEventPayload(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to eventPayload map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the eventPayload map
      Returns:
      this builder for use in a chained invocation
    • build

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