
                             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dZdZ ej"                  ej$                  j&                         G d dej(                               Zee_        y)z'ids operations list' command.    )absolute_import)division)unicode_literals)ids_api)base)flags)common_args)
propertiesz:
          List Cloud IDS operation in a project.
        z
          $ {command} --project=my-project

          The project is automatically read from the core/project property if it is defined.
    )DESCRIPTIONEXAMPLESztable(
    name.scope("operations"):label=ID,
    name.scope("locations").segment(0):label=LOCATION,
    metadata.target,
    metadata.verb,
    done
)
c                   &    e Zd ZdZed        Zd Zy)ListzList Cloud IDS operations.c                 0   |j                   j                  t               |j                   j                  t	        j
                  | j                                      t        j                         j                  |       t	        j                  |dd       y )NFzThe zone of an operation)required	help_text)display_info	AddFormat_FORMAT
AddUriFuncr   MakeGetUriFuncReleaseTrackr	   ProjectArgumentAddToParser
AddZoneArg)clsparsers     "lib/surface/ids/operations/list.pyArgsz	List.Args7   sl    
!!'*
""5#7#78H8H8J#KL!--f5	*DF    c                 Z   |j                   xs2 t        j                  j                  j                   j	                         }|j
                  xs d}dj                  ||      }t        j                  | j                               }|j                  ||j                  |j                        S )N-zprojects/{}/locations/{})projectr
   VALUEScore	GetOrFailzoneformatr   Clientr   ListOperationslimit	page_size)selfargsr"   r&   nameclients         r   RunzList.Run?   s    llHj//44<<FFHG99D%,,Wd;D^^D--/0F  tzz4>>BBr   N)__name__
__module____qualname____doc__classmethodr   r0    r   r   r   r   3   s    "F FCr   r   N)r4   
__future__r   r   r   googlecloudsdk.api_lib.idsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.idsr   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   DETAILED_HELPr   ReleaseTracksr   ALPHAListCommandr   detailed_helpr6   r   r   <module>rB      s    % &  ' . ( 0 < *		 D%%++,C4 C -C& # r   