Record Class StorageObject
java.lang.Object
java.lang.Record
io.clonecloudstore.driver.api.model.StorageObject
public record StorageObject(String bucket, String name, String hash, long size, Instant creationDate, Instant expiresDate, Map<String,String> metadata)
extends Record
Dto for Java and possibly Rest API: Object minimal information
-
Constructor Summary
ConstructorsConstructorDescriptionStorageObject(String bucket, String name, String hash, long size, Instant creationDate) StorageObject(String bucket, String name, String hash, long size, Instant creationDate, Instant expiresDate, Map<String, String> metadata) Creates an instance of aStorageObjectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbucket()Returns the value of thebucketrecord component.Returns the value of thecreationDaterecord component.booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresDaterecord component.hash()Returns the value of thehashrecord component.inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.longsize()Returns the value of thesizerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
StorageObject
public StorageObject(String bucket, String name, String hash, long size, Instant creationDate, Instant expiresDate, Map<String, String> metadata) Creates an instance of aStorageObjectrecord class.- Parameters:
bucket- the value for thebucketrecord componentname- the value for thenamerecord componenthash- the value for thehashrecord componentsize- the value for thesizerecord componentcreationDate- the value for thecreationDaterecord componentexpiresDate- the value for theexpiresDaterecord componentmetadata- the value for themetadatarecord component
-
StorageObject
-
-
Method Details
-
hashCode
public 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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. -
bucket
Returns the value of thebucketrecord component.- Returns:
- the value of the
bucketrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
hash
Returns the value of thehashrecord component.- Returns:
- the value of the
hashrecord component
-
size
public long size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
creationDate
Returns the value of thecreationDaterecord component.- Returns:
- the value of the
creationDaterecord component
-
expiresDate
Returns the value of theexpiresDaterecord component.- Returns:
- the value of the
expiresDaterecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-