Class UsergroupEnableResponse
java.lang.Object
com.hubspot.slack.client.models.response.usergroups.UsergroupEnableResponse
- All Implemented Interfaces:
SlackResponse,UsergroupEnableResponseIF
@Generated(from="UsergroupEnableResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class UsergroupEnableResponse
extends Object
implements UsergroupEnableResponseIF
Immutable implementation of
UsergroupEnableResponseIF.
Use the builder to create immutable instances:
UsergroupEnableResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeUsergroupEnableResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forUsergroupEnableResponse.static UsergroupEnableResponsecopyOf(UsergroupEnableResponseIF instance) Creates an immutable copy of aUsergroupEnableResponseIFvalue.booleanThis instance is equal to all instances ofUsergroupEnableResponsethat have equal attribute values.inthashCode()Computes a hash code from attributes:ok,responseMetadata,usergroup.booleanisOk()toString()Prints the immutable valueUsergroupEnableResponsewith attribute values.final UsergroupEnableResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final UsergroupEnableResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final UsergroupEnableResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.final UsergroupEnableResponsewithUsergroup(SlackUsergroup value) Copy the current immutable object by setting a value for theusergroupattribute.
-
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
-
getUsergroup
- Specified by:
getUsergroupin interfaceUsergroupEnableResponseIF- Returns:
- The value of the
usergroupattribute
-
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 UsergroupEnableResponse 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
-
withUsergroup
Copy the current immutable object by setting a value for theusergroupattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for usergroup- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofUsergroupEnableResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,usergroup. -
toString
Prints the immutable valueUsergroupEnableResponsewith attribute values. -
copyOf
Creates an immutable copy of aUsergroupEnableResponseIFvalue. 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 UsergroupEnableResponse instance
-
builder
Creates a builder forUsergroupEnableResponse.UsergroupEnableResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setUsergroup(com.hubspot.slack.client.models.usergroups.SlackUsergroup) // requiredusergroup.build();- Returns:
- A new UsergroupEnableResponse builder
-