o
    ëÉ¶dn<  ã                   @   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                   @   sb  e 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d*d+„ Zd,d-„ Zd.d/„ Zd0S )1ÚPolicya  
    A document that specifies the type of access a group has to the resources in a compartment. For information about
    policies and other IAM Service components, see
    `Overview of IAM`__. If you're new to policies, see
    `Get Started with Policies`__.

    The word "policy" is used by people in different ways:

    * An individual statement written in the policy language
    * A collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it)
    * The overall body of policies your organization uses to control access to resources

    To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
    talk to an administrator.

    **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values
    using the API.

    __ https://docs.cloud.oracle.com/Content/Identity/getstarted/identity-domains.htm
    __ https://docs.cloud.oracle.com/Content/Identity/policiesgs/get-started-with-policies.htm
    ÚCREATINGÚACTIVEÚINACTIVEÚDELETINGÚDELETEDc                 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S )a®  
        Initializes a new Policy 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 Policy.
        :type id: str

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

        :param name:
            The value to assign to the name property of this Policy.
        :type name: str

        :param statements:
            The value to assign to the statements property of this Policy.
        :type statements: list[str]

        :param description:
            The value to assign to the description property of this Policy.
        :type description: str

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

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

        :param inactive_status:
            The value to assign to the inactive_status property of this Policy.
        :type inactive_status: int

        :param version_date:
            The value to assign to the version_date property of this Policy.
        :type version_date: datetime

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

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

        Ústrz	list[str]ÚdatetimeÚintzdict(str, str)zdict(str, dict(str, object)))ÚidÚcompartment_idÚnameÚ
