Class ImmutableErrorDetails
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableErrorDetails
-
- All Implemented Interfaces:
ErrorDetails
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableErrorDetails extends Object implements ErrorDetails
Immutable implementation ofErrorDetails.Use the builder to create immutable instances:
ImmutableErrorDetails.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableErrorDetails.BuilderBuilds instances of typeImmutableErrorDetails.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableErrorDetails.Builderbuilder()Creates a builder forImmutableErrorDetails.static ImmutableErrorDetailscopyOf(ErrorDetails instance)Creates an immutable copy of aErrorDetailsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableErrorDetailsthat have equal attribute values.longgetCode()StringgetDescription()StringgetErrorCode()inthashCode()Computes a hash code from attributes:code,description,errorCode.StringtoString()Prints the immutable valueErrorDetailswith attribute values.ImmutableErrorDetailswithCode(long value)Copy the current immutable object by setting a value for thecodeattribute.ImmutableErrorDetailswithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableErrorDetailswithErrorCode(String value)Copy the current immutable object by setting a value for theerrorCodeattribute.
-
-
-
Method Detail
-
getCode
public long getCode()
- Specified by:
getCodein interfaceErrorDetails- Returns:
- The value of the
codeattribute
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceErrorDetails- Returns:
- The value of the
descriptionattribute
-
getErrorCode
public String getErrorCode()
- Specified by:
getErrorCodein interfaceErrorDetails- Returns:
- The value of the
errorCodeattribute
-
withCode
public final ImmutableErrorDetails withCode(long value)
Copy the current immutable object by setting a value for thecodeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for code- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableErrorDetails withDescription(String value)
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description (can benull)- Returns:
- A modified copy of the
thisobject
-
withErrorCode
public final ImmutableErrorDetails withErrorCode(String value)
Copy the current immutable object by setting a value for theerrorCodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for errorCode (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableErrorDetailsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:code,description,errorCode.
-
toString
public String toString()
Prints the immutable valueErrorDetailswith attribute values.
-
copyOf
public static ImmutableErrorDetails copyOf(ErrorDetails instance)
Creates an immutable copy of aErrorDetailsvalue. 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 ErrorDetails instance
-
builder
public static ImmutableErrorDetails.Builder builder()
Creates a builder forImmutableErrorDetails.ImmutableErrorDetails.builder() .code(long) // optionalcode.description(String | null) // nullabledescription.errorCode(String | null) // nullableerrorCode.build();- Returns:
- A new ImmutableErrorDetails builder
-
-