
    <jd                        d Z ddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZ  ed      Z ed      Z ed      ZddlmZ ddlmZ d	ed
eddfdZ G d dee         Zej<                  j                  j?                  e        G d dee   ee         Z  G d dee   ee         Z! G d deeef         Z" G d deeef         Z# G d d      Z$ G d d      Z% G d d      Z&y)a  Contains container classes to represent different protocol buffer types.

This file defines container classes which represent categories of protocol
buffer field types which need extra maintenance. Currently these categories
are:

-   Repeated scalar fields - These are all repeated fields which aren't
    composite (e.g. they are of simple types like int32, string, etc).
-   Repeated composite fields - Repeated fields which are composite. This
    includes groups and nested messages.
    N)AnyIterableIteratorListMutableMappingMutableSequenceNoReturnOptionalSequenceTypeVarUnionoverload_T_K_V)FieldDescriptor)message	is_frozenmsgreturnc                 B    | rt        j                  dt        d       y y )NzwMutating messages or containers returned by GetOptions() is deprecated and will raise an exception in a future release.   )category
stacklevel)warningswarnFutureWarning)r   r   s     Z/opt/lfcs-signon/.venv/lib/python3.12/site-packages/google/protobuf/internal/containers.py_CheckFrozenr   .   s"    MM	G	     c                       e Zd ZdZg dZdeddfdZedede	fd       Z
ededee	   fd	       Z
d
 Z
defdZdedefdZdZdefdZddZddZddZddZy)BaseContainerzBase container class._message_listener_values_frozenmessage_listenerr   Nc                 .    || _         g | _        d| _        y)zArgs:

    message_listener: A MessageListener implementation.
      The RepeatedScalarFieldContainer will call this object's
      Modified() method when it is modified.
    FNr#   )selfr'   s     r   __init__zBaseContainer.__init__>   s     .DDLDLr    keyc                      y N r)   r+   s     r   __getitem__zBaseContainer.__getitem__I       r    c                      y r-   r.   r/   s     r   r0   zBaseContainer.__getitem__M   r1   r    c                      | j                   |   S )z$Retrieves item by the specified key.r%   r/   s     r   r0   zBaseContainer.__getitem__Q   s    <<r    c                 ,    t        | j                        S )z0Returns the number of elements in the container.lenr%   r)   s    r   __len__zBaseContainer.__len__U   s    t||r    otherc                     | |k(   S )z3Checks if another instance isn't equal to this one.r.   r)   r:   s     r   __ne__zBaseContainer.__ne__Y   s     u}r    c                 ,    t        | j                        S r-   reprr%   r8   s    r   __repr__zBaseContainer.__repr__`       r    c                     d| _         y NTr&   r8   s    r   
_SetFrozenzBaseContainer._SetFrozenc   	    DLr    c                 2    t        | j                  d       | S )NzContainer is immutabler   r&   r8   s    r   _AssureWritablezBaseContainer._AssureWritablef   s    78Kr    c                     | j                          d|v r|j                  d      |d<    | j                  j                  |i | y )Nsort_functioncmp)rJ   popr%   sort)r)   argskwargss      r   rO   zBaseContainer.sortj   sC     & jj1fUmDLLt&v&r    c                 X    | j                          | j                  j                          y r-   )rJ   r%   reverser8   s    r   rS   zBaseContainer.reverses   s    LLr    r   N)r   zBaseContainer[_T])__name__
__module____qualname____doc__	__slots__r   r*   r   intr   r0   slicer   r9   boolr=   __hash__strrA   rF   rJ   rO   rS   r.   r    r   r"   r"   8   s     :)	s 	t 	 S R   U tBx  s # $ 
 ( 'r    r"   c            	       Z    e Zd ZdZddgZ	 ddedededdf fd	Zd
eddfdZde	d
eddfdZ
dee   ddfdZdedee   f   ddfdZdefdZd dee	   defdZede	d
eddfd       Zeded
ee   ddfd       Zd!dZdee	ef   ddfdZdedefdZ	 ddeddfdZdefdZd"dZ xZS )#RepeatedScalarFieldContainerzGSimple, type-checked, list-like container for holding repeated scalars._type_checker_fieldNr'   type_checkerfieldr   c                 @    t         |   |       || _        || _        y)a  Args:

    message_listener: A MessageListener implementation. The
    RepeatedScalarFieldContainer will call this object's Modified() method
    when it is modified.
    type_checker: A type_checkers.ValueChecker instance to run on elements
    inserted into this container.
    N)superr*   ra   rb   )r)   r'   rc   rd   	__class__s       r   r*   z%RepeatedScalarFieldContainer.__init__   s"     
