o
    ɶd8                     @   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                   @   sV  e Zd ZdZdZdZdZdZd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ed'd( Zejd)d( Zd*d+ Zd,d- Z d.d/ Z!d0S )1Updatez
    Update model.
    ROLLING_APPLYNON_ROLLING_APPLYPRECHECKROLLBACK
GI_UPGRADEGI_PATCH	OS_UPDATE	AVAILABLESUCCESSIN_PROGRESSFAILEDc              
   K   sn   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 Update 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 Update.
        :type id: str

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

        :param last_action:
            The value to assign to the last_action property of this Update.
            Allowed values for this property are: "ROLLING_APPLY", "NON_ROLLING_APPLY", "PRECHECK", "ROLLBACK", '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 Update.
            Allowed values for items in this list are: "ROLLING_APPLY", "NON_ROLLING_APPLY", "PRECHECK", "ROLLBACK", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type available_actions: list[str]

        :param update_type:
            The value to assign to the update_type property of this Update.
            Allowed values for this property are: "GI_UPGRADE", "GI_PATCH", "OS_UPDATE", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type update_type: str

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

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this Update.
            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 Update.
        :type time_released: datetime

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

        strz	list[str]datetime)	iddescriptionlast_actionavailable_actionsupdate_typelifecycle_detailslifecycle_statetime_releasedversionr   r   Z
lastActionZavailableActionsZ
updateTypeZlifecycleDetailsZlifecycleStateZtimeReleasedr   N)Zswagger_typesZattribute_map_id_description_last_action_available_actions_update_type_lifecycle_details_lifecycle_state_time_released_version)selfkwargs r(   >usr/lib/python3.10/site-packages/oci/database/models/update.py__init__N   s:   3
zUpdate.__init__c                 C      | j S )z
        **[Required]** Gets the id of this Update.
        The `OCID`__ of the maintenance update.

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


        :return: The id of this Update.
        :rtype: str
        r   r&   r(   r(   r)   r      s   z	Update.idc                 C   
   || _ dS )z
        Sets the id of this Update.
        The `OCID`__ of the maintenance update.

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


        :param id: The id of this Update.
        :type: str
        Nr,   )r&   r   r(   r(   r)   r      s   
c                 C   r+   )z
        **[Required]** Gets the description of this Update.
        Details of the maintenance update package.


        :return: The description of this Update.
        :rtype: str
        r   r-   r(   r(   r)   r         
zUpdate.descriptionc                 C   r.   )z
        Sets the description of this Update.
        Details of the maintenance update package.


        :param description: The description of this Update.
        :type: str
        Nr/   )r&   r   r(   r(   r)   r         

c                 C   r+   )ay  
        Gets the last_action of this Update.
        The update action.

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


        :return: The last_action of this Update.
        :rtype: str
        )r   r-   r(   r(   r)   r         zUpdate.last_actionc                 C       g d}t ||sd}|| _dS )z
        Sets the last_action of this Update.
        The update action.


        :param last_action: The last_action of this Update.
        :type: str
        r   r   r	   r
   UNKNOWN_ENUM_VALUEN)r   r   )r&   r   allowed_valuesr(   r(   r)   r         


c                 C   r+   )a  
        Gets the available_actions of this Update.
        The possible actions performed by the update operation on the infrastructure components.

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


        :return: The available_actions of this Update.
        :rtype: list[str]
        r    r-   r(   r(   r)   r      r2   zUpdate.available_actionsc                    s0   g d |r fdd|D |dd< || _ dS )a   
        Sets the available_actions of this Update.
        The possible actions performed by the update operation on the infrastructure components.


        :param available_actions: The available_actions of this Update.
        :type: list[str]
        r4   c                    s   g | ]}t | sd n|qS )r5   )r   ).0xr6   r(   r)   
<listcomp>  s    z,Update.available_actions.<locals>.<listcomp>Nr8   )r&   r   r(   r;   r)   r     s   

