
    
                         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
\R                  5      rg)z$service-management undelete command.    )absolute_import)division)unicode_literals)services_util)base)arg_parsers)common_flagsc                   .    \ rS rSrSr\S 5       rS rSrg)Undelete   a"  Undeletes a service configuration that was previously deleted.

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 this command.

Note that this means that this command will not be effective for
service configurations marked for deletion more than 30 days ago.

## EXAMPLES
To undelete 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        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 undelete)suffixN)r	   producer_service_flagAddToParserr   
ASYNC_FLAG)parsers    *lib/surface/endpoints/services/undelete.pyArgsUndelete.Args1   s/     &&m<HHPOO'    c                 *   [         R                  " 5       n[         R                  " 5       n[        R                  " UR
                  5      nUR                  US9nUR                  R                  U5      n[         R                  " XaR                  5      $ )zRun 'service-management undelete'.

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

Returns:
  The response from the Undelete API call (or None if cancelled).
)serviceName)r   GetMessagesModuleGetClientInstancer   GetServiceNameFromArgservice(ServicemanagementServicesUndeleteRequestservicesr   ProcessOperationResultasync_)selfargsmessagesclientr   request	operations          r   RunUndelete.Run>   sx     ..0H,,.F//=G?? @ G ((1I//	;;GGr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r'   __static_attributes__r)   r   r   r   r      s!    ( 
( 
(Hr   r   N)r.   
__future__r   r   r    googlecloudsdk.api_lib.endpointsr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.endpointsr   r	   Commandr   r)   r   r   <module>r6      s1    + &  ' : ( < =7Ht|| 7Hr   