
    
                     6    d Z ddlmZ ddlmZ  G d de      Zy)z8Utilities for Audit Manager API, Audit Report Endpoints.    )	constants)utilc            
       T    e Zd ZdZ	 ddej
                  ddfdZdededed	ed
ef
dZ	y)AuditReportsClientz.Client for Audit Reports in Audit Manager API.Napi_versionreturnc                     |xs t        j                  |      | _        |xs t        j                  ||      | _        | j                  j
                  j                  }d|j                  i| _        y )N)r   )r   clientodf)	r   GetClientInstancer
   GetMessagesModulemessagesGenerateAuditReportRequestReportFormatValueValuesEnumAUDIT_REPORT_FORMAT_ODFreport_format_map)selfr   r
   r   report_format_enums        9lib/googlecloudsdk/api_lib/audit_manager/audit_reports.py__init__zAuditReportsClient.__init__   sj     KD22{KDK  6 6!DM 	00LL  $%7%O%OPD    scopecompliance_frameworkreport_formatgcs_uriis_parent_folderc                    |r| j                   j                  n| j                   j                  }| j                  j	                         }||_        | j                  |   |_        ||_        |r| j                  j                         n| j                  j                         }||_        ||_        |j                  |      S )a  Generate an Audit Report.

    Args:
      scope: The scope for which to generate the report.
      compliance_framework: Compliance framework against which the Report must
        be generated.
      report_format: The format in which the audit report should be generated.
      gcs_uri: Destination Cloud storage bucket where report and evidence must
        be uploaded.
      is_parent_folder: Whether the parent is folder and not project.

    Returns:
      Described audit operation resource.
    )r
   folders_locations_auditReportsprojects_locations_auditReportsr   r   complianceFrameworkr   reportFormatgcsUri7AuditmanagerFoldersLocationsAuditReportsGenerateRequest8AuditmanagerProjectsLocationsAuditReportsGenerateRequestr   generateAuditReportRequestGenerate)	r   r   r   r   r   r   service	inner_reqreqs	            r   r&   zAuditReportsClient.Generate&   s    0  	22[[88  88:I$8I!!33MBII  	MMO]]SSU  CI%.C"C  r   )NN)
__name__
__module____qualname____doc__r   
ApiVersionr   strboolr&    r   r   r   r      s_    6 FJQ"--QQ)!)!  )! 	)!
 )! )!r   r   N)r-   $googlecloudsdk.api_lib.audit_managerr   r   objectr   r1   r   r   <module>r4      s    ? : 5:! :!r   