Record Class QuorumRequestReceipt
java.lang.Object
java.lang.Record
co.ankatech.ankasecure.keymanagement.model.QuorumRequestReceipt
- Record Components:
requestId- the quorum request idoperation- the gated operation, as the API names it (for exampleKEY_MARK_FOR_DESTRUCTION)target- what the operation acts on (a key id), ornullstatus- the request status the answer carried (for examplePENDING), ornullwhen the answer omitted itrequiredApprovals- the approvals the request needsapprovals- the approvals it holdsexpiresAt- when it expires unless approved, ornullwhen the answer omitted itlocation- the request's address, from theLocationheader, 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 Summary
ConstructorsConstructorDescriptionQuorumRequestReceipt(String requestId, String operation, String target, String status, int requiredApprovals, int approvals, OffsetDateTime expiresAt, String location) Canonical constructor. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theapprovalsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.Returns the value of theoperationrecord component.Returns the value of therequestIdrecord component.intReturns the value of therequiredApprovalsrecord component.status()Returns the value of thestatusrecord component.target()Returns the value of thetargetrecord component.toString()The receipt as a log line: every server-supplied member rendered byTerminalSafe.text(String), and never thelocation, which is a server-supplied address.
-
Constructor Details
-
QuorumRequestReceipt
public QuorumRequestReceipt(String requestId, String operation, String target, String status, int requiredApprovals, int approvals, OffsetDateTime expiresAt, String location) Canonical constructor.- Throws:
NullPointerException- ifrequestId,operationorlocationisnull
-
-
Method Details
-
toString
The receipt as a log line: every server-supplied member rendered byTerminalSafe.text(String), and never thelocation, which is a server-supplied address. -
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 '=='. -
requestId
Returns the value of therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
requiredApprovals
public int requiredApprovals()Returns the value of therequiredApprovalsrecord component.- Returns:
- the value of the
requiredApprovalsrecord component
-
approvals
public int approvals()Returns the value of theapprovalsrecord component.- Returns:
- the value of the
approvalsrecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-