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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class ValidityWindow extends Object
Optional validity window, enforced by the cryptographic service on every request as [validFrom, validUntil). Each bound is an RFC 3339 instant WITH an offset; a value without one is refused with 400 naming the member.
  • Field Details

  • Constructor Details

    • ValidityWindow

      public ValidityWindow()
  • Method Details

    • validFrom

      public ValidityWindow validFrom(@Nullable OffsetDateTime validFrom)
    • getValidFrom

      @Nullable public OffsetDateTime getValidFrom()
      Start (inclusive), an instant with an offset. If omitted, server defaults to the current time.
      Returns:
      validFrom
    • setValidFrom

      public void setValidFrom(@Nullable OffsetDateTime validFrom)
    • validUntil

      public ValidityWindow validUntil(@Nullable OffsetDateTime validUntil)
    • getValidUntil

      @Nullable public OffsetDateTime getValidUntil()
      End (exclusive), an instant with an offset. If omitted, server defaults to validFrom + 1 year.
      Returns:
      validUntil
    • setValidUntil

      public void setValidUntil(@Nullable OffsetDateTime validUntil)
    • 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 ValidityWindow
    • 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 ValidityWindow
    • fromJson

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

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