Class ConstraintPolicyVersionResponse

java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.ConstraintPolicyVersionResponse

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class ConstraintPolicyVersionResponse extends Object
One immutable version of a Constraint Policy. Creating a policy writes version 1 and every edit writes the next version; a Capability Grant enforces the limits and schedule of the version it is pinned to.
  • Field Details

  • Constructor Details

    • ConstraintPolicyVersionResponse

      public ConstraintPolicyVersionResponse()
  • Method Details

    • createdAt

      public ConstraintPolicyVersionResponse createdAt(@Nonnull OffsetDateTime createdAt)
    • getCreatedAt

      @Nonnull public OffsetDateTime getCreatedAt()
      When the version was written.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nonnull OffsetDateTime createdAt)
    • createdBy

      public ConstraintPolicyVersionResponse createdBy(@Nonnull String createdBy)
    • getCreatedBy

      @Nonnull public String getCreatedBy()
      The principal that wrote the version.
      Returns:
      createdBy
    • setCreatedBy

      public void setCreatedBy(@Nonnull String createdBy)
    • id

      public ConstraintPolicyVersionResponse id(@Nonnull UUID id)
    • getId

      @Nonnull public UUID getId()
      Version identifier.
      Returns:
      id
    • setId

      public void setId(@Nonnull UUID id)
    • liveGrantCount

      public ConstraintPolicyVersionResponse liveGrantCount(@Nonnull Long liveGrantCount)
    • getLiveGrantCount

      @Nonnull public Long getLiveGrantCount()
      How many live Capability Grants are pinned to this version now.
      Returns:
      liveGrantCount
    • setLiveGrantCount

      public void setLiveGrantCount(@Nonnull Long liveGrantCount)
    • maxUsage

      public ConstraintPolicyVersionResponse maxUsage(@Nullable Long maxUsage)
    • getMaxUsage

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

      public void setMaxUsage(@Nullable Long maxUsage)
    • policyId

      public ConstraintPolicyVersionResponse policyId(@Nonnull UUID policyId)
    • getPolicyId

      @Nonnull public UUID getPolicyId()
      The policy this version belongs to.
      Returns:
      policyId
    • setPolicyId

      public void setPolicyId(@Nonnull UUID policyId)
    • rateLimitPerMinute

      public ConstraintPolicyVersionResponse rateLimitPerMinute(@Nullable Integer rateLimitPerMinute)
    • getRateLimitPerMinute

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

      public void setRateLimitPerMinute(@Nullable Integer rateLimitPerMinute)
    • revokeOnUse

      public ConstraintPolicyVersionResponse revokeOnUse(@Nonnull Boolean revokeOnUse)
    • getRevokeOnUse

      @Nonnull public Boolean getRevokeOnUse()
      When true, a grant pinned to this version is consumed by its first admitted invocation.
      Returns:
      revokeOnUse
    • setRevokeOnUse

      public void setRevokeOnUse(@Nonnull Boolean revokeOnUse)
    • scheduleEnd

      public ConstraintPolicyVersionResponse scheduleEnd(@Nullable String scheduleEnd)
    • getScheduleEnd

      @Nullable public String getScheduleEnd()
      End of the daily window, HH:mm, exclusive; earlier than the start for an overnight window; null when the version has no schedule.
      Returns:
      scheduleEnd
    • setScheduleEnd

      public void setScheduleEnd(@Nullable String scheduleEnd)
    • scheduleStart

      public ConstraintPolicyVersionResponse scheduleStart(@Nullable String scheduleStart)
    • getScheduleStart

      @Nullable public String getScheduleStart()
      Start of the daily window, HH:mm, inclusive, in the platform time zone; null when the version has no schedule.
      Returns:
      scheduleStart
    • setScheduleStart

      public void setScheduleStart(@Nullable String scheduleStart)
    • scheduleTimeZone

      public ConstraintPolicyVersionResponse scheduleTimeZone(@Nonnull String scheduleTimeZone)
    • getScheduleTimeZone

      @Nonnull public String getScheduleTimeZone()
      The time zone in which the schedule is evaluated: the platform setting authorization.schedule.timezone, an IANA region zone or UTC. One platform value governs every schedule.
      Returns:
      scheduleTimeZone
    • setScheduleTimeZone

      public void setScheduleTimeZone(@Nonnull String scheduleTimeZone)
    • scheduleWeekdays

      public ConstraintPolicyVersionResponse scheduleWeekdays(@Nullable List<Integer> scheduleWeekdays)
    • addScheduleWeekdaysItem

      public ConstraintPolicyVersionResponse addScheduleWeekdaysItem(Integer scheduleWeekdaysItem)
    • getScheduleWeekdays

      @Nullable public List<Integer> getScheduleWeekdays()
      ISO weekdays (1 = Monday .. 7 = Sunday) on which the daily window opens, ascending; null when the version has no schedule.
      Returns:
      scheduleWeekdays
    • setScheduleWeekdays

      public void setScheduleWeekdays(@Nullable List<Integer> scheduleWeekdays)
    • validFrom

      public ConstraintPolicyVersionResponse validFrom(@Nullable OffsetDateTime validFrom)
    • getValidFrom

      @Nullable public OffsetDateTime getValidFrom()
      Start of validity; null = effective immediately.
      Returns:
      validFrom
    • setValidFrom

      public void setValidFrom(@Nullable OffsetDateTime validFrom)
    • validUntil

      public ConstraintPolicyVersionResponse validUntil(@Nullable OffsetDateTime validUntil)
    • getValidUntil

      @Nullable public OffsetDateTime getValidUntil()
      End of validity; null = never expires.
      Returns:
      validUntil
    • setValidUntil

      public void setValidUntil(@Nullable OffsetDateTime validUntil)
    • version

      public ConstraintPolicyVersionResponse version(@Nonnull Integer version)
    • getVersion

      @Nonnull public Integer getVersion()
      Version number, starting at 1.
      Returns:
      version
    • setVersion

      public void setVersion(@Nonnull Integer version)
    • 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 ConstraintPolicyVersionResponse
    • 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 ConstraintPolicyVersionResponse
    • fromJson

      public static ConstraintPolicyVersionResponse fromJson(String jsonString) throws IOException
      Create an instance of ConstraintPolicyVersionResponse given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of ConstraintPolicyVersionResponse
      Throws:
      IOException - if the JSON string is invalid with respect to ConstraintPolicyVersionResponse
    • toJson

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