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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class ImportedKey extends Object
Metadata about a successfully imported private key.
  • Field Details

  • Constructor Details

    • ImportedKey

      public ImportedKey()
  • Method Details

    • 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
    • alg

      public ImportedKey alg(@Nonnull String alg)
    • getAlg

      @Nonnull public String getAlg()
      Key algorithm as the platform records it (RSA-2048, P-384, Ed25519, ML-DSA-65, and so on).
      Returns:
      alg
    • setAlg

      public void setAlg(@Nonnull String alg)
    • keyOps

      public ImportedKey keyOps(@Nullable List<String> keyOps)
    • addKeyOpsItem

      public ImportedKey addKeyOpsItem(String keyOpsItem)
    • getKeyOps

      @Nullable public List<String> getKeyOps()
      Operations the imported key permits, from its certificate's validity. - Valid certificate: [\"sign\", \"encrypt\", \"decrypt\", \"verify\"] - Expired certificate (IMPORT_ONLY validation mode): [\"decrypt\"] only
      Returns:
      keyOps
    • setKeyOps

      public void setKeyOps(@Nullable List<String> keyOps)
    • kid

      public ImportedKey kid(@Nonnull String kid)
    • getKid

      @Nonnull public String getKid()
      Key ID assigned during import.
      Returns:
      kid
    • setKid

      public void setKid(@Nonnull String kid)
    • kty

      public ImportedKey kty(@Nonnull String kty)
    • getKty

      @Nonnull public String getKty()
      Key type (RSA, EC, OKP for EdDSA, and so on).
      Returns:
      kty
    • setKty

      public void setKty(@Nonnull String kty)
    • sourceAlias

      public ImportedKey sourceAlias(@Nullable String sourceAlias)
    • getSourceAlias

      @Nullable public String getSourceAlias()
      The entry's alias in the original keystore file.
      Returns:
      sourceAlias
    • setSourceAlias

      public void setSourceAlias(@Nullable String sourceAlias)
    • status

      public ImportedKey status(@Nullable ImportedKey.StatusEnum status)
    • getStatus

      @Nullable public ImportedKey.StatusEnum getStatus()
      Lifecycle state, as the lower-case wire alias of the key-status vocabulary: active, pending_rotation, rotated, expired, revoked, archived, suspended, pending_destruction, deleted_logical.
      Returns:
      status
    • setStatus

      public void setStatus(@Nullable ImportedKey.StatusEnum status)
    • 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 ImportedKey
    • 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 ImportedKey
    • fromJson

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

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