
    \j=                     J    d dl Z d dlmZ  G d de j        j                  ZdS )    N)cached_propertyc                   h    e Zd ZdZed             Zd Zd Zd Zd Z	d Z
d Zd	 Zed
             ZdS )MapCompositezA view around a mutable sequence in protocol buffers.

    This implements the full Python MutableMapping interface, but all methods
    modify the underlying field container directly.
    c                 h    t           | j                                                    j                  S )z2Return the protocol buffer type for this sequence.)typepbGetEntryClassvalueselfs    b/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/proto/marshal/collections/maps.py_pb_typezMapComposite._pb_type   s,     +DG))++--3444    c                "    || _         || _        dS )zInitialize a wrapper around a protobuf map.

        Args:
            sequence: A protocol buffers map.
            marshal (~.MarshalRegistry): An instantiated marshal, used to
                convert values going to and from this map.
        N)_pb_marshal)r   sequencemarshals      r   __init__zMapComposite.__init__!   s     r   c                 H    |t          |                                           v S N)tuplekeysr   keys     r   __contains__zMapComposite.__contains__,   s     eDIIKK((((r   c                 ~    || vrt          |          | j                            | j        | j        |                   S r   )KeyErrorr   	to_pythonr   r   r   s     r   __getitem__zMapComposite.__getitem__4   s9     d??3--}&&t}dgclCCCr   c                     | j                             | j        |d          }| j        |                                          | j        |                             |           d S )NT)strict)r   to_protor   r   Clear	MergeFrom)r   r   r
   pb_values       r   __setitem__zMapComposite.__setitem__;   sZ    =))$-t)LL 	x(((((r   c                 :    | j                             |           d S r   )r   popr   s     r   __delitem__zMapComposite.__delitem__F   s    Cr   c                 *    t          | j                  S r   )lenr   r   s    r   __len__zMapComposite.__len__I   s    47||r   c                 *    t          | j                  S r   )iterr   r   s    r   __iter__zMapComposite.__iter__L   s    DG}}r   c                     | j         S r   )r   r   s    r   r   zMapComposite.pbO   s	    xr   N)__name__
__module____qualname____doc__r   r   r   r   r    r'   r*   r-   r0   propertyr    r   r   r   r      s          5 5 _5
	  	  	 ) ) )D D D	) 	) 	)         X  r   r   )collectionsproto.utilsr   abcMutableMappingr   r7   r   r   <module>r<      s^        ' ' ' ' ' '= = = = =;?1 = = = = =r   