o
    ëÉ¶d  ã                   @   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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dS )ÚResourceLockzÞ
    Resource locks are used to prevent certain APIs from being called for the resource.
    A full lock prevents both updating the resource and deleting the resource. A delete
    lock prevents deleting the resource.
    ÚFULLÚDELETEc                 K   sF   ddddddœ| _ ddddd	dœ| _d
| _d
| _d
| _d
| _d
| _d
S )aD  
        Initializes a new ResourceLock object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param type:
            The value to assign to the type property of this ResourceLock.
            Allowed values for this property are: "FULL", "DELETE", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type type: str

        :param related_resource_id:
            The value to assign to the related_resource_id property of this ResourceLock.
        :type related_resource_id: str

        :param message:
            The value to assign to the message property of this ResourceLock.
        :type message: str

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

        :param is_active:
            The value to assign to the is_active property of this ResourceLock.
        :type is_active: bool

        ÚstrÚdatetimeÚbool)ÚtypeÚrelated_resource_idÚmessageÚtime_createdÚ	is_activer   ZrelatedResourceIdr   ZtimeCreatedZisActiveN)Zswagger_typesZattribute_mapÚ_typeÚ_related_resource_idÚ_messageÚ_time_createdÚ
_is_active)ÚselfÚkwargs© r   úEusr/lib/python3.10/site-packages/oci/identity/models/resource_lock.pyÚ__init__   s"   û	û
zResourceLock.__init__c                 C   ó   | j S )aY  
        **[Required]** Gets the type of this ResourceLock.
        Type of the lock.

        Allowed values for this property are: "FULL", "DELETE", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The type of this ResourceLock.
        :rtype: str
        )r   ©r   r   r   r   r   N   s   zResourceLock.typec                 C   s    ddg}t ||ƒsd}|| _dS )z˜
        Sets the type of this ResourceLock.
        Type of the lock.


        :param type: The type of this ResourceLock.
        :type: str
        r   r   ZUNKNOWN_ENUM_VALUEN)r   r   )r   r   Zallowed_valuesr   r   r   r   ]   s   


c                 C   r   )a  
        Gets the related_resource_id of this ResourceLock.
        The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.


        :return: The related_resource_id of this ResourceLock.
        :rtype: str
        ©r   r   r   r   r   r   l   ó   
z ResourceLock.related_resource_idc                 C   ó
   || _ dS )a%  
        Sets the related_resource_id of this ResourceLock.
        The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.


        :param related_resource_id: The related_resource_id of this ResourceLock.
        :type: str
        Nr   )r   r   r   r   r   r   x   ó   

c                 C   r   )a	  
        Gets the message of this ResourceLock.
        A message added by the creator of the lock. This is typically used to give an
        indication of why the resource is locked.


        :return: The message of this ResourceLock.
        :rtype: str
        ©r   r   r   r   r   r   „   s   zResourceLock.messagec                 C   r   )a  
        Sets the message of this ResourceLock.
        A message added by the creator of the lock. This is typically used to give an
        indication of why the resource is locked.


        :param message: The message of this ResourceLock.
        :type: str
        Nr!   )r   r   r   r   r   r   ‘   s   
c                 C   r   )z³
        Gets the time_created of this ResourceLock.
        When the lock was created.


        :return: The time_created of this ResourceLock.
        :rtype: datetime
        ©r   r   r   r   r   r   ž   r   zResourceLock.time_createdc                 C   r   )z¾
        Sets the time_created of this ResourceLock.
        When the lock was created.


        :param time_created: The time_created of this ResourceLock.
        :type: datetime
        Nr"   )r   r   r   r   r   r   ª   r    c                 C   r   )a  
        Gets the is_active of this ResourceLock.
        Indicates if the lock is active or not. For example, if there are mutliple FULL locks, the first-created FULL lock will be effective.


        :return: The is_active of this ResourceLock.
        :rtype: bool
        ©r   r   r   r   r   r   ¶   r   zResourceLock.is_activec                 C   r   )a  
        Sets the is_active of this ResourceLock.
        Indicates if the lock is active or not. For example, if there are mutliple FULL locks, the first-created FULL lock will be effective.


        :param is_active: The is_active of this ResourceLock.
        :type: bool
        Nr#   )r   r   r   r   r   r   Â   r    c                 C   s   t | ƒS ©N)r   r   r   r   r   Ú__repr__Î   s   zResourceLock.__repr__c                 C   s   |d u rdS | j |j kS )NF)Ú__dict__©r   Úotherr   r   r   Ú__eq__Ñ   s   zResourceLock.__eq__c                 C   s
   | |k S r$   r   r'   r   r   r   Ú__ne__×   s   
zResourceLock.__ne__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Z	TYPE_FULLZTYPE_DELETEr   Úpropertyr   Úsetterr   r   r   r   r%   r)   r*   r   r   r   r   r      s8    2









r   N)Zoci.utilr   r   r   Zoci.decoratorsr   Úobjectr   r   r   r   r   Ú<module>   s   