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 Summary
ConstructorsConstructorDescriptionCreates an instance of RetentionPolicyParameters class. -
Method Summary
Modifier and TypeMethodDescriptiondays()Get the days property: Number of days to retain flow log records.enabled()Get the enabled property: Flag to enable/disable retention.static RetentionPolicyParametersfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RetentionPolicyParameters from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the days property: Number of days to retain flow log records.withEnabled(Boolean enabled) Set the enabled property: Flag to enable/disable retention.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
RetentionPolicyParameters
public RetentionPolicyParameters()Creates an instance of RetentionPolicyParameters class.
-
-
Method Details
-
days
Get the days property: Number of days to retain flow log records.- Returns:
- the days value.
-
withDays
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
Get the enabled property: Flag to enable/disable retention.- Returns:
- the enabled value.
-
withEnabled
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
- Specified by:
toJsonin interfacecom.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.
-