Class SlackErrorResponse
java.lang.Object
com.hubspot.slack.client.models.response.SlackErrorResponse
- All Implemented Interfaces:
SlackErrorResponseIF,SlackResponse
@Generated(from="SlackErrorResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackErrorResponse
extends Object
implements SlackErrorResponseIF
Immutable implementation of
SlackErrorResponseIF.
Use the builder to create immutable instances:
SlackErrorResponse.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackErrorResponse.Builderbuilder()Creates a builder forSlackErrorResponse.static SlackErrorResponsecopyOf(SlackErrorResponseIF instance) Creates an immutable copy of aSlackErrorResponseIFvalue.booleanThis instance is equal to all instances ofSlackErrorResponsethat have equal attribute values.getError()inthashCode()Computes a hash code from attributes:ok,responseMetadata,error,errors.booleanisOk()toString()Prints the immutable valueSlackErrorResponsewith attribute values.final SlackErrorResponsewithError(SlackError value) Copy the current immutable object by setting a present value for the optionalerrorattribute.final SlackErrorResponsewithError(Optional<? extends SlackError> optional) Copy the current immutable object by setting an optional value for theerrorattribute.final SlackErrorResponsewithErrors(SlackError... elements) Copy the current immutable object with elements that replace the content oferrors.final SlackErrorResponsewithErrors(Iterable<? extends SlackError> elements) Copy the current immutable object with elements that replace the content oferrors.final SlackErrorResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final SlackErrorResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final SlackErrorResponsewithResponseMetadata(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
-
getError
- Specified by:
getErrorin interfaceSlackErrorResponseIF- Returns:
- The value of the
errorattribute
-
getErrors
- Specified by:
getErrorsin interfaceSlackErrorResponseIF- Returns:
- The value of the
errorsattribute
-
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
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
-
withError
Copy the current immutable object by setting a present value for the optionalerrorattribute.- Parameters:
value- The value for error,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withError
Copy the current immutable object by setting an optional value for theerrorattribute. 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 error- Returns:
- A modified copy or
thisif not changed
-
withErrors
Copy the current immutable object with elements that replace the content oferrors.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withErrors
Copy the current immutable object with elements that replace the content oferrors. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of errors elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackErrorResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,error,errors. -
toString
Prints the immutable valueSlackErrorResponsewith attribute values. -
copyOf
Creates an immutable copy of aSlackErrorResponseIFvalue. 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 SlackErrorResponse instance
-
builder
Creates a builder forSlackErrorResponse.SlackErrorResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setError(Optional<SlackError>) // optionalerror.addErrors|addAllErrors(SlackError) //errorselements .build();- Returns:
- A new SlackErrorResponse builder
-