Class RetentionPolicy
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.RetentionPolicy
-
public final class RetentionPolicy extends Object
Specifies the retention policy for the log.
-
-
Constructor Summary
Constructors Constructor Description RetentionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdays()Get the days property: the number of days for the retention in days.booleanenabled()Get the enabled property: a value indicating whether the retention policy is enabled.voidvalidate()Validates the instance.RetentionPolicywithDays(int days)Set the days property: the number of days for the retention in days.RetentionPolicywithEnabled(boolean enabled)Set the enabled property: a value indicating whether the retention policy is enabled.
-
-
-
Method Detail
-
enabled
public boolean enabled()
Get the enabled property: a value indicating whether the retention policy is enabled.- Returns:
- the enabled value.
-
withEnabled
public RetentionPolicy withEnabled(boolean enabled)
Set the enabled property: a value indicating whether the retention policy is enabled.- Parameters:
enabled- the enabled value to set.- Returns:
- the RetentionPolicy object itself.
-
days
public int days()
Get the days property: the number of days for the retention in days. A value of 0 will retain the events indefinitely.- Returns:
- the days value.
-
withDays
public RetentionPolicy withDays(int days)
Set the days property: the number of days for the retention in days. A value of 0 will retain the events indefinitely.- Parameters:
days- the days value to set.- Returns:
- the RetentionPolicy object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-