Package io.dialob.api.rest
Class ImmutableMetadata
java.lang.Object
io.dialob.api.rest.ImmutableMetadata
- All Implemented Interfaces:
Metadata,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableMetadata
extends Object
implements Metadata
Immutable implementation of
Metadata.
Use the builder to create immutable instances:
ImmutableMetadata.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableMetadata.Builderbuilder()Creates a builder forImmutableMetadata.static ImmutableMetadataCreates an immutable copy of aMetadatavalue.booleanThis instance is equal to all instances ofImmutableMetadatathat have equal attribute values.getLabel()getValid()inthashCode()Computes a hash code from attributes:description,label,created,lastSaved,valid.toString()Prints the immutable valueMetadatawith attribute values.final ImmutableMetadatawithCreated(Date value) Copy the current immutable object by setting a value for thecreatedattribute.final ImmutableMetadatawithDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.final ImmutableMetadataCopy the current immutable object by setting a value for thelabelattribute.final ImmutableMetadatawithLastSaved(Date value) Copy the current immutable object by setting a value for thelastSavedattribute.final ImmutableMetadataCopy the current immutable object by setting a value for thevalidattribute.
-
Method Details
-
getDescription
- Specified by:
getDescriptionin interfaceMetadata- Returns:
- The value of the
descriptionattribute
-
getLabel
-
getCreated
- Specified by:
getCreatedin interfaceMetadata- Returns:
- The value of the
createdattribute
-
getLastSaved
- Specified by:
getLastSavedin interfaceMetadata- Returns:
- The value of the
lastSavedattribute
-
getValid
-
withDescription
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
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- Returns:
- A modified copy of the
thisobject
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created (can benull)- Returns:
- A modified copy of the
thisobject
-
withLastSaved
Copy the current immutable object by setting a value for thelastSavedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lastSaved (can benull)- Returns:
- A modified copy of the
thisobject
-
withValid
Copy the current immutable object by setting a value for thevalidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valid (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableMetadatathat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:description,label,created,lastSaved,valid. -
toString
Prints the immutable valueMetadatawith attribute values. -
copyOf
Creates an immutable copy of aMetadatavalue. 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 Metadata instance
-
builder
Creates a builder forImmutableMetadata.ImmutableMetadata.builder() .description(String | null) // nullabledescription.label(String) // requiredlabel.created(Date | null) // nullablecreated.lastSaved(Date | null) // nullablelastSaved.valid(Boolean | null) // nullablevalid.build();- Returns:
- A new ImmutableMetadata builder
-