Package com.oracle.bmc.recovery.model
Class ProtectionPolicy.Builder
- java.lang.Object
-
- com.oracle.bmc.recovery.model.ProtectionPolicy.Builder
-
- Enclosing class:
- ProtectionPolicy
public static class ProtectionPolicy.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtectionPolicy.Builder
backupRetentionPeriodInDays(Integer backupRetentionPeriodInDays)
The maximum number of days to retain backups for a protected database.ProtectionPolicy
build()
ProtectionPolicy.Builder
compartmentId(String compartmentId)
The OCID of the compartment that contains the protection policy.ProtectionPolicy.Builder
copy(ProtectionPolicy model)
ProtectionPolicy.Builder
definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.ProtectionPolicy.Builder
displayName(String displayName)
A user provided name for the protection policy.ProtectionPolicy.Builder
freeformTags(Map<String,String> freeformTags)
Simple key-value pair that is applied without any predefined name, type or scope.ProtectionPolicy.Builder
id(String id)
The protection policy OCID.ProtectionPolicy.Builder
isPredefinedPolicy(Boolean isPredefinedPolicy)
Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy.ProtectionPolicy.Builder
lifecycleDetails(String lifecycleDetails)
Detailed description about the current lifecycle state of the protection policy.ProtectionPolicy.Builder
lifecycleState(LifecycleState lifecycleState)
The current state of the protection policy.ProtectionPolicy.Builder
mustEnforceCloudLocality(Boolean mustEnforceCloudLocality)
Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned.ProtectionPolicy.Builder
policyLockedDateTime(String policyLockedDateTime)
An RFC3339 formatted datetime string that specifies the exact date and time for the retention lock to take effect and permanently lock the retention period defined in the policy.ProtectionPolicy.Builder
systemTags(Map<String,Map<String,Object>> systemTags)
Usage of system tag keys.ProtectionPolicy.Builder
timeCreated(Date timeCreated)
An RFC3339 formatted datetime string that indicates the created time for the protection policy.ProtectionPolicy.Builder
timeUpdated(Date timeUpdated)
An RFC3339 formatted datetime string that indicates the updated time for the protection policy.
-
-
-
Method Detail
-
id
public ProtectionPolicy.Builder id(String id)
The protection policy OCID.- Parameters:
id
- the value to set- Returns:
- this builder
-
displayName
public ProtectionPolicy.Builder displayName(String displayName)
A user provided name for the protection policy.- Parameters:
displayName
- the value to set- Returns:
- this builder
-
compartmentId
public ProtectionPolicy.Builder compartmentId(String compartmentId)
The OCID of the compartment that contains the protection policy.- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
backupRetentionPeriodInDays
public ProtectionPolicy.Builder backupRetentionPeriodInDays(Integer backupRetentionPeriodInDays)
The maximum number of days to retain backups for a protected database.Specify a period ranging from a minimum 14 days to a maximum 95 days. For example, specify the value 55 if you want to retain backups for 55 days.
- Parameters:
backupRetentionPeriodInDays
- the value to set- Returns:
- this builder
-
isPredefinedPolicy
public ProtectionPolicy.Builder isPredefinedPolicy(Boolean isPredefinedPolicy)
Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy.You can modify only the custom policies.
- Parameters:
isPredefinedPolicy
- the value to set- Returns:
- this builder
-
policyLockedDateTime
public ProtectionPolicy.Builder policyLockedDateTime(String policyLockedDateTime)
An RFC3339 formatted datetime string that specifies the exact date and time for the retention lock to take effect and permanently lock the retention period defined in the policy.- Parameters:
policyLockedDateTime
- the value to set- Returns:
- this builder
-
mustEnforceCloudLocality
public ProtectionPolicy.Builder mustEnforceCloudLocality(Boolean mustEnforceCloudLocality)
Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned.- Parameters:
mustEnforceCloudLocality
- the value to set- Returns:
- this builder
-
timeCreated
public ProtectionPolicy.Builder timeCreated(Date timeCreated)
An RFC3339 formatted datetime string that indicates the created time for the protection policy.For example: ‘2020-05-22T21:10:29.600Z’.
- Parameters:
timeCreated
- the value to set- Returns:
- this builder
-
timeUpdated
public ProtectionPolicy.Builder timeUpdated(Date timeUpdated)
An RFC3339 formatted datetime string that indicates the updated time for the protection policy.For example: ‘2020-05-22T21:10:29.600Z’.
- Parameters:
timeUpdated
- the value to set- Returns:
- this builder
-
lifecycleState
public ProtectionPolicy.Builder lifecycleState(LifecycleState lifecycleState)
The current state of the protection policy.- Parameters:
lifecycleState
- the value to set- Returns:
- this builder
-
lifecycleDetails
public ProtectionPolicy.Builder lifecycleDetails(String lifecycleDetails)
Detailed description about the current lifecycle state of the protection policy.For example, it can be used to provide actionable information for a resource in a Failed state.
- Parameters:
lifecycleDetails
- the value to set- Returns:
- this builder
-
freeformTags
public ProtectionPolicy.Builder freeformTags(Map<String,String> freeformTags)
Simple key-value pair that is applied without any predefined name, type or scope.Exists for cross-compatibility only. Example: {“bar-key”: “value”}
- Parameters:
freeformTags
- the value to set- Returns:
- this builder
-
definedTags
public ProtectionPolicy.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}. For more information, see Resource Tags
- Parameters:
definedTags
- the value to set- Returns:
- this builder
-
systemTags
public ProtectionPolicy.Builder systemTags(Map<String,Map<String,Object>> systemTags)
Usage of system tag keys.These predefined keys are scoped to namespaces. Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}. For more information, see Resource Tags
- Parameters:
systemTags
- the value to set- Returns:
- this builder
-
build
public ProtectionPolicy build()
-
copy
public ProtectionPolicy.Builder copy(ProtectionPolicy model)
-
-