Class RotationMaterialSpec

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class RotationMaterialSpec extends Object
New material spec for a Stable KID rotation (no kid). Mirrors the cryptographic service's rotation material specification.
  • Field Details

  • Constructor Details

    • RotationMaterialSpec

      public RotationMaterialSpec()
  • 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
    • alg

      public RotationMaterialSpec alg(@Nonnull String alg)
    • getAlg

      @Nonnull public String getAlg()
      Algorithm identifier (single for simple, composite for COMPOSITE).
      Returns:
      alg
    • setAlg

      public void setAlg(@Nonnull String alg)
    • expiresAt

      public RotationMaterialSpec expiresAt(@Nullable String expiresAt)
    • getExpiresAt

      @Nullable public String getExpiresAt()
      Hard expiration of the new material (ISO-8601 UTC). When omitted or null, the new material keeps the validity period of the key's current PRIMARY material, counted from the rotation: rotation time + (current expiresAt - current creation time). A key without expiry stays without expiry. A current material whose expiresAt is not after its creation time has no period to inherit, and the rotation is refused with 400 until expiresAt is stated. The two-year default applies only to key creation and import.
      Returns:
      expiresAt
    • setExpiresAt

      public void setExpiresAt(@Nullable String expiresAt)
    • exportable

      public RotationMaterialSpec exportable(@Nullable Boolean exportable)
    • getExportable

      @Nullable public Boolean getExportable()
      Whether the new material's public key may be exported. When omitted or null, the new material keeps the exportability of the key's current PRIMARY material: a rotation changes the material, not the key's attributes.
      Returns:
      exportable
    • setExportable

      public void setExportable(@Nullable Boolean exportable)
    • kdf

    • getKdf

      @Nullable public RotationMaterialSpec.KdfEnum getKdf()
      Key derivation function combining the component secrets of the successor COMPOSITE_KEM_COMBINE material. Optional: when omitted, the cryptographic service applies the pairing's catalogue default. Ignored for simple keys and COMPOSITE_SIGNATURE. Membership is exact in case; an unpublished token is refused at this boundary before the rotation is relayed.
      Returns:
      kdf
    • setKdf

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

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

      public RotationMaterialSpec addKeyOpsItem(String keyOpsItem)
    • getKeyOps

      @Nullable public List<String> getKeyOps()
      Permitted key operations of the new material. When omitted or empty, the new material keeps the operations of the key's current PRIMARY material within the key's invariant purpose, never the algorithm's full set: an RSA or EC key created for signing stays a signing key. A stated set must keep every current operation of the purpose and must not name an operation of the other purpose (422). An operation the current material does not permit makes the key usable for more, so the rotation waits for the tenant's key weakening update quorum when its policy gates one.
      Returns:
      keyOps
    • setKeyOps

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

      public RotationMaterialSpec kty(@Nonnull String kty)
    • getKty

      @Nonnull public String getKty()
      Key type (oct, RSA, EC, OKP, ML-KEM, ML-DSA, ..., or the single coarse token COMPOSITE for every composite key).
      Returns:
      kty
    • setKty

      public void setKty(@Nonnull String kty)
    • maxUsageLimit

      public RotationMaterialSpec maxUsageLimit(@Nullable Integer maxUsageLimit)
    • getMaxUsageLimit

      @Nullable public Integer getMaxUsageLimit()
      Hard usage limit of the new material; 0 = unlimited. When omitted or null, the new material keeps the current PRIMARY material's limit (a rotation does not lift a cap). The new material's usage count starts at 0. minimum: 0
      Returns:
      maxUsageLimit
    • setMaxUsageLimit

      public void setMaxUsageLimit(@Nullable Integer maxUsageLimit)
    • softLimitExpiration

      public RotationMaterialSpec softLimitExpiration(@Nullable String softLimitExpiration)
    • getSoftLimitExpiration

      @Nullable public String getSoftLimitExpiration()
      Soft expiration threshold of the new material (ISO-8601 UTC); must be before expiresAt. When omitted or null, the new material keeps the current PRIMARY material's lead time before its hard expiry (expiresAt - (current expiresAt - current softLimitExpiration)), never earlier than the rotation time; a current material with a soft expiration but no hard one keeps its period from creation instead. A key without a soft expiration stays without one. A resolved soft expiration that is not before the resolved expiresAt is refused with 400.
      Returns:
      softLimitExpiration
    • setSoftLimitExpiration

      public void setSoftLimitExpiration(@Nullable String softLimitExpiration)
    • softUsageLimit

      public RotationMaterialSpec softUsageLimit(@Nullable Integer softUsageLimit)
    • getSoftUsageLimit

      @Nullable public Integer getSoftUsageLimit()
      Soft usage limit (warning threshold) of the new material. When omitted or null, the current PRIMARY material's threshold is kept if the resulting maxUsageLimit can carry it (no threshold, or one strictly below a finite limit); otherwise it is derived as on key creation (none on an unlimited limit, 80% of a finite one). A resolved positive threshold that is not strictly below a finite maxUsageLimit, or that sits over an unlimited one, is refused with 400, including a current pair carried forward when both limits are omitted. minimum: 0
      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 RotationMaterialSpec
    • 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 RotationMaterialSpec
    • fromJson

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

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