Record Class KeyFilters

java.lang.Object
java.lang.Record
co.ankatech.ankasecure.sdk.model.KeyFilters
Record Components:
origin - key origin filter (e.g. GENERATED, IMPORTED); null to skip
restricted - restricted-flag filter; null to skip
kty - key type filter (e.g. RSA, ML-KEM, oct); null to skip
status - lifecycle status filter (e.g. ACTIVE, REVOKED); null to skip

public record KeyFilters(String origin, Boolean restricted, String kty, String status) extends Record
Server-side filters for the key listing endpoints. Filters apply at the server BEFORE pagination, so the page totals returned by listKeys(filters, page, size) are filtered, tenant-scoped counts.

Pass null for any dimension that should not be filtered; use none() for an unfiltered listing. Filters combine with AND logic.

Example


 // All ACTIVE ML-KEM keys
 KeyFilters filters = new KeyFilters(null, null, "ML-KEM", "ACTIVE");

 // All imported keys
 KeyFilters imported = new KeyFilters("IMPORTED", null, null, null);
 
Since:
3.0.0
  • Constructor Details

    • KeyFilters

      public KeyFilters(String origin, Boolean restricted, String kty, String status)
      Creates an instance of a KeyFilters record class.
      Parameters:
      origin - the value for the origin record component
      restricted - the value for the restricted record component
      kty - the value for the kty record component
      status - the value for the status record component
  • Method Details

    • none

      public static KeyFilters none()
      An unfiltered listing (all keys of the tenant).
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • origin

      public String origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component
    • restricted

      public Boolean restricted()
      Returns the value of the restricted record component.
      Returns:
      the value of the restricted record component
    • kty

      public String kty()
      Returns the value of the kty record component.
      Returns:
      the value of the kty record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component