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 Details

    • StorageObject

      public StorageObject(String bucket, String name, String hash, long size, Instant creationDate, Instant expiresDate, Map<String,String> metadata)
      Creates an instance of a StorageObject record class.
      Parameters:
      bucket - the value for the bucket record component
      name - the value for the name record component
      hash - the value for the hash record component
      size - the value for the size record component
      creationDate - the value for the creationDate record component
      expiresDate - the value for the expiresDate record component
      metadata - the value for the metadata record component
    • StorageObject

      public StorageObject(String bucket, String name, String hash, long size, Instant creationDate)
  • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public boolean equals(Object obj)
      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:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • toString

      public 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
    • bucket

      public String bucket()
      Returns the value of the bucket record component.
      Returns:
      the value of the bucket record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • hash

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

      public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • creationDate

      public Instant creationDate()
      Returns the value of the creationDate record component.
      Returns:
      the value of the creationDate record component
    • expiresDate

      public Instant expiresDate()
      Returns the value of the expiresDate record component.
      Returns:
      the value of the expiresDate record component
    • metadata

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