
    	                     J   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ  ej                  ej                  j                  ej                  j                   ej                  j"                        ej$                   G d	 d
ej&                                      Zy)z-`gcloud api-gateway operations wait` command.    )absolute_import)division)unicode_literals)
operations)base)resource_args)logc                   0    e Zd ZdZdddZed        Zd Zy)Waitz3Wait for a Cloud API Gateway operation to complete.z{description}a=            To wait for a Cloud API Gateway operation named ``NAME'' in the ``us-central1''
          region, run:

            $ {command} NAME --location=us-central1

          To wait for a Cloud API Gateway operation with a resource name of ``RESOURCE'',
          run:

            $ {command} RESOURCE

          )DESCRIPTIONEXAMPLESc                 0    t        j                  | d       y )Npoll)r   AddOperationResourceArgs)parsers    *lib/surface/api_gateway/operations/wait.pyArgsz	Wait.Args4   s    **66:    c                 T   t        j                         }|j                  j                  j	                         }|j                  |      }|j                  rd}n|j                  |       d}t        j                  j                  dj                  ||j                                      y )Nz Operation has already completed.z!Operation completed successfully.zZ{} Use the following command for more details:

gcloud api-gateway operations describe {}
)r   OperationsClientCONCEPTS	operationParseGetdoneWaitForOperationr	   statusPrintformatRelativeName)selfargsclientoperation_refr   
msg_prefixs         r   RunzWait.Run8   s    ((*FMM++113M 

=)I~~5j m,6jJJ CCI6#&335D78r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r&    r   r   r   r      s1     < 	-$ ; ;8r   r   N)r*   
__future__r   r   r   "googlecloudsdk.api_lib.api_gatewayr   googlecloudsdk.callioper   &googlecloudsdk.command_lib.api_gatewayr   googlecloudsdk.corer	   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyCommandr   r-   r   r   <module>r:      s     4 &  ' 9 ( @ # D%%++T->->-C-C%%((*,84<< ,8 *,8r   