Class SubProtectionPolicy
- java.lang.Object
-
- com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy
-
public final class SubProtectionPolicy extends Object
Sub-protection policy which includes schedule and retention.
-
-
Constructor Summary
Constructors Constructor Description SubProtectionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolicyType
policyType()
Get the policyType property: Type of backup policy type.RetentionPolicy
retentionPolicy()
Get the retentionPolicy property: Retention policy with the details on backup copy retention ranges.SchedulePolicy
schedulePolicy()
Get the schedulePolicy property: Backup schedule specified as part of backup policy.Map<String,TieringPolicy>
tieringPolicy()
Get the tieringPolicy property: Tiering policy to automatically move RPs to another tier.void
validate()
Validates the instance.SubProtectionPolicy
withPolicyType(PolicyType policyType)
Set the policyType property: Type of backup policy type.SubProtectionPolicy
withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retentionPolicy property: Retention policy with the details on backup copy retention ranges.SubProtectionPolicy
withSchedulePolicy(SchedulePolicy schedulePolicy)
Set the schedulePolicy property: Backup schedule specified as part of backup policy.SubProtectionPolicy
withTieringPolicy(Map<String,TieringPolicy> tieringPolicy)
Set the tieringPolicy property: Tiering policy to automatically move RPs to another tier.
-
-
-
Method Detail
-
policyType
public PolicyType policyType()
Get the policyType property: Type of backup policy type.- Returns:
- the policyType value.
-
withPolicyType
public SubProtectionPolicy withPolicyType(PolicyType policyType)
Set the policyType property: Type of backup policy type.- Parameters:
policyType
- the policyType value to set.- Returns:
- the SubProtectionPolicy object itself.
-
schedulePolicy
public SchedulePolicy schedulePolicy()
Get the schedulePolicy property: Backup schedule specified as part of backup policy.- Returns:
- the schedulePolicy value.
-
withSchedulePolicy
public SubProtectionPolicy withSchedulePolicy(SchedulePolicy schedulePolicy)
Set the schedulePolicy property: Backup schedule specified as part of backup policy.- Parameters:
schedulePolicy
- the schedulePolicy value to set.- Returns:
- the SubProtectionPolicy object itself.
-
retentionPolicy
public RetentionPolicy retentionPolicy()
Get the retentionPolicy property: Retention policy with the details on backup copy retention ranges.- Returns:
- the retentionPolicy value.
-
withRetentionPolicy
public SubProtectionPolicy withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retentionPolicy property: Retention policy with the details on backup copy retention ranges.- Parameters:
retentionPolicy
- the retentionPolicy value to set.- Returns:
- the SubProtectionPolicy object itself.
-
tieringPolicy
public Map<String,TieringPolicy> tieringPolicy()
Get the tieringPolicy property: Tiering policy to automatically move RPs to another tier. Key is Target Tier, defined in RecoveryPointTierType enum. Tiering policy specifies the criteria to move RP to the target tier.- Returns:
- the tieringPolicy value.
-
withTieringPolicy
public SubProtectionPolicy withTieringPolicy(Map<String,TieringPolicy> tieringPolicy)
Set the tieringPolicy property: Tiering policy to automatically move RPs to another tier. Key is Target Tier, defined in RecoveryPointTierType enum. Tiering policy specifies the criteria to move RP to the target tier.- Parameters:
tieringPolicy
- the tieringPolicy value to set.- Returns:
- the SubProtectionPolicy object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-