
                             S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr  SS	KJr  SS
KJr  SSS.rSr\	R$                  " \	R&                  R(                  5       " S S\	R*                  5      5       rg)z.'Marketplace Solutions instances list command.    )absolute_import)division)unicode_literalsN)	MpsClient)base)flags)
properties)resource_projectorzF
          List Marketplace Solutions instances in a project.
        z
          To list instances in the region within the project ``us-central1'', run:

            $ {command} --region=us-central1

          Or:

          To list all instances in the project, run:

            $ {command}
    )DESCRIPTIONEXAMPLESz table(
        name.segment(-1):label=NAME,
        name.segment(-5):label=PROJECT,
        name.segment(-3):label=REGION,
        systemType,
        virtualCpuCores,
        memoryGib,
        osImage,
        state
    )c                   8    \ rS rSrSr\r\S 5       rS r	S r
Srg)List=   z1List Marketplace Solution instances in a project.c                 f   [         R                  R                  U 5        [         R                  R                  U 5        [         R                  R                  U 5        [         R
                  R                  U 5        [        R                  " U 5        U R                  R                  [        5        g)z Register flags for this command.N)r   FILTER_FLAGRemoveFromParserPAGE_SIZE_FLAGSORT_BY_FLAGURI_FLAGr   AddRegionArgToParserdisplay_info	AddFormatINSTANCE_LIST_FORMAT)parsers    !lib/surface/mps/instances/list.pyArgs	List.ArgsB   sw     	%%f-((0&&v.MM""6*	v&
 !!"67    c                   ^  UR                   R                  R                  5       n[        5       n[        R
                  R                  R                  R                  SS9nUcU  [        R
                  R                  R                  R                  SS9nU 4S jUR                  XTUR                  S9 5       $ U 4S jUR                  XB5       5       $ )NT)requiredc              3   F   >#    U  H  nTR                  U5      v   M     g 7fNsynthesizesInstanceInfo.0insselfs     r   	<genexpr>List.Run.<locals>.<genexpr>Z   s*      76# **3//6   !)limitc              3   F   >#    U  H  nTR                  U5      v   M     g 7fr"   r#   r%   s     r   r)   r*   ]   s&      >< ((--<r+   )CONCEPTSregionParser   r	   VALUESmpsproductGetcoreprojectAggregateListInstancesr,   ListInstances)r(   argsr/   clientr3   r6   s   `     r   RunList.RunR   s    ]]!!'')F[F##++///>G~!!&&..22D2Ag766$** 7 67 7>++G<> >r   c                     [         R                  " U5      nUR                  R                  US'   [        R
                  " US   5      US'   U$ )NosImage)r
   MakeSerializabler>   versionjsondumps)r(   r'   outs      r   r$   List.synthesizesInstanceInfo`   sB    

-
-c
2C[[((C	N ZZI/C	NJr    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r;   r$   __static_attributes__rE   r   r   r   r   =   s&    9-8 8>r   r   )rJ   
__future__r   r   r   rA   %googlecloudsdk.api_lib.mps.mps_clientr   googlecloudsdk.callioper   googlecloudsdk.command_lib.mpsr   googlecloudsdk.corer	   googlecloudsdk.core.resourcer
   rK   r   ReleaseTracksReleaseTrackALPHAListCommandr   rE   r   r   <module>rY      sv     5 &  '  ; ( 0 * ;	
	&		  D%%++,(4 ( -(r   