
                            S 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	  \R                  " \R                  R                  \R                  R                  5      \R                  " \R                  R                   5       " S S\R"                  \R$                  5      5       5       r\R                  " \R                  R(                  5      \R                  " \R                  R(                  5       " S	 S
\5      5       5       rg)zresources list command.    )
list_pager)dm_api_util)dm_base)base)alpha_flagsc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	List   mList resources in a deployment.

Prints a table with summary information on all resources in the deployment.
EXAMPLESz
To print out a list of resources in the deployment with some summary information about each, run:

  $ {command} --deployment=my-deployment

To print only the name of each resource, run:

  $ {command} --deployment=my-deployment --simple-list
c                 x    [         R                  R                  U 5        U R                  R	                  S5        g)Args is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go
      on the command line after this command. Positional arguments are
      allowed.
z
          table(
            name,
            type:wrap,
            update.state.yesno(no="COMPLETED"),
            update.error.errors.group(code),
            update.intent
          )
    N)r   SIMPLE_LIST_FLAGAddToParserdisplay_info	AddFormatparsers    0lib/surface/deployment_manager/resources/list.pyArgs	List.Args.   s1       ,,V4
!! # 	    c           
         U R                   R                  [        R                  " 5       UR                  S9n[
        R                  " [        R                  " U R                  R                  USUR                  UR                  S95      $ )  Run 'resources list'.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
      with.

Returns:
  The list of resources for the specified deployment.

Raises:
  HttpException: An http error response was received while executing api
      request.
project
deployment	resourcesfieldlimit
batch_sizemessages%DeploymentmanagerResourcesListRequestr   
GetProjectr   r   YieldWithHttpExceptionsr   YieldFromListclientr   r!   	page_size)selfargsrequests      r   RunList.RunB   st     mmAA""$?? B G ..  !6!6!('2'+zz,0NN		<= =r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r.   __static_attributes__r0   r   r   r	   r	      s1      
- 	 	&=r   r	   c                   H   ^  \ rS rSrSr\S 5       rS rS rU 4S jr	Sr
U =r$ )	ListAlpha\   r   c                 B    [         R                  R                  U 5        g)r   N)r   r   r   r   s    r   r   ListAlpha.Argsd   s       ,,V4r   c           
   #   <  #    U R                   R                  [        R                  " 5       UR                  S9n[
        R                  " [        R                  " U R                  R                  USUR                  UR                  S95      nU H  nUv   M	     g 7f)Nr   r   r   r#   )r+   r,   r-   paginated_resourcesresources        r    _YieldPrintableResourcesOnErrors*ListAlpha._YieldPrintableResourcesOnErrorso   s     mmAA""$?? B G
 &==  KK!!**~~	'( (n (s   BBc                     [         R                  " U R                  U R                  [        R
                  " 5       UR                  5      nUR                  (       a  gg)NTF)r   FetchDeploymentr)   r$   r   r&   r   update)r+   r,   r   s      r   _isDeploymentInPreview ListAlpha._isDeploymentInPreview   sB    ,,T[[$---4-?-?-A-1__>J r   c                 $  > UR                  S5      (       a  [        [        U ]  U5        OAU R	                  U5      (       a  [
        R                  Ul        O[
        R                  Ul        [        R                  " U R                  U5      5      $ )r   format)IsSpecifiedsuperr:   r.   rF   r   LIST_PREVIEWED_RESOURCES_FORMATrI   LIST_RESOURCES_FORMATr   r'   rA   )r+   r,   	__class__s     r   r.   ListAlpha.Run   sq     !!It &		$	$T	*	*??dk55dk..--d35 5r   r0   )r1   r2   r3   r4   r5   r7   r   rA   rF   r.   r8   __classcell__)rN   s   @r   r:   r:   \   s0    
 5 5 5 5r   r:   N)r5   apitools.base.pyr   )googlecloudsdk.api_lib.deployment_managerr   r   googlecloudsdk.callioper   -googlecloudsdk.command_lib.deployment_managerr   ReleaseTracksReleaseTrackGABETAUseDmApiDmApiVersionV2ListCommand	DmCommandr	   ALPHAr:   r0   r   r   <module>r_      s      ( A = ( E D%%(($*;*;*@*@A'&&))*==4W.. == + B==@ D%%++,'&&,,-?5 ?5 . -?5r   