G%&%DDKr    valuec                     | j                          | j                  j                  | j                  j	                  |             | j
                  j                  s| j
                  j                          yy)z6Appends an item to the list. Similar to list.append().N)rJ   r%   appendra   
CheckValuer$   dirtyModifiedr)   rh   s     r   rj   z#RepeatedScalarFieldContainer.append   sW    LL**55e<=!!''
%%' (r    r+   c                     | j                          | j                  j                  || j                  j	                  |             | j
                  j                  s| j
                  j                          yy)zEInserts the item at the specified position. Similar to list.insert().N)rJ   r%   insertra   rk   r$   rl   rm   r)   r+   rh   s      r   rp   z#RepeatedScalarFieldContainer.insert   sY    LLT//::5AB!!''
%%' (r    elem_seqc                    | j                          t        |      }|D cg c]  }| j                  j                  |       }}|r| j                  j                  |       | j                  j                          yc c}w )zBExtends by appending the given iterable. Similar to list.extend().N)rJ   iterra   rk   r%   extendr$   rm   )r)   rr   elem_seq_iterelem
new_valuess        r   ru   z#RepeatedScalarFieldContainer.extend   sh    NMBOP$$$$//5PJP
ll*%##% Qs   "A<r:   z RepeatedScalarFieldContainer[_T]c                     | j                          | j                  j                  |       | j                  j	                          y)zAppends the contents of another repeated field of the same type to this

    one. We do not check the types of the individual fields.
    N)rJ   r%   ru   r$   rm   r<   s     r   	MergeFromz&RepeatedScalarFieldContainer.MergeFrom   s4     	LL##%r    rw   c                     | j                          | j                  j                  |       | j                  j	                          yz8Removes an item from the list. Similar to list.remove().NrJ   r%   remover$   rm   r)   rw   s     r   r~   z#RepeatedScalarFieldContainer.remove   2    LL##%r    c                 f    | j                          | j                  |   }| j                  |       |S zDRemoves and returns an item at a given index. Similar to list.pop().rJ   r%   __delitem__rq   s      r   rN   z RepeatedScalarFieldContainer.pop   /    LLESLr    c                      y r-   r.   rq   s      r   __setitem__z(RepeatedScalarFieldContainer.__setitem__   r1   r    c                      y r-   r.   rq   s      r   r   z(RepeatedScalarFieldContainer.__setitem__   r1   r    c                    | j                          t        |t              r_|j                  t	        d      t        | j                  j                  |      | j                  |<   | j                  j                          y| j                  j                  |      | j                  |<   | j                  j                          y)z(Sets the item on the specified position.NzExtended slices not supported)rJ   
