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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class FailedEntry extends Object
An entry that failed validation or import.
  • Field Details

  • Constructor Details

    • FailedEntry

      public FailedEntry()
  • Method Details

    • getEntryTypeAsString

      public String getEntryTypeAsString()
      The wire value of entryType: 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 getEntryType() 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
    • getFailureReasonAsString

      public String getFailureReasonAsString()
      The wire value of failureReason: 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 getFailureReason() 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
    • entryType

      public FailedEntry entryType(@Nonnull FailedEntry.EntryTypeEnum entryType)
    • getEntryType

      @Nonnull public FailedEntry.EntryTypeEnum getEntryType()
      Entry type. Only PRIVATE_KEY is published: a trusted-certificate entry that fails to import is best-effort and is not added to the failure list.
      Returns:
      entryType
    • setEntryType

      public void setEntryType(@Nonnull FailedEntry.EntryTypeEnum entryType)
    • errorMessage

      public FailedEntry errorMessage(@Nonnull String errorMessage)
    • getErrorMessage

      @Nonnull public String getErrorMessage()
      The failure, explained.
      Returns:
      errorMessage
    • setErrorMessage

      public void setErrorMessage(@Nonnull String errorMessage)
    • failureReason

      public FailedEntry failureReason(@Nonnull FailedEntry.FailureReasonEnum failureReason)
    • getFailureReason

      @Nonnull public FailedEntry.FailureReasonEnum getFailureReason()
      Failure category: - CERTIFICATE_VALIDATION_FAILED: the certificate failed validation (STRICT mode), an expired or otherwise unacceptable certificate included - KEY_BINDING_FAILED: the entry's private key does not match its certificate - KEY_ID_RETIRED: the entry's Key ID belonged to a destroyed key of this tenant; a Key ID is never reused, so the entry needs another Key ID - UNEXPECTED_ERROR: an internal processing error; errorMessage carries a fixed text
      Returns:
      failureReason
    • setFailureReason

      public void setFailureReason(@Nonnull FailedEntry.FailureReasonEnum failureReason)
    • kid

      public FailedEntry kid(@Nullable String kid)
    • getKid

      @Nullable public String getKid()
      Identifier attempted for this entry.
      Returns:
      kid
    • setKid

      public void setKid(@Nullable String kid)
    • sourceAlias

      public FailedEntry sourceAlias(@Nonnull String sourceAlias)
    • getSourceAlias

      @Nonnull public String getSourceAlias()
      The entry's alias in the original keystore file.
      Returns:
      sourceAlias
    • setSourceAlias

      public void setSourceAlias(@Nonnull String sourceAlias)
    • 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 FailedEntry
    • 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 FailedEntry
    • fromJson

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

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