
    	                         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 operations wait 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)Wait   aX  Waits for an operation to complete.

This command will block until an operation has been marked as complete.

Note that the `operations/` prefix of the operation name is optional
and may be omitted.

## EXAMPLES
To wait on an operation named `operations/serviceConfigs.my-service.1`
to complete, run:

  $ {command} serviceConfigs.my-service.1
c                 J    [         R                  " SS9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on which to wait)suffixN)r	   operation_flagAddToParser)parsers    (lib/surface/endpoints/operations/wait.pyArgs	Wait.Args-   s     '9:FFvN    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                  " USS9$ )zRun 'service-management operations wait'.

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

Returns:
  If successful, the response from the operations.Get API call.
)operationsIdF)is_async)
r   GetMessagesModuleGetClientInstancer   GetOperationIdFromArg	operation%ServicemanagementOperationsGetRequest
operationsGetProcessOperationResult)selfargsmessagesclientoperation_idrequestr   s          r   RunWait.Run8   sw     ..0H,,.F44T^^DL<<! = $G !!%%g.I//	EJJr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r'   __static_attributes__r)   r   r   r   r      s#     O OK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     2 &  ' : ( < =0K4<< 0Kr   