File: //lib/mysqlsh/lib/python3.8/site-packages/oci/recovery/models/update_protection_policy_details.py
# coding: utf-8
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20210216
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
from oci.decorators import init_model_state_from_kwargs
@init_model_state_from_kwargs
class UpdateProtectionPolicyDetails(object):
"""
The information to be updated.
"""
def __init__(self, **kwargs):
"""
Initializes a new UpdateProtectionPolicyDetails object with values from keyword arguments.
The following keyword arguments are supported (corresponding to the getters/setters of this class):
:param display_name:
The value to assign to the display_name property of this UpdateProtectionPolicyDetails.
:type display_name: str
:param backup_retention_period_in_days:
The value to assign to the backup_retention_period_in_days property of this UpdateProtectionPolicyDetails.
:type backup_retention_period_in_days: int
:param policy_locked_date_time:
The value to assign to the policy_locked_date_time property of this UpdateProtectionPolicyDetails.
:type policy_locked_date_time: str
:param freeform_tags:
The value to assign to the freeform_tags property of this UpdateProtectionPolicyDetails.
:type freeform_tags: dict(str, str)
:param defined_tags:
The value to assign to the defined_tags property of this UpdateProtectionPolicyDetails.
:type defined_tags: dict(str, dict(str, object))
"""
self.swagger_types = {
'display_name': 'str',
'backup_retention_period_in_days': 'int',
'policy_locked_date_time': 'str',
'freeform_tags': 'dict(str, str)',
'defined_tags': 'dict(str, dict(str, object))'
}
self.attribute_map = {
'display_name': 'displayName',
'backup_retention_period_in_days': 'backupRetentionPeriodInDays',
'policy_locked_date_time': 'policyLockedDateTime',
'freeform_tags': 'freeformTags',
'defined_tags': 'definedTags'
}
self._display_name = None
self._backup_retention_period_in_days = None
self._policy_locked_date_time = None
self._freeform_tags = None
self._defined_tags = None
@property
def display_name(self):
"""
Gets the display_name of this UpdateProtectionPolicyDetails.
A user provided name for the protection policy. The 'displayName' does not have to be unique, and it can be modified. Avoid entering confidential information.
:return: The display_name of this UpdateProtectionPolicyDetails.
:rtype: str
"""
return self._display_name
@display_name.setter
def display_name(self, display_name):
"""
Sets the display_name of this UpdateProtectionPolicyDetails.
A user provided name for the protection policy. The 'displayName' does not have to be unique, and it can be modified. Avoid entering confidential information.
:param display_name: The display_name of this UpdateProtectionPolicyDetails.
:type: str
"""
self._display_name = display_name
@property
def backup_retention_period_in_days(self):
"""
Gets the backup_retention_period_in_days of this UpdateProtectionPolicyDetails.
The maximum number of days to retain backups for a protected database.
:return: The backup_retention_period_in_days of this UpdateProtectionPolicyDetails.
:rtype: int
"""
return self._backup_retention_period_in_days
@backup_retention_period_in_days.setter
def backup_retention_period_in_days(self, backup_retention_period_in_days):
"""
Sets the backup_retention_period_in_days of this UpdateProtectionPolicyDetails.
The maximum number of days to retain backups for a protected database.
:param backup_retention_period_in_days: The backup_retention_period_in_days of this UpdateProtectionPolicyDetails.
:type: int
"""
self._backup_retention_period_in_days = backup_retention_period_in_days
@property
def policy_locked_date_time(self):
"""
Gets the policy_locked_date_time of this UpdateProtectionPolicyDetails.
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.
* The retention lock feature controls whether Recovery Service strictly preserves backups for the duration defined in a policy. Retention lock is useful to enforce recovery window compliance and to prevent unintentional modifications to protected database backups.
* Recovery Service enforces a 14-day delay before the retention lock set for a policy can take effect. Therefore, you must set policyLockedDateTime to a date that occurs 14 days after the current date.
* For example, assuming that the current date is Aug 1, 2023 9 pm, you can set policyLockedDateTime to '2023-08-15T21:00:00.600Z' (Aug 15, 2023, 9:00 pm), or greater.
* During the 14-day delay period, you can either increase or decrease the retention period in the policy.
* However, you are only allowed to increase the retention period on or after the retention lock date.
* You cannot change the value of policyLockedDateTime if the retention lock is already in effect.
:return: The policy_locked_date_time of this UpdateProtectionPolicyDetails.
:rtype: str
"""
return self._policy_locked_date_time
@policy_locked_date_time.setter
def policy_locked_date_time(self, policy_locked_date_time):
"""
Sets the policy_locked_date_time of this UpdateProtectionPolicyDetails.
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.
* The retention lock feature controls whether Recovery Service strictly preserves backups for the duration defined in a policy. Retention lock is useful to enforce recovery window compliance and to prevent unintentional modifications to protected database backups.
* Recovery Service enforces a 14-day delay before the retention lock set for a policy can take effect. Therefore, you must set policyLockedDateTime to a date that occurs 14 days after the current date.
* For example, assuming that the current date is Aug 1, 2023 9 pm, you can set policyLockedDateTime to '2023-08-15T21:00:00.600Z' (Aug 15, 2023, 9:00 pm), or greater.
* During the 14-day delay period, you can either increase or decrease the retention period in the policy.
* However, you are only allowed to increase the retention period on or after the retention lock date.
* You cannot change the value of policyLockedDateTime if the retention lock is already in effect.
:param policy_locked_date_time: The policy_locked_date_time of this UpdateProtectionPolicyDetails.
:type: str
"""
self._policy_locked_date_time = policy_locked_date_time
@property
def freeform_tags(self):
"""
Gets the freeform_tags of this UpdateProtectionPolicyDetails.
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
Example: `{\"bar-key\": \"value\"}`
:return: The freeform_tags of this UpdateProtectionPolicyDetails.
:rtype: dict(str, str)
"""
return self._freeform_tags
@freeform_tags.setter
def freeform_tags(self, freeform_tags):
"""
Sets the freeform_tags of this UpdateProtectionPolicyDetails.
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
Example: `{\"bar-key\": \"value\"}`
:param freeform_tags: The freeform_tags of this UpdateProtectionPolicyDetails.
:type: dict(str, str)
"""
self._freeform_tags = freeform_tags
@property
def defined_tags(self):
"""
Gets the defined_tags of this UpdateProtectionPolicyDetails.
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`__
__ https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm
:return: The defined_tags of this UpdateProtectionPolicyDetails.
:rtype: dict(str, dict(str, object))
"""
return self._defined_tags
@defined_tags.setter
def defined_tags(self, defined_tags):
"""
Sets the defined_tags of this UpdateProtectionPolicyDetails.
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`__
__ https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm
:param defined_tags: The defined_tags of this UpdateProtectionPolicyDetails.
:type: dict(str, dict(str, object))
"""
self._defined_tags = defined_tags
def __repr__(self):
return formatted_flat_dict(self)
def __eq__(self, other):
if other is None:
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
return not self == other