§
    L˜ºh‚  ã                   ó^   — d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlmZ d„ Z	d
d„Z
d	„ ZdS )zDynamic Protobuf class creator.é    )ÚOrderedDictN)Údescriptor_pb2)Ú
descriptor)Úmessage_factoryc                 ód   — | j                              |¦  «        }|                      |¦  «        }|S )a8  Get a proto class from the MessageFactory by name.

  Args:
    factory: a MessageFactory instance.
    full_name: str, the fully qualified name of the proto type.
  Returns:
    A class, for the type identified by full_name.
  Raises:
    KeyError, if the proto is not found in the factory's descriptor pool.
  )ÚpoolÚFindMessageTypeByNameÚGetPrototype)ÚfactoryÚ	full_nameÚproto_descriptorÚ	proto_clss       úe/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/google/protobuf/proto_builder.pyÚ_GetMessageFromFactoryr   *   s4   € ð ”\×7Ò7¸	ÑBÔBÐØ×"Ò"Ð#3Ñ4Ô4€)Ø	Ðó    c                 óî  — t          j        |¬¦  «        }|�#	 t          ||¦  «        }|S # t          $ r Y nw xY w|                      ¦   «         }t          | t          ¦  «        st          |¦  «        }t          j	        ¦   «         }|D ]b\  }}| 
                    |                     d¦  «        ¦  «         | 
                    t          |¦  «                             d¦  «        ¦  «         Œc|                     ¦   «         dz   }	|€:d|                     ¦   «         z   }	 t          ||¦  «        }|S # t          $ r Y nw xY w|j                             t!          |	||¦  «        ¦  «         t          ||¦  «        S )aê  Create a Protobuf class whose fields are basic types.

  Note: this doesn't validate field names!

  Args:
    fields: dict of {name: field_type} mappings for each field in the proto. If
        this is an OrderedDict the order will be maintained, otherwise the
        fields will be sorted by name.
    full_name: optional str, the fully-qualified name of the proto type.
    pool: optional DescriptorPool instance.
  Returns:
    a class, the new protobuf class with a FileDescriptor.
  )r   Nzutf-8z.protoz6net.proto2.python.public.proto_builder.AnonymousProto_)r   ÚMessageFactoryr   ÚKeyErrorÚitemsÚ
isinstancer   ÚsortedÚhashlibÚsha1ÚupdateÚencodeÚstrÚ	hexdigestr   ÚAddÚ_MakeFileDescriptorProto)
Úfieldsr   r   r   r   Úfield_itemsÚfields_hashÚf_nameÚf_typeÚproto_file_names
             r   ÚMakeSimpleProtoClassr&   :   sŸ  € õ Ô*°Ð5Ñ5Ô5€'àÐðÝ(¨°)Ñ<Ô<€iØÐøÝð ð ð à
€dðøøøð —’‘”€+Ý	�F�KÑ	(Ô	(ð &Ý˜Ñ%Ô%€Kõ ”‘”€+Ø#ð 4ð 4�n€fˆfØ×Ò�v—}’} WÑ-Ô-Ñ.Ô.Ð.Ø×Ò•s˜6‘{”{×)Ò)¨'Ñ2Ô2Ñ3Ô3Ð3Ð3Ø×)Ò)Ñ+Ô+¨hÑ6€/ð ÐØIØ×&Ò&Ñ(Ô(ñ)€IðÝ(¨°)Ñ<Ô<€iØÐøÝð ð ð à
€dðøøøð
 
„,×ÒÝ˜°	¸;ÑGÔGñIô Ið Iå	 ¨Ñ	3Ô	3Ð3s   ™+ «
8·8ÄD. Ä.
D;Ä:D;c                 óT  — |                      dd¦  «        \  }}t          j        ¦   «         }t          j                             |                     dd¦  «        | ¦  «        |_        ||_        |j	         
                    ¦   «         }||_        t          |d¦  «        D ]Š\  }\  }}	|j         
                    ¦   «         }
||
_        |t          j        j        k    r)|t          j        j        t          j        j        z
  dz   z  }||
_        t          j        j        |
_        |	|
_        Œ‹|S )zAPopulate FileDescriptorProto for MessageFactory's DescriptorPool.ú.é   ú/)Úrsplitr   ÚFileDescriptorProtoÚosÚpathÚjoinÚreplaceÚnameÚpackageÚmessage_typeÚaddÚ	enumerateÚfieldr   ÚFieldDescriptorÚFIRST_RESERVED_FIELD_NUMBERÚLAST_RESERVED_FIELD_NUMBERÚnumberÚFieldDescriptorProtoÚLABEL_OPTIONALÚlabelÚtype)r%   r   r!   r2   r1   Ú
file_protoÚ
desc_protoÚf_numberr#   r$   Úfield_protos              r   r   r   r   s  € à×"Ò" 3¨Ñ*Ô*�-€'ˆ4ÝÔ1Ñ3Ô3€*Ý”G—L’L §¢°°cÑ!:Ô!:¸OÑLÔL€*„/Ø€*ÔØÔ&×*Ò*Ñ,Ô,€*Ø€*„/Ý$-¨k¸1Ñ$=Ô$=ð ð Ñ €hÑ �˜ØÔ"×&Ò&Ñ(Ô(€KØ€KÔð •:Ô-ÔIÒIÐIØÝ
Ô
$Ô
?Ý
Ô
$Ô
@ñAØCDñEñF€hð "€KÔÝ&Ô;ÔJ€KÔØ€KÔÐØ	Ðr   )NN)Ú__doc__Úcollectionsr   r   r-   Úgoogle.protobufr   r   r   r   r&   r   © r   r   ú<module>rG      s¤   ðð> &Ð %à #Ð #Ð #Ð #Ð #Ð #Ø €€€Ø 	€	€	€	à *Ð *Ð *Ð *Ð *Ð *Ø &Ð &Ð &Ð &Ð &Ð &Ø +Ð +Ð +Ð +Ð +Ð +ðð ð ð 54ð 54ð 54ð 54ðpð ð ð ð r   