
    !	                         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  G d	 d
ej                        Zy)z'Command to list instances in a project.    )absolute_import)division)unicode_literals)
list_pager)
datafusion)base)resource_argsc                   &    e Zd ZdZed        Zd Zy)ListzLists all Data Fusion instances in a project given a location.

  ## EXAMPLES

  To list instances in project `my-project` and location `my-location`, run:

    $ {command} --project=my-project --location=my-location
  c                 f    t        j                  | d       | j                  j                  d       y )NzLocation to list instances for.a$  table[box](name.segment(5):label=NAME,type:label=EDITION,createTime:reverse:label=CREATE_TIME,updateTime:reverse:label=UPDATE_TIME,zone:label=ZONE,version:label=VERSION,patchRevision:label=PATCH_REVISION,availableVersion:label=AVAILABLE_VERSIONS_TO_UPDATE,service_endpoint:label=INSTANCE_URL))r	   AddLocationResourceArgdisplay_info	AddFormat)parsers    )lib/surface/data_fusion/instances/list.pyArgsz	List.Args&   s/    (()JL
!!
	    c                 L   t        j                         }|j                  j                  j	                         }|j
                  j                  |j                               }t        j                  |j                  j                  ||j                  d|j                  d      S )N)parent	instancespageSize)limitfield
batch_sizebatch_size_attribute)df
DatafusionCONCEPTSlocationParsemessages/DatafusionProjectsLocationsInstancesListRequestRelativeNamer   YieldFromListclientprojects_locations_instancesr   	page_size)selfargsr   location_refrequests        r   RunzList.Run7   s    J==))//1L!!QQ((* R ,G ##66jj>>') )r   N)__name__
__module____qualname____doc__staticmethodr   r,    r   r   r   r      s        )r   r   N)r0   
__future__r   r   r   apitools.base.pyr   "googlecloudsdk.api_lib.data_fusionr   r   googlecloudsdk.callioper   &googlecloudsdk.command_lib.data_fusionr	   ListCommandr   r2   r   r   <module>r9      s1    . &  ' ' ? ( @()4 ()r   