
    <                     b   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
dZdZ ej                   ej"                  j$                         G d dej&                               Z ej                   ej"                  j*                         G d dej&                               Zy)z3Command to list operations in the Project/Location.    )absolute_import)division)unicode_literals)
operations)utils)base)flagsz{description}zE         To list all operations, run:

          $ {command}
        )DESCRIPTIONEXAMPLESzf
  table(
    name.scope("operations"):label=ID,
    metadata.verb,
    metadata.target,
    done
  )
c                   *    e Zd ZdZeZed        Zd Zy)ListGA1List Apphub operations (long-running operations).c                     t        j                  |        | j                  j                  t               | j                  j                  t        j                  dt        j                  j                               y Nz$apphub.projects.locations.operationsrelease_track)r	   AddListOperationsFlagsdisplay_info	AddFormat_FORMAT
AddUriFuncapi_lib_utilsMakeGetUriFuncr   ReleaseTrackGAparsers    %lib/surface/apphub/operations/list.pyArgszListGA.Args3   sX    	  (
!!'*
""$$2++..	
    c                    t        j                  t        j                  j                        }|j
                  j                  j                         }|j                  |j                  |j                  |j                               S zRun the list command.r   )limit	page_sizeparent)apisOperationsClientr   r   r   CONCEPTSlocationParseListr#   r$   RelativeNameselfargsclientlocation_refs       r   Runz
ListGA.Run>   sf    ""1B1B1E1EFF==))//1L;;jj..((*   r    N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r2    r    r   r   r   -   !    9 - r    r   c                   *    e Zd ZdZeZed        Zd Zy)	ListAlphar   c                     t        j                  |        | j                  j                  t               | j                  j                  t        j                  dt        j                  j                               y r   )r	   r   r   r   r   r   r   r   r   r   ALPHAr   s    r   r   zListAlpha.ArgsO   sX    	  (
!!'*
""$$2++11	
r    c                    t        j                  t        j                  j                        }|j
                  j                  j                         }|j                  |j                  |j                  |j                               S r"   )r&   r'   r   r   r@   r(   r)   r*   r+   r#   r$   r,   r-   s       r   r2   zListAlpha.RunZ   sf    ""1B1B1H1HIF==))//1L;;jj..((*   r    Nr3   r;   r    r   r>   r>   I   r<   r    r>   N)r7   
__future__r   r   r   googlecloudsdk.api_lib.apphubr   r&   r   r   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apphubr	   r8   r   ReleaseTracksr   r   ListCommandr   r@   r>   r;   r    r   <module>rH      s    : &  ' < @ ( 3 # D%%(()T  *6 D%%++,    -r    