o ckF[@s0ddlmZGdddeZGdddeZdS))Userc@s4eZdZdZd ddZddZd dd Zd d ZdS) ResultSeta& The ResultSet is used to pass results back from the Amazon services to the client. It is light wrapper around Python's :py:class:`list` class, with some additional methods for parsing XML results from AWS. Because I don't really want any dependencies on external libraries, I'm using the standard SAX parser that comes with Python. The good news is that it's quite fast and efficient but it makes some things rather difficult. You can pass in, as the marker_elem parameter, a list of tuples. Each tuple contains a string as the first element which represents the XML element that the resultset needs to be on the lookout for and a Python class as the second element of the tuple. Each time the specified element is found in the XML, a new instance of the class will be created and popped onto the stack. :ivar str next_token: A hash used to assist in paging through very long result sets. In most cases, passing this value to certain methods will give you another 'page' of results. NcCsht|t|tr||_ng|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_dS)NFT)list__init__ isinstancemarkersmarker key_marker next_markernext_key_markernext_upload_id_markernext_version_id_markernext_generation_markerversion_id_marker is_truncated next_tokenstatusself marker_elemr0/usr/lib/python3/dist-packages/boto/resultset.pyr.s   zResultSet.__init__cCsP|jD]}||dkr|d|}|||Sq|dkr&t|_|jSdS)NrOwner)rappendrowner)rnameattrs connectiontobjrrr startElement@s    zResultSet.startElementtruecC||krdSdSNTFrrvalue true_valuerrr to_booleanNzResultSet.to_booleancCs|dkr |||_dS|dkr||_dS|dkr||_dS|dkr'||_dS|dkr0||_dS|dkr9||_dS|dkrB||_dS|dkrK||_dS|d krT||_ dS|d kr]||_ dS|d krf||_ dS|d krqt ||_ dS|d kr|t ||_dS|dkr||_dS|dkr|||_dS|dkr||d|_dS|dkr||dS|dkr||_dS|dkr||_||_dS|dkrz |jt|7_WdSYdS|dkr||d|_dSt|||dS)N IsTruncatedMarker KeyMarker NextMarker NextKeyMarkerVersionIdMarkerNextVersionIdMarkerNextGenerationMarkerUploadIdMarkerNextUploadIdMarkerBucket MaxUploadsMaxItemsPrefixreturn StatusCodeSuccessItemName NextToken nextTokenBoxUsageIsValidTrue)r(rrr r r rr rupload_id_markerr bucketint max_uploads max_itemsprefixrrrr= box_usagefloatsetattrrrr&rrrr endElementTs^             zResultSet.endElementNr")__name__ __module__ __qualname____doc__rr!r(rKrrrrrs    rc@s@eZdZdddZddZddZdd Zdd d Zd dZdS) BooleanResultNcCsd|_d|_d|_dS)NT)r request_idrGrrrrrs zBooleanResult.__init__cCs|jrdSdS)Nr@Falserrrrr__repr__szBooleanResult.__repr__cCs|jSrLrUrVrrr __nonzero__szBooleanResult.__nonzero__cCsdSrLr)rrrrrrrr!szBooleanResult.startElementr"cCr#r$rr%rrrr(r)zBooleanResult.to_booleancCs|dkr |||_dS|dkr||d|_dS|dkr&||d|_dS|dkr/||_dS|dkr8||_dS|dkrA||_dSt|||dS) Nr8r9r:r?r@ RequestId requestIdr>)r(rrSrIrJrrrrKs   zBooleanResult.endElementrLrM) rNrOrPrrWrXr!r(rKrrrrrRs   rRN) boto.s3.userrrrobjectrRrrrrs p