Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/boto/__pycache__/ |
Upload File : |
o ckF[� � @ s0 d dl mZ G dd� de�ZG dd� de�ZdS )� )�Userc @ s4 e Zd ZdZddd�Zdd� Zd 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. Nc C sh t �| � t|t �r|| _ng | _d | _d | _d | _d | _d | _d | _ d | _ d | _d| _d | _ d| _d S )NFT)�list�__init__� isinstance�markers�marker� key_marker�next_marker�next_key_marker�next_upload_id_marker�next_version_id_marker�next_generation_marker�version_id_marker�is_truncated� next_token�status��self�marker_elem� r �0/usr/lib/python3/dist-packages/boto/resultset.pyr . s zResultSet.__init__c C sP | j D ]}||d kr|d |�}| �|� | S q|dkr&t� | _| jS d S )Nr � �Owner)r �appendr �owner)r �name�attrs� connection�t�objr r r �startElement@ s �zResultSet.startElement�truec C � ||krdS dS �NTFr �r �value� true_valuer r r � to_booleanN � zResultSet.to_booleanc C s� |dkr| � |�| _d S |dkr|| _d S |dkr|| _d S |dkr'|| _d S |dkr0|| _d S |dkr9|| _d S |dkrB|| _d S |dkrK|| _d S |d krT|| _ d S |d kr]|| _ d S |dkrf|| _d S |dkrqt|�| _ d S |d kr|t|�| _d S |dkr�|| _d S |dkr�| � |�| _d S |dkr�| � |d�| _d S |dkr�| �|� d S |dkr�|| _d S |dkr�|| _|| _d S |dkr�z| jt|�7 _W d S Y d S |dkr�| � |d�| _d S t| ||� d S )N�IsTruncated�Marker� KeyMarker� NextMarker� NextKeyMarker�VersionIdMarker�NextVersionIdMarker�NextGenerationMarker�UploadIdMarker�NextUploadIdMarker�Bucket� MaxUploads�MaxItems�Prefix�return� StatusCode�Success�ItemName� NextToken� nextToken�BoxUsage�IsValid�True)r( r r r r r r r r �upload_id_markerr �bucket�int�max_uploads� max_items�prefixr r r r= � box_usage�float�setattr�r r r&