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.
  • Field Details

  • Constructor Details

    • AdminKeyMergePatchRequest

      public AdminKeyMergePatchRequest()
  • Method Details

    • description

      public AdminKeyMergePatchRequest description(@Nullable String description)
    • getDescription

      @Nullable public String 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

      public void setDescription(@Nullable String description)
    • displayName

      public AdminKeyMergePatchRequest displayName(@Nullable String displayName)
    • getDisplayName

      @Nullable public String 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

      public void setDisplayName(@Nullable String displayName)
    • expiresAt

      public AdminKeyMergePatchRequest expiresAt(@Nullable OffsetDateTime expiresAt)
    • getExpiresAt

      @Nullable public OffsetDateTime 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

      public void setExpiresAt(@Nullable OffsetDateTime expiresAt)
    • exportable

      public AdminKeyMergePatchRequest exportable(@Nullable Boolean exportable)
    • getExportable

      @Nullable public Boolean 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

      public void setExportable(@Nullable Boolean exportable)
    • maxUsageLimit

      public AdminKeyMergePatchRequest maxUsageLimit(@Nullable Integer maxUsageLimit)
    • getMaxUsageLimit

      @Nullable public Integer 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

      public void setMaxUsageLimit(@Nullable Integer maxUsageLimit)
    • softLimitExpiration

      public AdminKeyMergePatchRequest softLimitExpiration(@Nullable OffsetDateTime softLimitExpiration)
    • getSoftLimitExpiration

      @Nullable public OffsetDateTime 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

      public void setSoftLimitExpiration(@Nullable OffsetDateTime softLimitExpiration)
    • softUsageLimit

      public AdminKeyMergePatchRequest softUsageLimit(@Nullable Integer softUsageLimit)
    • getSoftUsageLimit

      @Nullable public Integer 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

      public void setSoftUsageLimit(@Nullable Integer softUsageLimit)
    • 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 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 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 AdminKeyMergePatchRequest
    • fromJson

      public static AdminKeyMergePatchRequest fromJson(String jsonString) throws IOException
      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

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