Package io.dialob.api.rest
Class ImmutableErrors
java.lang.Object
io.dialob.api.rest.Errors
io.dialob.api.rest.ImmutableErrors
- All Implemented Interfaces:
Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableErrors
extends Errors
Immutable implementation of
Errors.
Use the builder to create immutable instances:
ImmutableErrors.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableErrors.static final classImmutable implementation ofErrors.Error. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableErrors.Builderbuilder()Creates a builder forImmutableErrors.static ImmutableErrorsCreates an immutable copy of aErrorsvalue.booleanThis instance is equal to all instances ofImmutableErrorsthat have equal attribute values.getError()getPath()getTrace()inthashCode()Computes a hash code from attributes:timestamp,status,error,message,trace,path,errors.toString()Prints the immutable valueErrorswith attribute values.final ImmutableErrorsCopy the current immutable object by setting a value for theerrorattribute.final ImmutableErrorswithErrors(Errors.Error... elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableErrorswithErrors(Iterable<? extends Errors.Error> elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableErrorswithMessage(String value) Copy the current immutable object by setting a value for themessageattribute.final ImmutableErrorsCopy the current immutable object by setting a value for thepathattribute.final ImmutableErrorswithStatus(Integer value) Copy the current immutable object by setting a value for thestatusattribute.final ImmutableErrorswithTimestamp(Date value) Copy the current immutable object by setting a value for thetimestampattribute.final ImmutableErrorsCopy the current immutable object by setting a value for thetraceattribute.
-
Method Details
-
getTimestamp
- Overrides:
getTimestampin classErrors- Returns:
- The value of the
timestampattribute
-
getStatus
-
getError
-
getMessage
- Specified by:
getMessagein classErrors- Returns:
- The value of the
messageattribute
-
getTrace
-
getPath
-
getErrors
-
withTimestamp
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
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
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
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
-
withTrace
Copy the current immutable object by setting a value for thetraceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for trace (can benull)- Returns:
- A modified copy of the
thisobject
-
withPath
Copy the current immutable object by setting a value for thepathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for path (can benull)- Returns:
- A modified copy of the
thisobject
-
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 of
thisobject
-
equals
This instance is equal to all instances ofImmutableErrorsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:timestamp,status,error,message,trace,path,errors. -
toString
Prints the immutable valueErrorswith attribute values. -
copyOf
Creates an immutable copy of aErrorsvalue. 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 Errors instance
-
builder
Creates a builder forImmutableErrors.ImmutableErrors.builder() .timestamp(Date | null) // nullabletimestamp.status(Integer | null) // nullablestatus.error(String | null) // nullableerror.message(String | null) // nullablemessage.trace(String | null) // nullabletrace.path(String | null) // nullablepath.errors(List<io.dialob.api.rest.Errors.Error> | null) // nullableerrors.build();- Returns:
- A new ImmutableErrors builder
-