
    j                         S r SSKJr  S rg)z;Declarative Response Hooks for Cloud SCC's Source response.    )
exceptionsc                 p   U  Ho  nUR                   (       a*  UR                  R                  UR                   5      (       d/  UR                  (       d  MQ  UR                  UR                  :X  d  Mm  Us  $    [
        R                  " SUR                   b  UR                   -  5      eUR                  -  5      e)zReturns source that matches the user provided source_id or display_name.

Args:
  response: Response object.
  args: Input arguments.

Raises:
  Error if it's an invalid source or no matching source was found.
zSource: %s not found.)sourcenameendswithsource_display_namedisplayNamecore_exceptionsError)responseargsr   s      <lib/googlecloudsdk/command_lib/scc/sources/response_hooks.py!ExtractMatchingSourceFromResponser      s     f	--dkk::		!	!	!			t77	7m	 
 	kk-t{{M	N N373K3KM	N N    N)__doc__googlecloudsdk.corer   r
   r    r   r   <module>r      s    B >Nr   