Class KeyDestructionOrderView

java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.KeyDestructionOrderView

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class KeyDestructionOrderView extends Object
A scheduled, executed, cancelled or failed destruction of a key or of one of its material versions: what the approval of a destruction request scheduled and how it ended.
  • Field Details

  • Constructor Details

    • KeyDestructionOrderView

      public KeyDestructionOrderView()
  • Method Details

    • getCoolingOffSourceAsString

      public String getCoolingOffSourceAsString()
      The wire value of coolingOffSource: what the server sent, verbatim.
      • For a value this release declares, the same wire value the enum names.
      • For a value it does not declare (one a later server added), the server's wire value verbatim, while getCoolingOffSource() reads UNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel.
      • For an absent member, null.
      Returns:
      the wire value, or null when the member is absent
    • getScopeAsString

      public String getScopeAsString()
      The wire value of scope: what the server sent, verbatim.
      • For a value this release declares, the same wire value the enum names.
      • For a value it does not declare (one a later server added), the server's wire value verbatim, while getScope() reads UNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel.
      • For an absent member, null.
      Returns:
      the wire value, or null when the member is absent
    • getStatusAsString

      public String getStatusAsString()
      The wire value of status: what the server sent, verbatim.
      • For a value this release declares, the same wire value the enum names.
      • For a value it does not declare (one a later server added), the server's wire value verbatim, while getStatus() reads UNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel.
      • For an absent member, null.
      Returns:
      the wire value, or null when the member is absent
    • approvedAt

      public KeyDestructionOrderView approvedAt(@Nonnull OffsetDateTime approvedAt)
    • getApprovedAt

      @Nonnull public OffsetDateTime getApprovedAt()
      When the request was approved.
      Returns:
      approvedAt
    • setApprovedAt

      public void setApprovedAt(@Nonnull OffsetDateTime approvedAt)
    • cancelledAt

      public KeyDestructionOrderView cancelledAt(@Nullable OffsetDateTime cancelledAt)
    • getCancelledAt

      @Nullable public OffsetDateTime getCancelledAt()
      When a cancel ended the order; absent unless CANCELLED.
      Returns:
      cancelledAt
    • setCancelledAt

      public void setCancelledAt(@Nullable OffsetDateTime cancelledAt)
    • coolingOffDays

      public KeyDestructionOrderView coolingOffDays(@Nonnull Integer coolingOffDays)
    • getCoolingOffDays

      @Nonnull public Integer getCoolingOffDays()
      Days between the approval and the destruction (7 to 365).
      Returns:
      coolingOffDays
    • setCoolingOffDays

      public void setCoolingOffDays(@Nonnull Integer coolingOffDays)
    • coolingOffSource

      public KeyDestructionOrderView coolingOffSource(@Nonnull KeyDestructionOrderView.CoolingOffSourceEnum coolingOffSource)
    • getCoolingOffSource

      @Nonnull public KeyDestructionOrderView.CoolingOffSourceEnum getCoolingOffSource()
      REQUEST when the request named the period; TENANT_POLICY or DEPLOYMENT_POLICY when it came from that lifecycle policy's default; DEFAULT for the platform's 30 days.
      Returns:
      coolingOffSource
    • setCoolingOffSource

      public void setCoolingOffSource(@Nonnull KeyDestructionOrderView.CoolingOffSourceEnum coolingOffSource)
    • eligibleFrom

      public KeyDestructionOrderView eligibleFrom(@Nonnull OffsetDateTime eligibleFrom)
    • getEligibleFrom

      @Nonnull public OffsetDateTime getEligibleFrom()
      When the destruction runs, or ran: the approval plus the cooling-off period.
      Returns:
      eligibleFrom
    • setEligibleFrom

      public void setEligibleFrom(@Nonnull OffsetDateTime eligibleFrom)
    • executedAt

      public KeyDestructionOrderView executedAt(@Nullable OffsetDateTime executedAt)
    • getExecutedAt

      @Nullable public OffsetDateTime getExecutedAt()
      When the versions were destroyed; absent unless EXECUTED.
      Returns:
      executedAt
    • setExecutedAt

      public void setExecutedAt(@Nullable OffsetDateTime executedAt)
    • failedAt

      public KeyDestructionOrderView failedAt(@Nullable OffsetDateTime failedAt)
    • getFailedAt

      @Nullable public OffsetDateTime getFailedAt()
      When the order ended without destroying anything; absent unless FAILED.
      Returns:
      failedAt
    • setFailedAt

      public void setFailedAt(@Nullable OffsetDateTime failedAt)
    • failureReason

      public KeyDestructionOrderView failureReason(@Nullable String failureReason)
    • getFailureReason

      @Nullable public String getFailureReason()
      Why the order failed; absent unless FAILED.
      Returns:
      failureReason
    • setFailureReason

      public void setFailureReason(@Nullable String failureReason)
    • id

      public KeyDestructionOrderView id(@Nonnull UUID id)
    • getId

      @Nonnull public UUID getId()
      The destruction order.
      Returns:
      id
    • setId

      public void setId(@Nonnull UUID id)
    • quorumRequestId

      public KeyDestructionOrderView quorumRequestId(@Nonnull UUID quorumRequestId)
    • getQuorumRequestId

      @Nonnull public UUID getQuorumRequestId()
      The quorum request whose approval scheduled the order.
      Returns:
      quorumRequestId
    • setQuorumRequestId

      public void setQuorumRequestId(@Nonnull UUID quorumRequestId)
    • scope

    • getScope

      @Nonnull public KeyDestructionOrderView.ScopeEnum getScope()
      KEY destroys every material the key had left and retires its Key ID for good; MATERIAL destroys one material version of a key that keeps another.
      Returns:
      scope
    • setScope

      public void setScope(@Nonnull KeyDestructionOrderView.ScopeEnum scope)
    • status

    • getStatus

      @Nonnull public KeyDestructionOrderView.StatusEnum getStatus()
      SCHEDULED waits for its cooling-off period to end; EXECUTED destroyed the versions; CANCELLED was ended by a cancel, which restored the versions; FAILED destroyed nothing, because the versions were no longer the approved ones or could not be erased, and is never retried.
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull KeyDestructionOrderView.StatusEnum status)
    • supersededBy

      public KeyDestructionOrderView supersededBy(@Nullable UUID supersededBy)
    • getSupersededBy

      @Nullable public UUID getSupersededBy()
      On a CANCELLED version order, the destruction order of the whole key that absorbed it when the key's destruction was approved; absent otherwise.
      Returns:
      supersededBy
    • setSupersededBy

      public void setSupersededBy(@Nullable UUID supersededBy)
    • versions

      public KeyDestructionOrderView versions(@Nonnull List<Integer> versions)
    • addVersionsItem

      public KeyDestructionOrderView addVersionsItem(Integer versionsItem)
    • getVersions

      @Nonnull public List<Integer> getVersions()
      The material versions the order destroys, ascending.
      Returns:
      versions
    • setVersions

      public void setVersions(@Nonnull List<Integer> versions)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to KeyDestructionOrderView
    • validateJsonElementAsCandidate

      public static void validateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element as a candidate of a oneOf schema: the checks of validateJsonElement(JsonElement), and the element carries no member this model does not declare. A oneOf schema without a discriminator tells its candidates apart by their member sets, so a candidate is matched on its closed member set.
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is not a KeyDestructionOrderView
    • fromJson

      public static KeyDestructionOrderView fromJson(String jsonString) throws IOException
      Create an instance of KeyDestructionOrderView given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of KeyDestructionOrderView
      Throws:
      IOException - if the JSON string is invalid with respect to KeyDestructionOrderView
    • toJson

      public String toJson()
      Convert an instance of KeyDestructionOrderView to an JSON string
      Returns:
      JSON string