
    U	                         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 e
j                   e
j                  e
j                  j                          G d	 d
e
j"                                      Zy)z$Command to list Transfer Appliances.    )absolute_import)division)unicode_literals)
list_pager)apis)base)resource_argsc                   0    e Zd ZdZdddZed        Zd Zy)ListzList Transfer Appliances.zl      List Transfer Appliances in a given project to show their state and
      corresponding orders.
      z      To list all appliances in your current project, run:

        $ {command}

      To list all information about all jobs formatted as JSON, run:

        $ {command} --format=json

      )DESCRIPTIONEXAMPLESc                 h    t        j                  | d       | j                  j                  d       y )NFlisting_orderszD
        yaml(displayName,model,name,sessionId,order,state)
        )r	   add_list_resource_argsdisplay_info	AddFormat)parsers    'lib/surface/transfer/appliances/list.pyArgsz	List.Args4   s+    ((F
!!	    c           
      (   t        j                  dd      }t        j                  dd      }t        j                  |j
                  |j                  t        j                  |d      dt        j                  |j                              dd	      S )
zCommand execution logic.transferappliancev1alpha1Fr   zname asc)filterorderByparentpageSize
appliances)batch_size_attributefield)r   GetClientInstanceGetMessagesModuler   YieldFromListprojects_locations_appliances7TransferapplianceProjectsLocationsAppliancesListRequestr	   )parse_list_resource_args_as_filter_stringget_parent_stringregion)selfargsclientmessagess       r   RunzList.Run<   s    ##$7DF%%&9:FH##,,HH JJU, 224;;?	 	I 	A
 ( r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r.    r   r   r   r      s1     "

	
-&  r   r   N)r2   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   .googlecloudsdk.command_lib.transfer.appliancesr	   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHAListCommandr   r5   r   r   <module>r@      sg    + &  ' ' , ( H D%%++,*4 * - *r   