o
    ¿­RhÒ  ã                   @   sn   d Z ddlZG dd„ deƒZG dd„ deeƒZG dd„ deeƒZG d	d
„ d
eeƒZ	G dd„ deƒZ
dd„ ZdS )zö
    Kubernetes

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: release-1.33
    Generated by: https://openapi-generator.tech
é    Nc                   @   s   e Zd ZdZdS )ÚOpenApiExceptionz2The base exception class for all OpenAPIExceptionsN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   ú^/home/air/sanwanet/backup_V2/venv/lib/python3.10/site-packages/kubernetes/client/exceptions.pyr      s    r   c                       s"   e Zd Z		d‡ fdd„	Z‡  ZS )ÚApiTypeErrorNc                    s>   || _ || _|| _|}|rd |t|ƒ¡}tt| ƒ |¡ dS )aÌ   Raises an exception for TypeErrors

        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (list): a list of keys an indices to get to the
                                 current_item
                                 None if unset
            valid_classes (tuple): the primitive classes that current item
                                   should be an instance of
                                   None if unset
            key_type (bool): False if our value is a value in a dict
                             True if it is a key in a dict
                             False if our item is an item in a list
                             None if unset
        ú
{0} at {1}N)Úpath_to_itemÚvalid_classesÚkey_typeÚformatÚrender_pathÚsuperr	   Ú__init__)ÚselfÚmsgr   r   r   Úfull_msg©Ú	__class__r   r   r      s   zApiTypeError.__init__©NNN©r   r   r   r   Ú__classcell__r   r   r   r   r	      s    ÿr	   c                       ó   e Zd Zd‡ fdd„	Z‡  ZS )ÚApiValueErrorNc                    ó2   || _ |}|rd |t|ƒ¡}tt| ƒ |¡ dS )zÎ
        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (list) the path to the exception in the
                received_data dict. None if unset
        r
   N)r   r   r   r   r   r   ©r   r   r   r   r   r   r   r   2   s
   
zApiValueError.__init__©Nr   r   r   r   r   r   1   ó    r   c                       r   )ÚApiKeyErrorNc                    r   )zÄ
        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (None/list) the path to the exception in the
                received_data dict
        r
   N)r   r   r   r   r    r   r   r   r   r   r   D   s
   	zApiKeyError.__init__r   r   r   r   r   r   r    C   r   r    c                   @   s   e Zd Zddd„Zdd„ ZdS )ÚApiExceptionNc                 C   sF   |r|j | _ |j| _|j| _| ¡ | _d S || _ || _d | _d | _d S r   )ÚstatusÚreasonÚdataÚbodyÚ
getheadersÚheaders)r   r"   r#   Ú	http_respr   r   r   r   V   s   
zApiException.__init__c                 C   s@   d  | j| j¡}| jr|d  | j¡7 }| jr|d  | j¡7 }|S )z#Custom error messages for exceptionz({0})
Reason: {1}
zHTTP response headers: {0}
zHTTP response body: {0}
)r   r"   r#   r'   r%   )r   Úerror_messager   r   r   Ú__str__b   s   ÿÿzApiException.__str__r   )r   r   r   r   r*   r   r   r   r   r!   T   s    
r!   c                 C   s<   d}| D ]}t |tjƒr|d |¡7 }q|d |¡7 }q|S )z)Returns a string representation of a pathÚ z[{0}]z['{0}'])Ú
isinstanceÚsixÚinteger_typesr   )r   ÚresultÚpthr   r   r   r   p   s   r   )r   r-   Ú	Exceptionr   Ú	TypeErrorr	   Ú
ValueErrorr   ÚKeyErrorr    r!   r   r   r   r   r   Ú<module>   s   
