Class UsersProfileResponse
java.lang.Object
com.hubspot.slack.client.models.response.users.UsersProfileResponse
- All Implemented Interfaces:
SlackResponse,UsersProfileResponseIF
@Generated(from="UsersProfileResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class UsersProfileResponse
extends Object
implements UsersProfileResponseIF
Immutable implementation of
UsersProfileResponseIF.
Use the builder to create immutable instances:
UsersProfileResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeUsersProfileResponse. -
Method Summary
Modifier and TypeMethodDescriptionstatic UsersProfileResponse.Builderbuilder()Creates a builder forUsersProfileResponse.static UsersProfileResponsecopyOf(UsersProfileResponseIF instance) Creates an immutable copy of aUsersProfileResponseIFvalue.booleanThis instance is equal to all instances ofUsersProfileResponsethat have equal attribute values.inthashCode()Computes a hash code from attributes:ok,responseMetadata,userProfile.booleanisOk()toString()Prints the immutable valueUsersProfileResponsewith attribute values.final UsersProfileResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final UsersProfileResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final UsersProfileResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.final UsersProfileResponsewithUserProfile(UserProfile value) Copy the current immutable object by setting a value for theuserProfileattribute.
-
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
-
getUserProfile
- Specified by:
getUserProfilein interfaceUsersProfileResponseIF- Returns:
- The value of the
userProfileattribute
-
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 UsersProfileResponse 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
-
withUserProfile
Copy the current immutable object by setting a value for theuserProfileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userProfile- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofUsersProfileResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,userProfile. -
toString
Prints the immutable valueUsersProfileResponsewith attribute values. -
copyOf
Creates an immutable copy of aUsersProfileResponseIFvalue. 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 UsersProfileResponse instance
-
builder
Creates a builder forUsersProfileResponse.UsersProfileResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setUserProfile(com.hubspot.slack.client.models.users.UserProfile) // requireduserProfile.build();- Returns:
- A new UsersProfileResponse builder
-