
                             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SK	Jr  SS	KJr   " S
 S\R                  5      rg)z"service-management delete command.    )absolute_import)division)unicode_literals)services_util)base)arg_parsers)common_flags)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Delete   a  Deletes a service from Google Service Management.

Services that are deleted will be retained in the system for 30 days.
If a deleted service is still within this retention window, it can be
undeleted with the undelete command.

## EXAMPLES
To delete a service named `my-service`, run:

  $ {command} my-service

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

  $ {command} my-service --async
c                     [         R                  " SS9R                  U 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.
z	to delete)suffixN)r	   producer_service_flagAddToParserr   
ASYNC_FLAGdisplay_infoAddCacheUpdater)parsers    (lib/surface/endpoints/services/delete.pyArgsDelete.Args0   sC     &&k:FFvNOO'
''-    c                 Z   [         R                  " 5       n[         R                  " 5       n[        R                  " SSSSSS9  [
        R                  " UR                  5      nUR                  US9nUR                  R                  U5      n[         R                  " XaR                  5      $ )zRun 'service-management delete'.

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

Returns:
  The response from the Delete API call (or None if cancelled).
a=  Are you sure? This will set the service configuration to be deleted, along with all of the associated consumer information. Note: This does not immediately delete the service configuration or data and can be undone using the undelete command for 30 days. Only after 30 days will the service be purged from the system.zContinue anywayT)messageprompt_stringdefaultthrow_if_unattendedcancel_on_no)serviceName)r   GetMessagesModuleGetClientInstancer
   PromptContinuer   GetServiceNameFromArgservice&ServicemanagementServicesDeleteRequestservicesr   ProcessOperationResultasync_)selfargsmessagesclientr%   request	operations          r   Run
Delete.Run>   s     ..0H,,.F - ( 
 //=G== > G &&w/I//	;;GGr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r0   __static_attributes__r2   r   r   r   r      s!    " . .!Hr   r   N)r7   
__future__r   r   r    googlecloudsdk.api_lib.endpointsr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.endpointsr   r	   googlecloudsdk.core.consoler
   DeleteCommandr   r2   r   r   <module>r@      s8     ) &  ' : ( < = 2BHT BHr   