isinstancer[   step
ValueErrormapra   rk   r%   r$   rm   rq   s      r   r   z(RepeatedScalarFieldContainer.__setitem__   s    #u		899d00;;UCdll3
%%',,77>dll3
%%'r    c                 r    | j                          | j                  |= | j                  j                          yz+Deletes the item at the specified position.NrJ   r%   r$   rm   r/   s     r   r   z(RepeatedScalarFieldContainer.__delitem__   ,    S##%r    c                     | |u ryt        || j                        r|j                  | j                  k(  S || j                  k(  S )/Compares the current instance with another one.T)r   rg   r%   r<   s     r   __eq__z#RepeatedScalarFieldContainer.__eq__   s<    u}%(]]dll**DLL  r    unused_memoc                     t        t        j                  | j                        | j                  | j
                        }|j                  |        |S r-   )r`   copydeepcopyr$   ra   rb   rz   )r)   r   clones      r   __deepcopy__z)RepeatedScalarFieldContainer.__deepcopy__   sA     )d,,-t/A/A4;;E 
OODLr    c                 ,    t        j                  d      )Nz:Can't pickle repeated scalar fields, convert to list first)picklePickleError)r)   rQ   s     r   
__reduce__z'RepeatedScalarFieldContainer.__reduce__   s    


D r    c                 D   dd l }||| j                  j                  }|t        j                  k(  r|j
                  }nE|t        j                  k(  r|j                  }n$|t        j                  k(  r|j                  }n|t        j                  k(  r|j                  }n|t        j                  k(  r|j                  }n|t        j                  k(  r|j                  }n|t        j                   k(  r|j"                  }n|t        j$                  k(  r|j
                  }nc| j                  j&                  t        j(                  k(  rd}n9| j                  j&                  t        j*                  k(  rt,        }nt/        d      |j1                  | j2                  |d      S )Nr   SzSCode should never reach here: message type detected in RepeatedScalarFieldContainerT)dtyper   )numpyrb   cpp_typer   CPPTYPE_INT32int32CPPTYPE_INT64int64CPPTYPE_UINT32uint32CPPTYPE_UINT64uint64CPPTYPE_DOUBLEfloat64CPPTYPE_FLOATfloat32CPPTYPE_BOOLr\   CPPTYPE_ENUMtype
TYPE_BYTESTYPE_STRINGr^   SystemErrorarrayr%   )r)   r   r   npr   s        r   	__array__z&RepeatedScalarFieldContainer.__array__   s8   }%%h	_22	2444555		555		555

444

333333;;999;;:::,
 	
 88DLLD899r    r-   rT   )NN)rU   rV   rW   rX   rY   r   r*   r   rj   rZ   rp   r   ru   r   rz   r~   r
   rN   r   r   r[   r   r\   r   r   r	   r   r   __classcell__rg   s   @r   r`   r`   }   s   O )) 	  	
 $(" ( (( (B (4 (&Xb\ &d &
&5x|CD
& 
&& &Xc] B  S     U 8B< D  
(&U3:. &4 &!# !$ !  *H 
:r    r`   c                   F    e Zd ZdZdgZdededdf fdZd fdZd	edefd
Z	deddfdZ
dededdfdZdee   ddfdZdedee   f   ddfdZdeddfdZddee   defdZedededdfd       Zededee   ddfd       Zd Zdeeef   ddfdZdedefdZ xZS )RepeatedCompositeFieldContainerzBSimple, list-like container for holding repeated composite fields._message_descriptorr'   message_descriptorr   Nc                 2    t         |   |       || _        y)a  Note that we pass in a descriptor instead of the generated directly,

    since at the time we construct a _RepeatedCompositeFieldContainer we
    haven't yet necessarily initialized the type that will be contained in the
    container.

    Args:
      message_listener: A MessageListener implementation. The
        RepeatedCompositeFieldContainer will call this object's Modified()
        method when it is modified.
      message_descriptor: A Descriptor instance describing the protocol type
        that should be present in this container.  We'll use the _concrete_class
        field of this descriptor when the client calls add().
    N)rf   r*   r   )r)   r'   r   rg   s      r   r*   z(RepeatedCompositeFieldContainer.__init__   s     
G%&1Dr    c                 d    t         |           | j                  D ]  }|j                           y r-   )rf   rF   r%   )r)   valrg   s     r   rF   z*RepeatedCompositeFieldContainer._SetFrozen2  s+    	G|| 	nnr    rQ   c                 *   | j                           | j                  j                  di |}|j                  | j                         | j
                  j                  |       | j                  j                  s| j                  j                          |S )z|Adds a new element at the end of the list and returns it.

    Keyword arguments may be used to initialize the element.
    r.   )	rJ   r   _concrete_class_SetListenerr$   r%   rj   rl   rm   )r)   rQ   new_elements      r   addz#RepeatedCompositeFieldContainer.add7  sx    
 	:$**::DVDKT334LL$!!''
