
    K                        S 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  \R                  \R                  " \R                  R                  5       " S S\R                  5      5       5       r\R                  \R                  \R                  " \R                  R                   5       " S	 S
\R                  5      5       5       5       rg)zservices mcp list command.    N)services_util)serviceusage)base)common_flagsc                   .    \ rS rSrSr\S 5       rS rSrg)	ListAlpha     List MCP services for a project, folder or organization.

This command lists the MCP services that are enabled or available (with MCP
endpoints) to be MCP enabled
by a project, folder or organization.

## EXAMPLES

To list the services the current project has enabled for MCP, run:

  $ {command} --enabled

To list the services the current project can enable for MCP, run:

  $ {command} --available
c                 F   U R                  SS9nUR                  SSSS9  UR                  SSSS9  [        R                  " U 5        [        R
                  R                  U S	5        [        R                  R                  U 5        U R                  R                  S
5        gzArgs 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.
F)requiredz	--enabled
store_truezX(DEFAULT) Return the MCP services which the project, folder or organization has enabled.)actionhelpz--availablezWReturn the services available to the project, folder or organization to enable for MCP.i  zp
        table(
            name:label=NAME:sort=1,
            mcp_endpoint:label=MCP_ENDPOINT
        )
      Nadd_mutually_exclusive_groupadd_argumentr   add_resource_argsr   PAGE_SIZE_FLAG
SetDefaultURI_FLAGRemoveFromParserdisplay_info	AddFormatparser
mode_groups      lib/surface/services/mcp/list.pyArgsListAlpha.Args.        44e4DJ)	   A	   ""6*""640 	MM""6*
!! #
     c           	      .   UR                   (       d  UR                  (       d  SUl         UR                  S5      (       a  UR                  nO [        R
                  " UR                  5      nUR                  S5      (       a  UR                  nOSnUR                  S5      (       a  UR                  nOSnUR                  S5      (       a  UR                  nO[        R                  n[        R                  " UUR                   UR                  UUUS9$ zRun 'services mcp list'.

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

Returns:
  The list of MCP services for the given project, folder or organization.
TprojectfolderNorganizationlimit)r(   r&   r'   enabled	availableIsSpecifiedr%   r   GetValidatedProjectr&   r'   r(   sysmaxsizer   ListMcpServicesV2Beta	page_sizeselfargsr%   r&   r'   r(   s         r   RunListAlpha.RunX        LLDNNdl	""g11$,,?g!!{{ff''&&ll  jjekke--! r"    N	__name__
__module____qualname____firstlineno____doc__staticmethodr   r5   __static_attributes__r8   r"   r   r   r      s!    " ' 'R'r"   r   c                   .    \ rS rSrSr\S 5       rS rSrg)List   r
   c                 F   U R                  SS9nUR                  SSSS9  UR                  SSSS9  [        R                  " U 5        [        R
                  R                  U S	5        [        R                  R                  U 5        U R                  R                  S
5        gr   r   r   s     r   r   	List.Args   r!   r"   c           	      .   UR                   (       d  UR                  (       d  SUl         UR                  S5      (       a  UR                  nO [        R
                  " UR                  5      nUR                  S5      (       a  UR                  nOSnUR                  S5      (       a  UR                  nOSnUR                  S5      (       a  UR                  nO[        R                  n[        R                  " UUR                   UR                  UUUS9$ r$   r)   r2   s         r   r5   List.Run   r7   r"   r8   Nr9   r8   r"   r   rB   rB      s!    " ' 'R'r"   rB   )r>   r.   googlecloudsdk.api_lib.servicesr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.servicesr   UniverseCompatibleReleaseTracksReleaseTrackALPHAListCommandr   HiddenBETArB   r8   r"   r   <module>rR      s     ! 
 9 8 ( < D%%++,c   c - cN D%%**+c4 c ,  cr"   