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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newStreamMetadata.final StreamMetadata.Builderfrom(StreamMetadataIF instance) Fill a builder with attribute values from the providedStreamMetadataIFinstance.final StreamMetadata.BuilderputAllEventPayload(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toeventPayloadmap.final StreamMetadata.BuilderputEventPayload(String key, Object value) Put one entry to theeventPayloadmap.final StreamMetadata.BuilderputEventPayload(Map.Entry<String, ? extends Object> entry) Put one entry to theeventPayloadmap.final StreamMetadata.BuildersetEventPayload(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theeventPayloadmap.final StreamMetadata.BuildersetEventType(String eventType) Initializes the value for theeventTypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedStreamMetadataIFinstance. 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:
thisbuilder for use in a chained invocation
-
setEventType
Initializes the value for theeventTypeattribute.- Parameters:
eventType- The value for eventType- Returns:
thisbuilder for use in a chained invocation
-
putEventPayload
Put one entry to theeventPayloadmap.- Parameters:
key- The key in the eventPayload mapvalue- The associated value in the eventPayload map- Returns:
thisbuilder for use in a chained invocation
-
putEventPayload
Put one entry to theeventPayloadmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
setEventPayload
Sets or replaces all mappings from the specified map as entries for theeventPayloadmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the eventPayload map- Returns:
thisbuilder for use in a chained invocation
-
putAllEventPayload
Put all mappings from the specified map as entries toeventPayloadmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the eventPayload map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newStreamMetadata.- Returns:
- An immutable instance of StreamMetadata
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-