Class DeleteRetentionPolicy

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

public final class DeleteRetentionPolicy extends Object implements com.azure.json.JsonSerializable<DeleteRetentionPolicy>
Response for Delete Retention Policy object.
  • Constructor Details

    • DeleteRetentionPolicy

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

    • policyState

      public PolicyState policyState()
      Get the policyState property: The policyState property.
      Returns:
      the policyState value.
    • withPolicyState

      public DeleteRetentionPolicy withPolicyState(PolicyState policyState)
      Set the policyState property: The policyState property.
      Parameters:
      policyState - the policyState value to set.
      Returns:
      the DeleteRetentionPolicy object itself.
    • retentionPeriodDays

      public Integer retentionPeriodDays()
      Get the retentionPeriodDays property: The number of days to retain the resources after deletion.
      Returns:
      the retentionPeriodDays value.
    • withRetentionPeriodDays

      public DeleteRetentionPolicy withRetentionPeriodDays(Integer retentionPeriodDays)
      Set the retentionPeriodDays property: The number of days to retain the resources after deletion.
      Parameters:
      retentionPeriodDays - the retentionPeriodDays value to set.
      Returns:
      the DeleteRetentionPolicy 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<DeleteRetentionPolicy>
      Throws:
      IOException
    • fromJson

      public static DeleteRetentionPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DeleteRetentionPolicy from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DeleteRetentionPolicy 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 DeleteRetentionPolicy.