Class GrantConstraintSnapshot
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.GrantConstraintSnapshot
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class GrantConstraintSnapshot
extends Object
The limits of the Constraint Policy version a grant enforces.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic GrantConstraintSnapshotCreate an instance of GrantConstraintSnapshot given an JSON stringTotal invocation ceiling; null = unlimitedPer-minute ceiling; 0 = fully blocked, null = no rate limitSingle use: the first admitted invocation consumes the grantPolicy window start, inclusive; null = no start boundPolicy window end, exclusive; null = no end boundinthashCode()rateLimitPerMinute(Integer rateLimitPerMinute) revokeOnUse(Boolean revokeOnUse) voidsetMaxUsage(Long maxUsage) voidsetRateLimitPerMinute(Integer rateLimitPerMinute) voidsetRevokeOnUse(Boolean revokeOnUse) voidsetValidFrom(OffsetDateTime validFrom) voidsetValidUntil(OffsetDateTime validUntil) toJson()Convert an instance of GrantConstraintSnapshot 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_MAX_USAGE
- See Also:
-
SERIALIZED_NAME_RATE_LIMIT_PER_MINUTE
- See Also:
-
SERIALIZED_NAME_REVOKE_ON_USE
- See Also:
-
SERIALIZED_NAME_VALID_FROM
- See Also:
-
SERIALIZED_NAME_VALID_UNTIL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
GrantConstraintSnapshot
public GrantConstraintSnapshot()
-
-
Method Details
-
maxUsage
-
getMaxUsage
Total invocation ceiling; null = unlimited- Returns:
- maxUsage
-
setMaxUsage
-
rateLimitPerMinute
-
getRateLimitPerMinute
Per-minute ceiling; 0 = fully blocked, null = no rate limit- Returns:
- rateLimitPerMinute
-
setRateLimitPerMinute
-
revokeOnUse
-
getRevokeOnUse
Single use: the first admitted invocation consumes the grant- Returns:
- revokeOnUse
-
setRevokeOnUse
-
validFrom
-
getValidFrom
Policy window start, inclusive; null = no start bound- Returns:
- validFrom
-
setValidFrom
-
validUntil
-
getValidUntil
Policy window end, exclusive; null = no end bound- 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 GrantConstraintSnapshot
-
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 GrantConstraintSnapshot
-
fromJson
Create an instance of GrantConstraintSnapshot given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of GrantConstraintSnapshot
- Throws:
IOException- if the JSON string is invalid with respect to GrantConstraintSnapshot
-
toJson
Convert an instance of GrantConstraintSnapshot to an JSON string- Returns:
- JSON string
-