File: //lib/python3/dist-packages/boto/s3/__pycache__/key.cpython-312.pyc
�
ckF[zE � �
� d dl Zd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dlm
Z
d dlZd dl
mZmZmZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d
lmZ d dlmZmZ d dlmZ d d
lm Z G d� de!� Z"y)� N)�md5)�BytesIO�six�urllib�encodebytes��BotoClientError)�StorageDataError)�PleaseRetryException)�Provider)�KeyFile)�User)� UserAgent)�compute_md5�compute_hash)�find_matching_headers)�merge_headers_by_namec �p � e Zd ZdZdZdZej j ddd� Z e
g d�� Z e
� ZeD ]# Z
ej e
j dd � � �% e e
g d
�� z ZdKd�Zd
� Zd� Zed� � Zd� Zd� Z eee� Zd� Zd� Z eee� Zd� Zd� Z eee� Zd� Zd� Z eee � Z!d� Z"d� Z#d� Z$dLd�Z%d� Z&d� Z' dMd�Z(dKd �Z) dNd!�Z*dZ+dLd"�Z,d#� Z-e-Z.dOd$�Z/ dPd%�Z0 dQd&�Z1d'� Z2d(� Z3dRd)�Z4dRd*�Z5d+� Z6d,� Z7d-� Z8dRd.�Z9dRd/�Z:dRd0�Z;dRd1�Z<dRd2�Z=d3� Z>dRd4�Z?dRd5�Z@ dSd6�ZA dTd7�ZB dUd8�ZCdLd9�ZDdRd:�ZE dVd;�ZF dWd<�ZG dXd=�ZH dXd>�ZI dYd?�ZJ dZd@�ZKd[dA�ZL dYdB�ZM dYdC�ZN dYdD�ZOdRdE�ZP dKdF�ZQdG� ZRdRdH�ZS dRdI�ZTdRdJ�ZUy)\�KeyaC
Represents a key (object) in an S3 bucket.
:ivar bucket: The parent :class:`boto.s3.bucket.Bucket`.
:ivar name: The name of this Key object.
:ivar metadata: A dictionary containing user metadata that you
wish to store with the object or that has been retrieved from
an existing object.
:ivar cache_control: The value of the `Cache-Control` HTTP header.
:ivar content_type: The value of the `Content-Type` HTTP header.
:ivar content_encoding: The value of the `Content-Encoding` HTTP header.
:ivar content_disposition: The value of the `Content-Disposition` HTTP
header.
:ivar content_language: The value of the `Content-Language` HTTP header.
:ivar etag: The `etag` associated with this object.
:ivar last_modified: The string timestamp representing the last
time this object was modified in S3.
:ivar owner: The ID of the owner of this object.
:ivar storage_class: The storage class of the object. Currently, one of:
STANDARD | REDUCED_REDUNDANCY | GLACIER
:ivar md5: The MD5 hash of the contents of the object.
:ivar size: The size, in bytes, of the object.
:ivar version_id: The version ID of this object, if it is a versioned
object.
:ivar encrypted: Whether the object is encrypted while at rest on
the server.
zapplication/octet-streamz�<?xml version="1.0" encoding="UTF-8"?>
<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-03-01">
<Days>%s</Days>
</RestoreRequest>�Boto�key_buffer_sizei )z
cache-controlzcontent-dispositionzcontent-encodingzcontent-language�content-md5�content-typezx-robots-tag�expires�-�_)z
last-modified�content-length�date�etagNc �v � || _ || _ i | _ d | _ | j | _ d | _ d | _ d | _ d | _ d | _
d| _ d | _ d | _
d | _ d | _ d | _ d | _ d | _ d | _ d | _ d| _ d | _ d | _ d | _ i | _ y )NF)�bucket�name�metadata�
cache_control�DefaultContentType�content_type�content_encoding�content_disposition�content_language�filenamer � is_latest�
last_modified�owner�_storage_class�path�resp�mode�size�
version_id�source_version_id�
delete_marker� encrypted�ongoing_restore�expiry_date�local_hashes)�selfr! r"