Package com.adobe.testing.s3mock.dto
Record Class S3Object
java.lang.Object
java.lang.Record
com.adobe.testing.s3mock.dto.S3Object
public record S3Object(String key, String lastModified, String etag, String size, StorageClass storageClass, Owner owner, ChecksumAlgorithm checksumAlgorithm)
extends Record
Class representing an Object on S3.
API Reference
-
Constructor Summary
ConstructorsConstructorDescriptionS3Object(String key, String lastModified, String etag, String size, StorageClass storageClass, Owner owner, ChecksumAlgorithm checksumAlgorithm) Creates an instance of aS3Objectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechecksumAlgorithmrecord component.final booleanIndicates whether some other object is "equal to" this one.etag()Returns the value of theetagrecord component.static S3Objectfrom(S3ObjectMetadata s3ObjectMetadata) final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.Returns the value of thelastModifiedrecord component.owner()Returns the value of theownerrecord component.size()Returns the value of thesizerecord component.Returns the value of thestorageClassrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
S3Object
public S3Object(String key, String lastModified, String etag, String size, StorageClass storageClass, Owner owner, ChecksumAlgorithm checksumAlgorithm) Creates an instance of aS3Objectrecord class.- Parameters:
key- the value for thekeyrecord componentlastModified- the value for thelastModifiedrecord componentetag- the value for theetagrecord componentsize- the value for thesizerecord componentstorageClass- the value for thestorageClassrecord componentowner- the value for theownerrecord componentchecksumAlgorithm- the value for thechecksumAlgorithmrecord component
-
-
Method Details
-
from
-
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. -
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. -
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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
lastModified
Returns the value of thelastModifiedrecord component.- Returns:
- the value of the
lastModifiedrecord component
-
etag
Returns the value of theetagrecord component.- Returns:
- the value of the
etagrecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
storageClass
Returns the value of thestorageClassrecord component.- Returns:
- the value of the
storageClassrecord component
-
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
checksumAlgorithm
Returns the value of thechecksumAlgorithmrecord component.- Returns:
- the value of the
checksumAlgorithmrecord component
-