
    	                     \    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 r    S
S	 jr	g)z<Utilities for interacting with Cloud API Gateway operations.    )absolute_import)division)unicode_literals)log)	resourcesc                 |    [         R                  R                  SR                  XR	                  5       5      5        g)zPrints the operation result with wait epilogue.

Args:
  operation_ref: Resource reference for the operation
  result: Epiloque string to be printed
za{}. Use the following command to wait for its completion:

gcloud api-gateway operations wait {}
N)r   statusPrintformatRelativeName)operation_refresults     =lib/googlecloudsdk/command_lib/api_gateway/operations_util.py$PrintOperationResultWithWaitEpiloguer      s0     **  F6--/0	2    Nc                     [         R                  R                  U SS9nU(       a  [        Xd5        gUR	                  XcU5      $ )a  Prints results for an operation.

Args:
  op_name: name of the operation.
  op_client: client for accessing operation data.
  service: the service which operation result can be grabbed.
  wait_string: string to use while waiting for polling operation
  async_string: string to print out for operation waiting
  is_async: whether to wait for aync operations or not.

Returns:
  The object which is returned by the service if async is false,
  otherwise null
z(apigateway.projects.locations.operations)
collectionN)r   REGISTRYParser   WaitForOperation)op_name	op_clientservicewait_stringasync_stringis_asyncr   s          r   PrintOperationResultr   )   sE    & $$**; + =- (E%%m'JJr   )Nz"Waiting for long running operationz%Asynchronous operation is in progressF)
__doc__
__future__r   r   r   googlecloudsdk.corer   r   r   r    r   r   <module>r"      s3     C &  ' # )2 6:%I&M"'Kr   