o
    ɶd2F                     @   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ed.d/ Zejd0d/ Zed1d2 Zejd3d2 Zed4d5 Zejd6d5 Zd7d8 Zd9d: Zd;d< Zd=S )>Sessionz
    A bastion session resource. A bastion session lets authorized users connect to a target resource using a Secure Shell (SSH) for a predetermined amount of time.
    PUBCREATING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| _d| _	d| _
d| _d| _d| _d| _d| _d| _dS )aF  
        Initializes a new Session 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 Session.
        :type id: str

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

        :param bastion_id:
            The value to assign to the bastion_id property of this Session.
        :type bastion_id: str

        :param bastion_name:
            The value to assign to the bastion_name property of this Session.
        :type bastion_name: str

        :param bastion_user_name:
            The value to assign to the bastion_user_name property of this Session.
        :type bastion_user_name: str

        :param target_resource_details:
            The value to assign to the target_resource_details property of this Session.
        :type target_resource_details: oci.bastion.models.TargetResourceDetails

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

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

        :param key_details:
            The value to assign to the key_details property of this Session.
        :type key_details: oci.bastion.models.PublicKeyDetails

        :param bastion_public_host_key_info:
            The value to assign to the bastion_public_host_key_info property of this Session.
        :type bastion_public_host_key_info: str

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

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

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this Session.
            Allowed values for this property are: "CREATING", "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 Session.
        :type lifecycle_details: str

        :param session_ttl_in_seconds:
            The value to assign to the session_ttl_in_seconds property of this Session.
        :type session_ttl_in_seconds: int

        strZTargetResourceDetailszdict(str, str)ZPublicKeyDetailsdatetimeint)iddisplay_name
bastion_idbastion_namebastion_user_nametarget_resource_detailsssh_metadatakey_typekey_detailsbastion_public_host_key_infotime_createdtime_updatedlifecycle_statelifecycle_detailssession_ttl_in_secondsr   ZdisplayNameZ	bastionIdZbastionNameZbastionUserNameZtargetResourceDetailsZsshMetadataZkeyTypeZ
keyDetailsZbastionPublicHostKeyInfoZtimeCreatedZtimeUpdatedZlifecycleStateZlifecycleDetailsZsessionTtlInSecondsN)Zswagger_typesZattribute_map_id_display_name_bastion_id_bastion_name_bastion_user_name_target_resource_details_ssh_metadata	_key_type_key_details_bastion_public_host_key_info_time_created_time_updated_lifecycle_state_lifecycle_details_session_ttl_in_seconds)selfkwargs r0   >usr/lib/python3.10/site-packages/oci/bastion/models/session.py__init__*   s^   G
zSession.__init__c                 C      | j S )z
        **[Required]** Gets the id of this Session.
        The unique identifier (OCID) of the session, which can't be changed after creation.


        :return: The id of this Session.
        :rtype: str
        r   r.   r0   r0   r1   r         
z
Session.idc                 C   
   || _ dS )z
        Sets the id of this Session.
        The unique identifier (OCID) of the session, which can't be changed after creation.


        :param id: The id of this Session.
        :type: str
        Nr4   )r.   r   r0   r0   r1   r         

c                 C   r3   )z
        Gets the display_name of this Session.
        The name of the session.


        :return: The display_name of this Session.
        :rtype: str
        r    r5   r0   r0   r1   r      r6   zSession.display_namec                 C   r7   )z
        Sets the display_name of this Session.
        The name of the session.


        :param display_name: The display_name of this Session.
        :type: str
        Nr9   )r.   r   r0   r0   r1   r      r8   c                 C   r3   )z
        **[Required]** Gets the bastion_id of this Session.
        The unique identifier (OCID) of the bastion that is hosting this session.


        :return: The bastion_id of this Session.
        :rtype: str
        r!   r5   r0   r0   r1   r      r6   zSession.bastion_idc                 C   r7   )z
        Sets the bastion_id of this Session.
        The unique identifier (OCID) of the bastion that is hosting this session.


        :param bastion_id: The bastion_id of this Session.
        :type: str
        Nr:   )r.   r   r0   r0   r1   r      r8   c                 C   r3   )z
        **[Required]** Gets the bastion_name of this Session.
        The name of the bastion that is hosting this session.


        :return: The bastion_name of this Session.
        :rtype: str
        r"   r5   r0   r0   r1   r      r6   zSession.bastion_namec                 C   r7   )z
        Sets the bastion_name of this Session.
        The name of the bastion that is hosting this session.


        :param bastion_name: The bastion_name of this Session.
        :type: str
        Nr;   )r.   r   r0   r0   r1   r      r8   c                 C   r3   )z
        Gets the bastion_user_name of this Session.
        The username that the session uses to connect to the target resource.


        :return: The bastion_user_name of this Session.
        :rtype: str
        r#   r5   r0   r0   r1   r     r6   zSession.bastion_user_namec                 C   r7   )z
        Sets the bastion_user_name of this Session.
        The username that the session uses to connect to the target resource.


        :param bastion_user_name: The bastion_user_name of this Session.
        :type: str
        Nr<   )r.   r   r0   r0   r1   r     r8   c                 C   r3   )z
        **[Required]** Gets the target_resource_details of this Session.

        :return: The target_resource_details of this Session.
        :rtype: oci.bastion.models.TargetResourceDetails
        r$   r5   r0   r0   r1   r        zSession.target_resource_detailsc                 C   r7   )z
        Sets the target_resource_details of this Session.

        :param target_resource_details: The target_resource_details of this Session.
        :type: oci.bastion.models.TargetResourceDetails
        Nr=   )r.   r   r0   r0   r1   r   &     
