Package codes.grow.packages.vault
Record Class KvVersionMetadata
java.lang.Object
java.lang.Record
codes.grow.packages.vault.KvVersionMetadata
- Record Components:
version- version numbercreatedTime- creation timedeletionTime- soft-deletion time (empty when not deleted)destroyed- whether the version is destroyedcustomMetadata- custom metadata of the secret
public record KvVersionMetadata(int version, Optional<Instant> createdTime, Optional<Instant> deletionTime, boolean destroyed, Map<String,String> customMetadata)
extends Record
Metadata of one KV v2 version.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedTimerecord component.Returns the value of thecustomMetadatarecord component.booleandeleted()Returns whether the version is soft-deleted or destroyed.Returns the value of thedeletionTimerecord component.booleanReturns the value of thedestroyedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
-
Constructor Details
-
KvVersionMetadata
public KvVersionMetadata(int version, Optional<Instant> createdTime, Optional<Instant> deletionTime, boolean destroyed, Map<String, String> customMetadata) Creates the record; the map is copied.- Parameters:
version- versioncreatedTime- creation timedeletionTime- deletion timedestroyed- destroyed flagcustomMetadata- custom metadata
-
-
Method Details
-
deleted
public boolean deleted()Returns whether the version is soft-deleted or destroyed.- Returns:
- true when the data is gone
-
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. -
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. -
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 '=='. -
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
createdTime
Returns the value of thecreatedTimerecord component.- Returns:
- the value of the
createdTimerecord component
-
deletionTime
Returns the value of thedeletionTimerecord component.- Returns:
- the value of the
deletionTimerecord component
-
destroyed
public boolean destroyed()Returns the value of thedestroyedrecord component.- Returns:
- the value of the
destroyedrecord component
-
customMetadata
Returns the value of thecustomMetadatarecord component.- Returns:
- the value of the
customMetadatarecord component
-