%%'r    rh   c                 H   | j                          | j                  j                         }|j                  | j                         |j                  |       | j                  j                  |       | j                  j                  s| j                  j                          yy)z+Appends one element by copying the message.N)
rJ   r   r   r   r$   CopyFromr%   rj   rl   rm   )r)   rh   r   s      r   rj   z&RepeatedCompositeFieldContainer.appendD  s|    **::<KT334LL$!!''
%%' (r    r+   c                 J   | j                          | j                  j                         }|j                  | j                         |j                  |       | j                  j                  ||       | j                  j                  s| j                  j                          yy)z6Inserts the item at the specified position by copying.N)
rJ   r   r   r   r$   r   r%   rp   rl   rm   )r)   r+   rh   r   s       r   rp   z&RepeatedCompositeFieldContainer.insertN  s~    **::<KT334LL[)!!''
%%' (r    rr   c                 "   | j                          | j                  j                  }| j                  }| j                  }|D ]<  } |       }|j                  |       |j                  |       |j                  |       > |j                          y)z|Extends by appending the given sequence of elements of the same type

    as this one, copying each individual message.
    N)	rJ   r   r   r$   r%   r   rz   rj   rm   )r)   rr   message_classlistenervaluesr   r   s          r   ru   z&RepeatedCompositeFieldContainer.extendX  s    
 	,,<<M%%H\\F !!Okx(G$mmK 	!
 r    r:   z#RepeatedCompositeFieldContainer[_T]c                 F    | j                          | j                  |       y)zwAppends the contents of another repeated field of the same type to this

    one, copying each individual message.
    N)rJ   ru   r<   s     r   rz   z)RepeatedCompositeFieldContainer.MergeFromh  s     	KKr    rw   c                     | j                          | j                  j                  |       | j                  j	                          yr|   r}   r   s     r   r~   z&RepeatedCompositeFieldContainer.removes  r   r    c                 f    | j                          | j                  |   }| j                  |       |S r   r   rq   s      r   rN   z#RepeatedCompositeFieldContainer.popy  r   r    c                      y r-   r.   rq   s      r   r   z+RepeatedCompositeFieldContainer.__setitem__  r1   r    c                      y r-   r.   rq   s      r   r   z+RepeatedCompositeFieldContainer.__setitem__  r1   r    c                 F    t        | j                  j                   d      )Nz( object does not support item assignment)	TypeErrorrg   rU   rq   s      r   r   z+RepeatedCompositeFieldContainer.__setitem__  s'     >>""
