Record Class S3ObjectMetadata

java.lang.Object
java.lang.Record
com.adobe.testing.s3mock.store.S3ObjectMetadata

public record S3ObjectMetadata(UUID id, String key, String size, String modificationDate, String etag, String contentType, long lastModified, Path dataPath, Map<String,String> userMetadata, List<Tag> tags, LegalHold legalHold, Retention retention, Owner owner, Map<String,String> storeHeaders, Map<String,String> encryptionHeaders, ChecksumAlgorithm checksumAlgorithm, String checksum) extends Record
Represents an object in S3, used to serialize and deserialize all metadata locally.
  • Constructor Details

    • S3ObjectMetadata

      public S3ObjectMetadata(UUID id, String key, String size, String modificationDate, String etag, String contentType, long lastModified, Path dataPath, Map<String,String> userMetadata, List<Tag> tags, LegalHold legalHold, Retention retention, Owner owner, Map<String,String> storeHeaders, Map<String,String> encryptionHeaders, ChecksumAlgorithm checksumAlgorithm, String checksum)
      Creates an instance of a S3ObjectMetadata record class.
      Parameters:
      id - the value for the id record component
      key - the value for the key record component
      size - the value for the size record component
      modificationDate - the value for the modificationDate record component
      etag - the value for the etag record component
      contentType - the value for the contentType record component
      lastModified - the value for the lastModified record component
      dataPath - the value for the dataPath record component
      userMetadata - the value for the userMetadata record component
      tags - the value for the tags record component
      legalHold - the value for the legalHold record component
      retention - the value for the retention record component
      owner - the value for the owner record component
      storeHeaders - the value for the storeHeaders record component
      encryptionHeaders - the value for the encryptionHeaders record component
      checksumAlgorithm - the value for the checksumAlgorithm record component
      checksum - the value for the checksum 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 '=='.
      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 UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • size

      public String size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • modificationDate

      public String modificationDate()
      Returns the value of the modificationDate record component.
      Returns:
      the value of the modificationDate record component
    • etag

      public String etag()
      Returns the value of the etag record component.
      Returns:
      the value of the etag record component
    • contentType

      public String contentType()
      Returns the value of the contentType record component.
      Returns:
      the value of the contentType record component
    • lastModified

      public long lastModified()
      Returns the value of the lastModified record component.
      Returns:
      the value of the lastModified record component
    • dataPath

      public Path dataPath()
      Returns the value of the dataPath record component.
      Returns:
      the value of the dataPath record component
    • userMetadata

      public Map<String,String> userMetadata()
      Returns the value of the userMetadata record component.
      Returns:
      the value of the userMetadata record component
    • tags

      public List<Tag> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component
    • legalHold

      public LegalHold legalHold()
      Returns the value of the legalHold record component.
      Returns:
      the value of the legalHold record component
    • retention

      public Retention retention()
      Returns the value of the retention record component.
      Returns:
      the value of the retention record component
    • owner

      public Owner owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • storeHeaders

      public Map<String,String> storeHeaders()
      Returns the value of the storeHeaders record component.
      Returns:
      the value of the storeHeaders record component
    • encryptionHeaders

      public Map<String,String> encryptionHeaders()
      Returns the value of the encryptionHeaders record component.
      Returns:
      the value of the encryptionHeaders record component
    • checksumAlgorithm

      public ChecksumAlgorithm checksumAlgorithm()
      Returns the value of the checksumAlgorithm record component.
      Returns:
      the value of the checksumAlgorithm record component
    • checksum

      public String checksum()
      Returns the value of the checksum record component.
      Returns:
      the value of the checksum record component