
    \	                         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 Appliance orders.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 )NTlisting_orderszS
        yaml(name,appliances,state,submit_time.date(),update_time.date())
        )r	   add_list_resource_argsdisplay_info	AddFormat)parsers    .lib/surface/transfer/appliances/orders/list.pyArgsz	List.Args4   s+    ((E
!!	    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v1alpha1Tr   zname asc)filterorderByparentpageSizeorders)batch_size_attributefield)r   GetClientInstanceGetMessagesModuler   YieldFromListprojects_locations_orders3TransferapplianceProjectsLocationsOrdersListRequestr	   )parse_list_resource_args_as_filter_stringget_parent_stringregion)selfargsclientmessagess       r   RunzList.Run<   s    ##$7DF%%&9:FH##((DD JJT+ 224;;?	 	E 	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   