
                         d    S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr  S	 rS
 rg)z;Request hooks for Cloud Media Asset's asset transformation.    )absolute_import)division)unicode_literalsN)encoding)apis)utilsc                     A [         R                  " 5       n[         R                  " U5      n[         R                  " X4UR                  UR
                  UR                  5      Ul        U$ )zVPython hook for yaml commands to wildcard the parent parameter in annotation requests.)r   
GetProjectGetLocationGetAnnotationParentTemplate
asset_typeassetannotation_setparent)refargsreqprojectlocations        ?lib/googlecloudsdk/command_lib/media/asset/annotations/hooks.py!AddParentInfoToAnnotationRequestsr      sU    	't$(0015$**151D1DF#* 
*    c                 0   A [         R                  " SS5      nUR                  c&  [        R                  " 0 UR
                  5      Ul        UR                  S5      (       aD  [        R                  " UR                  UR
                  R                  5      UR                  l        UR                  S5      (       aZ  [        R                  " UR                  5      n[        R                  " UUR
                  R                  5      UR                  l        U$ )z6Prepare the annotation for create and update requests.
mediaassetv1alphalabelsannotation_data_file)r   GetMessagesModule
annotationr   DictToMessage
AnnotationIsKnownAndSpecifiedr   LabelsValuejsonloadsr   	DataValuedata)r   r   r   messagesannotation_datas        r   ParseAnnotationRequestr*   '   s    	##L)<(^^++B0C0CDCN	h''$22X((446CNN	455jj!:!:;O"00191D1D1N1NPCNN	*r   )__doc__
__future__r   r   r   r$   apitools.base.pyr   googlecloudsdk.api_lib.utilr   &googlecloudsdk.command_lib.media.assetr   r   r*    r   r   <module>r1      s*    B &  '  % , 8r   