o .&ßa¤ã@sGdd„deƒZdS)c@s<eZdZdZ     d dd„Zdd„Zdd „Zd d „ZdS) ÚFileInfoaæThis class contains important details related to performing a task. It can perform operations such as ``upload``, ``download``, ``copy``, ``delete``, ``move``. Similarly to ``TaskInfo`` objects attributes like ``session`` need to be set in order to perform operations. :param dest: the destination path :type dest: string :param compare_key: the name of the file relative to the specified directory/prefix. This variable is used when performing synching or if the destination file is adopting the source file's name. :type compare_key: string :param size: The size of the file in bytes. :type size: integer :param last_update: the local time of last modification. :type last_update: datetime object :param dest_type: if the destination is s3 or local. :param dest_type: string :param parameters: a dictionary of important values this is assigned in the ``BasicTask`` object. :param associated_response_data: The response data used by the ``FileGenerator`` to create this task. It is either an dictionary from the list of a ListObjects or the response from a HeadObject. It will only be filled if the task was generated from an S3 bucket. NFcCs`||_||_||_| |_||_||_||_||_||_i|_ | dur%| |_ | |_ | |_ | |_ dS)N) ÚsrcÚsrc_typeÚoperation_nameÚclientÚdestÚ dest_typeÚ compare_keyÚsizeÚ last_updateÚ parametersÚ source_clientÚ is_streamÚassociated_response_data)Úselfrrrr r rrrrr r r r©rúC/usr/lib/python3/dist-packages/awscli/customizations/s3/fileinfo.pyÚ__init__)s zFileInfo.__init__cCs6| |j¡r|jdvr dS|jdkr|jdkrdSdS)aDetermines if a file info object is glacier compatible Operations will fail if the S3 object has a storage class of GLACIER and it involves copying from S3 to S3, downloading from S3, or moving where S3 is the source (the delete will actually succeed, but we do not want fail to transfer the file and then successfully delete it). :returns: True if the FileInfo's operation will not fail because the operation is on a glacier object. False if it will fail. )ÚcopyÚdownloadFÚmoveÚs3T)Ú_is_glacier_objectrrr)rrrrÚis_glacier_compatible?s   zFileInfo.is_glacier_compatiblecCs,ddg}|r| d¡|vr| |¡sdSdS)NÚGLACIERÚ DEEP_ARCHIVEÚ StorageClassTF)ÚgetÚ _is_restored)rÚ response_dataÚglacier_storage_classesrrrrRsÿzFileInfo._is_glacier_objectcCsd| dd¡vS)Nzongoing-request="false"ÚRestoreÚ)r)rrrrrrZszFileInfo._is_restored) NNNNNNNNNNFN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrrrrrs ü rN)ÚobjectrrrrrÚs