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
  • Field Details

  • Constructor Details

    • CreateConstraintPolicyRequest

      public CreateConstraintPolicyRequest()
  • Method Details

    • description

      public CreateConstraintPolicyRequest description(@Nullable String description)
    • getDescription

      @Nullable public String getDescription()
      Get description
      Returns:
      description
    • setDescription

      public void setDescription(@Nullable String description)
    • maxUsage

      public CreateConstraintPolicyRequest maxUsage(@Nullable Long maxUsage)
    • getMaxUsage

      @Nullable public Long 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

      public void setMaxUsage(@Nullable Long maxUsage)
    • name

      public CreateConstraintPolicyRequest name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Human-readable policy name, unique at tenant level (convention only)
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • rateLimitPerMinute

      public CreateConstraintPolicyRequest rateLimitPerMinute(@Nullable Integer rateLimitPerMinute)
    • getRateLimitPerMinute

      @Nullable public Integer 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

      public void setRateLimitPerMinute(@Nullable Integer rateLimitPerMinute)
    • revokeOnUse

      public CreateConstraintPolicyRequest revokeOnUse(@Nullable Boolean revokeOnUse)
    • getRevokeOnUse

      @Nullable public Boolean 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

      public void setRevokeOnUse(@Nullable Boolean revokeOnUse)
    • validFrom

      public CreateConstraintPolicyRequest validFrom(@Nullable OffsetDateTime validFrom)
    • getValidFrom

      @Nullable public OffsetDateTime getValidFrom()
      Policy becomes active at this instant. Null = effective immediately.
      Returns:
      validFrom
    • setValidFrom

      public void setValidFrom(@Nullable OffsetDateTime validFrom)
    • validUntil

      public CreateConstraintPolicyRequest validUntil(@Nullable OffsetDateTime validUntil)
    • getValidUntil

      @Nullable public OffsetDateTime getValidUntil()
      Policy expires at this instant. Null = never expires.
      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 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 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 CreateConstraintPolicyRequest
    • fromJson

      public static CreateConstraintPolicyRequest fromJson(String jsonString) throws IOException
      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

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