# Record Class CALocation

java.lang.Object
java.lang.Record
com.io7m.cardant.model.CALocation

Record Components:
  `id` - The location ID
  `parent` - The location parent, if any
  `path` - The location path
  `timeCreated` - The time the location was created
  `timeUpdated` - The time the location was last updated
  `metadata` - The metadata associated with the location
  `attachments` - The attachments associated with the location
  `types` - The types associated with the location

All Implemented Interfaces:
  `CAInventoryObjectType<CALocationSummary>`

public record CALocation(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, SortedMap<CATypeRecordFieldIdentifier,CAMetadataType> metadata, SortedMap<CAAttachmentKey,CAAttachment> attachments, SortedSet<CATypeRecordIdentifier> types) extends Record implements CAInventoryObjectType<CALocationSummary>
A location.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CALocation(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, SortedMap<CATypeRecordFieldIdentifier,CAMetadataType> metadata, SortedMap<CAAttachmentKey,CAAttachment> attachments, SortedSet<CATypeRecordIdentifier> types)`
  Construct a location.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SortedMap<CAAttachmentKey,CAAttachment>`
  `attachments()`
  Returns the value of the `attachments` record component.
  `String`
  `displayId()`
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `CALocationID`
  `id()`
  Returns the value of the `id` record component.
  `SortedMap<CATypeRecordFieldIdentifier,CAMetadataType>`
  `metadata()`
  Returns the value of the `metadata` record component.
  `CALocationName`
  `name()`
  `Optional<CALocationID>`
  `parent()`
  Returns the value of the `parent` record component.
  `CALocationPath`
  `path()`
  Returns the value of the `path` record component.
  `CALocationSummary`
  `summary()`
  `OffsetDateTime`
  `timeCreated()`
  Returns the value of the `timeCreated` record component.
  `OffsetDateTime`
  `timeUpdated()`
  Returns the value of the `timeUpdated` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `SortedSet<CATypeRecordIdentifier>`
  `types()`
  Returns the value of the `types` record component.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.cardant.model.CAInventoryObjectType

  `attachmentsWithRelation, firstAttachmentWithRelation, hasAttachmentWithRelation`

- ## Constructor Details

  - ### CALocation

    public CALocation(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated, SortedMap<CATypeRecordFieldIdentifier,CAMetadataType> metadata, SortedMap<CAAttachmentKey,CAAttachment> attachments, SortedSet<CATypeRecordIdentifier> types)
    Construct a location.
    Parameters:
      `id` - The location ID
      `parent` - The location parent, if any
      `path` - The location path
      `timeCreated` - The time the location was created
      `timeUpdated` - The time the location was last updated
      `metadata` - The metadata associated with the location
      `attachments` - The attachments associated with the location
      `types` - The types associated with the location

- ## Method Details

  - ### displayId

    public String displayId()
    Returns:
      The location display ID

  - ### summary

    public CALocationSummary summary()
    Specified by:
      `summary` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      A summary of the object

  - ### name

    public CALocationName name()
    Returns:
      The location name (the last path component)

  - ### toString

    public final String toString()
    Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### hashCode

    public final int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    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 with `Objects::equals(Object,Object)`.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### id

    public CALocationID id()
    Returns the value of the `id` record component.
    Returns:
      the value of the `id` record component

  - ### parent

    public Optional<CALocationID> parent()
    Returns the value of the `parent` record component.
    Returns:
      the value of the `parent` record component

  - ### path

    public CALocationPath path()
    Returns the value of the `path` record component.
    Returns:
      the value of the `path` record component

  - ### timeCreated

    public OffsetDateTime timeCreated()
    Returns the value of the `timeCreated` record component.
    Returns:
      the value of the `timeCreated` record component

  - ### timeUpdated

    public OffsetDateTime timeUpdated()
    Returns the value of the `timeUpdated` record component.
    Returns:
      the value of the `timeUpdated` record component

  - ### metadata

    public SortedMap<CATypeRecordFieldIdentifier,CAMetadataType> metadata()
    Returns the value of the `metadata` record component.
    Specified by:
      `metadata` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      the value of the `metadata` record component

  - ### attachments

    public SortedMap<CAAttachmentKey,CAAttachment> attachments()
    Returns the value of the `attachments` record component.
    Specified by:
      `attachments` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      the value of the `attachments` record component

  - ### types

    public SortedSet<CATypeRecordIdentifier> types()
    Returns the value of the `types` record component.
    Specified by:
      `types` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      the value of the `types` record component