
    p                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 ddlmZ dd	lmZ dd
lmZ ddiZe
j"                   G d de
j$                               Zy)z7Command to list environments in a project and location.    )absolute_import)division)unicode_literals)environments_util)arg_parsers)base)flags)resource_args)	resourcesEXAMPLESz          To list the Cloud Composer environments under the project 'project-1'
          and in location 'us-central1', run:

            $ {command} --project=project-1 --locations=us-central1
        c                   :    e Zd ZdZeZed        Zed        Zd Z	y)ListzList the Cloud Composer environments under a project and location.

  List environments that have not been successfully deleted. Prints a table
  with the following columns:
  * name
  * location
  * status
  * creation timestamp
  c                 z    t         j                  j                  | j                  dd      }|j	                         S )Nz(composer.projects.locations.environmentsv1)
collectionapi_version)r   REGISTRYParseRelativeNamenameSelfLink)environmentrs     )lib/surface/composer/environments/list.py_GetUrizList._GetUri6   s:    ,,= 	- 	A
 ::<    c           	          t        j                  | ddt        j                  dd      dd       | j                  j                  d       | j                  j                  t        j                         y )Nzin which to list environmentsFT)default_universenon_default_universezXIf not specified, the location stored in the property  [composer/location] will be used.)
positionalrequiredpluralhelp_supplementzjtable[box](name.segment(5):label=NAME,name.segment(3):label=LOCATION,state:label=STATE,createTime:reverse))	r
   AddLocationResourceArgr   ArgRequiredInUniversedisplay_info	AddFormat
AddUriFuncr   r   )parsers    r   Argsz	List.Args?   sk    (('22"
 1 !! #& ' ""4<<0r   c                     t        j                  |j                  j                  j	                         dd      }t        j                  ||j                  |j                  | j                               S )Nz--locationszEOne or more locations in which to list environments must be provided.)limitrelease_track)
r	   FallthroughToLocationPropertyCONCEPTS	locationsParseenvironments_api_utilr   	page_sizer+   ReleaseTrack)selfargslocation_refss      r   RunzList.RunV   sa    77%%'OQM
 !%%jj'')	+ +r   N)
__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r)   r7    r   r   r   r   (   s9      -  1 1,
+r   r   N)r;   
__future__r   r   r   googlecloudsdk.api_lib.composerr   r1   googlecloudsdk.callioper   r   #googlecloudsdk.command_lib.composerr	   r
   googlecloudsdk.corer   r<   UniverseCompatibleListCommandr   r?   r   r   <module>rG      s]    > &  ' V / ( 5 = ) 	 7+4 7+ 7+r   