Class RetentionPolicyParameters

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

public final class RetentionPolicyParameters extends Object implements com.azure.json.JsonSerializable<RetentionPolicyParameters>
Parameters that define the retention policy for flow log.
  • Constructor Details

    • RetentionPolicyParameters

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

    • days

      public Integer days()
      Get the days property: Number of days to retain flow log records.
      Returns:
      the days value.
    • withDays

      public RetentionPolicyParameters withDays(Integer days)
      Set the days property: Number of days to retain flow log records.
      Parameters:
      days - the days value to set.
      Returns:
      the RetentionPolicyParameters object itself.
    • enabled

      public Boolean enabled()
      Get the enabled property: Flag to enable/disable retention.
      Returns:
      the enabled value.
    • withEnabled

      public RetentionPolicyParameters withEnabled(Boolean enabled)
      Set the enabled property: Flag to enable/disable retention.
      Parameters:
      enabled - the enabled value to set.
      Returns:
      the RetentionPolicyParameters 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<RetentionPolicyParameters>
      Throws:
      IOException
    • fromJson

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