Class ValidityWindow
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ValidityWindowCreate an instance of ValidityWindow given an JSON stringStart (inclusive), an instant with an offset.End (exclusive), an instant with an offset.inthashCode()voidsetValidFrom(OffsetDateTime validFrom) voidsetValidUntil(OffsetDateTime validUntil) toJson()Convert an instance of ValidityWindow to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundstatic voidvalidateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare.validFrom(OffsetDateTime validFrom) validUntil(OffsetDateTime validUntil)
-
Field Details
-
SERIALIZED_NAME_VALID_FROM
- See Also:
-
SERIALIZED_NAME_VALID_UNTIL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ValidityWindow
public ValidityWindow()
-
-
Method Details
-
validFrom
-
getValidFrom
Start (inclusive), an instant with an offset. If omitted, server defaults to the current time.- Returns:
- validFrom
-
setValidFrom
-
validUntil
-
getValidUntil
End (exclusive), an instant with an offset. If omitted, server defaults to validFrom + 1 year.- Returns:
- validUntil
-
setValidUntil
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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 ofvalidateJsonElement(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
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
Convert an instance of ValidityWindow to an JSON string- Returns:
- JSON string
-