
                             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)zAThe `gcloud compute shared-vpc associated-projects list` command.    )absolute_import)division)unicode_literals)xpn_api)base)flags)utilc                   .    e Zd ZdZddiZed        Zd Zy)Listz?List the associated service projects of the given host project.EXAMPLESaY  
          If `service-project1` and `service-project2` are associated service
          projects of the shared VPC host project `host-project`,

            $ {command} host-project

          yields the output

            RESOURCE_ID         RESOURCE_TYPE
            service-project1    PROJECT
            service-project2    PROJECT
      c                     t        j                  d      j                  |        | j                  j	                  t
        j                         y )Nzget associated projects for)r   GetProjectIdArgumentAddToParserdisplay_info	AddFormatcommand_lib_utilXPN_RESOURCE_ID_FORMAT)parsers    :lib/surface/compute/shared_vpc/associated_projects/list.pyArgsz	List.Args.   s8    	%''2{6':
!!"2"I"IJ    c                    t        j                  | j                               }|j                  j                  j
                  }|j                  |j                        }|D cg c]  }|j                  |j                  k(  r| c}S c c}w )N)
r   GetXpnClientReleaseTrackmessagesXpnResourceIdTypeValueValuesEnumListEnabledResourcesprojecttypePROJECT)selfargs
xpn_client	xpn_types	resourcesresources         r   RunzList.Run4   s{    %%d&7&7&9:J##11EEI//=I%. 0YMMY... Y 0 0 0s   #"BN)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r(    r   r   r   r      s1    G 
-  K K
0r   r   N)r,   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   &googlecloudsdk.command_lib.compute.xpnr   r	   r   ListCommandr   r/   r   r   <module>r5      s2    H &  ' 2 ( 8 K04 0r   