Class CreateConstraintPolicyRequest
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.CreateConstraintPolicyRequest
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class CreateConstraintPolicyRequest
extends Object
CreateConstraintPolicyRequest
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescription(String description) booleanCreate an instance of CreateConstraintPolicyRequest given an JSON stringGet descriptionTotal invocation ceiling.getName()Human-readable policy name, unique at tenant level (convention only)Per-grant rate ceiling per minute, over a fixed one-minute window (approximate: a burst across a minute boundary can briefly reach twice the rate). 0 = fully blocked (emergency freeze).When true, every grant referencing this policy is single use (Refuerzo 1): its first admitted invocation consumes it, whether or not the operation succeeds, and the grant cannot be used again.Policy becomes active at this instant.Policy expires at this instant.inthashCode()rateLimitPerMinute(Integer rateLimitPerMinute) revokeOnUse(Boolean revokeOnUse) voidsetDescription(String description) voidsetMaxUsage(Long maxUsage) voidvoidsetRateLimitPerMinute(Integer rateLimitPerMinute) voidsetRevokeOnUse(Boolean revokeOnUse) voidsetValidFrom(OffsetDateTime validFrom) voidsetValidUntil(OffsetDateTime validUntil) toJson()Convert an instance of CreateConstraintPolicyRequest 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_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_MAX_USAGE
- See Also:
-
SERIALIZED_NAME_NAME
- 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
-
CreateConstraintPolicyRequest
public CreateConstraintPolicyRequest()
-
-
Method Details
-
description
-
getDescription
Get description- Returns:
- description
-
setDescription
-
maxUsage
-
getMaxUsage
Total invocation ceiling. Null = unlimited. Must not be negative — a negative value is rejected with 422 by the constraint-policy domain rules, not by request-shape validation, so exactly one layer decides the status. Counted per grant and checked-then-charged atomically by the cryptographic service: an admitted invocation is charged even if the cryptographic operation then fails; an invocation refused by a constraint is charged nothing. minimum: 0- Returns:
- maxUsage
-
setMaxUsage
-
name
-
getName
Human-readable policy name, unique at tenant level (convention only)- Returns:
- name
-
setName
-
rateLimitPerMinute
-
getRateLimitPerMinute
Per-grant rate ceiling per minute, over a fixed one-minute window (approximate: a burst across a minute boundary can briefly reach twice the rate). 0 = fully blocked (emergency freeze). Null = no rate limit. Do not conflate. Must not be negative — rejected with 422 by the domain rules, not by Bean Validation. minimum: 0- Returns:
- rateLimitPerMinute
-
setRateLimitPerMinute
-
revokeOnUse
-
getRevokeOnUse
When true, every grant referencing this policy is single use (Refuerzo 1): its first admitted invocation consumes it, whether or not the operation succeeds, and the grant cannot be used again. Single use authorizes one operation, not one message — to let a counterparty decrypt N messages once each, issue N single-use grants. Optional: omitting it is equivalent to false.- Returns:
- revokeOnUse
-
setRevokeOnUse
-
validFrom
-
getValidFrom
Policy becomes active at this instant. Null = effective immediately.- Returns:
- validFrom
-
setValidFrom
-
validUntil
-
getValidUntil
Policy expires at this instant. Null = never expires.- 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 CreateConstraintPolicyRequest
-
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 CreateConstraintPolicyRequest
-
fromJson
Create an instance of CreateConstraintPolicyRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateConstraintPolicyRequest
- Throws:
IOException- if the JSON string is invalid with respect to CreateConstraintPolicyRequest
-
toJson
Convert an instance of CreateConstraintPolicyRequest to an JSON string- Returns:
- JSON string
-