Record Class CJ1Item
java.lang.Object
java.lang.Record
com.io7m.cardant.protocol.inventory.json.internal.CJ1Item
- All Implemented Interfaces:
CJ1ValueType
@JsonClassDescription("An item.")
public record CJ1Item(UUID id, String name, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, Map<CJ1TypeRecordFieldIdentifier,CJ1MetadataType> metadata, List<CJ1AttachmentItem> attachments, Set<CJ1TypeRecordIdentifier> types)
extends Record
implements CJ1ValueType
-
Constructor Summary
ConstructorsConstructorDescriptionCJ1Item(UUID id, String name, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, Map<CJ1TypeRecordFieldIdentifier, CJ1MetadataType> metadata, List<CJ1AttachmentItem> attachments, Set<CJ1TypeRecordIdentifier> types) Creates an instance of aCJ1Itemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.Returns the value of thetimeCreatedrecord component.Returns the value of thetimeUpdatedrecord component.final StringtoString()Returns a string representation of this record class.types()Returns the value of thetypesrecord component.
-
Constructor Details
-
CJ1Item
public CJ1Item(@JsonPropertyDescription("The item ID.") UUID id, @JsonPropertyDescription("The item name.") String name, @JsonPropertyDescription("The item creation time.") OffsetDateTime timeCreated, @JsonPropertyDescription("The item most recent update time.") OffsetDateTime timeUpdated, @JsonPropertyDescription("The item metadata.") Map<CJ1TypeRecordFieldIdentifier, CJ1MetadataType> metadata, @JsonPropertyDescription("The item attachments.") List<CJ1AttachmentItem> attachments, @JsonPropertyDescription("The item types.") Set<CJ1TypeRecordIdentifier> types) Creates an instance of aCJ1Itemrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componenttimeCreated- the value for thetimeCreatedrecord componenttimeUpdated- the value for thetimeUpdatedrecord componentmetadata- the value for themetadatarecord componentattachments- the value for theattachmentsrecord componenttypes- the value for thetypesrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
timeCreated
Returns the value of thetimeCreatedrecord component.- Returns:
- the value of the
timeCreatedrecord component
-
timeUpdated
Returns the value of thetimeUpdatedrecord component.- Returns:
- the value of the
timeUpdatedrecord component
-
metadata
@JsonPropertyDescription("The item metadata.") public Map<CJ1TypeRecordFieldIdentifier,CJ1MetadataType> metadata()Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
attachments
Returns the value of theattachmentsrecord component.- Returns:
- the value of the
attachmentsrecord component
-
types
Returns the value of thetypesrecord component.- Returns:
- the value of the
typesrecord component
-