Record Class KeyListQuery
java.lang.Object
java.lang.Record
co.ankatech.ankasecure.keymanagement.query.KeyListQuery
- Record Components:
status- the projected key status:active,pending_rotation,rotated,expired,revoked,archived,deleted_logical(destroyed),suspendedorpending_destruction;nullfor every statusorigin-GENERATEDorIMPORTED;nullfor bothrestricted- only restricted keys (true) or only unrestricted ones (false);nullfor bothkty- the key type (for exampleML-KEM,ML-DSA,EC,RSA,COMPOSITE);nullfor every typeconformance-ALL,CONFORMINGorNON_CONFORMINGwith the tenant's algorithm policy;nullforALLpage- the zero-based page number;nullfor the server default (0)size- the page size;nullfor the server default (25)sort- sort criteria asproperty,ASC|DESC;nullfor the server default (createdAt,DESC)
public record KeyListQuery(String status, String origin, Boolean restricted, String kty, String conformance, Integer page, Integer size, List<String> sort)
extends Record
The filters and page of a key listing (
keys().list).
Its components are exactly the query parameters of the listKeys operation; a null
component sends nothing, so the server applies its default.
KeyListQuery.firstPage().withStatus("active").withConformance("NON_CONFORMING")
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconformancerecord component.final booleanIndicates whether some other object is "equal to" this one.static KeyListQueryfinal inthashCode()Returns a hash code value for this object.kty()Returns the value of thektyrecord component.origin()Returns the value of theoriginrecord component.page()Returns the value of thepagerecord component.Returns the value of therestrictedrecord component.size()Returns the value of thesizerecord component.sort()Returns the value of thesortrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.withConformance(String value) withOrigin(String value) withRestricted(Boolean value) withStatus(String value)
-
Constructor Details
-
Method Details
-
firstPage
- Returns:
- the first page with the server's defaults and no filter
-
withStatus
- Parameters:
value- the newstatus;nullclears it- Returns:
- a copy of this query with
statusreplaced
-
withOrigin
- Parameters:
value- the neworigin;nullclears it- Returns:
- a copy of this query with
originreplaced
-
withRestricted
- Parameters:
value- the newrestricted;nullclears it- Returns:
- a copy of this query with
restrictedreplaced
-
withKty
- Parameters:
value- the newkty;nullclears it- Returns:
- a copy of this query with
ktyreplaced
-
withConformance
- Parameters:
value- the newconformance;nullclears it- Returns:
- a copy of this query with
conformancereplaced
-
withPage
- Parameters:
value- the newpage;nullclears it- Returns:
- a copy of this query with
pagereplaced
-
withSize
- Parameters:
value- the newsize;nullclears it- Returns:
- a copy of this query with
sizereplaced
-
withSort
- Parameters:
value- the newsort;nullclears it- Returns:
- a copy of this query with
sortreplaced
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
restricted
Returns the value of therestrictedrecord component.- Returns:
- the value of the
restrictedrecord component
-
kty
Returns the value of thektyrecord component.- Returns:
- the value of the
ktyrecord component
-
conformance
Returns the value of theconformancerecord component.- Returns:
- the value of the
conformancerecord component
-
page
Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
sort
Returns the value of thesortrecord component.- Returns:
- the value of the
sortrecord component
-