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 TypeMethodDescriptionaddScheduleWeekdaysItem(Integer scheduleWeekdaysItem) description(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.End of the daily window, HH:mm, exclusive: a request at this minute is refused.Start of the daily window, HH:mm, inclusive: a request at this minute is admitted.ISO weekdays, 1 (Monday) to 7 (Sunday), on which the daily window below opens.Policy becomes active at this instant.Policy expires at this instant.inthashCode()rateLimitPerMinute(Integer rateLimitPerMinute) revokeOnUse(Boolean revokeOnUse) scheduleEnd(String scheduleEnd) scheduleStart(String scheduleStart) scheduleWeekdays(List<Integer> scheduleWeekdays) voidsetDescription(String description) voidsetMaxUsage(Long maxUsage) voidvoidsetRateLimitPerMinute(Integer rateLimitPerMinute) voidsetRevokeOnUse(Boolean revokeOnUse) voidsetScheduleEnd(String scheduleEnd) voidsetScheduleStart(String scheduleStart) voidsetScheduleWeekdays(List<Integer> scheduleWeekdays) 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_SCHEDULE_END
- See Also:
-
SERIALIZED_NAME_SCHEDULE_START
- See Also:
-
SERIALIZED_NAME_SCHEDULE_WEEKDAYS
- 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
-
scheduleEnd
-
getScheduleEnd
End of the daily window, HH:mm, exclusive: a request at this minute is refused. An end earlier than the start is an overnight window, which belongs to the weekday it starts on (22:00 to 06:00 on Monday admits Tuesday 05:59). Must differ from scheduleStart. Required with scheduleWeekdays.- Returns:
- scheduleEnd
-
setScheduleEnd
-
scheduleStart
-
getScheduleStart
Start of the daily window, HH:mm, inclusive: a request at this minute is admitted. Required with scheduleWeekdays.- Returns:
- scheduleStart
-
setScheduleStart
-
scheduleWeekdays
-
addScheduleWeekdaysItem
-
getScheduleWeekdays
ISO weekdays, 1 (Monday) to 7 (Sunday), on which the daily window below opens. Set together with scheduleStart and scheduleEnd, or omit all three for no schedule; a partial schedule, an empty list, a repeated day or a day outside 1..7 is refused with 400 naming the field. The schedule is evaluated in the platform time zone (setting authorization.schedule.timezone, UTC unless a platform administrator sets an IANA region time zone).- Returns:
- scheduleWeekdays
-
setScheduleWeekdays
-
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
-