o
    È·eÆ  ã                   @   s    d dl mZ G dd„ deƒZdS )é    )Újsonc                   @   s"   e Zd ZdZdd„ Zddd„ZdS )ÚGlacierResponsezª
    Represents a response from Glacier layer1. It acts as a dictionary
    containing the combined keys received via JSON in the body (if
    supplied) and headers.
    c                 C   s”   || _ |j| _| d¡| d< |r|D ]\}}| |¡| |< q|jdkr9| d¡dkr9t | ¡  d¡¡}|  |¡ | dd ¡}|d urH|| _d S d S )Nzx-amzn-requestidÚ	RequestIdéÌ   zContent-Typezapplication/jsonzutf-8zContent-Length)	Úhttp_responseÚstatusÚ	getheaderr   ÚloadsÚreadÚdecodeÚupdateÚsize)Úselfr   Úresponse_headersÚheader_nameÚ	item_nameÚbodyr   © r   úL/var/www/ideatree/venv/lib/python3.10/site-packages/boto/glacier/response.pyÚ__init__    s   


ÿzGlacierResponse.__init__Nc                 C   s   | j  |¡S )zAReads and returns the response body, or up to the next amt bytes.)r   r
   )r   Úamtr   r   r   r
   /   s   zGlacierResponse.read)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r
   r   r   r   r   r      s    r   N)Úboto.compatr   Údictr   r   r   r   r   Ú<module>   s   