o
    ɶdD                     @   s8   d dl mZmZmZ d dlmZ eG dd deZdS )    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s  e Zd ZdZdZdZdZdZdZdZ	dd	 Z
ed
d Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd  Zejd!d  Zed"d# Zejd$d# Zed%d& Zejd'd& Zed(d) Zejd*d) Zed+d, Zejd-d, Zd.d/ Zd0d1 Zd2d3 Zd4S )5ProtectionPolicyae  
    The details of a protection policy.A policy defines the exact number of days to retain protected database backups created by Recovery Service.
    Each protected database must be associated with one protection policy. You can use Oracle-defined protection policies or create custom policies to suit your internal backup storage regulation demands.
    CREATINGUPDATINGACTIVEDELETINGDELETEDFAILEDc                 K   s   ddddddddddddd| _ dd	d
dddddddddd| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d| _d| _d| _dS )aN	  
        Initializes a new ProtectionPolicy object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param id:
            The value to assign to the id property of this ProtectionPolicy.
        :type id: str

        :param display_name:
            The value to assign to the display_name property of this ProtectionPolicy.
        :type display_name: str

        :param compartment_id:
            The value to assign to the compartment_id property of this ProtectionPolicy.
        :type compartment_id: str

        :param backup_retention_period_in_days:
            The value to assign to the backup_retention_period_in_days property of this ProtectionPolicy.
        :type backup_retention_period_in_days: int

        :param is_predefined_policy:
            The value to assign to the is_predefined_policy property of this ProtectionPolicy.
        :type is_predefined_policy: bool

        :param time_created:
            The value to assign to the time_created property of this ProtectionPolicy.
        :type time_created: datetime

        :param time_updated:
            The value to assign to the time_updated property of this ProtectionPolicy.
        :type time_updated: datetime

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this ProtectionPolicy.
            Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        :param lifecycle_details:
            The value to assign to the lifecycle_details property of this ProtectionPolicy.
        :type lifecycle_details: str

        :param freeform_tags:
            The value to assign to the freeform_tags property of this ProtectionPolicy.
        :type freeform_tags: dict(str, str)

        :param defined_tags:
            The value to assign to the defined_tags property of this ProtectionPolicy.
        :type defined_tags: dict(str, dict(str, object))

        :param system_tags:
            The value to assign to the system_tags property of this ProtectionPolicy.
        :type system_tags: dict(str, dict(str, object))

        strintbooldatetimezdict(str, str)zdict(str, dict(str, object)))iddisplay_namecompartment_idbackup_retention_period_in_daysis_predefined_policytime_createdtime_updatedlifecycle_statelifecycle_detailsfreeform_tagsdefined_tagssystem_tagsr   ZdisplayNameZcompartmentIdZbackupRetentionPeriodInDaysZisPredefinedPolicyZtimeCreatedZtimeUpdatedZlifecycleStateZlifecycleDetailsZfreeformTagsZdefinedTagsZ
systemTagsN)Zswagger_typesZattribute_map_id_display_name_compartment_id _backup_retention_period_in_days_is_predefined_policy_time_created_time_updated_lifecycle_state_lifecycle_details_freeform_tags_defined_tags_system_tags)selfkwargs r+   Iusr/lib/python3.10/site-packages/oci/recovery/models/protection_policy.py__init__+   sL   9
zProtectionPolicy.__init__c                 C      | j S )z
        **[Required]** Gets the id of this ProtectionPolicy.
        The protection policy OCID.


        :return: The id of this ProtectionPolicy.
        :rtype: str
        r   r)   r+   r+   r,   r         
zProtectionPolicy.idc                 C   
   || _ dS )z
        Sets the id of this ProtectionPolicy.
        The protection policy OCID.


        :param id: The id of this ProtectionPolicy.
        :type: str
        Nr/   )r)   r   r+   r+   r,   r         