c                 C   r+   )a  
        **[Required]** Gets the update_type of this Update.
        The type of cloud VM cluster maintenance update.

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


        :return: The update_type of this Update.
        :rtype: str
        )r!   r-   r(   r(   r)   r     r2   zUpdate.update_typec                 C   r3   )z
        Sets the update_type of this Update.
        The type of cloud VM cluster maintenance update.


        :param update_type: The update_type of this Update.
        :type: str
        )r   r   r   r5   N)r   r!   )r&   r   r6   r(   r(   r)   r   !  r7   c                 C   r+   )z
        Gets the lifecycle_details of this Update.
        Descriptive text providing additional details about the lifecycle state.


        :return: The lifecycle_details of this Update.
        :rtype: str
        r"   r-   r(   r(   r)   r   0  r0   zUpdate.lifecycle_detailsc                 C   r.   )z
        Sets the lifecycle_details of this Update.
        Descriptive text providing additional details about the lifecycle state.


        :param lifecycle_details: The lifecycle_details of this Update.
        :type: str
        Nr=   )r&   r   r(   r(   r)   r   <  r1   c                 C   r+   )a  
        Gets the lifecycle_state of this Update.
        The current state of the maintenance update. Dependent on value 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 Update.
        :rtype: str
        )r#   r-   r(   r(   r)   r   H  r2   zUpdate.lifecycle_statec                 C   r3   )z
        Sets the lifecycle_state of this Update.
        The current state of the maintenance update. Dependent on value of `lastAction`.


        :param lifecycle_state: The lifecycle_state of this Update.
        :type: str
        )r   r   r   r   r5   N)r   r#   )r&   r   r6   r(   r(   r)   r   W  r7   c                 C   r+   )z
        **[Required]** Gets the time_released of this Update.
        The date and time the maintenance update was released.


        :return: The time_released of this Update.
        :rtype: datetime
        r$   r-   r(   r(   r)   r   f  r0   zUpdate.time_releasedc                 C   r.   )z
        Sets the time_released of this Update.
        The date and time the maintenance update was released.


        :param time_released: The time_released of this Update.
        :type: datetime
        Nr>   )r&   r   r(   r(   r)   r   r  r1   c                 C   r+   )z
        **[Required]** Gets the version of this Update.
        The version of the maintenance update package.


        :return: The version of this Update.
        :rtype: str
        r%   r-   r(   r(   r)   r   ~  r0   zUpdate.versionc                 C   r.   )z
        Sets the version of this Update.
        The version of the maintenance update package.


        :param version: The version of this Update.
        :type: str
        Nr?   )r&   r   r(   r(   r)   r     r1   c                 C   s   t | S N)r   r-   r(   r(   r)   __repr__  s   zUpdate.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r&   otherr(   r(   r)   __eq__  s   zUpdate.__eq__c                 C   s
   | |k S r@   r(   rC   r(   r(   r)   __ne__  s   
zUpdate.__ne__N)"__name__
__module____qualname____doc__ZLAST_ACTION_ROLLING_APPLYZLAST_ACTION_NON_ROLLING_APPLYZLAST_ACTION_PRECHECKZLAST_ACTION_ROLLBACKZAVAILABLE_ACTIONS_ROLLING_APPLYZ#AVAILABLE_ACTIONS_NON_ROLLING_APPLYZAVAILABLE_ACTIONS_PRECHECKZAVAILABLE_ACTIONS_ROLLBACKZUPDATE_TYPE_GI_UPGRADEZUPDATE_TYPE_GI_PATCHZUPDATE_TYPE_OS_UPDATEZLIFECYCLE_STATE_AVAILABLEZLIFECYCLE_STATE_SUCCESSZLIFECYCLE_STATE_IN_PROGRESSZLIFECYCLE_STATE_FAILEDr*   propertyr   setterr   r   r   r   r   r   r   r   rA   rE   rF   r(   r(   r(   r)   r      sr    T

















r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r(   r(   r(   r)   <module>   s   