
    c                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  S r\R0                  \R2                  " \R4                  R6                  \R4                  R8                  5       " S S\R:                  5      5       5       r\R0                  \R2                  " \R4                  R>                  5       " S S\5      5       5       r g)z4Command for obtaining details about a given service.    )absolute_import)division)unicode_literals)base)connection_context)
exceptions)flags)resource_args)serverless_operations)threat_detection_util)export_printer)service_printer)concept_parsers)presentation_specs)resource_printerc                 ~    U (       a  [         R                  $ U(       a  [         R                  $ [         R                  $ N)r   MultiRegionServicePrinterServicePrinterAlphaServicePrinter)is_multi_regionis_alphas     $lib/surface/run/services/describe.py_GetFormatterr   #   s,    444...)))    c                   R    \ rS rSrSrSSS.r\SS j5       r\S 5       rS r	S	 r
S
rg)Describe,   %Obtain details about a given service.z"          {description}
          a            To obtain details about a given service:

              $ {command} <service-name>

          To get those details in the YAML format:

              $ {command} <service-name> --format=yaml

          To get them in YAML format suited to export (omitting metadata
          specific to this deployment and status info):

              $ {command} <service-name> --format=export
          )DESCRIPTIONEXAMPLESc                    [         R                  " S[        R                  " 5       SSSS9n[        R
                  " U/5      R                  U 5        [        X5      n[        R                  " [        R                  U5        U R                  R                  [        R                  5        [        R                  " [        R                  [        R                   5        g )NSERVICEzService to describe.TF)requiredprefixes)r   ResourcePresentationSpecr
   GetServiceResourceSpecr   ConceptParserAddToParserr   r   RegisterFormatterr   SERVICE_PRINTER_FORMATdisplay_info	AddFormatr   EXPORT_PRINTER_FORMATExportPrinter)parserr   r   service_presentation	formatters        r   
CommonArgsDescribe.CommonArgsE   s    -FF,,. !!#7"89EEfMo8I&&..	 !!/"H"HI&&,,$$r   c                 ,    [         R                  U SS9  g )NFr   r   r3   r0   s    r   ArgsDescribe.ArgsZ   s    /r   c                 ~    [         R                  " U[        R                  R                  U R                  5       5      $ r   )r   GetConnectionContextr	   ProductRUNReleaseTrack)selfargss     r   _ConnectionContextDescribe._ConnectionContext^   s/    22emm!2!2!4 r   c                    U R                  U5      nUR                  R                  R                  5       n[        R
                  " U5        [        R                  " U5       nUR                  U5      n[        R                  " XT5        SSS5        W(       d/  [        R                  " SR                  UR                  5      5      eU$ ! , (       d  f       NF= f)r   NzCannot find service [{}])rB   CONCEPTSserviceParser	   ValidateResourcer   Connect
GetService	crtd_utilUpdateThreatDetectionStater   ArgumentErrorformat
servicesId)r@   rA   conn_contextservice_refclientservs         r   RunDescribe.Runc   s    **40L--''--/K	;'		&	&|	4{+d**48 
5 $$
$
+
+K,B,B
C  K 
5	4s   "(C


C N)FF)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr3   r9   rB   rT   __static_attributes__rV   r   r   r   r   ,   sJ     .	-(  ( 0 0
r   r   c                   (    \ rS rSrSr\S 5       rSrg)DescribeAlphar   r   c                 ,    [         R                  U SS9  g )NTr6   r7   r8   s    r   r9   DescribeAlpha.Argsw   s    .r   rV   N)rW   rX   rY   rZ   r[   r]   r9   r^   rV   r   r   r`   r`   r   s     ./ /r   r`   N)!r[   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   r   r	   r
   r   r   rK   'googlecloudsdk.command_lib.run.printersr   r   (googlecloudsdk.command_lib.util.conceptsr   r   googlecloudsdk.core.resourcer   r   UniverseCompatibleReleaseTracksr?   BETAGACommandr   ALPHAr`   rV   r   r   <module>rp      s    ; &  ' ( = 5 0 8 @ M B C D G 9* D%%**D,=,=,@,@AAt|| A B AH D%%++,/H / - /r   