+
    ij                     n    ^ RI t^ RIHt ^ RIHt ^ RIHt  ! R R4      t ! R R4      t ! R	 R
4      t	R# )    N)
struct_pb2)maps)repeatedc                   V   a  ] tR t^t o RtR tRR/V 3R lR lltV 3R lR ltR	tV t	R# )
	ValueRulezBA rule to marshal between google.protobuf.Value and Python values.c                   Wn         R # N_marshalselfmarshals   &$m/Users/igloo/.openclaw/workspace/scratch/fb_ad_env/lib/python3.14/site-packages/proto/marshal/rules/struct.py__init__ValueRule.__init__           absentNc                    < V ^8  d   QhRS[ /#    r   bool)format__classdict__s   "r   __annotate__ValueRule.__annotate__   s     !7 !7$ !7r   c                  VP                  R4      pVR8X  g	   V'       d   R# VR8X  d   \        VP                  4      # VR8X  d   \        VP                  4      # VR8X  d   \        VP                  4      # VR8X  d7   V P                  P                  \        P                  VP                  RR	7      # VR
8X  d7   V P                  P                  \        P                  VP                  RR	7      # \        RV,          4      h)a
  Coerce the given value to the appropriate Python type.

Note that both NullValue and absent fields return None.
In order to disambiguate between these two options,
use containment check,
E.g.
"value" in foo
which is True for NullValue and False for an absent value.
kind
null_valueN
bool_valuenumber_valuestring_valuestruct_valueF)r   
list_valuezUnexpected kind: %s)
WhichOneofr   r!   floatr"   strr#   r   	to_pythonr   Structr$   	ListValuer%   
ValueError)r   valuer   r   s   &&$ r   r)   ValueRule.to_python   s     '<6<(())>!++,,>!u))**>!==**!!"" +  
 <==**$$   +   .566r   c                4   < V ^8  d   QhRS[ P                  /# r   return)r   Value)r   r   s   "r   r   r   @   s     ? ?!1!1 ?r   c                p   \        V\        P                  4      '       d   V# Vf   \        P                  ! ^ R7      # \        V\        4      '       d   \        P                  ! VR7      # \        V\        \
        34      '       d!   \        P                  ! \        V4      R7      # \        V\        4      '       d   \        P                  ! VR7      # \        V\        P                  P                  4      '       d@   \        P                  ! V P                  P                  \        P                  V4      R7      # \        V\        P                  P                  4      '       d@   \        P                  ! V P                  P                  \        P                  V4      R7      # \        RV,          4      h)z7Return a protobuf Value object representing this value.)r    )r!   )r"   )r#   )r%   )r$   zUnable to coerce value: %r)
isinstancer   r2   r   intr'   r(   collectionsabcSequencer   to_protor+   Mappingr*   r,   )r   r-   s   &&r   r9   ValueRule.to_proto@   s/   eZ--..L=##q11eT""##u55ec5\**##u>>eS!!##77e[__5566##==11*2F2FN  e[__4455##!]]33J4E4EuM  5=>>r   r
   
__name__
__module____qualname____firstlineno____doc__r   r)   r9   __static_attributes____classdictcell__r   s   @r   r   r      s)     L !7 !7 !7F? ?r   r   c                   V   a  ] tR t^Wt o RtR tRR/V 3R lR lltV 3R lR ltR	tV t	R# )
ListValueRulezCA rule translating google.protobuf.ListValue and list-like objects.c                   Wn         R # r	   r
   r   s   &$r   r   ListValueRule.__init__Z   r   r   r   Nc                    < V ^8  d   QhRS[ /# r   r   )r   r   s   "r   r   ListValueRule.__annotate__]   s     
 
$ 
r   c               n    V'       d   R# \         P                  ! VP                  V P                  R7      # )z,Coerce the given value to a Python sequence.Nr   )r   RepeatedCompositevaluesr   r   r-   r   s   &&$r   r)   ListValueRule.to_python]   s0      	
 ++ELL$--P	
r   c                4   < V ^8  d   QhRS[ P                  /# r0   )r   r+   )r   r   s   "r   r   rJ   e   s     
 
!5!5 
r   c           	        \        V\        P                  4      '       d   V# \        V\        P                  4      '       d1   \        P                  ! VP
                   Uu. uF  q"NK  	  upR 7      # \        P                  ! V Uu. uF,  q P                  P                  \        P                  V4      NK.  	  upR 7      # u upi u upi ))rN   )	r4   r   r+   r   rM   pbr   r9   r2   )r   r-   vs   && r   r9   ListValueRule.to_protoe   s     eZ1122LeX7788''588/D8a8/DEE ##INOAMM**:+;+;Q?O
 	
 0E Ps   !
C2Cr
   r<   rD   s   @r   rF   rF   W   s(     M 
 
 

 
r   rF   c                   V   a  ] tR t^st o RtR tRR/V 3R lR lltV 3R lR ltR	tV t	R# )

StructRulez@A rule translating google.protobuf.Struct and dict-like objects.c                   Wn         R # r	   r
   r   s   &$r   r   StructRule.__init__v   r   r   r   Nc                    < V ^8  d   QhRS[ /# r   r   )r   r   s   "r   r   StructRule.__annotate__y   s     
 
$ 
r   c               n    V'       d   R# \         P                  ! VP                  V P                  R7      # )z+Coerce the given value to a Python mapping.NrL   )r   MapCompositefieldsr   rO   s   &&$r   r)   StructRule.to_pythony   s+     D	
 $ 1 1%,, V	
r   c                4   < V ^8  d   QhRS[ P                  /# r0   )r   r*   )r   r   s   "r   r   r[      s      !2!2 r   c                   \        V\        P                  4      '       d   V# \        V\        P                  4      '       dD   \        P                  ! VP
                  P                  4        UUu/ uF  w  r#W#bK	  	  uppR 7      # \        P                  ! VP                  4        UUu/ uF/  w  r#W P                  P                  \        P                  V4      bK1  	  uppR 7      pV# u uppi u uppi ))r^   )
r4   r   r*   r   r]   rS   itemsr   r9   r2   )r   r-   krT   answers   &&   r   r9   StructRule.to_proto   s     eZ..//LeT..//$$).)9:)9)9: 
 ""KP;;=KX41==))**:*:A>>=

  ;
s   0C)
)5C/
r
   r<   rD   s   @r   rW   rW   s   s(     J 
 
 
 r   rW   )
collections.abcr6   google.protobufr   proto.marshal.collectionsr   r   r   rF   rW    r   r   <module>rj      s2     & * .=? =?@
 
8 r   