Record Class MultipartPart

java.lang.Object
java.lang.Record
io.micronaut.objectstorage.multipart.MultipartPart
Record Components:
partNumber - the positive part number
eTag - the provider entity tag for the part
size - the uploaded part size in bytes
checksum - an optional portable checksum value

public record MultipartPart(int partNumber, @NonNull String eTag, long size, @Nullable String checksum) extends Record
Portable multipart upload part metadata.
Since:
3.1.0
  • Constructor Details

    • MultipartPart

      public MultipartPart(int partNumber, @NonNull String eTag, long size)
      Parameters:
      partNumber - the positive part number
      eTag - the provider entity tag for the part
      size - the uploaded part size in bytes
    • MultipartPart

      public MultipartPart(int partNumber, @NonNull String eTag, long size, @Nullable String checksum)
      Creates an instance of a MultipartPart record class.
      Parameters:
      partNumber - the value for the partNumber record component
      eTag - the value for the eTag record component
      size - the value for the size record component
      checksum - the value for the checksum record component
  • Method Details

    • getPartNumber

      public int getPartNumber()
      Returns:
      the positive part number
    • getETag

      public @NonNull String getETag()
      Returns:
      the provider entity tag for the part
    • getSize

      public long getSize()
      Returns:
      the uploaded part size in bytes
    • getChecksum

      public @NonNull Optional<String> getChecksum()
      Returns:
      an optional portable checksum value
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • partNumber

      public int partNumber()
      Returns the value of the partNumber record component.
      Returns:
      the value of the partNumber record component
    • eTag

      public @NonNull String eTag()
      Returns the value of the eTag record component.
      Returns:
      the value of the eTag record component
    • size

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

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