Record Class CJ1FileWithoutData

java.lang.Object
java.lang.Record
com.io7m.cardant.protocol.inventory.json.internal.CJ1FileWithoutData
All Implemented Interfaces:
CJ1FileType, CJ1ValueType

@JsonClassDescription("A file without the data included.") public record CJ1FileWithoutData(UUID id, String description, String mediaType, long size, String hashAlgorithm, String hashValue) extends Record implements CJ1FileType
  • Constructor Summary

    Constructors
    Constructor
    Description
    CJ1FileWithoutData(UUID id, String description, String mediaType, long size, String hashAlgorithm, String hashValue)
    Creates an instance of a CJ1FileWithoutData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the description record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the hashAlgorithm record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the hashValue record component.
    id()
    Returns the value of the id record component.
    Returns the value of the mediaType record component.
    long
    Returns the value of the size record component.
    final String
    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

    • CJ1FileWithoutData

      public CJ1FileWithoutData(@JsonPropertyDescription("The file ID.") UUID id, @JsonPropertyDescription("The file description.") String description, @JsonPropertyDescription("The file media type.") String mediaType, @JsonPropertyDescription("The file size.") long size, @JsonPropertyDescription("The file hash algorithm.") String hashAlgorithm, @JsonPropertyDescription("The file hash value.") String hashValue)
      Creates an instance of a CJ1FileWithoutData 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
      size - the value for the size record component
      hashAlgorithm - the value for the hashAlgorithm record component
      hashValue - the value for the hashValue 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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
    • size

      @JsonPropertyDescription("The file size.") public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size 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