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

  • Constructor Details

    • GrantConstraintSnapshot

      public GrantConstraintSnapshot()
  • Method Details

    • maxUsage

      public GrantConstraintSnapshot maxUsage(@Nullable Long maxUsage)
    • getMaxUsage

      @Nullable public Long getMaxUsage()
      Total invocation ceiling; null = unlimited
      Returns:
      maxUsage
    • setMaxUsage

      public void setMaxUsage(@Nullable Long maxUsage)
    • rateLimitPerMinute

      public GrantConstraintSnapshot rateLimitPerMinute(@Nullable Integer rateLimitPerMinute)
    • getRateLimitPerMinute

      @Nullable public Integer getRateLimitPerMinute()
      Per-minute ceiling; 0 = fully blocked, null = no rate limit
      Returns:
      rateLimitPerMinute
    • setRateLimitPerMinute

      public void setRateLimitPerMinute(@Nullable Integer rateLimitPerMinute)
    • revokeOnUse

      public GrantConstraintSnapshot revokeOnUse(@Nullable Boolean revokeOnUse)
    • getRevokeOnUse

      @Nullable public Boolean getRevokeOnUse()
      Single use: the first admitted invocation consumes the grant
      Returns:
      revokeOnUse
    • setRevokeOnUse

      public void setRevokeOnUse(@Nullable Boolean revokeOnUse)
    • validFrom

      public GrantConstraintSnapshot validFrom(@Nullable OffsetDateTime validFrom)
    • getValidFrom

      @Nullable public OffsetDateTime getValidFrom()
      Policy window start, inclusive; null = no start bound
      Returns:
      validFrom
    • setValidFrom

      public void setValidFrom(@Nullable OffsetDateTime validFrom)
    • validUntil

      public GrantConstraintSnapshot validUntil(@Nullable OffsetDateTime validUntil)
    • getValidUntil

      @Nullable public OffsetDateTime getValidUntil()
      Policy window end, exclusive; null = no end bound
      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 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 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 GrantConstraintSnapshot
    • fromJson

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

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