Record Class QuorumRequestReceipt

java.lang.Object
java.lang.Record
co.ankatech.ankasecure.keymanagement.model.QuorumRequestReceipt
Record Components:
requestId - the quorum request id
operation - the gated operation, as the API names it (for example KEY_MARK_FOR_DESTRUCTION)
target - what the operation acts on (a key id), or null
status - the request status the answer carried (for example PENDING), or null when the answer omitted it
requiredApprovals - the approvals the request needs
approvals - the approvals it holds
expiresAt - when it expires unless approved, or null when the answer omitted it
location - the request's address, from the Location header, for programmatic use; it is never rendered

public record QuorumRequestReceipt(String requestId, String operation, String target, String status, int requiredApprovals, int approvals, OffsetDateTime expiresAt, String location) extends Record
The quorum request the Admin API opened instead of performing a gated operation (202 Accepted): what is now waiting for people to approve it.

A key or key-version destruction request always answers one: destruction needs the approval of at least one person other than the requester, given in the Admin Console, and the server destroys the approved material by itself once the cooling-off period has ended. The SDK can read the request (quorumRequests().get(requestId)) and cancel it while it waits; it can never approve or reject it.

The String members are the server's values, unrendered, for programmatic use: a caller that displays one renders it through TerminalSafe.text(String), as toString() does. The location is never displayed at all. A receipt the SDK builds from a quorum answer holds a request id that is a UUID.

  • Constructor Details

  • Method Details

    • toString

      public String toString()
      The receipt as a log line: every server-supplied member rendered by TerminalSafe.text(String), and never the location, which is a server-supplied address.
      Specified by:
      toString in class Record
      Returns:
      the rendering
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • requestId

      public String requestId()
      Returns the value of the requestId record component.
      Returns:
      the value of the requestId 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
    • status

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

      public int requiredApprovals()
      Returns the value of the requiredApprovals record component.
      Returns:
      the value of the requiredApprovals record component
    • approvals

      public int approvals()
      Returns the value of the approvals record component.
      Returns:
      the value of the approvals record component
    • expiresAt

      public OffsetDateTime expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component
    • location

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