# Record Class CJ1FileWithData

java.lang.Object
java.lang.Record
com.io7m.cardant.protocol.inventory.json.internal.CJ1FileWithData

All Implemented Interfaces:
  `CJ1FileType`, `CJ1ValueType`

@JsonClassDescription("A file with the data included.") public record CJ1FileWithData(UUID id, String description, String mediaType, String hashAlgorithm, String hashValue, byte[] data) extends Record implements CJ1FileType

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CJ1FileWithData(UUID id, String description, String mediaType, String hashAlgorithm, String hashValue, byte[] data)`
  Creates an instance of a `CJ1FileWithData` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `data()`
  Returns the value of the `data` record component.
  `String`
  `description()`
  Returns the value of the `description` record component.
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `String`
  `hashAlgorithm()`
  Returns the value of the `hashAlgorithm` record component.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `String`
  `hashValue()`
  Returns the value of the `hashValue` record component.
  `UUID`
  `id()`
  Returns the value of the `id` record component.
  `String`
  `mediaType()`
  Returns the value of the `mediaType` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.

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

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

- ## Constructor Details

  - ### CJ1FileWithData

    public CJ1FileWithData(@JsonPropertyDescription("The file ID.") UUID id, @JsonPropertyDescription("The file description.") String description, @JsonPropertyDescription("The file media type.") String mediaType, @JsonPropertyDescription("The file hash algorithm.") String hashAlgorithm, @JsonPropertyDescription("The file hash value.") String hashValue, @JsonPropertyDescription("The file data.") byte[] data)
    Creates an instance of a `CJ1FileWithData` record class.
    Parameters:
      `id` - the value for the `id` record component
      `description` - the value for the `description` record component
      `mediaType` - the value for the `mediaType` record component
      `hashAlgorithm` - the value for the `hashAlgorithm` record component
      `hashValue` - the value for the `hashValue` record component
      `data` - the value for the `data` record component

- ## Method Details

  - ### 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

    @JsonPropertyDescription("The file ID.") public UUID id()
    Returns the value of the `id` record component.
    Returns:
      the value of the `id` record component

  - ### description

    @JsonPropertyDescription("The file description.") public String description()
    Returns the value of the `description` record component.
    Returns:
      the value of the `description` record component

  - ### mediaType

    @JsonPropertyDescription("The file media type.") public String mediaType()
    Returns the value of the `mediaType` record component.
    Returns:
      the value of the `mediaType` record component

  - ### hashAlgorithm

    @JsonPropertyDescription("The file hash algorithm.") public String hashAlgorithm()
    Returns the value of the `hashAlgorithm` record component.
    Returns:
      the value of the `hashAlgorithm` record component

  - ### hashValue

    @JsonPropertyDescription("The file hash value.") public String hashValue()
    Returns the value of the `hashValue` record component.
    Returns:
      the value of the `hashValue` record component

  - ### data

    @JsonPropertyDescription("The file data.") public byte[] data()
    Returns the value of the `data` record component.
    Returns:
      the value of the `data` record component