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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class KeyImportRequest extends Object
Import request for a simple or composite (hybrid) PUBLIC cryptographic key. Mirrors the cryptographic service's key import request field for field.
  • Field Details

  • Constructor Details

    • KeyImportRequest

      public KeyImportRequest()
  • Method Details

    • getKdfAsString

      public String getKdfAsString()
      The wire value of kdf: 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 getKdf() 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
    • getTypeAsString

      public String getTypeAsString()
      The wire value of type: 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 getType() 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 KeyImportRequest alg(@Nonnull String alg)
    • getAlg

      @Nonnull public String getAlg()
      Algorithm identifier. Simple: ML-DSA-87, P-256, RSA-2048. Composite: a combined pairing (e.g., X25519+ML-KEM-768) that MUST be in this deployment's composite catalogue — the construction is resolved FROM the pairing, so an uncatalogued pairing has no resolvable construction and is refused with 400. Call GET /api/v3/admin/tenants/{tenantId}/supported-algorithms?kty=COMPOSITE for the pairings this deployment accepts.
      Returns:
      alg
    • setAlg

      public void setAlg(@Nonnull String alg)
    • components

      public KeyImportRequest components(@Nullable List<KeyComponentImportRequest> components)
    • addComponentsItem

      public KeyImportRequest addComponentsItem(KeyComponentImportRequest componentsItem)
    • getComponents

      @Nullable public List<KeyComponentImportRequest> getComponents()
      Component array for COMPOSITE keys (one classical + one PQC, typically). Required when type=COMPOSITE.
      Returns:
      components
    • setComponents

      public void setComponents(@Nullable List<KeyComponentImportRequest> components)
    • expiresAt

      public KeyImportRequest expiresAt(@Nullable String expiresAt)
    • getExpiresAt

      @Nullable public String getExpiresAt()
      ISO-8601 UTC expiration. Null means no expiration.
      Returns:
      expiresAt
    • setExpiresAt

      public void setExpiresAt(@Nullable String expiresAt)
    • exportable

      public KeyImportRequest exportable(@Nullable Boolean exportable)
    • getExportable

      @Nullable public Boolean getExportable()
      Whether this key can be exported from the keystore.
      Returns:
      exportable
    • setExportable

      public void setExportable(@Nullable Boolean exportable)
    • kdf

      public KeyImportRequest kdf(@Nullable KeyImportRequest.KdfEnum kdf)
    • getKdf

      @Nullable public KeyImportRequest.KdfEnum getKdf()
      Key derivation function of an imported COMPOSITE_KEM_COMBINE key. Optional; ignored for simple keys and COMPOSITE_SIGNATURE. Membership is exact in case; an unpublished token is refused at this boundary before the import is relayed.
      Returns:
      kdf
    • setKdf

      public void setKdf(@Nullable KeyImportRequest.KdfEnum kdf)
    • keyOps

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

      public KeyImportRequest addKeyOpsItem(String keyOpsItem)
    • getKeyOps

      @Nullable public List<String> getKeyOps()
      Permitted key operations. Public-only operations: encrypt, verify, wrapKey, deriveKey.
      Returns:
      keyOps
    • setKeyOps

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

      public KeyImportRequest kid(@Nonnull String kid)
    • getKid

      @Nonnull public String getKid()
      Unique identifier (kid) for the key. If it exists, the supplied public key is validated against the stored key.
      Returns:
      kid
    • setKid

      public void setKid(@Nonnull String kid)
    • kty

      public KeyImportRequest kty(@Nonnull String kty)
    • getKty

      @Nonnull public String getKty()
      Key type. Simple: RSA, EC, ML-KEM, ML-DSA, etc. — and it must be a PUBLISHED key type; an unpublished spelling is refused with 400 naming the accepted set, because a stored value outside the vocabulary can neither be filtered on nor round-tripped. Composite: the single coarse token COMPOSITE — the construction is carried by compositeMode and follows from the pairing named in alg.
      Returns:
      kty
    • setKty

      public void setKty(@Nonnull String kty)
    • maxUsageLimit

      public KeyImportRequest maxUsageLimit(@Nullable Integer maxUsageLimit)
    • getMaxUsageLimit

      @Nullable public Integer getMaxUsageLimit()
      Maximum usage operations allowed. 0 means unlimited.
      Returns:
      maxUsageLimit
    • setMaxUsageLimit

      public void setMaxUsageLimit(@Nullable Integer maxUsageLimit)
    • publicKey

      public KeyImportRequest publicKey(@Nullable String publicKey)
    • getPublicKey

      @Nullable public String getPublicKey()
      Base64-encoded public key (X.509 SubjectPublicKeyInfo). Required for simple asymmetric keys; omitted for composite keys (use components).
      Returns:
      publicKey
    • setPublicKey

      public void setPublicKey(@Nullable String publicKey)
    • softLimitExpiration

      public KeyImportRequest softLimitExpiration(@Nullable String softLimitExpiration)
    • getSoftLimitExpiration

      @Nullable public String getSoftLimitExpiration()
      ISO-8601 UTC soft-limit expiration for warnings.
      Returns:
      softLimitExpiration
    • setSoftLimitExpiration

      public void setSoftLimitExpiration(@Nullable String softLimitExpiration)
    • softUsageLimit

      public KeyImportRequest softUsageLimit(@Nullable Integer softUsageLimit)
    • getSoftUsageLimit

      @Nullable public Integer getSoftUsageLimit()
      Soft-limit usage count for warnings.
      Returns:
      softUsageLimit
    • setSoftUsageLimit

      public void setSoftUsageLimit(@Nullable Integer softUsageLimit)
    • type

      public KeyImportRequest type(@Nullable KeyImportRequest.TypeEnum type)
    • getType

      @Nullable public KeyImportRequest.TypeEnum getType()
      Key structure: SIMPLE (default) or COMPOSITE.
      Returns:
      type
    • setType

      public void setType(@Nullable KeyImportRequest.TypeEnum type)
    • 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 KeyImportRequest
    • 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 KeyImportRequest
    • fromJson

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

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