Class SupportedAlgorithm

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class SupportedAlgorithm extends Object
Algorithm profile supported by the platform, including cryptographic capabilities, security classification, and lifecycle status. Core fields: kty (key type), alg (algorithm), keyOps (permitted operations) Lifecycle: status (RECOMMENDED/LEGACY), sunsetDate, advisory Security: securityLevel (NIST 1-5), standards (endorsing bodies), category (CLASSICAL/POST_QUANTUM/HYBRID) Composite: compositeMode, present only for a hybrid entry — absent means the algorithm is not composite
  • Field Details

  • Constructor Details

    • SupportedAlgorithm

      public SupportedAlgorithm()
  • Method Details

    • getCategoryAsString

      public String getCategoryAsString()
      The wire value of category: 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 getCategory() 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
    • getCompositeModeAsString

      public String getCompositeModeAsString()
      The wire value of compositeMode: 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 getCompositeMode() 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
    • getStatusAsString

      public String getStatusAsString()
      The wire value of status: 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 getStatus() 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
    • advisory

      public SupportedAlgorithm advisory(@Nullable String advisory)
    • getAdvisory

      @Nullable public String getAdvisory()
      Migration guidance or security advisory message.
      Returns:
      advisory
    • setAdvisory

      public void setAdvisory(@Nullable String advisory)
    • alg

      public SupportedAlgorithm alg(@Nonnull String alg)
    • getAlg

      @Nonnull public String getAlg()
      Algorithm identifier specifying the exact variant (e.g., ML-KEM-768, RSA-4096, AES-256, X25519+ML-KEM-768)
      Returns:
      alg
    • setAlg

      public void setAlg(@Nonnull String alg)
    • category

      public SupportedAlgorithm category(@Nonnull SupportedAlgorithm.CategoryEnum category)
    • getCategory

      @Nonnull public SupportedAlgorithm.CategoryEnum getCategory()
      Algorithm category: CLASSICAL for traditional cryptography, POST_QUANTUM for quantum-resistant algorithms, HYBRID for composite algorithms combining both.
      Returns:
      category
    • setCategory

      public void setCategory(@Nonnull SupportedAlgorithm.CategoryEnum category)
    • compositeMode

      public SupportedAlgorithm compositeMode(@Nullable SupportedAlgorithm.CompositeModeEnum compositeMode)
    • getCompositeMode

      @Nullable public SupportedAlgorithm.CompositeModeEnum getCompositeMode()
      Composite construction mode. Present only for a hybrid algorithm; its absence means the algorithm is not composite.
      Returns:
      compositeMode
    • setCompositeMode

      public void setCompositeMode(@Nullable SupportedAlgorithm.CompositeModeEnum compositeMode)
    • keyOps

      public SupportedAlgorithm keyOps(@Nonnull List<String> keyOps)
    • addKeyOpsItem

      public SupportedAlgorithm addKeyOpsItem(String keyOpsItem)
    • getKeyOps

      @Nonnull public List<String> getKeyOps()
      Permitted JWK operations for this algorithm
      Returns:
      keyOps
    • setKeyOps

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

      public SupportedAlgorithm kty(@Nonnull String kty)
    • getKty

      @Nonnull public String getKty()
      JWK key type identifier (e.g., ML-KEM, ML-DSA, RSA, EC, oct, COMPOSITE). A hybrid algorithm publishes the coarse COMPOSITE token; how it is constructed is carried by compositeMode and its exact pairing by alg.
      Returns:
      kty
    • setKty

      public void setKty(@Nonnull String kty)
    • securityLevel

      public SupportedAlgorithm securityLevel(@Nonnull Integer securityLevel)
    • getSecurityLevel

      @Nonnull public Integer getSecurityLevel()
      NIST security level (1-5). Level 1 = 128-bit, Level 3 = 192-bit, Level 5 = 256-bit equivalent. minimum: 1 maximum: 5
      Returns:
      securityLevel
    • setSecurityLevel

      public void setSecurityLevel(@Nonnull Integer securityLevel)
    • standards

      public SupportedAlgorithm standards(@Nonnull List<String> standards)
    • addStandardsItem

      public SupportedAlgorithm addStandardsItem(String standardsItem)
    • getStandards

      @Nonnull public List<String> getStandards()
      Cryptographic standards and regulatory bodies that endorse this algorithm, in CryptoStandard declaration order.
      Returns:
      standards
    • setStandards

      public void setStandards(@Nonnull List<String> standards)
    • status

      public SupportedAlgorithm status(@Nonnull SupportedAlgorithm.StatusEnum status)
    • getStatus

      @Nonnull public SupportedAlgorithm.StatusEnum getStatus()
      Lifecycle status: RECOMMENDED for active use, EXPERIMENTAL for testing, LEGACY for deprecated algorithms
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull SupportedAlgorithm.StatusEnum status)
    • sunsetDate

      public SupportedAlgorithm sunsetDate(@Nullable LocalDate sunsetDate)
    • getSunsetDate

      @Nullable public LocalDate getSunsetDate()
      Planned deprecation date (ISO 8601). Present only for LEGACY or soon-to-be-deprecated algorithms.
      Returns:
      sunsetDate
    • setSunsetDate

      public void setSunsetDate(@Nullable LocalDate sunsetDate)
    • 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 SupportedAlgorithm
    • 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 SupportedAlgorithm
    • fromJson

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

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