HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/google/protobuf/__pycache__/proto_builder.cpython-311.pyc
�

�nc���^�dZddlmZddlZddlZddlmZddlmZddlmZd�Z	d
d�Z
d	�ZdS)zDynamic Protobuf class creator.�)�OrderedDictN)�descriptor_pb2)�
descriptor)�message_factoryc�d�|j�|��}|�|��}|S)a8Get 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    �?D:\Python311\Lib\site-packages\google/protobuf/proto_builder.py�_GetMessageFromFactoryr*s4���\�7�7�	�B�B���"�"�#3�4�4�)�	��c���tj|���}|�#	t||��}|S#t$rYnwxYw|���}t|t��st|��}tj	��}|D]b\}}|�
|�d����|�
t|���d�����c|�
��dz}	|�:d|�
��z}	t||��}|S#t$rYnwxYw|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.
  )rNzutf-8z.protoz6net.proto2.python.public.proto_builder.AnonymousProto_)r�MessageFactoryr�KeyError�items�
isinstancer�sorted�hashlib�sha1�update�encode�str�	hexdigestr�Add�_MakeFileDescriptorProto)
�fieldsrrrr�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�|�dd��\}}tj��}tj�|�dd��|��|_||_|j	�
��}||_t|d��D]�\}\}}	|j�
��}
||
_|tjjkr)|tjjtjjz
dzz
}||
_tjj|
_|	|
_��|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!r2r1�
file_proto�
desc_proto�f_numberr#r$�field_protos           rrrrs���"�"�3��*�*�-�'�4��1�3�3�*��G�L�L�����c�!:�!:�O�L�L�*�/��*���&�*�*�,�,�*��*�/�$-�k�1�$=�$=��� �h� ����"�&�&�(�(�K��K���:�-�I�I�F��
�
$�
?�
�
$�
@�A�CD�E�F�h�"�K��&�;�J�K���K���	�r)NN)�__doc__�collectionsrrr-�google.protobufrrrrr&r�rr�<module>rGs���>&�%�#�#�#�#�#�#�����	�	�	�	�*�*�*�*�*�*�&�&�&�&�&�&�+�+�+�+�+�+�
�
�
� 54�54�54�54�p����r