
    R                         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	Z G d
 dej                        Zy)zICommand to list all long running operations in the relevant organization.    )absolute_import)division)unicode_literals)apigee)base)defaults)resource_args
operationsc                   .    e Zd ZdZddiZed        Zd Zy)Listz$List Apigee long running operations.EXAMPLESa,    To list all operations for the active Cloud Platform project, run:

      $ {command}

  To list all in-progress operations in an Apigee organization called
  ``my-org'', formatted as a JSON array, run:

      $ {command} --organization=my-org --filter="metadata.state=IN_PROGRESS" --format=json
  c           	          t        j                  | ddddt        j                         g       | j                  j                  d       y )NorganizationzOrganization whose operations should be listed. If unspecified, the Cloud Platform project's associated organization will be used.FT)
positionalrequiredfallthroughsz)table(uuid, organization, metadata.state))r	   AddSingleResourceArgumentr   !GCPProductOrganizationFallthroughdisplay_info	AddFormat)parsers    %lib/surface/apigee/operations/list.pyArgsz	List.Args-   sG    ++	I4@@BCE !!"MN    c                     |j                   j                  j                         j                         }t        j
                  j                  |      S )zRun the list command.)CONCEPTSr   ParseAsDictr   OperationsClientr   )selfargsidentifierss      r   RunzList.Run7   s:    --,,224;;=K""''44r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r#    r   r   r   r      s1    , 	- O O5r   r   N)r'   
__future__r   r   r   googlecloudsdk.api_libr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apigeer   r	   RESPONSE_CONTENT_FIELDListCommandr   r*   r   r   <module>r1      s:    P &  ' ) ( 6 ; & 54 5r   