
    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 G d de          Z G d de          Z	 G d de          Z
 G d de          ZdS )    )wrappers_pb2c                   *    e Zd ZdZdddefdZ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                F    t          || j                  r|rd S |j        S |S )N)
isinstance_proto_typevalue)selfr
   r   s      X/var/www/html/ai-engine/env/lib/python3.11/site-packages/proto/marshal/rules/wrappers.py	to_pythonzWrapperRule.to_python   s1    eT-.. 	 t;    c                 \    t          || j                  r|                     |          S |S )N)r
   )r   _python_typer	   )r   r
   s     r   to_protozWrapperRule.to_proto$   s3    eT.// 	1##%#000r   )__name__
__module____qualname____doc__boolr   r    r   r   r   r      sW          26   $        r   r   c                        e Zd Zej        ZeZdS )DoubleValueRuleN)r   r   r   r   DoubleValuer	   floatr   r   r   r   r   r   *   s        *KLLLr   r   c                        e Zd Zej        ZeZdS )FloatValueRuleN)r   r   r   r   
FloatValuer	   r   r   r   r   r   r   r   /           )KLLLr   r   c                        e Zd Zej        ZeZdS )Int64ValueRuleN)r   r   r   r   
Int64Valuer	   intr   r   r   r   r!   r!   4           )KLLLr   r!   c                        e Zd Zej        ZeZdS )UInt64ValueRuleN)r   r   r   r   UInt64Valuer	   r#   r   r   r   r   r&   r&   9           *KLLLr   r&   c                        e Zd Zej        ZeZdS )Int32ValueRuleN)r   r   r   r   
Int32Valuer	   r#   r   r   r   r   r*   r*   >   r$   r   r*   c                        e Zd Zej        ZeZdS )UInt32ValueRuleN)r   r   r   r   UInt32Valuer	   r#   r   r   r   r   r-   r-   C   r(   r   r-   c                        e Zd Zej        ZeZdS )BoolValueRuleN)r   r   r   r   	BoolValuer	   r   r   r   r   r   r0   r0   H   s        (KLLLr   r0   c                        e Zd Zej        ZeZdS )StringValueRuleN)r   r   r   r   StringValuer	   strr   r   r   r   r3   r3   M   r(   r   r3   c                        e Zd Zej        ZeZdS )BytesValueRuleN)r   r   r   r   
BytesValuer	   bytesr   r   r   r   r7   r7   R   r   r   r7   N)google.protobufr   r   r   r   r!   r&   r*   r-   r0   r3   r7   r   r   r   <module>r;      s   ) ( ( ( ( (       0    k   
    [   
    [   
    k   
    [   
    k   
    K   
    k   
    [     r   