Class RetentionDuration
- java.lang.Object
-
- com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration
-
public final class RetentionDuration extends Object
Retention duration.
-
-
Constructor Summary
Constructors Constructor Description RetentionDuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
count()
Get the count property: Count of duration types.RetentionDurationType
durationType()
Get the durationType property: Retention duration type of retention policy.void
validate()
Validates the instance.RetentionDuration
withCount(Integer count)
Set the count property: Count of duration types.RetentionDuration
withDurationType(RetentionDurationType durationType)
Set the durationType property: Retention duration type of retention policy.
-
-
-
Method Detail
-
count
public Integer count()
Get the count property: Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.- Returns:
- the count value.
-
withCount
public RetentionDuration withCount(Integer count)
Set the count property: Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.- Parameters:
count
- the count value to set.- Returns:
- the RetentionDuration object itself.
-
durationType
public RetentionDurationType durationType()
Get the durationType property: Retention duration type of retention policy.- Returns:
- the durationType value.
-
withDurationType
public RetentionDuration withDurationType(RetentionDurationType durationType)
Set the durationType property: Retention duration type of retention policy.- Parameters:
durationType
- the durationType value to set.- Returns:
- the RetentionDuration object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-