Record Class ObjectMetadataEntry<T>
java.lang.Object
java.lang.Record
io.micronaut.objectstorage.metadata.ObjectMetadataEntry<T>
- Type Parameters:
T- The provider-native metadata representation type.- Record Components:
key- The object key.metadata- User metadata.attributes- Portable custom attributes.contentType- The optional content type.contentLength- The optional content length.etag- The optional entity tag.lastModified- The optional last modified instant.nativeEntry- The provider-native metadata representation.
public record ObjectMetadataEntry<T>(@NonNull String key, @NonNull Map<String,String> metadata, @NonNull Map<String,String> attributes, @Nullable String contentType, @Nullable Long contentLength, @Nullable String etag, @Nullable Instant lastModified, @Nullable T nativeEntry)
extends Record
Portable object metadata snapshot.
- Since:
- 3.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
ConstructorsConstructorDescriptionObjectMetadataEntry(@NonNull String key, @NonNull Map<String, String> metadata, @NonNull Map<String, String> attributes, @Nullable String contentType, @Nullable Long contentLength, @Nullable String etag, @Nullable Instant lastModified, @Nullable T nativeEntry) Creates an instance of aObjectMetadataEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.@Nullable LongReturns the value of thecontentLengthrecord component.@Nullable StringReturns the value of thecontentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable Stringetag()Returns the value of theetagrecord component.final inthashCode()Returns a hash code value for this object.@NonNull Stringkey()Returns the value of thekeyrecord component.@Nullable InstantReturns the value of thelastModifiedrecord component.metadata()Returns the value of themetadatarecord component.@Nullable TReturns the value of thenativeEntryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ObjectMetadataEntry
public ObjectMetadataEntry(@NonNull String key, @NonNull Map<String, String> metadata, @NonNull Map<String, String> attributes, @Nullable String contentType, @Nullable Long contentLength, @Nullable String etag, @Nullable Instant lastModified, @Nullable T nativeEntry) Creates an instance of aObjectMetadataEntryrecord class.- Parameters:
key- the value for thekeyrecord componentmetadata- the value for themetadatarecord componentattributes- the value for theattributesrecord componentcontentType- the value for thecontentTyperecord componentcontentLength- the value for thecontentLengthrecord componentetag- the value for theetagrecord componentlastModified- the value for thelastModifiedrecord componentnativeEntry- the value for thenativeEntryrecord component
-
-
Method Details
-
toString
-
hashCode
-
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
-
metadata
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
contentLength
Returns the value of thecontentLengthrecord component.- Returns:
- the value of the
contentLengthrecord component
-
etag
-
lastModified
Returns the value of thelastModifiedrecord component.- Returns:
- the value of the
lastModifiedrecord component
-
nativeEntry
Returns the value of thenativeEntryrecord component.- Returns:
- the value of the
nativeEntryrecord component
-