statementsÚdescriptionÚtime_createdÚlifecycle_stateÚinactive_statusÚversion_dateÚfreeform_tagsÚdefined_tagsr   ZcompartmentIdr   r   r   ZtimeCreatedZlifecycleStateZinactiveStatusZversionDateZfreeformTagsZdefinedTagsN)Zswagger_typesZattribute_mapÚ_idÚ_compartment_idÚ_nameÚ_statementsÚ_descriptionÚ_time_createdÚ_lifecycle_stateÚ_inactive_statusÚ_version_dateÚ_freeform_tagsÚ_defined_tags)ÚselfÚkwargs© r'   ú>usr/lib/python3.10/site-packages/oci/identity/models/policy.pyÚ__init__8   sF   5õõ
zPolicy.__init__c                 C   ó   | j S )zš
        **[Required]** Gets the id of this Policy.
        The OCID of the policy.


        :return: The id of this Policy.
        :rtype: str
        ©r   ©r%   r'   r'   r(   r   ”   ó   
z	Policy.idc                 C   ó
   || _ dS )zŒ
        Sets the id of this Policy.
        The OCID of the policy.


        :param id: The id of this Policy.
        :type: str
        Nr+   )r%   r   r'   r'   r(   r       ó   

c                 C   r*   )zù
        **[Required]** Gets the compartment_id of this Policy.
        The OCID of the compartment containing the policy (either the tenancy or another compartment).


        :return: The compartment_id of this Policy.
        :rtype: str
        ©r   r,   r'   r'   r(   r   ¬   r-   zPolicy.compartment_idc                 C   r.   )z÷
        Sets the compartment_id of this Policy.
        The OCID of the compartment containing the policy (either the tenancy or another compartment).


        :param compartment_id: The compartment_id of this Policy.
        :type: str
        Nr0   )r%   r   r'   r'   r(   r   ¸   r/   c                 C   r*   )a  
        **[Required]** Gets the name of this Policy.
        The name you assign to the policy during creation. The name must be unique across all policies
        in the tenancy and cannot be changed.


        :return: The name of this Policy.
        :rtype: str
        ©r   r,   r'   r'   r(   r   Ä   s   zPolicy.namec                 C   r.   )a  
        Sets the name of this Policy.
        The name you assign to the policy during creation. The name must be unique across all policies
        in the tenancy and cannot be changed.


        :param name: The name of this Policy.
        :type: str
        Nr1   )r%   r   r'   r'   r(   r   Ñ   s   
c                 C   r*   )zâ
        **[Required]** Gets the statements of this Policy.
        An array of one or more policy statements written in the policy language.


        :return: The statements of this Policy.
        :rtype: list[str]
        ©r   r,   r'   r'   r(   r   Þ   r-   zPolicy.statementsc                 C   r.   )zÜ
        Sets the statements of this Policy.
        An array of one or more policy statements written in the policy language.


        :param statements: The statements of this Policy.
        :type: list[str]
        Nr2   )r%   r   r'   r'   r(   r   ê   r/   c                 C   r*   )zï
        **[Required]** Gets the description of this Policy.
        The description you assign to the policy. Does not have to be unique, and it's changeable.


        :return: The description of this Policy.
        :rtype: str
        ©r   r,   r'   r'   r(   r   ö   r-   zPolicy.descriptionc                 C   r.   )zê
        Sets the description of this Policy.
        The description you assign to the policy. Does not have to be unique, and it's changeable.


        :param description: The description of this Policy.
        :type: str
        Nr3   )r%   r   r'   r'   r(   r     r/   c                 C   r*   )a  
        **[Required]** Gets the time_created of this Policy.
        Date and time the policy was created, in the format defined by RFC3339.

        Example: `2016-08-25T21:10:29.600Z`


        :return: The time_created of this Policy.
        :rtype: datetime
        ©r   r,   r'   r'   r(   r     ó   zPolicy.time_createdc                 C   r.   )a  
        Sets the time_created of this Policy.
        Date and time the policy was created, in the format defined by RFC3339.

        Example: `2016-08-25T21:10:29.600Z`


        :param time_created: The time_created of this Policy.
        :type: datetime
        Nr4   )r%   r   r'   r'   r(   r     ó   
c                 C   r*   )a  
        **[Required]** Gets the lifecycle_state of this Policy.
        The policy's current state. After creating a policy, make sure its `lifecycleState` changes from CREATING to
        ACTIVE before using it.

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


        :return: The lifecycle_state of this Policy.
        :rtype: str
        )r    r,   r'   r'   r(   r   *  ó   zPolicy.lifecycle_statec                 C   s    g d¢}t ||ƒsd}|| _dS )a(  
        Sets the lifecycle_state of this Policy.
        The policy's current state. After creating a policy, make sure its `lifecycleState` changes from CREATING to
        ACTIVE before using it.


        :param lifecycle_state: The lifecycle_state of this Policy.
        :type: str
        )r   r   r	   r
   r   ZUNKNOWN_ENUM_VALUEN)r   r    )r%   r   Zallowed_valuesr'   r'   r(   r   :  s   

c                 C   r*   )z½
        Gets the inactive_status of this Policy.
        The detailed status of INACTIVE lifecycleState.


        :return: The inactive_status of this Policy.
        :rtype: int
        ©r!   r,   r'   r'   r(   r   J  r-   zPolicy.inactive_statusc                 C   r.   )zË
        Sets the inactive_status of this Policy.
        The detailed status of INACTIVE lifecycleState.


        :param inactive_status: The inactive_status of this Policy.
        :type: int
        Nr8   )r%   r   r'   r'   r(   r   V  r/   c                 C   r*   )aã  
        Gets the version_date of this Policy.
        The version of the policy. If null or set to an empty string, when a request comes in for authorization, the
        policy will be evaluated according to the current behavior of the services at that moment. If set to a particular
        date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date.


        :return: The version_date of this Policy.
        :rtype: datetime
        ©r"   r,   r'   r'   r(   r   b  r5   zPolicy.version_datec                 C   r.   )aî  
        Sets the version_date of this Policy.
        The version of the policy. If null or set to an empty string, when a request comes in for authorization, the
        policy will be evaluated according to the current behavior of the services at that moment. If set to a particular
        date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date.


        :param version_date: The version_date of this Policy.
        :type: datetime
        Nr9   )r%   r   r'   r'   r(   r   p  r6   c                 C   r*   )a½  
        Gets the freeform_tags of this Policy.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :return: The freeform_tags of this Policy.
        :rtype: dict(str, str)
        ©r#   r,   r'   r'   r(   r   ~  r7   zPolicy.freeform_tagsc                 C   r.   )aÉ  
        Sets the freeform_tags of this Policy.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :param freeform_tags: The freeform_tags of this Policy.
        :type: dict(str, str)
        Nr:   )r%   r   r'   r'   r(   r   Ž  ó   
c                 C   r*   )a³  
        Gets the defined_tags of this Policy.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :return: The defined_tags of this Policy.
        :rtype: dict(str, dict(str, object))
        ©r$   r,   r'   r'   r(   r   ž  r7   zPolicy.defined_tagsc                 C   r.   )a¾  
        Sets the defined_tags of this Policy.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :param defined_tags: The defined_tags of this Policy.
        :type: dict(str, dict(str, object))
        Nr<   )r%   r   r'   r'   r(   r   ®  r;   c                 C   s   t | ƒS ©N)r   r,   r'   r'   r(   Ú__repr__¾  s   zPolicy.__repr__c                 C   s   |d u rdS | j |j kS )NF)Ú__dict__©r%   Úotherr'   r'   r(   Ú__eq__Á  s   zPolicy.__eq__c                 C   s
   | |k S r=   r'   r@   r'   r'   r(   Ú__ne__Ç  s   
zPolicy.__ne__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_INACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDr)   Úpropertyr   Úsetterr   r   r   r   r   r   r   r   r   r   r>   rB   rC   r'   r'   r'   r(   r      sn    \





















r   N)Zoci.utilr   r   r   Zoci.decoratorsr   Úobjectr   r'   r'   r'   r(   Ú<module>   s   