o
    Mfû  ã                   @   s|   d dl mZ G dd„ dƒZG dd„ deƒZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZG dd„ deƒZeeeeegZdS )é    )Ú	ProtoTypec                   @   s,   e Zd ZdZddœdefdd„Zd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                C   s   |S ©N© )ÚselfÚvaluer   r   r   úe/var/www/html/analyze/labelStudio/lib/python3.10/site-packages/proto/marshal/rules/stringy_numbers.pyÚ	to_python   s   zStringyNumberRule.to_pythonc                 C   s   |d ur	|   |¡S d S r   )Ú_python_type)r   r   r   r   r	   Úto_proto!   s   
zStringyNumberRule.to_proto)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úboolr
   r   r   r   r   r	   r      s    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   (   ó    
r   c                   @   r   )Ú
UInt64RuleN)r   r   r   r   r   r   ÚUINT64r   r   r   r   r	   r   -   r   r   c                   @   r   )Ú
SInt64RuleN)r   r   r   r   r   r   ÚSINT64r   r   r   r   r	   r   2   r   r   c                   @   r   )ÚFixed64RuleN)r   r   r   r   r   r   ÚFIXED64r   r   r   r   r	   r   7   r   r   c                   @   r   )ÚSFixed64RuleN)r   r   r   r   r   r   ÚSFIXED64r   r   r   r   r	   r   <   r   r   N)	Úproto.primitivesr   r   r   r   r   r   r   ÚSTRINGY_NUMBER_RULESr   r   r   r	   Ú<module>   s   û