Class SlackError
java.lang.Object
com.hubspot.slack.client.models.response.SlackError
- All Implemented Interfaces:
SlackErrorIF
@Generated(from="SlackErrorIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackError
extends Object
implements SlackErrorIF
Immutable implementation of
SlackErrorIF.
Use the builder to create immutable instances:
SlackError.builder().
Use the static factory method to create immutable instances:
SlackError.of().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackError.Builderbuilder()Creates a builder forSlackError.static SlackErrorcopyOf(SlackErrorIF instance) Creates an immutable copy of aSlackErrorIFvalue.booleanThis instance is equal to all instances ofSlackErrorthat have equal attribute values.getError()getType()inthashCode()Computes a hash code from attributes:type,error.static SlackErrorConstruct a new immutableSlackErrorinstance.toString()Prints the immutable valueSlackErrorwith attribute values.final SlackErrorCopy the current immutable object by setting a value for theerrorattribute.final SlackErrorwithType(SlackErrorType value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceSlackErrorIF- Returns:
- The value of the
typeattribute
-
getError
- Specified by:
getErrorin interfaceSlackErrorIF- Returns:
- The value of the
errorattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withError
Copy the current immutable object by setting a value for theerrorattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for error- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofSlackErrorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,error. -
toString
Prints the immutable valueSlackErrorwith attribute values. -
of
Construct a new immutableSlackErrorinstance.- Parameters:
error- The value for theerrorattribute- Returns:
- An immutable SlackError instance
-
copyOf
Creates an immutable copy of aSlackErrorIFvalue. 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 SlackError instance
-
builder
Creates a builder forSlackError.SlackError.builder() .setType(com.hubspot.slack.client.models.response.SlackErrorType) // optionaltype.setError(String) // requirederror.build();- Returns:
- A new SlackError builder
-