c                 C   r.   )z
        Gets the display_name of this ProtectionPolicy.
        A user provided name for the protection policy.


        :return: The display_name of this ProtectionPolicy.
        :rtype: str
        r   r0   r+   r+   r,   r      r1   zProtectionPolicy.display_namec                 C   r2   )z
        Sets the display_name of this ProtectionPolicy.
        A user provided name for the protection policy.


        :param display_name: The display_name of this ProtectionPolicy.
        :type: str
        Nr4   )r)   r   r+   r+   r,   r      r3   c                 C   r.   )z
        **[Required]** Gets the compartment_id of this ProtectionPolicy.
        The OCID of the compartment that contains the protection policy.


        :return: The compartment_id of this ProtectionPolicy.
        :rtype: str
        r   r0   r+   r+   r,   r      r1   zProtectionPolicy.compartment_idc                 C   r2   )z
        Sets the compartment_id of this ProtectionPolicy.
        The OCID of the compartment that contains the protection policy.


        :param compartment_id: The compartment_id of this ProtectionPolicy.
        :type: str
        Nr5   )r)   r   r+   r+   r,   r      r3   c                 C   r.   )a  
        **[Required]** Gets the backup_retention_period_in_days of this ProtectionPolicy.
        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.


        :return: The backup_retention_period_in_days of this ProtectionPolicy.
        :rtype: int
        r    r0   r+   r+   r,   r      r1   z0ProtectionPolicy.backup_retention_period_in_daysc                 C   r2   )a  
        Sets the backup_retention_period_in_days of this ProtectionPolicy.
        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.


        :param backup_retention_period_in_days: The backup_retention_period_in_days of this ProtectionPolicy.
        :type: int
        Nr6   )r)   r   r+   r+   r,   r      r3   c                 C   r.   )a=  
        **[Required]** Gets the is_predefined_policy of this ProtectionPolicy.
        Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.


        :return: The is_predefined_policy of this ProtectionPolicy.
        :rtype: bool
        r!   r0   r+   r+   r,   r      r1   z%ProtectionPolicy.is_predefined_policyc                 C   r2   )aA  
        Sets the is_predefined_policy of this ProtectionPolicy.
        Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.


        :param is_predefined_policy: The is_predefined_policy of this ProtectionPolicy.
        :type: bool
        Nr7   )r)   r   r+   r+   r,   r      r3   c                 C   r.   )a)  
        Gets the time_created of this ProtectionPolicy.
        An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.


        :return: The time_created of this ProtectionPolicy.
        :rtype: datetime
        r"   r0   r+   r+   r,   r     r1   zProtectionPolicy.time_createdc                 C   r2   )a4  
        Sets the time_created of this ProtectionPolicy.
        An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.


        :param time_created: The time_created of this ProtectionPolicy.
        :type: datetime
        Nr8   )r)   r   r+   r+   r,   r     r3   c                 C   r.   )a)  
        Gets the time_updated of this ProtectionPolicy.
        An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.


        :return: The time_updated of this ProtectionPolicy.
        :rtype: datetime
        r#   r0   r+   r+   r,   r     r1   zProtectionPolicy.time_updatedc                 C   r2   )a4  
        Sets the time_updated of this ProtectionPolicy.
        An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.


        :param time_updated: The time_updated of this ProtectionPolicy.
        :type: datetime
        Nr9   )r)   r   r+   r+   r,   r   *  r3   c                 C   r.   )a@  
        Gets the lifecycle_state of this ProtectionPolicy.
        The current state of the protection policy. Allowed values are:
          - CREATING
          - UPDATING
          - ACTIVE
          - DELETING
          - DELETED
          - FAILED

        Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this ProtectionPolicy.
        :rtype: str
        )r$   r0   r+   r+   r,   r   6  s   z ProtectionPolicy.lifecycle_statec                 C   s    g d}t ||sd}|| _dS )ah  
        Sets the lifecycle_state of this ProtectionPolicy.
        The current state of the protection policy. Allowed values are:
          - CREATING
          - UPDATING
          - ACTIVE
          - DELETING
          - DELETED
          - FAILED


        :param lifecycle_state: The lifecycle_state of this ProtectionPolicy.
        :type: str
        )r   r   r	   r
   r   r   ZUNKNOWN_ENUM_VALUEN)r   r$   )r)   r   Zallowed_valuesr+   r+   r,   r   K  s   

c                 C   r.   )aV  
        Gets the lifecycle_details of this ProtectionPolicy.
        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.


        :return: The lifecycle_details of this ProtectionPolicy.
        :rtype: str
        r%   r0   r+   r+   r,   r   `  r1   z"ProtectionPolicy.lifecycle_detailsc                 C   r2   )af  
        Sets the lifecycle_details of this ProtectionPolicy.
        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.


        :param lifecycle_details: The lifecycle_details of this ProtectionPolicy.
        :type: str
        Nr:   )r)   r   r+   r+   r,   r   l  r3   c                 C   r.   )aG  
        Gets the freeform_tags of this ProtectionPolicy.
        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 ProtectionPolicy.
        :rtype: dict(str, str)
        r&   r0   r+   r+   r,   r   x  s   zProtectionPolicy.freeform_tagsc                 C   r2   )aS  
        Sets the freeform_tags of this ProtectionPolicy.
        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 ProtectionPolicy.
        :type: dict(str, str)
        Nr;   )r)   r   r+   r+   r,   r     s   
c                 C   r.   )a  
        Gets the defined_tags of this ProtectionPolicy.
        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 ProtectionPolicy.
        :rtype: dict(str, dict(str, object))
        r'   r0   r+   r+   r,   r        zProtectionPolicy.defined_tagsc                 C   r2   )a  
        Sets the defined_tags of this ProtectionPolicy.
        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 ProtectionPolicy.
        :type: dict(str, dict(str, object))
        Nr<   )r)   r   r+   r+   r,   r        
c                 C   r.   )a  
        Gets the system_tags of this ProtectionPolicy.
        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`__

        __ https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm


        :return: The system_tags of this ProtectionPolicy.
        :rtype: dict(str, dict(str, object))
        r(   r0   r+   r+   r,   r     r=   zProtectionPolicy.system_tagsc                 C   r2   )a  
        Sets the system_tags of this ProtectionPolicy.
        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`__

        __ https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm


        :param system_tags: The system_tags of this ProtectionPolicy.
        :type: dict(str, dict(str, object))
        Nr?   )r)   r   r+   r+   r,   r     r>   c                 C   s   t | S N)r   r0   r+   r+   r,   __repr__  s   zProtectionPolicy.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r)   otherr+   r+   r,   __eq__  s   zProtectionPolicy.__eq__c                 C   s
   | |k S r@   r+   rC   r+   r+   r,   __ne__  s   
zProtectionPolicy.__ne__N)__name__
__module____qualname____doc__ZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_UPDATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_FAILEDr-   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   rA   rE   rF   r+   r+   r+   r,   r      sx    c























r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r+   r+   r+   r,   <module>   s   