Class SearchMessageResponse
java.lang.Object
com.hubspot.slack.client.models.response.search.SearchMessageResponse
- All Implemented Interfaces:
SearchMessageResponseIF,SlackResponse
@Generated(from="SearchMessageResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SearchMessageResponse
extends Object
implements SearchMessageResponseIF
Immutable implementation of
SearchMessageResponseIF.
Use the builder to create immutable instances:
SearchMessageResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeSearchMessageResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSearchMessageResponse.static SearchMessageResponsecopyOf(SearchMessageResponseIF instance) Creates an immutable copy of aSearchMessageResponseIFvalue.booleanThis instance is equal to all instances ofSearchMessageResponsethat have equal attribute values.getQuery()inthashCode()Computes a hash code from attributes:ok,responseMetadata,query,messages.booleanisOk()toString()Prints the immutable valueSearchMessageResponsewith attribute values.final SearchMessageResponsewithMessages(MessagePage value) Copy the current immutable object by setting a value for themessagesattribute.final SearchMessageResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final SearchMessageResponseCopy the current immutable object by setting a value for thequeryattribute.final SearchMessageResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final SearchMessageResponsewithResponseMetadata(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
-
getQuery
- Specified by:
getQueryin interfaceSearchMessageResponseIF- Returns:
- The value of the
queryattribute
-
getMessages
- Specified by:
getMessagesin interfaceSearchMessageResponseIF- 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 SearchMessageResponse 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
-
withQuery
Copy the current immutable object by setting a value for thequeryattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for query- Returns:
- A modified copy or the
thisobject
-
withMessages
Copy the current immutable object by setting a value for themessagesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for messages- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofSearchMessageResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,query,messages. -
toString
Prints the immutable valueSearchMessageResponsewith attribute values. -
copyOf
Creates an immutable copy of aSearchMessageResponseIFvalue. 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 SearchMessageResponse instance
-
builder
Creates a builder forSearchMessageResponse.SearchMessageResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setQuery(String) // requiredquery.setMessages(com.hubspot.slack.client.models.response.MessagePage) // requiredmessages.build();- Returns:
- A new SearchMessageResponse builder
-