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 ofErrors.Use the builder to create immutable instances:
ImmutableErrors.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableErrors.BuilderBuilds instances of typeImmutableErrors.static classImmutableErrors.ErrorImmutable implementation ofErrors.Error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableErrors.Builderbuilder()Creates a builder forImmutableErrors.static ImmutableErrorscopyOf(Errors instance)Creates an immutable copy of aErrorsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableErrorsthat have equal attribute values.StringgetError()List<Errors.Error>getErrors()StringgetMessage()StringgetPath()IntegergetStatus()DategetTimestamp()StringgetTrace()inthashCode()Computes a hash code from attributes:timestamp,status,error,message,trace,path,errors.StringtoString()Prints the immutable valueErrorswith attribute values.ImmutableErrorswithError(String value)Copy the current immutable object by setting a value for theerrorattribute.ImmutableErrorswithErrors(Errors.Error... elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableErrorswithErrors(Iterable<? extends Errors.Error> elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableErrorswithMessage(String value)Copy the current immutable object by setting a value for themessageattribute.ImmutableErrorswithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableErrorswithStatus(Integer value)Copy the current immutable object by setting a value for thestatusattribute.ImmutableErrorswithTimestamp(Date value)Copy the current immutable object by setting a value for thetimestampattribute.ImmutableErrorswithTrace(String value)Copy the current immutable object by setting a value for thetraceattribute.
-
-
-
Method Detail
-
getTimestamp
public Date getTimestamp()
- Overrides:
getTimestampin classErrors- Returns:
- The value of the
timestampattribute
-
getStatus
public Integer getStatus()
-
getError
public String getError()
-
getMessage
public String getMessage()
- Specified by:
getMessagein classErrors- Returns:
- The value of the
messageattribute
-
getTrace
public String getTrace()
-
getPath
public String getPath()
-
getErrors
public List<Errors.Error> getErrors()
-
withTimestamp
public final ImmutableErrors withTimestamp(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 ImmutableErrors withStatus(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 ImmutableErrors withError(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 ImmutableErrors withMessage(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
-
withTrace
public final ImmutableErrors withTrace(String value)
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
public final ImmutableErrors withPath(String value)
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
public final ImmutableErrors withErrors(Errors.Error... elements)
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
public final ImmutableErrors withErrors(Iterable<? extends Errors.Error> elements)
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
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueErrorswith attribute values.
-
copyOf
public static ImmutableErrors copyOf(Errors instance)
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
public static ImmutableErrors.Builder 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
-
-