
    xnhi                     b    d dl Z d dlmZ d dlmZ  G d de j
                  j                        Zy)    N)cached_property)Messagec                   Z    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y)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                 f    t         | j                  j                                j                        S )z2Return the protocol buffer type for this sequence.)typepbGetEntryClassvalueselfs    _/var/www/html/profi_bot/bot/venv/lib/python3.12/site-packages/proto/marshal/collections/maps.py_pb_typezMapComposite._pb_type   s(     +DGG))+-3344    c                     || _         || _        y)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                 8    |t        | j                               v S N)tuplekeysr   keys     r   __contains__zMapComposite.__contains__-   s     eDIIK(((r   c                     || vrt        |      | j                  j                  | j                  | j                  |         S r   )KeyErrorr   	to_pythonr   r	   r   s     r   __getitem__zMapComposite.__getitem__5   s8     d?3-}}&&t}}dggclCCr   c                     | j                   j                  | j                  |d      }| j                  |   j	                          | j                  |   j                  |       y )NT)strict)r   to_protor   r	   Clear	MergeFrom)r   r   r   pb_values       r   __setitem__zMapComposite.__setitem__<   sM    ==))$--t)L 	x(r   c                 :    | j                   j                  |       y r   )r	   popr   s     r   __delitem__zMapComposite.__delitem__G   s    Cr   c                 ,    t        | j                        S r   )lenr	   r   s    r   __len__zMapComposite.__len__J   s    477|r   c                 ,    t        | j                        S r   )iterr	   r   s    r   __iter__zMapComposite.__iter__M   s    DGG}r   c                     | j                   S r   )r   r   s    r   r	   zMapComposite.pbP   s    xxr   N)__name__
__module____qualname____doc__r   r   r   r   r!   r(   r+   r.   r1   propertyr	    r   r   r   r      sS     5 5
	 )D	)  r   r   )collectionsproto.utilsr   google.protobuf.messager   abcMutableMappingr   r8   r   r   <module>r>      s&     ' +=;??11 =r   