
    Ng                         d dl mZ  G d d          Z G d de          Z G d de          Z G d d	e          Z G d
 de          Z G d de          ZeeeeegZdS )    )	ProtoTypec                   *    e Zd ZdZdddefdZd ZdS )StringyNumberRuleaE  A marshal between certain numeric types and strings

    This is a necessary hack to allow round trip conversion
    from messages to dicts back to messages.

    See https://github.com/protocolbuffers/protobuf/issues/2679
    and
    https://developers.google.com/protocol-buffers/docs/proto3#json
    for more details.
    N)absentr   c                    |S N )selfvaluer   s      _/var/www/html/ai-engine/env/lib/python3.11/site-packages/proto/marshal/rules/stringy_numbers.py	to_pythonzStringyNumberRule.to_python   s        c                 4    ||                      |          S d S r   )_python_type)r
   r   s     r   to_protozStringyNumberRule.to_proto!   s!    $$U+++tr   )__name__
__module____qualname____doc__boolr   r   r	   r   r   r   r      sW        	 	 26   $        r   r   c                        e Zd ZeZej        ZdS )	Int64RuleN)r   r   r   intr   r   INT64_proto_typer	   r   r   r   r   (   s        L/KKKr   r   c                        e Zd ZeZej        ZdS )
UInt64RuleN)r   r   r   r   r   r   UINT64r   r	   r   r   r   r   -           L"KKKr   r   c                        e Zd ZeZej        ZdS )
SInt64RuleN)r   r   r   r   r   r   SINT64r   r	   r   r   r!   r!   2   r   r   r!   c                        e Zd ZeZej        ZdS )Fixed64RuleN)r   r   r   r   r   r   FIXED64r   r	   r   r   r$   r$   7   s        L#KKKr   r$   c                        e Zd ZeZej        ZdS )SFixed64RuleN)r   r   r   r   r   r   SFIXED64r   r	   r   r   r'   r'   <   s        L$KKKr   r'   N)	proto.primitivesr   r   r   r   r!   r$   r'   STRINGY_NUMBER_RULESr	   r   r   <module>r+      s7   ' & & & & &       ," " " " "! " " "
# # # # #" # # #
# # # # #" # # #
$ $ $ $ $# $ $ $
% % % % %$ % % %    r   