Class RotationPolicy

java.lang.Object
com.azure.resourcemanager.keyvault.models.RotationPolicy
All Implemented Interfaces:
com.azure.json.JsonSerializable<RotationPolicy>

public final class RotationPolicy extends Object implements com.azure.json.JsonSerializable<RotationPolicy>
The RotationPolicy model.
  • Constructor Details

    • RotationPolicy

      public RotationPolicy()
      Creates an instance of RotationPolicy class.
  • Method Details

    • attributes

      public KeyRotationPolicyAttributes attributes()
      Get the attributes property: The attributes of key rotation policy.
      Returns:
      the attributes value.
    • withAttributes

      public RotationPolicy withAttributes(KeyRotationPolicyAttributes attributes)
      Set the attributes property: The attributes of key rotation policy.
      Parameters:
      attributes - the attributes value to set.
      Returns:
      the RotationPolicy object itself.
    • lifetimeActions

      public List<LifetimeAction> lifetimeActions()
      Get the lifetimeActions property: The lifetimeActions for key rotation action.
      Returns:
      the lifetimeActions value.
    • withLifetimeActions

      public RotationPolicy withLifetimeActions(List<LifetimeAction> lifetimeActions)
      Set the lifetimeActions property: The lifetimeActions for key rotation action.
      Parameters:
      lifetimeActions - the lifetimeActions value to set.
      Returns:
      the RotationPolicy object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<RotationPolicy>
      Throws:
      IOException
    • fromJson

      public static RotationPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RotationPolicy from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RotationPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the RotationPolicy.