
                         6   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	  SSKJ
r
  Sr\S	-   rS
rSrSrSrSr\R$                  \R&                  " \R(                  R*                  \R(                  R,                  5       " S S\R.                  5      5       5       rg)zservices mcp disable command.    )services_util)serviceusage)base)common_flags)log)
propertiesz gcloud beta services operations zwait {0}zservices/%szprojects/{}z
folders/{}zorganizations/{}z/consumerPolicies/{}c                   .    \ rS rSrSr\S 5       rS rSrg)Disable#   a  Disable a service for MCP on a project, folder or organization.

Disable a service for MCP on a project, folder or organization

## EXAMPLES

To disable a service for MCP called `my-service` on the current project, run:

  $ {command} my-service

To disable a service for MCP called `my-service` on the project
`my-project`, run:

  $ {command} my-service --project=my-project

To disable a service for MCP called `my-service` on the folder
`my-folder, run:

  $ {command} my-service --folder=my-folder

To disable a service for MCP called `my-service` on the organization
`my-organization`, run:

  $ {command} my-service --organization=my-organization

To run the same command asynchronously (non-blocking), run:

  $ {command} my-service --async
c                     [         R                  " SS9R                  U 5        [         R                  " U 5        [        R
                  R                  U 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.
zto disable MCP)suffixN)r   service_flagAddToParseradd_resource_argsr   
ASYNC_FLAG)parsers    #lib/surface/services/mcp/disable.pyArgsDisable.ArgsD   s>     %56BB6J""6*OO'    c                     [         R                  R                  R                  R	                  SS9n[
        R                  U5      nUR                  S5      (       a+  [
        R                  UR                  5      nUR                  nUR                  S5      (       a,  [        R                  UR                  5      nUR                  nOSnUR                  S5      (       a,  [        R                  UR                  5      nUR                  nOSn[        R                  " UUR                  UUS9nUc  gUR                  (       aB  [         R                  UR"                  5      n[$        R&                  R)                  SU 35        g[*        R,                  " UR"                  [        R.                  5      nUR0                  (       a  [*        R2                  " U5        g[$        R&                  R)                  S	UR                   S
U S35        g)zRun 'services mcp disable'.

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

Returns:
  Updated MCP Policy.
T)requiredprojectfolderNorganization)r   r   z`Asynchronous operation is in progress... Use the following command to wait for its completion:
 zThe MCP endpoint for service z$ has been disabled for the resource .)r   VALUEScorer   Get_PROJECT_RESOURCEformatIsSpecified_FOLDER_RESOURCEr   _ORGANIZATION_RESOURCEr   r   RemoveMcpEnableRuleserviceasync__OP_WAIT_CMDnamer   statusPrintr   WaitOperationGetOperationV2BetaerrorPrintOperation)selfargsr   resource_namer   r   opcmds           r   RunDisable.RunP   s    $$,,00$0?G%,,W5M	""'..t||<mg!!&--dkk:m{{ff'',33D4E4EFm&&ll		)	)!	
B 
z{{(c	jj%!
 		$	$RWWl.M.M	NB	xx""2&	jj)$,, 8(/,r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r5   __static_attributes__r7   r   r   r
   r
   #   s     < 	( 	(6r   r
   N)r<   googlecloudsdk.api_lib.servicesr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.servicesr   googlecloudsdk.corer   r   _OP_BASE_CMDr(   _SERVICEr    r#   r$   _CONSUMER_POLICY_DEFAULTUniverseCompatibleReleaseTracksReleaseTrackALPHABETASilentCommandr
   r7   r   r   <module>rL      s     $ 9 8 ( < # *1j(!  + 1  D%%++T->->-C-CDad   a E ar   