+
    TŎiM                     2    ^ RI Ht ^ RIHt  ! R R4      tR# )    )FacebookBadObjectError)AbstractObjectc                   >   a  ] tR t^t o RtRR ltRR ltR tRtV t	R# )	ObjectParserz
Parser for API response
Nc                v    \        W#RJV.4      '       g   \        R4      hW0n        W n        W@n        Wn        R# )ag  Initialize an ObjectParser.
To Initialize, you need to provide either a reuse_object, target_class,
or an custom_parse_method.
Args:
    api: FacebookAdsApi object.
    target_class (optional): The expected return object type.
    reuse_object (optional): Reuse existing object to populate response.
    custom_parse_method (optional): Custom parsing method.
NPMust specify either target class calling objector custom parse method for parser)anyr   _reuse_object_target_class_custom_parse_method_api)selfapitarget_classreuse_objectcustom_parse_methods   &&&&&w/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/facebook_business/adobjects/objectparser.py__init__ObjectParser.__init__   sE      Ld":<OPQQ(45 5 *)$7!	    c           	     ,   V P                   e   V P                  WP                  4      # ^RIHp ^RIHp ^RIHp ^RIH	p TpRV9   d(   \        VR,          \        4      '       d   VR,          pM=RV9   d7   \        VR,          \        4      '       g   VR,          P                  4       w  rRV3RV3R	V3R
V33p	V	 F>  w  rW9  d   K  Wz,          R,           Uu. uF  pV P                  WR7      NK  	  upWz&   K@  	  RV9   d   VR T;'       g    V P                  pV P                   e(   V P                   P#                  V4       V P                   # V P                  e#   \$        P&                  ! V P                  VV4      # \)        R4      hu upi )N)Ad)	AdPreview)AdSet)Campaigndataimages	campaignsadsetsadspreviews)override_target_classsuccessr   )r   r   adr   	adpreviewr   adsetr   campaignr   
isinstancedictlistpopitemparse_singler   r
   	_set_datar   create_objectr   )r   responser"   r   r   r   r   r   _	subfieldssubfield_classitemr   s   &&&           r   r,   ObjectParser.parse_single+   s   $$0,,XyyAA( &X*Xf-=t"D"DF#D!*T(^T*J*J8n,,.GA (#uBK#	
	 !*H#
 #nV4 5d !! " 4DN	 !* Y,BB0B0B)((.%%%+!//		40<> > )45 5%s   Fc                   R V9   d   \        VR ,          \        4      '       d|   . p\        VR ,          \        4      '       d3   VR ,           F#  pVP                  V P                  V4      4       K%  	  V# VP                  V P                  VR ,          4      4        V# R V9   d
   VR ,          MTp\        P
                  ! V P                  VV P                  4      .pV# )r   )r(   r*   appendr,   r   r.   r   r   )r   r/   retjson_objr   s   &&   r   parse_multipleObjectParser.parse_multipleZ   s    X*Xf-=t"D"DC(6*D11 ( 0 0HJJt00:; !1 
 

4,,Xf-=>? 
	 (.'98F#xD!//		4040B0BD EC 
r   )r   r   r
   r   )NNNN)N)
__name__
__module____qualname____firstlineno____doc__r   r,   r:   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s     2-5^ r   r   N)facebook_business.exceptionsr   *facebook_business.adobjects.abstractobjectr   r    r   r   <module>rG      s    FZ Zr   