@NotThreadSafe public static final class ConversationOpenParams.Builder extends Object
ConversationOpenParams.
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.
| Modifier and Type | Method and Description |
|---|---|
ConversationOpenParams.Builder |
addAllUsers(Iterable<String> elements)
Adds elements to
users list. |
ConversationOpenParams.Builder |
addUsers(String... elements)
Adds elements to
users list. |
ConversationOpenParams.Builder |
addUsers(String element)
Adds one element to
users list. |
ConversationOpenParams |
build()
Builds a new
ConversationOpenParams. |
ConversationOpenParams.Builder |
from(ConversationOpenParamsIF instance)
Fill a builder with attribute values from the provided
ConversationOpenParamsIF instance. |
ConversationOpenParams.Builder |
setChannelId(Optional<String> channelId)
Initializes the optional value
channelId to channelId. |
ConversationOpenParams.Builder |
setChannelId(String channelId)
Initializes the optional value
channelId to channelId. |
ConversationOpenParams.Builder |
setReturnIm(boolean returnIm)
Initializes the value for the
returnIm attribute. |
ConversationOpenParams.Builder |
setUsers(Iterable<String> elements)
Sets or replaces all elements for
users list. |
public final ConversationOpenParams.Builder from(ConversationOpenParamsIF instance)
ConversationOpenParamsIF 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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ConversationOpenParams.Builder setChannelId(@Nullable String channelId)
channelId to channelId.channelId - The value for channelId, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ConversationOpenParams.Builder setChannelId(Optional<String> channelId)
channelId to channelId.channelId - The value for channelIdthis builder for use in a chained invocationpublic final ConversationOpenParams.Builder addUsers(String element)
users list.element - A users elementthis builder for use in a chained invocationpublic final ConversationOpenParams.Builder addUsers(String... elements)
users list.elements - An array of users elementsthis builder for use in a chained invocationpublic final ConversationOpenParams.Builder setUsers(Iterable<String> elements)
users list.elements - An iterable of users elementsthis builder for use in a chained invocationpublic final ConversationOpenParams.Builder addAllUsers(Iterable<String> elements)
users list.elements - An iterable of users elementsthis builder for use in a chained invocationpublic final ConversationOpenParams.Builder setReturnIm(boolean returnIm)
returnIm attribute.
If not set, this attribute will have a default value as returned by the initializer of returnIm.
returnIm - The value for returnImthis builder for use in a chained invocationpublic ConversationOpenParams build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
ConversationOpenParams.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.