
    h                          " S  S5      r g)c                   V    \ rS rSrSrS\S\4S jrSS.S\4S	 jjrS
 r	\
S 5       rSrg)MessageRule   z@A marshal for converting between a descriptor and proto.Message.
descriptorwrapperc                     Xl         X l        g N_descriptor_wrapper)selfr   r   s      .lib/third_party/proto/marshal/rules/message.py__init__MessageRule.__init__   s    %    N)absentr   c                p    [        XR                  5      (       a  U R                  R                  U5      $ U$ r   )
isinstancer
   r   wrap)r   valuer   s      r   	to_pythonMessageRule.to_python   s-    e--..==%%e,,r   c                 R   [        XR                  5      (       a  U R                  R                  U5      $ [        U[        5      (       a$  U R                  (       d   U R
                  " S0 UD6$ U$ ! [        [        4 a%  nU R                  U5      R                  s S nA$ S nAff = f)N )	r   r   pbdictis_mapr
   	TypeError
ValueError_pb)r   r   exs      r   to_protoMessageRule.to_proto   s    e]]++==##E**eT""4;;0''0%00  z* 0 }}U+///0s   A1 1B&B!B&!B&c                     U R                   R                  nUR                  =(       a    UR                  5       R                  $ )z>Return True if the descriptor is a map entry, False otherwise.)r
   
DESCRIPTORhas_options
GetOptions	map_entry)r   descs     r   r   MessageRule.is_map0   s3     **?DOO$5$?$??r   r	   )__name__
__module____qualname____firstlineno____doc__typer   boolr   r!   propertyr   __static_attributes__r   r   r   r   r      sD    J 4  $   26 $ 
( @ @r   r   N)r   r   r   r   <module>r3      s    $@ $@r   