Package io.dialob.security
Class ImmutableErrorsResponse
- java.lang.Object
-
- io.dialob.security.ImmutableErrorsResponse
-
- All Implemented Interfaces:
ErrorsResponse,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableErrorsResponse extends Object implements ErrorsResponse
Immutable implementation ofErrorsResponse.Use the builder to create immutable instances:
ImmutableErrorsResponse.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableErrorsResponse.BuilderBuilds instances of typeImmutableErrorsResponse.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableErrorsResponse.Builderbuilder()Creates a builder forImmutableErrorsResponse.static ImmutableErrorsResponsecopyOf(ErrorsResponse instance)Creates an immutable copy of aErrorsResponsevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableErrorsResponsethat have equal attribute values.StringgetError()StringgetMessage()IntegergetStatus()DategetTimestamp()inthashCode()Computes a hash code from attributes:timestamp,status,error,message.StringtoString()Prints the immutable valueErrorsResponsewith attribute values.ImmutableErrorsResponsewithError(String value)Copy the current immutable object by setting a value for theerrorattribute.ImmutableErrorsResponsewithMessage(String value)Copy the current immutable object by setting a value for themessageattribute.ImmutableErrorsResponsewithStatus(Integer value)Copy the current immutable object by setting a value for thestatusattribute.ImmutableErrorsResponsewithTimestamp(Date value)Copy the current immutable object by setting a value for thetimestampattribute.
-
-
-
Method Detail
-
getTimestamp
@Nullable public Date getTimestamp()
- Specified by:
getTimestampin interfaceErrorsResponse- Returns:
- The value of the
timestampattribute
-
getStatus
@Nullable public Integer getStatus()
- Specified by:
getStatusin interfaceErrorsResponse- Returns:
- The value of the
statusattribute
-
getError
@Nullable public String getError()
- Specified by:
getErrorin interfaceErrorsResponse- Returns:
- The value of the
errorattribute
-
getMessage
@Nullable public String getMessage()
- Specified by:
getMessagein interfaceErrorsResponse- Returns:
- The value of the
messageattribute
-
withTimestamp
public final ImmutableErrorsResponse withTimestamp(@Nullable Date value)
Copy the current immutable object by setting a value for thetimestampattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for timestamp (can benull)- Returns:
- A modified copy of the
thisobject
-
withStatus
public final ImmutableErrorsResponse withStatus(@Nullable Integer value)
Copy the current immutable object by setting a value for thestatusattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for status (can benull)- Returns:
- A modified copy of the
thisobject
-
withError
public final ImmutableErrorsResponse withError(@Nullable String value)
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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withMessage
public final ImmutableErrorsResponse withMessage(@Nullable String value)
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableErrorsResponsethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:timestamp,status,error,message.
-
toString
public String toString()
Prints the immutable valueErrorsResponsewith attribute values.
-
copyOf
public static ImmutableErrorsResponse copyOf(ErrorsResponse instance)
Creates an immutable copy of aErrorsResponsevalue. 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 ErrorsResponse instance
-
builder
public static ImmutableErrorsResponse.Builder builder()
Creates a builder forImmutableErrorsResponse.ImmutableErrorsResponse.builder() .timestamp(Date | null) // nullabletimestamp.status(Integer | null) // nullablestatus.error(String | null) // nullableerror.message(String | null) // nullablemessage.build();- Returns:
- A new ImmutableErrorsResponse builder
-
-