
                            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S	K
Jr  \R                  \R                  " \R                  R                   5       " S
 S\R"                  5      5       5       rS rg)z$The gcloud run presets list command.    )absolute_import)division)unicode_literalsN)base)presets_printer)
exceptions)yamlc                   H    \ rS rSrSrSSS.r\S 5       r\S 5       rS r	S	r
g
)List   zDList available Cloud Run presets. Currently only available in alpha.z
          {description}
      zN
          To list all available presets, run:

            $ {command}
      )DESCRIPTIONEXAMPLESc                 |    UR                   R                  S5        UR                   R                  S[        05        g)z/Adds the display format for the command output.z$table(name, category(), description)categoryN)display_info	AddFormatAddTransforms_TransformCategoryclsparsers     lib/surface/run/presets/list.py
CommonArgsList.CommonArgs-   s3     !!"HI
%%z3E&FG    c                 &    U R                  U5        g )N)r   r   s     r   Args	List.Args3   s    NN6r   c                      [         R                  " SS5      n[        R                  " U5      nUS   $ ! [         a    [
        R                  " S5      ef = f)z>Reads a Preset YAML file and returns its contents for display.zgooglecloudsdk.command_lib.runzpresets.yamlzPresets file not found.presets)pkgutilget_datar	   loadIOErrorr   Error)self_presets_yaml_contentspresets_datas       r   RunList.Run7   s\    8%..
*N<YY45l 	""  86778s	   -4 !A N)__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr   r   r*   __static_attributes__r,   r   r   r   r      sH     M

		- H H
  
#r   r   c                 ^    [         R                  R                  U R                  S5      5      $ )Nr   )r   PRESETS_ENUM_MAPget)rs    r   r   r   D   s"    		)	)	-	-aeeJ.?	@@r   )r1   
__future__r   r   r   r!   googlecloudsdk.callioper   'googlecloudsdk.command_lib.run.printersr   googlecloudsdk.corer   r	   UniverseCompatibleReleaseTracksReleaseTrackALPHAListCommandr   r   r,   r   r   <module>rB      so    + &  '  ( C * $ D%%++,"#4 "# - "#JAr   