
                             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  G d d	ej                        Zy
)zDescribe operations command.    )absolute_import)division)unicode_literals)
exceptions)util)basec                   0    e Zd ZdZdddZed        Zd Zy)DescribezDescribe an operation.z{description}z`          To describe an operation, run:

            $ {command} sample-operation-id
          )DESCRIPTIONEXAMPLESc                 *    | j                  dd       y)zRegister flags for this command.

    Args:
      parser: An argparse.ArgumentParser-like object. It is mocked out in order
        to capture some information, but behaves like an ArgumentParser.
    operation_idzThe operation id to look up.)helpN)add_argument)parsers    ,lib/surface/container/operations/describe.pyArgszDescribe.Args*   s     -KL    c                 $   | j                   d   }| j                   d   } ||      }	 |j                  |j                  |j                  |            S # t        j
                  $ r)}t        j                  |t        j                        d}~ww xY w)zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    api_adapterlocation_getN)
contextGetOperationParseOperationr   apitools_exceptions	HttpErrorr   HttpExceptionr   HTTP_ERROR_FORMAT)selfargsadapterr   locationerrors         r   RunzDescribe.Run4   s     ll=)G<</LD!HD!!

 
 !2!2H
=? ?(( D$$UD,B,BCCDs   *A B&$B

BN)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r$    r   r   r
   r
      s2     		- M MDr   r
   N)r(   
__future__r   r   r   apitools.base.pyr   r    googlecloudsdk.api_lib.containerr   googlecloudsdk.callioper   DescribeCommandr
   r+   r   r   <module>r1      s3    # &  ' > 1 ( .*Dt## *Dr   