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 aStorageObject
record class. -
Method Summary
Modifier and TypeMethodDescriptionbucket()
Returns the value of thebucket
record component.Returns the value of thecreationDate
record component.boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexpiresDate
record component.hash()
Returns the value of thehash
record component.int
hashCode()
Returns a hash code value for this object.metadata()
Returns the value of themetadata
record component.name()
Returns the value of thename
record component.long
size()
Returns the value of thesize
record 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 aStorageObject
record class.- Parameters:
bucket
- the value for thebucket
record componentname
- the value for thename
record componenthash
- the value for thehash
record componentsize
- the value for thesize
record componentcreationDate
- the value for thecreationDate
record componentexpiresDate
- the value for theexpiresDate
record componentmetadata
- the value for themetadata
record 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 thebucket
record component.- Returns:
- the value of the
bucket
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
hash
Returns the value of thehash
record component.- Returns:
- the value of the
hash
record component
-
size
public long size()Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-
creationDate
Returns the value of thecreationDate
record component.- Returns:
- the value of the
creationDate
record component
-
expiresDate
Returns the value of theexpiresDate
record component.- Returns:
- the value of the
expiresDate
record component
-
metadata
Returns the value of themetadata
record component.- Returns:
- the value of the
metadata
record component
-