Class AdminKeyMergePatchRequest
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.AdminKeyMergePatchRequest
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class AdminKeyMergePatchRequest
extends Object
Documentation of the set of fields accepted on a key-metadata merge-patch request. Only include the fields you want to change. Absent fields leave the current value unchanged. Explicit `null` clears the field (standard RFC 7396 semantics), except `exportable`, which is always `true` or `false`: a `null` there is refused with a 400. No value is coerced: a value of the wrong JSON type is refused with a 400 naming the field. These seven fields are the whole accepted set: a document naming any other field is refused with a 400 that names it. `displayName` and `description` are stored on the key itself and can be changed in every state the key can be addressed in. The other five are stored on the key's current material: on a REVOKED, ARCHIVED or PENDING_DESTRUCTION key, which has none, a patch naming any of them is refused with a 409 that names them. `expiresAt` and `maxUsageLimit` are protection limits and are final once reached: on a key whose expiry has passed, a patch naming `expiresAt` is refused with a 409 `key-protection-limit-reached`, and so is `maxUsageLimit` on a key whose usage limit is used up (KMIP 1.4 Table 112, ยง3.21). Rotation gives the key a new current material with new limits.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescription(String description) displayName(String displayName) booleanexpiresAt(OffsetDateTime expiresAt) exportable(Boolean exportable) static AdminKeyMergePatchRequestCreate an instance of AdminKeyMergePatchRequest given an JSON stringFree-text description of the key's purpose (a string, max 1000 UTF-8 bytes).Human-friendly display name shown in the admin console (a string, max 255 UTF-8 bytes).Hard expiration UTC timestamp (ISO-8601 string): after it the key no longer encrypts or signs.Whether the public key material can be exported via migration endpoints.Hard usage limit, a non-negative integer: the number of operations that apply protection (encrypt, sign) the key's current material performs.Soft expiration UTC timestamp (ISO-8601 string, warning threshold).Soft usage limit (warning threshold), a non-negative integer.inthashCode()maxUsageLimit(Integer maxUsageLimit) voidsetDescription(String description) voidsetDisplayName(String displayName) voidsetExpiresAt(OffsetDateTime expiresAt) voidsetExportable(Boolean exportable) voidsetMaxUsageLimit(Integer maxUsageLimit) voidsetSoftLimitExpiration(OffsetDateTime softLimitExpiration) voidsetSoftUsageLimit(Integer softUsageLimit) softLimitExpiration(OffsetDateTime softLimitExpiration) softUsageLimit(Integer softUsageLimit) toJson()Convert an instance of AdminKeyMergePatchRequest 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_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_DISPLAY_NAME
- See Also:
-
SERIALIZED_NAME_EXPIRES_AT
- See Also:
-
SERIALIZED_NAME_EXPORTABLE
- See Also:
-
SERIALIZED_NAME_MAX_USAGE_LIMIT
- See Also:
-
SERIALIZED_NAME_SOFT_LIMIT_EXPIRATION
- See Also:
-
SERIALIZED_NAME_SOFT_USAGE_LIMIT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
AdminKeyMergePatchRequest
public AdminKeyMergePatchRequest()
-
-
Method Details
-
description
-
getDescription
Free-text description of the key's purpose (a string, max 1000 UTF-8 bytes). `null` clears it. Patchable in every state.- Returns:
- description
-
setDescription
-
displayName
-
getDisplayName
Human-friendly display name shown in the admin console (a string, max 255 UTF-8 bytes). `null` clears it. Patchable in every state.- Returns:
- displayName
-
setDisplayName
-
expiresAt
-
getExpiresAt
Hard expiration UTC timestamp (ISO-8601 string): after it the key no longer encrypts or signs. Setting to `null` removes the expiration. Rejected with 400 if the value is in the past. Changeable only while the key's current expiry has not been reached; once it has, setting or clearing it is refused with a 409 `key-protection-limit-reached` and the key is rotated instead.- Returns:
- expiresAt
-
setExpiresAt
-
exportable
-
getExportable
Whether the public key material can be exported via migration endpoints. Must be a JSON boolean; `null` is refused with a 400, because the flag is always true or false.- Returns:
- exportable
-
setExportable
-
maxUsageLimit
-
getMaxUsageLimit
Hard usage limit, a non-negative integer: the number of operations that apply protection (encrypt, sign) the key's current material performs. `0` means unlimited, and `null` clears the limit, which is also unlimited. A positive value at or below the key's current `usageCount` is refused with a 400. Changeable only while the limit has not been reached; once it has, setting or clearing it is refused with a 409 `key-protection-limit-reached` and the key is rotated instead.- Returns:
- maxUsageLimit
-
setMaxUsageLimit
-
softLimitExpiration
-
getSoftLimitExpiration
Soft expiration UTC timestamp (ISO-8601 string, warning threshold). `null` clears it. Must be strictly before `expiresAt`, decided on the values the key carries after the patch; with no `expiresAt` there is nothing to order.- Returns:
- softLimitExpiration
-
setSoftLimitExpiration
-
softUsageLimit
-
getSoftUsageLimit
Soft usage limit (warning threshold), a non-negative integer. `0` or `null` means no threshold. A positive value requires a positive `maxUsageLimit` and must be strictly less than it, decided on the limits the key carries after the patch.- Returns:
- softUsageLimit
-
setSoftUsageLimit
-
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 AdminKeyMergePatchRequest
-
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 AdminKeyMergePatchRequest
-
fromJson
Create an instance of AdminKeyMergePatchRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of AdminKeyMergePatchRequest
- Throws:
IOException- if the JSON string is invalid with respect to AdminKeyMergePatchRequest
-
toJson
Convert an instance of AdminKeyMergePatchRequest to an JSON string- Returns:
- JSON string
-