Class ChannelsHistoryResponse
java.lang.Object
com.hubspot.slack.client.models.response.channels.AbstractChannelsHistoryResponse
com.hubspot.slack.client.models.response.channels.ChannelsHistoryResponse
- All Implemented Interfaces:
TimeIntervalFilter,SlackResponse
@Generated(from="AbstractChannelsHistoryResponse",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ChannelsHistoryResponse
extends AbstractChannelsHistoryResponse
Immutable implementation of
AbstractChannelsHistoryResponse.
Use the builder to create immutable instances:
ChannelsHistoryResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeChannelsHistoryResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forChannelsHistoryResponse.static ChannelsHistoryResponsecopyOf(AbstractChannelsHistoryResponse instance) Creates an immutable copy of aAbstractChannelsHistoryResponsevalue.booleanThis instance is equal to all instances ofChannelsHistoryResponsethat have equal attribute values.inthashCode()Computes a hash code from attributes:ok,responseMetadata,inclusive,newestTimestamp,oldestTimestamp,pagingDirection,hasMore,messages.booleanhasMore()booleanisOk()toString()Prints the immutable valueChannelsHistoryResponsewith attribute values.final ChannelsHistoryResponsewithHasMore(boolean value) Copy the current immutable object by setting a value for thehasMoreattribute.final ChannelsHistoryResponsewithInclusive(Boolean value) Copy the current immutable object by setting a present value for the optionalinclusiveattribute.final ChannelsHistoryResponsewithInclusive(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theinclusiveattribute.final ChannelsHistoryResponsewithMessages(LiteMessage... elements) Copy the current immutable object with elements that replace the content ofmessages.final ChannelsHistoryResponsewithMessages(Iterable<? extends LiteMessage> elements) Copy the current immutable object with elements that replace the content ofmessages.final ChannelsHistoryResponsewithNewestTimestamp(String value) Copy the current immutable object by setting a present value for the optionalnewestTimestampattribute.final ChannelsHistoryResponsewithNewestTimestamp(Optional<String> optional) Copy the current immutable object by setting an optional value for thenewestTimestampattribute.final ChannelsHistoryResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final ChannelsHistoryResponsewithOldestTimestamp(String value) Copy the current immutable object by setting a present value for the optionaloldestTimestampattribute.final ChannelsHistoryResponsewithOldestTimestamp(Optional<String> optional) Copy the current immutable object by setting an optional value for theoldestTimestampattribute.final ChannelsHistoryResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final ChannelsHistoryResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.
-
Method Details
-
isOk
public boolean isOk()- Returns:
- The value of the
okattribute
-
getResponseMetadata
- Returns:
- The value of the
responseMetadataattribute
-
isInclusive
- Returns:
- The value of the
inclusiveattribute
-
getNewestTimestamp
- Returns:
- The value of the
newestTimestampattribute
-
getOldestTimestamp
- Returns:
- The value of the
oldestTimestampattribute
-
getPagingDirection
- Returns:
- The computed-at-construction value of the
pagingDirectionattribute
-
hasMore
public boolean hasMore()- Specified by:
hasMorein classAbstractChannelsHistoryResponse- Returns:
- The value of the
hasMoreattribute
-
getMessages
- Specified by:
getMessagesin classAbstractChannelsHistoryResponse- Returns:
- The value of the
messagesattribute
-
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 ChannelsHistoryResponse 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
-
withInclusive
Copy the current immutable object by setting a present value for the optionalinclusiveattribute.- Parameters:
value- The value for inclusive,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withInclusive
Copy the current immutable object by setting an optional value for theinclusiveattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for inclusive- Returns:
- A modified copy or
thisif not changed
-
withNewestTimestamp
Copy the current immutable object by setting a present value for the optionalnewestTimestampattribute.- Parameters:
value- The value for newestTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withNewestTimestamp
Copy the current immutable object by setting an optional value for thenewestTimestampattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for newestTimestamp- Returns:
- A modified copy or
thisif not changed
-
withOldestTimestamp
Copy the current immutable object by setting a present value for the optionaloldestTimestampattribute.- Parameters:
value- The value for oldestTimestamp,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withOldestTimestamp
Copy the current immutable object by setting an optional value for theoldestTimestampattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for oldestTimestamp- Returns:
- A modified copy or
thisif not changed
-
withHasMore
Copy the current immutable object by setting a value for thehasMoreattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hasMore- Returns:
- A modified copy or the
thisobject
-
withMessages
Copy the current immutable object with elements that replace the content ofmessages.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMessages
Copy the current immutable object with elements that replace the content ofmessages. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of messages elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofChannelsHistoryResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,inclusive,newestTimestamp,oldestTimestamp,pagingDirection,hasMore,messages. -
toString
Prints the immutable valueChannelsHistoryResponsewith attribute values. -
copyOf
Creates an immutable copy of aAbstractChannelsHistoryResponsevalue. 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 ChannelsHistoryResponse instance
-
builder
Creates a builder forChannelsHistoryResponse.ChannelsHistoryResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setInclusive(Optional<Boolean>) // optionalinclusive.setNewestTimestamp(Optional<String>) // optionalnewestTimestamp.setOldestTimestamp(Optional<String>) // optionaloldestTimestamp.setHasMore(boolean) // requiredhasMore.addMessages|addAllMessages(com.hubspot.slack.client.models.LiteMessage) //messageselements .build();- Returns:
- A new ChannelsHistoryResponse builder
-