
    *                         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)z5Command to list operations in a project and location.    )absolute_import)division)unicode_literals)operations_util)arg_parsers)base)flags)resource_args)	resourcesEXAMPLESz          To list the environment operations in locations ``us-central1'' and
          ``europe-west3'', run:

            $ {command} --locations=us-central1,europe-west3
        c                   :    e Zd ZdZeZed        Zed        Zd Z	y)ListzLists environment operations.

  Prints a table containing the following columns:
  * uuid
  * type
  * location
  * target environment
  * status
  * last updated timestamp
  c                 z    t         j                  j                  | j                  dd      }|j	                         S )Nz&composer.projects.locations.operationsv1)
collectionapi_version)r   REGISTRYParseRelativeNamenameSelfLink)	operationrs     'lib/surface/composer/operations/list.py_GetUrizList._GetUri7   s8    ,,; 	- 	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 operations.FT)default_universenon_default_universezXIf not specified, the location stored in the property  [composer/location] will be used.)
positionalrequiredpluralhelp_supplementztable[box](name.segment(5):label=UUID,metadata.operationType:label=TYPE,name.segment(3):label=LOCATION,metadata.resource.basename():label=TARGET_ENVIRONMENT,metadata.state:label=STATE,metadata.createTime:label=CREATE_TIME: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--locationszCOne or more locations in which to list operations must be provided.)limitrelease_track)
r	   FallthroughToLocationPropertyCONCEPTS	locationsParseoperations_api_utilr   	page_sizer+   ReleaseTrack)selfargslocation_refss      r   RunzList.RunZ   sa    77%%'MOM
 ##jj'')	+ +r   N)
__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r)   r7    r   r   r   r   (   s9    	  -  1 12
+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]    < &  ' R / ( 5 = ) 	 ;+4 ;+ ;+r   