
    
3j                         S r SrSSKJrJrJr  SSKr " S S\5      r " S S\5      r	 " S	 S
\
5      rSSS\S\\   4S jrg)z*Provides a container for DescriptorProtos.z"matthewtoia@google.com (Matt Toia)    )DictIteratorOptionalNc                       \ rS rSrSrg)Error    N)__name__
__module____qualname____firstlineno____static_attributes__r	       ]/home/wildlama/miniconda3/lib/python3.13/site-packages/google/protobuf/descriptor_database.pyr   r      s    r   r   c                       \ rS rSrSrSrg),DescriptorDatabaseConflictingDefinitionError   zGRaised when a proto is added with the same name & different descriptor.r	   N)r
   r   r   r   __doc__r   r	   r   r   r   r      s    Or   r   c                       \ rS rSrSrSS jrSS jrS	\SS4S
 jrS\SS4S jr	S\S\
S\S   4S jrS\S\\
   4S jrS	\SSSS4S jrSrg)DescriptorDatabase   zEA container accepting FileDescriptorProtos and maps DescriptorProtos.returnNc                      0 U l         0 U l        g N_file_desc_protos_by_file_file_desc_protos_by_symbol)selfs    r   __init__DescriptorDatabase.__init__   s     	 	"
 	 	$r   file_desc_proto"descriptor_pb2.FileDescriptorProtoc                    UR                   nX R                  ;  a  XR                  U'   O"U R                  U   U:w  a  [        SU-  5      egUR                  nUR                   H&  n[        XC5       H  nU R                  XQ5        M     M(     UR                   H  nU R                  U(       a  SR                  X6R                   45      OUR                   U5        UR                   H?  nUU R                  U(       a  SR                  X7R                   45      OUR                   '   MA     M     UR                   HB  nU R                  U(       a  SR                  X8R                   45      OUR                   U5        MD     UR                   HB  n	U R                  U(       a  SR                  X9R                   45      OU	R                   U5        MD     g)a0  Adds the FileDescriptorProto and its types to this database.

Args:
  file_desc_proto: The FileDescriptorProto to add.
Raises:
  DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
    add a proto with the same name but different definition than an
    existing proto in the database.
z0%s already added, but with different descriptor.N.)namer   r   packagemessage_type_ExtractSymbols
_AddSymbol	enum_typejoinvaluer   	extensionservice)
r   r!   
proto_namer&   messager%   enum
enum_valuer-   r.   s
             r   AddDescriptorDatabase.Add#   s    !%%J7773B$$Z0		'	'
	3	F8
<z
IK K  %%G"//!'3$. 4 0  ))
oo-4388Wii()$))
 

*  	((4;CHHg/0	
 # * %..	
oo29388Wnn-.y~~
 /
 #**
oo07388Wll+,W\\
 +r   r%   c                      U R                   U   $ )a  Finds the file descriptor proto by file name.

Typically the file name is a relative path ending to a .proto file. The
proto with the given name will have to have been added to this database
using the Add method or else an error will be raised.

Args:
  name: The file name to find.

Returns:
  The file descriptor proto matching the name.

Raises:
  KeyError if no file by the given name was added.
)r   )r   r%   s     r   FindFileByName!DescriptorDatabase.FindFileByNameO   s    " ))$//r   symbolc                 R   UR                  S5      S:X  a5  US   S:X  a,  UR                  S5      n[        R                  " S[        5         U R
                  U   $ ! [         aA    UR                  S5      u  n  n U R
                  U   s $ ! [         a    [        U5      ef = ff = f)aj  Finds the file descriptor proto containing the specified symbol.

The symbol should be a fully qualified name including the file descriptor's
package and any containing messages. Some examples:

'some.package.name.Message'
'some.package.name.Message.NestedEnum'
'some.package.name.Message.some_field'

The file descriptor proto containing the specified symbol must be added to
this database using the Add method or else an error will be raised.

Args:
  symbol: The fully qualified symbol name.

Returns:
  The file descriptor proto containing the symbol.

Raises:
  KeyError if no file contains the specified symbol.
r$      r   zaPlease remove the leading "." when FindFileContainingSymbol, this will turn to error in 2026 Jan.)countlstripwarningswarnRuntimeWarningr   KeyError
rpartition)r   r8   	top_level_s       r   FindFileContainingSymbol+DescriptorDatabase.FindFileContainingSymbolb   s    0 ||CA&)s"2}}S!fmm 	--f55  ))#.oiA//	:: vs$   A B&;B	B&B""B&extendee_nameextension_numberc                     g r   r	   )r   rF   rG   s      r   FindFileContainingExtension.DescriptorDatabase.FindFileContainingExtension   s     r   c                     / $ r   r	   )r   rF   s     r   FindAllExtensionNumbers*DescriptorDatabase.FindAllExtensionNumbers   s    Ir   c                     XR                   ;   aP  SUR                  -   S-   U-   S-   U R                   U   R                  -   S-   n[        R                  " U[        5        X R                   U'   g )NzConflict register for file "z": z is already defined in file "")r   r%   r=   r>   r?   )r   r%   r!   warn_msgs       r   r)   DescriptorDatabase._AddSymbol   s~     ///0?3G3GG12 2248==> ADDh mmHn--<$$T*r   r   )r   N)r!   r"   r   N)r
   r   r   r   r   r   r3   strr6   rD   intr   rI   listrL   r)   r   r	   r   r   r   r      s    M*X0 0)M 0&--+-^25453 49 	=	=(L	=	=r   r   
desc_protozdescriptor_pb2.DescriptorProtor&   r   c              #     #    U(       a  US-   U R                   -   OU R                   nUv   U R                   H  n[        X25       H  nUv   M	     M     U R                   H!  nSR	                  X%R                   45      v   M#     g7f)zPulls out all the symbols from a descriptor proto.

Args:
  desc_proto: The proto to extract symbols from.
  package: The package containing the descriptor type.

Yields:
  The fully qualified name found in the descriptor.
r$   N)r%   nested_typer(   r*   r+   )rU   r&   message_namerW   r8   r*   s         r   r(   r(      ss      5<30,++k!+<l = , ''i
((L..1
22 (s   BB)r   
__author__typingr   r   r   r=   	Exceptionr   r   objectr   rR   r(   r	   r   r   <module>r]      sb    11
 + + I P5 PL= L=^303;>3c]3r   