##KL r    c                 r    | j                          | j                  |= | j                  j                          yr   r   r/   s     r   r   z+RepeatedCompositeFieldContainer.__delitem__  r   r    c                     | |u ryt        || j                        st        d      | j                  |j                  k(  S )r   TzSCan only compare repeated composite fields against other repeated composite fields.)r   rg   r   r%   r<   s     r   r   z&RepeatedCompositeFieldContainer.__eq__  sA    u}eT^^,-  <<5==((r    rT   r   )rU   rV   rW   rX   rY   r   r*   rF   r   r   rj   rZ   rp   r   ru   r   rz   r~   r
   rN   r   r   r[   r   r\   r   r   r   s   @r   r   r     s`   J %%)2s 2 2 2$
# " (" ( (( (B (4 (Xb\ d  	8(2,FG	 	& & &Xc] B  S     U 8B< D  &U3:. &4 &	)# 	)$ 	)r    r   c            
       B   e Zd ZdZg dZdededededdf
d	Zdd
Zd dZde	de
fdZde	defdZede	dee
   fd       Zede	dedee
ef   fd       Zd!dZde	de
defdZde	ddfdZdefdZdee	   fdZdefdZd!de	dee
   de
fdZd"dZddZddZdefdZy)#	ScalarMapzGSimple, type-checked, dict-like container for holding repeated scalars.)_key_checker_value_checkerr%   r$   _entry_descriptorr&   r'   key_checkervalue_checkerentry_descriptorr   Nc                 X    || _         || _        || _        || _        i | _        d| _        ya  Args:

    message_listener: A MessageListener implementation.
      The ScalarMap will call this object's Modified() method when it
      is modified.
    key_checker: A type_checkers.ValueChecker instance to run on keys
      inserted into this container.
    value_checker: A type_checkers.ValueChecker instance to run on values
      inserted into this container.
    entry_descriptor: The MessageDescriptor of a map entry: key and value.
    FN)r$   r   r   r   r%   r&   )r)   r'   r   r   r   s        r   r*   zScalarMap.__init__  s2    $ .D#D'D-DDLDLr    c                     d| _         y rD   rE   r8   s    r   rF   zScalarMap._SetFrozen  rG   r    c                 2    t        | j                  d       | S NzMap is immutablerI   r8   s    r   rJ   zScalarMap._AssureWritable      12Kr    r+   c                     | j                   j                  |      }	 | j                  |   S # t        $ r> | j	                          | j
                  j                         }|| j                  |<   |cY S w xY wr-   )r   rk   r%   KeyErrorrJ   r   DefaultValue)r)   r+   r   s      r   r0   zScalarMap.__getitem__  sn    



&
&s
+C\\# 
,,.cdll3j	s   , AA32A3itemc                 T    | j                   j                  |      }|| j                  v S r-   r   rk   r%   r)   r   s     r   __contains__zScalarMap.__contains__  s)     ''-D4<<r    c                      y r-   r.   r/   s     r   getzScalarMap.get  r1   r    defaultc                      y r-   r.   r)   r+   r   s      r   r   zScalarMap.get  r1   r    c                 b    | j                   j                  |      }|| j                  v r| |   S |S r-   r   )r)   r+   r   checked_keys       r   r   zScalarMap.get  s4    ##..s3Kdll"+nr    rh   c                     | j                          | j                  j                  |      }| j                  j                  |      }|| j                  |<   | j
                  j                          y r-   )rJ   r   rk   r   r%   r$   rm   )r)   r+   rh   r   checked_values        r   r   zScalarMap.__setitem__  sZ    ##..s3K''2259M -DLL##%r    c                     | j                          | j                  j                  |      }| j                  |= | j                  j                          y r-   rJ   r   rk   r%   r$   rm   )r)   r+   r   s      r   r   zScalarMap.__delitem__  sB    ##..s3K[!##%r    c                 ,    t        | j                        S r-   r6   r8   s    r   r9   zScalarMap.__len__      t||r    c                 ,    t        | j                        S r-   rt   r%   r8   s    r   __iter__zScalarMap.__iter__  rB   r    c                 ,    t        | j                        S r-   r?   r8   s    r   rA   zScalarMap.__repr__  rB   r    c                     | j                          | j                  j                  |      }|d k(  rt        d      || j                  vr| j                  ||       | |   S )Nz0The value for scalar map setdefault must be set.)rJ   r   rk   r   r%   r   )r)   r+   rh   r   s       r   
setdefaultzScalarMap.setdefault  s]    ##..s3K}IJJ$,,&
{E*9r    c                     | j                          | j                  j                  |j                         | j                  j	                          y r-   )rJ   r%   updater$   rm   r<   s     r   rz   zScalarMap.MergeFrom  s6    LL&##%r    c                 P    | j                   }|j                         | _         d |d <   y r-   r%   r   r)   originals     r   InvalidateIteratorszScalarMap.InvalidateIterators  #     ||H==?DLHTNr    c                     | j                          | j                  j                          | j                  j	                          y r-   rJ   r%   clearr$   rm   r8   s    r   r  zScalarMap.clear  0    LL##%r    c                 .    | j                   j                  S r-   r   r   r8   s    r   GetEntryClasszScalarMap.GetEntryClass"      !!111r    rT   )r   ScalarMap[_K, _V]r-   )r:   r  r   N) rU   rV   rW   rX   rY   r   r*   rF   rJ   r   r   r0   r\   r   r   r
   r   r   r   r   r   rZ   r9   r   r   r^   rA   r  rz   r  r  r  r.   r    r   r   r     s[   O)  	
  2R B  r  d   R HRL   R " r2v  &R & &r &&R &D &s   B x| r &
&
2S 2r    r   c            
       R   e Zd ZdZg dZdededededdf
d	Zd d
Zd!dZde	de
fdZde	de
fdZede	dee
   fd       Zede	dedee
ef   fd       Zd"dZde	defdZde	de
defdZde	ddfdZdefdZdee	   fdZdefdZd"de	dee
   de
fdZd#dZd dZd dZ defdZ!y)$
MessageMapzESimple, type-checked, dict-like container for with submessage values.)r   r%   r$   r   r   r&   r'   r   r   r   r   Nc                 X    || _         || _        || _        || _        i | _        d| _        yr   )r$   r   r   r   r%   r&   )r)   r'   r   r   r   s        r   r*   zMessageMap.__init__3  s2    $ .D1D#D-DDLDLr    c                 p    d| _         | j                  j                         D ]  }|j                           y rD   )r&   r%   r   rF   )r)   r   s     r   rF   zMessageMap._SetFrozenL  s/    DL||""$ 	nnr    c                 2    t        | j                  d       | S r   rI   r8   s    r   rJ   zMessageMap._AssureWritableQ  r   r    r+   c                 V   | j                   j                  |      }	 | j                  |   S # t        $ rs | j	                          | j
                  j                         }|j                  | j                         || j                  |<   | j                  j                          |cY S w xY wr-   )
r   rk   r%   r   rJ   r   r   r   r$   rm   )r)   r+   r   s      r   r0   zMessageMap.__getitem__U  s    



&
&s
+C\\# 
,,<<>kt556%dll3
%%'s   , A9B('B(c                     | |   S )aa  get_or_create() is an alias for getitem (ie. map[key]).

    Args:
      key: The key to get or create in the map.

    This is useful in cases where you want to be explicit that the call is
    mutating the map.  This can avoid lint errors for statements like this
    that otherwise would appear to be pointless statements:

      msg.my_map[key]
    r.   r/   s     r   get_or_createzMessageMap.get_or_createa  s     9r    c                      y r-   r.   r/   s     r   r   zMessageMap.geto  r1   r    r   c                      y r-   r.   r   s      r   r   zMessageMap.gets  r1   r    c                     || v r| |   S |S r-   r.   r   s      r   r   zMessageMap.getz  s    
d{#Ynr    r   c                 T    | j                   j                  |      }|| j                  v S r-   r   r   s     r   r   zMessageMap.__contains__  s'    ''-D4<<r    rh   c                 8    | j                          t        d      )Nz5May not set values directly, call my_map[key].foo = 5)rJ   r   rq   s      r   r   zMessageMap.__setitem__  s    
L
MMr    c                     | j                          | j                  j                  |      }| j                  |= | j                  j                          y r-   r   r/   s     r   r   zMessageMap.__delitem__  sB    



&
&s
+CS##%r    c                 ,    t        | j                        S r-   r6   r8   s    r   r9   zMessageMap.__len__  r   r    c                 ,    t        | j                        S r-   r   r8   s    r   r   zMessageMap.__iter__  rB   r    c                 ,    t        | j                        S r-   r?   r8   s    r   rA   zMessageMap.__repr__  rB   r    c                 8    | j                          t        d      )NzISet message map value directly is not supported, call my_map[key].foo = 5)rJ   NotImplementedErrorrq   s      r   r  zMessageMap.setdefault  s     
	 r    c                     | j                          |j                  D ]   }|| v r| |= | |   j                  ||          " y r-   )rJ   r%   r   )r)   r:   r+   s      r   rz   zMessageMap.MergeFrom  sG    }} % 
I
3is$%r    c                 P    | j                   }|j                         | _         d |d <   y r-   r  r  s     r   r  zMessageMap.InvalidateIterators  r	  r    c                     | j                          | j                  j                          | j                  j	                          y r-   r  r8   s    r   r  zMessageMap.clear  r  r    c                 .    | j                   j                  S r-   r  r8   s    r   r  zMessageMap.GetEntryClass  r  r    rT   )r   MessageMap[_K, _V]r-   )r:   r*  r   N)"rU   rV   rW   rX   rY   r   r*   rF   rJ   r   r   r0   r  r   r
   r   r   r   r\   r   r	   r   r   rZ   r9   r   r   r^   rA   r  rz   r  r  r  r.   r    r   r  r  &  sr   M)  	
  2

R 
B 
r b  R HRL   R " r2v   r  d  NR N Nx N&R &D &s   B x| r %&
2S 2r    r  c                   *    e Zd ZdZg dZd Zd Zd Zy)_UnknownFieldzA parsed unknown field._field_number
_wire_type_datac                 .    || _         || _        || _        y r-   r-  )r)   field_number	wire_typedatas       r   r*   z_UnknownField.__init__  s    %DDODJ
r    c                 4    | j                   |j                   k  S r-   )r.  r<   s     r   __lt__z_UnknownField.__lt__  s     3 333r    c                     | |u ry| j                   |j                   k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S rD   r-  r<   s     r   r   z_UnknownField.__eq__  sS    u} 	e111 	&OOu///	&JJ%++%r    N)rU   rV   rW   rX   rY   r*   r6  r   r.   r    r   r,  r,    s     7)4r    r,  c                   H    e Zd Zd Zd Zed        Zed        Zed        Zy)UnknownFieldRefc                      || _         || _        y r-   )_parent_index)r)   parentindexs      r   r*   zUnknownFieldRef.__init__  s    DLDKr    c                     | j                   st        d      | j                  t        | j                         k\  rt        d      y )NzAUnknownField does not exist. The parent message might be cleared.)r;  r   r<  r7   r8   s    r   _check_validzUnknownFieldRef._check_valid  sE    <<
M  {{c$,,''
M  (r    c                     | j                          | j                  j                  | j                        j                  S r-   )r@  r;  _internal_getr<  r.  r8   s    r   r2  zUnknownFieldRef.field_number  s-    <<%%dkk2@@@r    c                     | j                          | j                  j                  | j                        j                  S r-   )r@  r;  rB  r<  r/  r8   s    r   r3  zUnknownFieldRef.wire_type  s-    <<%%dkk2===r    c                     | j                          | j                  j                  | j                        j                  S r-   )r@  r;  rB  r<  r0  r8   s    r   r4  zUnknownFieldRef.data  s-    <<%%dkk2888r    N)	rU   rV   rW   r*   r@  propertyr2  r3  r4  r.   r    r   r9  r9    sJ     A A
 > >
 9 9r    r9  c                   L    e Zd ZdZdgZd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zy)UnknownFieldSetzUnknownField containerr%   c                     g | _         y r-   r4   r8   s    r   r*   zUnknownFieldSet.__init__  s	    DLr    c                     | j                   t        d      t        | j                         }|dk  r||z  }|dk  s||k\  rt        dj                        t        | |      S )NBUnknownFields does not exist. The parent message might be cleared.r   zindex %d out of range)r%   r   r7   
IndexErrorr>  r9  )r)   r>  sizes      r   r0   zUnknownFieldSet.__getitem__  sh    ||
N  t||DqytmeqyETM.44554''r    c                      | j                   |   S r-   r4   )r)   r>  s     r   rB  zUnknownFieldSet._internal_get  s    <<r    c                 Z    | j                   t        d      t        | j                         S )NrJ  )r%   r   r7   r8   s    r   r9   zUnknownFieldSet.__len__  s-    ||
N  t||r    c                 V    t        |||      }| j                  j                  |       |S r-   )r,  r%   rj   )r)   r2  r3  r4  unknown_fields        r   _addzUnknownFieldSet._add  s(    !,	4@MLL&r    c              #   Z   K   t        t        |             D ]  }t        | |        y wr-   )ranger7   r9  )r)   is     r   r   zUnknownFieldSet.__iter__  s+     3t9 %D!$$%s   )+c                 T    |y | j                   j                  |j                          y r-   )r%   ru   r<   s     r   _extendzUnknownFieldSet._extend"  s     }LL&r    c                     | |u ryt        | j                        }|| S |j                          t        |j                        }||k(  S rD   )listr%   rO   sorted)r)   r:   r   other_valuess       r   r   zUnknownFieldSet.__eq__(  sK    u} $,,F}Z
KKM%--(L\!!r    c                     | j                   D ]7  }t        |j                  t              s|j                  j	                          9 d | _         y r-   )r%   r   r0  rG  _clearrn   s     r   r\  zUnknownFieldSet._clear5  s<     	EKK	1 DLr    N)rU   rV   rW   rX   rY   r*   r0   rB  r9   rQ  r   rV  r   r\  r.   r    r   rG  rG    s;     k)(
%'"r    rG  )'rX   collections.abccollectionsr   r   r   typingr   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   google.protobuf.descriptorr   google.protobufr   r\   r^   r   r"   abcregisterr`   r   r   r  r,  r9  rG  r.   r    r   <module>rd     s  
        T]T]T] 6 #D s t =HRL =D    ( ( 7Y:=#4ob6I Y:zE)mB&79L E)PA2r2v& A2HR2B' R2j 6 9  9FA Ar    