Class KeyRotationScheduleRequest

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class KeyRotationScheduleRequest extends Object
Full replacement of the key's rotation schedule: its enablement, its optional cadence override and its usage options.
  • Field Details

  • Constructor Details

    • KeyRotationScheduleRequest

      public KeyRotationScheduleRequest()
  • Method Details

    • autoRotationEnabled

      public KeyRotationScheduleRequest autoRotationEnabled(@Nonnull Boolean autoRotationEnabled)
    • getAutoRotationEnabled

      @Nonnull public Boolean getAutoRotationEnabled()
      Whether the key rotates automatically. Enabling it needs an interval (the key's own TIME_BASED trigger, or a tenant or deployment default) or a usage option set to true.
      Returns:
      autoRotationEnabled
    • setAutoRotationEnabled

      public void setAutoRotationEnabled(@Nonnull Boolean autoRotationEnabled)
    • rotateOnSoftUsageLimit

      public KeyRotationScheduleRequest rotateOnSoftUsageLimit(@Nullable Boolean rotateOnSoftUsageLimit)
    • getRotateOnSoftUsageLimit

      @Nullable public Boolean getRotateOnSoftUsageLimit()
      Whether the key rotates when its usage count reaches its soft usage limit. Acts only while autoRotationEnabled is true. Turning it on needs a soft usage limit on the key; a stored true whose limit was removed later is kept. Absent or null is false: the PUT replaces the stored value.
      Returns:
      rotateOnSoftUsageLimit
    • setRotateOnSoftUsageLimit

      public void setRotateOnSoftUsageLimit(@Nullable Boolean rotateOnSoftUsageLimit)
    • rotateOnUsageExhaustion

      public KeyRotationScheduleRequest rotateOnUsageExhaustion(@Nullable Boolean rotateOnUsageExhaustion)
    • getRotateOnUsageExhaustion

      @Nullable public Boolean getRotateOnUsageExhaustion()
      Whether the key rotates when its usage count reaches its maximum usage limit. Acts only while autoRotationEnabled is true. Turning it on needs a maximum usage limit on the key; a stored true whose limit was removed later is kept. Absent or null is false: the PUT replaces the stored value.
      Returns:
      rotateOnUsageExhaustion
    • setRotateOnUsageExhaustion

      public void setRotateOnUsageExhaustion(@Nullable Boolean rotateOnUsageExhaustion)
    • triggers

      public KeyRotationScheduleRequest triggers(@Nullable List<TimeBasedTrigger> triggers)
    • addTriggersItem

      public KeyRotationScheduleRequest addTriggersItem(TimeBasedTrigger triggersItem)
    • getTriggers

      @Nullable public List<TimeBasedTrigger> getTriggers()
      The key's own cadence, shorter or longer than the inherited default. At most one TIME_BASED trigger. Null or absent inherits the tenant default, or the deployment default when the tenant has none; an empty array sets no cadence for the key.
      Returns:
      triggers
    • setTriggers

      public void setTriggers(@Nullable List<TimeBasedTrigger> triggers)
    • version

      public KeyRotationScheduleRequest version(@Nullable Long version)
    • getVersion

      @Nullable public Long getVersion()
      The version returned by the last read of this key's schedule. When present and no longer current the write is refused with 409 and nothing is stored; absent replaces unconditionally. minimum: 0
      Returns:
      version
    • setVersion

      public void setVersion(@Nullable Long 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 KeyRotationScheduleRequest
    • 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 KeyRotationScheduleRequest
    • fromJson

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

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