Class CapabilityGrantKeyPair

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class CapabilityGrantKeyPair extends Object
An ordered key pair of a REENCRYPT or RESIGN grant. The grant authorizes the transformation from sourceKid to targetKid only: a pair my-rsa-2048-key to my-mlkem-768-key does not authorize the reverse direction. The same Key ID on both ends authorizes the in-place transformation of that key across its versions.
  • Field Details

  • Constructor Details

    • CapabilityGrantKeyPair

      public CapabilityGrantKeyPair()
  • Method Details

    • sourceKid

      public CapabilityGrantKeyPair sourceKid(@Nonnull String sourceKid)
    • getSourceKid

      @Nonnull public String getSourceKid()
      The Key ID read from: decrypted for REENCRYPT, verified for RESIGN
      Returns:
      sourceKid
    • setSourceKid

      public void setSourceKid(@Nonnull String sourceKid)
    • targetKid

      public CapabilityGrantKeyPair targetKid(@Nonnull String targetKid)
    • getTargetKid

      @Nonnull public String getTargetKid()
      The Key ID written to: encrypted for REENCRYPT, signed for RESIGN
      Returns:
      targetKid
    • setTargetKid

      public void setTargetKid(@Nonnull String targetKid)
    • 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 CapabilityGrantKeyPair
    • 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 CapabilityGrantKeyPair
    • fromJson

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

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