Class ProtectionPolicy
java.lang.Object
com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy
- Direct Known Subclasses:
AzureFileShareProtectionPolicy
,AzureIaaSvmProtectionPolicy
,AzureSqlProtectionPolicy
,AzureVmWorkloadProtectionPolicy
,GenericProtectionPolicy
,MabProtectionPolicy
Base class for backup policy. Workload-specific backup policies are derived from this class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the protectedItemsCount property: Number of items associated with this policy.Get the resourceGuardOperationRequests property: ResourceGuard Operation Requests.void
validate()
Validates the instance.withProtectedItemsCount
(Integer protectedItemsCount) Set the protectedItemsCount property: Number of items associated with this policy.withResourceGuardOperationRequests
(List<String> resourceGuardOperationRequests) Set the resourceGuardOperationRequests property: ResourceGuard Operation Requests.
-
Constructor Details
-
ProtectionPolicy
public ProtectionPolicy()Creates an instance of ProtectionPolicy class.
-
-
Method Details
-
protectedItemsCount
Get the protectedItemsCount property: Number of items associated with this policy.- Returns:
- the protectedItemsCount value.
-
withProtectedItemsCount
Set the protectedItemsCount property: Number of items associated with this policy.- Parameters:
protectedItemsCount
- the protectedItemsCount value to set.- Returns:
- the ProtectionPolicy object itself.
-
resourceGuardOperationRequests
Get the resourceGuardOperationRequests property: ResourceGuard Operation Requests.- Returns:
- the resourceGuardOperationRequests value.
-
withResourceGuardOperationRequests
public ProtectionPolicy withResourceGuardOperationRequests(List<String> resourceGuardOperationRequests) Set the resourceGuardOperationRequests property: ResourceGuard Operation Requests.- Parameters:
resourceGuardOperationRequests
- the resourceGuardOperationRequests value to set.- Returns:
- the ProtectionPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-