o
    uZh                     @   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G dd deZG dd deZ	G dd deZ
G dd deZdS )    )wrappers_pb2c                   @   s,   e Zd ZdZdddefddZdd ZdS )	WrapperRuleaU  A marshal for converting the protobuf wrapper classes to Python.

    This class converts between ``google.protobuf.BoolValue``,
    ``google.protobuf.StringValue``, and their siblings to the appropriate
    Python equivalents.

    These are effectively similar to the protobuf primitives except
    that None becomes a possible value.
    N)absentr   c                C   s   t || jr|r
d S |jS |S )N)
isinstance_proto_typevalue)selfr   r    r	   S/var/www/html/lang_env/lib/python3.10/site-packages/proto/marshal/rules/wrappers.py	to_python   s
   zWrapperRule.to_pythonc                 C   s   t || jr| j|dS |S )N)r   )r   _python_typer   )r   r   r	   r	   r
   to_proto$   s   zWrapperRule.to_proto)__name__
__module____qualname____doc__boolr   r   r	   r	   r	   r
   r      s    
r   c                   @      e Zd ZejZeZdS )DoubleValueRuleN)r   r   r   r   ZDoubleValuer   floatr   r	   r	   r	   r
   r   *       r   c                   @   r   )FloatValueRuleN)r   r   r   r   Z
FloatValuer   r   r   r	   r	   r	   r
   r   /   r   r   c                   @   r   )Int64ValueRuleN)r   r   r   r   Z
Int64Valuer   intr   r	   r	   r	   r
   r   4   r   r   c                   @   r   )UInt64ValueRuleN)r   r   r   r   ZUInt64Valuer   r   r   r	   r	   r	   r
   r   9   r   r   c                   @   r   )Int32ValueRuleN)r   r   r   r   Z
Int32Valuer   r   r   r	   r	   r	   r
   r   >   r   r   c                   @   r   )UInt32ValueRuleN)r   r   r   r   ZUInt32Valuer   r   r   r	   r	   r	   r
   r   C   r   r   c                   @   r   )BoolValueRuleN)r   r   r   r   Z	BoolValuer   r   r   r	   r	   r	   r
   r   H   r   r   c                   @   r   )StringValueRuleN)r   r   r   r   ZStringValuer   strr   r	   r	   r	   r
   r   M   r   r   c                   @   r   )BytesValueRuleN)r   r   r   r   Z
BytesValuer   bytesr   r	   r	   r	   r
   r    R   r   r    N)Zgoogle.protobufr   r   r   r   r   r   r   r   r   r   r    r	   r	   r	   r
   <module>   s   