Class ChannelsListResponse
java.lang.Object
com.hubspot.slack.client.models.response.channels.ChannelsListResponse
- All Implemented Interfaces:
ChannelsListResponseIF,SlackResponse
@Generated(from="ChannelsListResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ChannelsListResponse
extends Object
implements ChannelsListResponseIF
Immutable implementation of
ChannelsListResponseIF.
Use the builder to create immutable instances:
ChannelsListResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeChannelsListResponse. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelsListResponse.Builderbuilder()Creates a builder forChannelsListResponse.static ChannelsListResponsecopyOf(ChannelsListResponseIF instance) Creates an immutable copy of aChannelsListResponseIFvalue.booleanThis instance is equal to all instances ofChannelsListResponsethat have equal attribute values.inthashCode()Computes a hash code from attributes:ok,responseMetadata,channels.booleanisOk()toString()Prints the immutable valueChannelsListResponsewith attribute values.final ChannelsListResponsewithChannels(SlackChannel... elements) Copy the current immutable object with elements that replace the content ofchannels.final ChannelsListResponsewithChannels(Iterable<? extends SlackChannel> elements) Copy the current immutable object with elements that replace the content ofchannels.final ChannelsListResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final ChannelsListResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final ChannelsListResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.
-
Method Details
-
isOk
public boolean isOk()- Specified by:
isOkin interfaceSlackResponse- Returns:
- The value of the
okattribute
-
getResponseMetadata
- Specified by:
getResponseMetadatain interfaceSlackResponse- Returns:
- The value of the
responseMetadataattribute
-
getChannels
- Specified by:
getChannelsin interfaceChannelsListResponseIF- Returns:
- The value of the
channelsattribute
-
withOk
Copy the current immutable object by setting a value for theokattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ok- Returns:
- A modified copy or the
thisobject
-
withResponseMetadata
Copy the current immutable object by setting a present value for the optionalresponseMetadataattribute.- Parameters:
value- The value for responseMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withResponseMetadata
public final ChannelsListResponse withResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for responseMetadata- Returns:
- A modified copy or
thisif not changed
-
withChannels
Copy the current immutable object with elements that replace the content ofchannels.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withChannels
Copy the current immutable object with elements that replace the content ofchannels. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of channels elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofChannelsListResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,channels. -
toString
Prints the immutable valueChannelsListResponsewith attribute values. -
copyOf
Creates an immutable copy of aChannelsListResponseIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ChannelsListResponse instance
-
builder
Creates a builder forChannelsListResponse.ChannelsListResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.addChannels|addAllChannels(com.hubspot.slack.client.models.SlackChannel) //channelselements .build();- Returns:
- A new ChannelsListResponse builder
-