Record Class QuorumRequestListQuery

java.lang.Object
java.lang.Record
co.ankatech.ankasecure.keymanagement.query.QuorumRequestListQuery
Record Components:
status - PENDING, SCHEDULED, EXECUTED, FAILED, REJECTED, CANCELLED or EXPIRED; null for every status
operation - the gated operation the request asks for, for example KEY_MARK_FOR_DESTRUCTION or KEY_MATERIAL_MARK_FOR_DESTRUCTION; null for every operation
target - the target the request names, for example a Key ID; null for every target
page - the zero-based page number; null for the server default (0)
size - the page size; null for the server default (20)

public record QuorumRequestListQuery(String status, String operation, String target, Integer page, Integer size) extends Record
The filters and page of the workload's own quorum request listing (quorumRequests().list).

Its components are exactly the query parameters of the listTenantQuorumRequests operation; a null component sends nothing, so the server applies its default.


 QuorumRequestListQuery.firstPage()
         .withStatus("PENDING")
         .withOperation("KEY_MARK_FOR_DESTRUCTION")
         .withTarget("legacy-signing-key")
 
  • Constructor Details

    • QuorumRequestListQuery

      public QuorumRequestListQuery(String status, String operation, String target, Integer page, Integer size)
      Creates an instance of a QuorumRequestListQuery record class.
      Parameters:
      status - the value for the status record component
      operation - the value for the operation record component
      target - the value for the target record component
      page - the value for the page record component
      size - the value for the size record component
  • Method Details

    • firstPage

      public static QuorumRequestListQuery firstPage()
      Returns:
      the first page with the server's defaults and no filter
    • withStatus

      public QuorumRequestListQuery withStatus(String value)
      Parameters:
      value - the new status; null clears it
      Returns:
      a copy of this query with status replaced
    • withOperation

      public QuorumRequestListQuery withOperation(String value)
      Parameters:
      value - the new operation; null clears it
      Returns:
      a copy of this query with operation replaced
    • withTarget

      public QuorumRequestListQuery withTarget(String value)
      Parameters:
      value - the new target; null clears it
      Returns:
      a copy of this query with target replaced
    • withPage

      public QuorumRequestListQuery withPage(Integer value)
      Parameters:
      value - the new page; null clears it
      Returns:
      a copy of this query with page replaced
    • withSize

      public QuorumRequestListQuery withSize(Integer value)
      Parameters:
      value - the new size; null clears it
      Returns:
      a copy of this query with size replaced
    • 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.
    • status

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

      public String operation()
      Returns the value of the operation record component.
      Returns:
      the value of the operation record component
    • target

      public String target()
      Returns the value of the target record component.
      Returns:
      the value of the target record component
    • page

      public Integer page()
      Returns the value of the page record component.
      Returns:
      the value of the page record component
    • size

      public Integer size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component