
    
                        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 dd	lmZ dd
lmZ ddlmZ dddZej&                   ej(                  ej*                  j,                         G d dej.                                      Zej&                   ej(                  ej*                  j2                         G d de                    Zy)z0Command to describe an existing Audit operation.    )absolute_import)division)unicode_literals)
exceptions)	constants)
operations)base)exception_utils)flagsz(Obtain details about an audit operation.z         To describe an Audit operation in the `us-central1` region,
        belonging to a project with ID `123`, with operation ID `operation-456`, run:

          $ {command} operation-456 --project=123 --location=us-central1
        )DESCRIPTIONEXAMPLESc                   V    e Zd ZdZeZej                  j                  Z	e
d        Zd Zy)DescribeDescribe Audit operation.c                 .    t        j                  |        y )N)r   AddDescribeOperationFlags)parsers    0lib/surface/audit_manager/operations/describe.pyArgszDescribe.Args1   s    	##F+    c                    |j                   j                  j                         }|j                  }|j                  j
                  dk(  }t        j                  | j                        }	 |j                  |j                         |      S # t        j                  $ r4}t        j                  |      }t        j                   |       Y d}~yd}~ww xY w)zRun the describe command.z/auditmanager.folders.locations.operationDetails)api_versionN)CONCEPTS	operationParseresultconcept_typenamer   OperationsClientr   GetRelativeNameapitools_exceptions	HttpErrorr
   AuditManagerErrorcore_exceptionsreraise)selfargsr   resourceis_folder_parentclienterrorexcs           r   RunzDescribe.Run5   s    ]]$$**,F}}H  <	= 
 ((T5E5EFF#ZZ--/1ABB(( #--e4cc""#s   +B C*CCN)__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpr   
ApiVersionV1r   staticmethodr   r.    r   r   r   r   )   s4     " -$$''+, ,#r   r   c                   <    e Zd ZdZej
                  j                  Zy)DescribeAlphar   N)r/   r0   r1   r2   r   r5   V1_ALPHAr   r8   r   r   r:   r:   G   s     "$$--+r   r:   N)r2   
__future__r   r   r   apitools.base.pyr   r"   $googlecloudsdk.api_lib.audit_managerr   r   googlecloudsdk.callioper	   (googlecloudsdk.command_lib.audit_managerr
   r   googlecloudsdk.corer%   r3   DefaultUniverseOnlyReleaseTracksReleaseTrackGADescribeCommandr   ALPHAr:   r8   r   r   <module>rH      s    7 &  ' > : ; ( D : = > D%%(()#t## # * #8 D%%++,.H . - .r   