Class UsergroupListResponse
java.lang.Object
com.hubspot.slack.client.models.response.usergroups.UsergroupListResponse
- All Implemented Interfaces:
SlackResponse,UsergroupListResponseIF
@Generated(from="UsergroupListResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class UsergroupListResponse
extends Object
implements UsergroupListResponseIF
Immutable implementation of
UsergroupListResponseIF.
Use the builder to create immutable instances:
UsergroupListResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeUsergroupListResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forUsergroupListResponse.static UsergroupListResponsecopyOf(UsergroupListResponseIF instance) Creates an immutable copy of aUsergroupListResponseIFvalue.booleanThis instance is equal to all instances ofUsergroupListResponsethat have equal attribute values.inthashCode()Computes a hash code from attributes:ok,responseMetadata,usergroups.booleanisOk()toString()Prints the immutable valueUsergroupListResponsewith attribute values.final UsergroupListResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final UsergroupListResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final UsergroupListResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.final UsergroupListResponsewithUsergroups(SlackUsergroup... elements) Copy the current immutable object with elements that replace the content ofusergroups.final UsergroupListResponsewithUsergroups(Iterable<? extends SlackUsergroup> elements) Copy the current immutable object with elements that replace the content ofusergroups.
-
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
-
getUsergroups
- Specified by:
getUsergroupsin interfaceUsergroupListResponseIF- Returns:
- The value of the
usergroupsattribute
-
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 UsergroupListResponse 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
-
withUsergroups
Copy the current immutable object with elements that replace the content ofusergroups.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withUsergroups
Copy the current immutable object with elements that replace the content ofusergroups. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of usergroups elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofUsergroupListResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,usergroups. -
toString
Prints the immutable valueUsergroupListResponsewith attribute values. -
copyOf
Creates an immutable copy of aUsergroupListResponseIFvalue. 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 UsergroupListResponse instance
-
builder
Creates a builder forUsergroupListResponse.UsergroupListResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.addUsergroups|addAllUsergroups(com.hubspot.slack.client.models.usergroups.SlackUsergroup) //usergroupselements .build();- Returns:
- A new UsergroupListResponse builder
-