Class ChannelsListResponse.Builder
java.lang.Object
com.hubspot.slack.client.models.response.channels.ChannelsListResponse.Builder
- Enclosing class:
ChannelsListResponse
@Generated(from="ChannelsListResponseIF",
generator="Immutables")
@NotThreadSafe
public static final class ChannelsListResponse.Builder
extends Object
Builds instances of type
ChannelsListResponse.
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 TypeMethodDescriptionaddAllChannels(Iterable<? extends SlackChannel> elements) Adds elements tochannelslist.addChannels(SlackChannel element) Adds one element tochannelslist.addChannels(SlackChannel... elements) Adds elements tochannelslist.build()Builds a newChannelsListResponse.from(ChannelsListResponseIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.channels.ChannelsListResponseIFinstance.from(SlackResponse instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackResponseinstance.setChannels(Iterable<? extends SlackChannel> elements) Sets or replaces all elements forchannelslist.setOk(boolean ok) Initializes the value for theokattribute.setResponseMetadata(ResponseMetadata responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.channels.ChannelsListResponseIFinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setOk
Initializes the value for theokattribute.- Parameters:
ok- The value for ok- Returns:
thisbuilder for use in a chained invocation
-
setResponseMetadata
public final ChannelsListResponse.Builder setResponseMetadata(@Nullable ResponseMetadata responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.- Parameters:
responseMetadata- The value for responseMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setResponseMetadata
public final ChannelsListResponse.Builder setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.- Parameters:
responseMetadata- The value for responseMetadata- Returns:
thisbuilder for use in a chained invocation
-
addChannels
Adds one element tochannelslist.- Parameters:
element- A channels element- Returns:
thisbuilder for use in a chained invocation
-
addChannels
Adds elements tochannelslist.- Parameters:
elements- An array of channels elements- Returns:
thisbuilder for use in a chained invocation
-
setChannels
Sets or replaces all elements forchannelslist.- Parameters:
elements- An iterable of channels elements- Returns:
thisbuilder for use in a chained invocation
-
addAllChannels
Adds elements tochannelslist.- Parameters:
elements- An iterable of channels elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newChannelsListResponse.- Returns:
- An immutable instance of ChannelsListResponse
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-