U
    3d                     @   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rr|ddkrrt| d}| | |dd }|d k	r|| _d S )Nzx-amzn-requestidZ	RequestId   zContent-Typezapplication/jsonzutf-8zContent-Length)	http_responsestatus	getheaderr   loadsreaddecodeupdatesize)selfr   response_headersheader_nameZ	item_namebodyr    r   9/tmp/pip-unpacked-wheel-d7dsrkjd/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)Zboto.compatr   dictr   r   r   r   r   <module>   s   