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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d"d#„ Zd$d%„ Zd&d'„ Zd(S ))ÚPatchz
    Patch model.
    ÚAPPLYÚPRECHECKÚ	AVAILABLEÚSUCCESSÚIN_PROGRESSÚFAILEDc              	   K   sd   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 )aq  
        Initializes a new Patch 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 Patch.
        :type id: str

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

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

        :param available_actions:
            The value to assign to the available_actions property of this Patch.
            Allowed values for items in this list are: "APPLY", "PRECHECK", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type available_actions: list[str]

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

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this Patch.
            Allowed values for this property are: "AVAILABLE", "SUCCESS", "IN_PROGRESS", "FAILED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        :param time_released:
            The value to assign to the time_released property of this Patch.
        :type time_released: datetime

        :param version:
            The value to assign to the version property of this Patch.
        :type version: str

        Ústrz	list[str]Údatetime)ÚidÚdescriptionÚlast_actionÚavailable_actionsÚlifecycle_detailsÚlifecycle_stateÚtime_releasedÚversionr   r   Z
lastActionZavailableActionsZlifecycleDetailsZlifecycleStateZtimeReleasedr   N)
Zswagger_typesZattribute_mapÚ_idÚ_descriptionÚ_last_actionÚ_available_actionsÚ_lifecycle_detailsÚ_lifecycle_stateÚ_time_releasedÚ_version)ÚselfÚkwargs© r!   ú=usr/lib/python3.10/site-packages/oci/database/models/patch.pyÚ__init__2   s4   -øø
zPatch.__init__c                 C   ó   | j S )zî
        **[Required]** Gets the id of this Patch.
        The `OCID`__ of the patch.

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


        :return: The id of this Patch.
        :rtype: str
        ©r   ©r   r!   r!   r"   r   }   s   zPatch.idc                 C   ó
   || _ dS )zà
        Sets the id of this Patch.
        The `OCID`__ of the patch.

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


        :param id: The id of this Patch.
        :type: str
        Nr%   )r   r   r!   r!   r"   r   ‹   s   
c                 C   r$   )zº
        **[Required]** Gets the description of this Patch.
        The text describing this patch package.


        :return: The description of this Patch.
        :rtype: str
        ©r   r&   r!   r!   r"   r   ™   ó   
zPatch.descriptionc                 C   r'   )zµ
        Sets the description of this Patch.
        The text describing this patch package.


        :param description: The description of this Patch.
        :type: str
        Nr(   )r   r   r!   r!   r"   r   ¥   ó   

c                 C   r$   )a{  
        Gets the last_action of this Patch.
        Action that is currently being performed or was completed last.

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


        :return: The last_action of this Patch.
        :rtype: str
        )r   r&   r!   r!   r"   r   ±   ó   zPatch.last_actionc                 C   s    ddg}t ||ƒsd}|| _dS )zÍ
        Sets the last_action of this Patch.
        Action that is currently being performed or was completed last.


        :param last_action: The last_action of this Patch.
        :type: str
        r   r   ÚUNKNOWN_ENUM_VALUEN)r   r   )r   r   Úallowed_valuesr!   r!   r"   r   À   ó   


c                 C   r$   )a‹  
        Gets the available_actions of this Patch.
        Actions that can possibly be performed using this patch.

        Allowed values for items in this list are: "APPLY", "PRECHECK", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The available_actions of this Patch.
        :rtype: list[str]
        ©r   r&   r!   r!   r"   r   Ï   r+   zPatch.available_actionsc                    s0   ddg‰ |r‡ fdd„|D ƒ|dd…< || _ dS )zÞ
        Sets the available_actions of this Patch.
        Actions that can possibly be performed using this patch.


        :param available_actions: The available_actions of this Patch.
        :type: list[str]
        r   r   c                    s   g | ]}t |ˆ ƒsd n|‘qS )r,   )r   )Ú.0Úx©r-   r!   r"   Ú
<listcomp>ê   s    z+Patch.available_actions.<locals>.<listcomp>Nr/   )r   r   r!   r2   r"   r   Þ   s   

c                 C   r$   )a  
        Gets the lifecycle_details of this Patch.
        A descriptive text associated with the lifecycleState.
        Typically can contain additional displayable text.


        :return: The lifecycle_details of this Patch.
        :rtype: str
        ©r   r&   r!   r!   r"   r   í   s   zPatch.lifecycle_detailsc                 C   r'   )a  
        Sets the lifecycle_details of this Patch.
        A descriptive text associated with the lifecycleState.
        Typically can contain additional displayable text.


        :param lifecycle_details: The lifecycle_details of this Patch.
        :type: str
        Nr4   )r   r   r!   r!   r"   r   ú   s   
c                 C   r$   )a™  
        Gets the lifecycle_state of this Patch.
        The current state of the patch as a result of lastAction.

        Allowed values for this property are: "AVAILABLE", "SUCCESS", "IN_PROGRESS", "FAILED", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this Patch.
        :rtype: str
        )r   r&   r!   r!   r"   r     r+   zPatch.lifecycle_statec                 C   s    g d¢}t ||ƒsd}|| _dS )zÓ
        Sets the lifecycle_state of this Patch.
        The current state of the patch as a result of lastAction.


        :param lifecycle_state: The lifecycle_state of this Patch.
        :type: str
        )r	   r
   r   r   r,   N)r   r   )r   r   r-   r!   r!   r"   r     r.   c                 C   r$   )zÊ
        **[Required]** Gets the time_released of this Patch.
        The date and time that the patch was released.


        :return: The time_released of this Patch.
        :rtype: datetime
        ©r   r&   r!   r!   r"   r   %  r)   zPatch.time_releasedc                 C   r'   )zÇ
        Sets the time_released of this Patch.
        The date and time that the patch was released.


        :param time_released: The time_released of this Patch.
        :type: datetime
        Nr5   )r   r   r!   r!   r"   r   1  r*   c                 C   r$   )z­
        **[Required]** Gets the version of this Patch.
        The version of this patch package.


        :return: The version of this Patch.
        :rtype: str
        ©r   r&   r!   r!   r"   r   =  r)   zPatch.versionc                 C   r'   )z¤
        Sets the version of this Patch.
        The version of this patch package.


        :param version: The version of this Patch.
        :type: str
        Nr6   )r   r   r!   r!   r"   r   I  r*   c                 C   s   t | ƒS ©N)r   r&   r!   r!   r"   Ú__repr__U  s   zPatch.__repr__c                 C   s   |d u rdS | j |j kS )NF)Ú__dict__©r   Úotherr!   r!   r"   Ú__eq__X  s   zPatch.__eq__c                 C   s
   | |k S r7   r!   r:   r!   r!   r"   Ú__ne__^  s   
zPatch.__ne__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ZLAST_ACTION_APPLYZLAST_ACTION_PRECHECKZAVAILABLE_ACTIONS_APPLYZAVAILABLE_ACTIONS_PRECHECKZLIFECYCLE_STATE_AVAILABLEZLIFECYCLE_STATE_SUCCESSZLIFECYCLE_STATE_IN_PROGRESSZLIFECYCLE_STATE_FAILEDr#   Úpropertyr   Úsetterr   r   r   r   r   r   r   r8   r<   r=   r!   r!   r!   r"   r      s\    K















r   N)Zoci.utilr   r   r   Zoci.decoratorsr   Úobjectr   r!   r!   r!   r"   Ú<module>   s   