Class RetentionDuration
java.lang.Object
com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration
Retention duration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncount()
Get the count property: Count of duration types.Get the durationType property: Retention duration type of retention policy.void
validate()
Validates the instance.Set the count property: Count of duration types.withDurationType
(RetentionDurationType durationType) Set the durationType property: Retention duration type of retention policy.
-
Constructor Details
-
RetentionDuration
public RetentionDuration()Creates an instance of RetentionDuration class.
-
-
Method Details
-
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
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
Get the durationType property: Retention duration type of retention policy.- Returns:
- the durationType value.
-
withDurationType
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.
-