Class KeyImportRequest
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumKey derivation function of an imported COMPOSITE_KEM_COMBINE key.static enumKey structure: SIMPLE (default) or COMPOSITE. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddComponentsItem(KeyComponentImportRequest componentsItem) addKeyOpsItem(String keyOpsItem) components(List<KeyComponentImportRequest> components) booleanexportable(Boolean exportable) static KeyImportRequestCreate an instance of KeyImportRequest given an JSON stringgetAlg()Algorithm identifier.Component array for COMPOSITE keys (one classical + one PQC, typically).ISO-8601 UTC expiration.Whether this key can be exported from the keystore.getKdf()Key derivation function of an imported COMPOSITE_KEM_COMBINE key.The wire value ofkdf: what the server sent, verbatim.Permitted key operations.getKid()Unique identifier (kid) for the key.getKty()Key type.Maximum usage operations allowed. 0 means unlimited.Base64-encoded public key (X.509 SubjectPublicKeyInfo).ISO-8601 UTC soft-limit expiration for warnings.Soft-limit usage count for warnings.getType()Key structure: SIMPLE (default) or COMPOSITE.The wire value oftype: what the server sent, verbatim.inthashCode()maxUsageLimit(Integer maxUsageLimit) voidvoidsetComponents(List<KeyComponentImportRequest> components) voidsetExpiresAt(String expiresAt) voidsetExportable(Boolean exportable) voidvoidvoidvoidvoidsetMaxUsageLimit(Integer maxUsageLimit) voidsetPublicKey(String publicKey) voidsetSoftLimitExpiration(String softLimitExpiration) voidsetSoftUsageLimit(Integer softUsageLimit) voidsoftLimitExpiration(String softLimitExpiration) softUsageLimit(Integer softUsageLimit) toJson()Convert an instance of KeyImportRequest to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundstatic voidvalidateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare.
-
Field Details
-
SERIALIZED_NAME_ALG
- See Also:
-
SERIALIZED_NAME_COMPONENTS
- See Also:
-
SERIALIZED_NAME_EXPIRES_AT
- See Also:
-
SERIALIZED_NAME_EXPORTABLE
- See Also:
-
SERIALIZED_NAME_KDF
- See Also:
-
SERIALIZED_NAME_KEY_OPS
- See Also:
-
SERIALIZED_NAME_KID
- See Also:
-
SERIALIZED_NAME_KTY
- See Also:
-
SERIALIZED_NAME_MAX_USAGE_LIMIT
- See Also:
-
SERIALIZED_NAME_PUBLIC_KEY
- See Also:
-
SERIALIZED_NAME_SOFT_LIMIT_EXPIRATION
- See Also:
-
SERIALIZED_NAME_SOFT_USAGE_LIMIT
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
KeyImportRequest
public KeyImportRequest()
-
-
Method Details
-
getKdfAsString
The wire value ofkdf: 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()readsUNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel. - For an absent member,
null.
- Returns:
- the wire value, or
nullwhen the member is absent
-
getTypeAsString
The wire value oftype: 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()readsUNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel. - For an absent member,
null.
- Returns:
- the wire value, or
nullwhen the member is absent
-
alg
-
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
-
components
-
addComponentsItem
-
getComponents
Component array for COMPOSITE keys (one classical + one PQC, typically). Required when type=COMPOSITE.- Returns:
- components
-
setComponents
-
expiresAt
-
getExpiresAt
ISO-8601 UTC expiration. Null means no expiration.- Returns:
- expiresAt
-
setExpiresAt
-
exportable
-
getExportable
Whether this key can be exported from the keystore.- Returns:
- exportable
-
setExportable
-
kdf
-
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
-
keyOps
-
addKeyOpsItem
-
getKeyOps
Permitted key operations. Public-only operations: encrypt, verify, wrapKey, deriveKey.- Returns:
- keyOps
-
setKeyOps
-
kid
-
getKid
Unique identifier (kid) for the key. If it exists, the supplied public key is validated against the stored key.- Returns:
- kid
-
setKid
-
kty
-
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
-
maxUsageLimit
-
getMaxUsageLimit
Maximum usage operations allowed. 0 means unlimited.- Returns:
- maxUsageLimit
-
setMaxUsageLimit
-
publicKey
-
getPublicKey
Base64-encoded public key (X.509 SubjectPublicKeyInfo). Required for simple asymmetric keys; omitted for composite keys (use components).- Returns:
- publicKey
-
setPublicKey
-
softLimitExpiration
-
getSoftLimitExpiration
ISO-8601 UTC soft-limit expiration for warnings.- Returns:
- softLimitExpiration
-
setSoftLimitExpiration
-
softUsageLimit
-
getSoftUsageLimit
Soft-limit usage count for warnings.- Returns:
- softUsageLimit
-
setSoftUsageLimit
-
type
-
getType
Key structure: SIMPLE (default) or COMPOSITE.- Returns:
- type
-
setType
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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 ofvalidateJsonElement(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
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
Convert an instance of KeyImportRequest to an JSON string- Returns:
- JSON string
-