c                 C   r3   )z
        Gets the ssh_metadata of this Session.
        The connection message for the session.


        :return: The ssh_metadata of this Session.
        :rtype: dict(str, str)
        r%   r5   r0   r0   r1   r   0  r6   zSession.ssh_metadatac                 C   r7   )z
        Sets the ssh_metadata of this Session.
        The connection message for the session.


        :param ssh_metadata: The ssh_metadata of this Session.
        :type: dict(str, str)
        Nr@   )r.   r   r0   r0   r1   r   <  r8   c                 C   r3   )a  
        Gets the key_type of this Session.
        The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.

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


        :return: The key_type of this Session.
        :rtype: str
        )r&   r5   r0   r0   r1   r   H     zSession.key_typec                 C   s   dg}t ||s
d}|| _dS )z
        Sets the key_type of this Session.
        The type of the key used to connect to the session. PUB is a standard public key in OpenSSH format.


        :param key_type: The key_type of this Session.
        :type: str
        r   UNKNOWN_ENUM_VALUEN)r   r&   )r.   r   allowed_valuesr0   r0   r1   r   W  s   


c                 C   r3   )z
        **[Required]** Gets the key_details of this Session.

        :return: The key_details of this Session.
        :rtype: oci.bastion.models.PublicKeyDetails
        r'   r5   r0   r0   r1   r   f  r>   zSession.key_detailsc                 C   r7   )z
        Sets the key_details of this Session.

        :param key_details: The key_details of this Session.
        :type: oci.bastion.models.PublicKeyDetails
        NrD   )r.   r   r0   r0   r1   r   p  r?   c                 C   r3   )a  
        Gets the bastion_public_host_key_info of this Session.
        The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.


        :return: The bastion_public_host_key_info of this Session.
        :rtype: str
        r(   r5   r0   r0   r1   r   z  r6   z$Session.bastion_public_host_key_infoc                 C   r7   )a2  
        Sets the bastion_public_host_key_info of this Session.
        The public key of the bastion host. You can use this to verify that you're connecting to the correct bastion.


        :param bastion_public_host_key_info: The bastion_public_host_key_info of this Session.
        :type: str
        NrE   )r.   r   r0   r0   r1   r     r8   c                 C   r3   )a=  
        **[Required]** Gets the time_created of this Session.
        The time the session was created. Format is defined by `RFC3339`__.
        Example: `2020-01-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :return: The time_created of this Session.
        :rtype: datetime
        r)   r5   r0   r0   r1   r     rA   zSession.time_createdc                 C   r7   )a9  
        Sets the time_created of this Session.
        The time the session was created. Format is defined by `RFC3339`__.
        Example: `2020-01-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :param time_created: The time_created of this Session.
        :type: datetime
        NrF   )r.   r   r0   r0   r1   r        
c                 C   r3   )a.  
        Gets the time_updated of this Session.
        The time the session was updated. Format is defined by `RFC3339`__.
        Example: `2020-01-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :return: The time_updated of this Session.
        :rtype: datetime
        r*   r5   r0   r0   r1   r     rA   zSession.time_updatedc                 C   r7   )a9  
        Sets the time_updated of this Session.
        The time the session was updated. Format is defined by `RFC3339`__.
        Example: `2020-01-25T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :param time_updated: The time_updated of this Session.
        :type: datetime
        NrH   )r.   r   r0   r0   r1   r     rG   c                 C   r3   )a  
        **[Required]** Gets the lifecycle_state of this Session.
        The current state of the session.

        Allowed values for this property are: "CREATING", "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 Session.
        :rtype: str
        )r+   r5   r0   r0   r1   r     rA   zSession.lifecycle_statec                 C   s    g d}t ||sd}|| _dS )z
        Sets the lifecycle_state of this Session.
        The current state of the session.


        :param lifecycle_state: The lifecycle_state of this Session.
        :type: str
        )r   r	   r
   r   r   rB   N)r   r+   )r.   r   rC   r0   r0   r1   r     s   


c                 C   r3   )z
        Gets the lifecycle_details of this Session.
        A message describing the current session state in more detail.


        :return: The lifecycle_details of this Session.
        :rtype: str
        r,   r5   r0   r0   r1   r     r6   zSession.lifecycle_detailsc                 C   r7   )z
        Sets the lifecycle_details of this Session.
        A message describing the current session state in more detail.


        :param lifecycle_details: The lifecycle_details of this Session.
        :type: str
        NrI   )r.   r   r0   r0   r1   r     r8   c                 C   r3   )z
        **[Required]** Gets the session_ttl_in_seconds of this Session.
        The amount of time the session can remain active.


        :return: The session_ttl_in_seconds of this Session.
        :rtype: int
        r-   r5   r0   r0   r1   r     r6   zSession.session_ttl_in_secondsc                 C   r7   )z
        Sets the session_ttl_in_seconds of this Session.
        The amount of time the session can remain active.


        :param session_ttl_in_seconds: The session_ttl_in_seconds of this Session.
        :type: int
        NrJ   )r.   r   r0   r0   r1   r     r8   c                 C   s   t | S N)r   r5   r0   r0   r1   __repr__  s   zSession.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r.   otherr0   r0   r1   __eq__  s   zSession.__eq__c                 C   s
   | |k S rK   r0   rN   r0   r0   r1   __ne__%  s   
zSession.__ne__N)__name__
__module____qualname____doc__ZKEY_TYPE_PUBZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_FAILEDr2   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   r   r   r   rL   rP   rQ   r0   r0   r0   r1   r      s    z










	
	




	
	











r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r0   r0   r0   r1   <module>   s   