
                             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SKJ	r	  SSK
Jr  SS	KJr  SS
KJr  SS	KJr  \R&                  " \R(                  R*                  5       " S S\R,                  5      5       rg)zCCommand for listing Cloud Security Command Center BigQuery exports.    )absolute_import)division)print_function)unicode_literals)
list_pager)securitycenter_client)base)flags)utilc                   :    \ rS rSrSrSSSS.r\S 5       rS rS	r	g
)List   z.List Security Command Center BigQuery exports.a  List Security Command Center BigQuery exports.

      BigQuery exports that are created with Security Command Center API V2 and
      later include a `location` attribute. Include the `--location` flag to
      list BigQuery exports with `location` attribute other than `global`.
      a        List BigQuery exports under organization `123`:

          $ gcloud scc bqexports list --organization=123

      List BigQuery exports under folder `456`:

          $ gcloud scc bqexports list --folder=456

      List BigQuery exports under project `789`:

          $ gcloud scc bqexports list --project=789

      List BigQuery exports under organization `123` and location `global`:

          $ gcloud scc bqexports list --organization=123               --location=global

      List BigQuery exports under organization `123` and `location=eu`:

          $ gcloud scc bqexports list --organization=123               --location=eu
      z      This command uses the Security Command Center API. For more information, see
      [Security Command Center API.](https://cloud.google.com/security-command-center/docs/reference/rest)
          )DESCRIPTIONEXAMPLESzAPI REFERENCEc                     [         R                  R                  U 5        [        R                  " U SS9  [
        R                  R                  U 5        [
        R                  R                  U 5        g )NT)required)	r	   URI_FLAGRemoveFromParserbqexports_flagsAddParentGroup	scc_flagsAPI_VERSION_FLAGAddToParserLOCATION_FLAG)parsers    !lib/surface/scc/bqexports/list.pyArgs	List.ArgsG   sN     	MM""6*""6D9**62''/    c                    [         R                  " USS9n[        R                  " U5      n[        R                  " U5      nUS:X  a8  UR                  5       n[         R                  " U5      Ul        UR                  nOUUR                  5       n[         R                  " U5      n[         R                  " US5      nU SU 3Ul        UR                  nUR                  Ul        [        R                  " UUSUR                  SS9$ )	NT)"version_specific_existing_resourcev1v2z/locations/pageSizebigQueryExports)batch_size_attribute
batch_sizefield)scc_utilGetVersionFromArgumentsr   GetMessages	GetClient5SecuritycenterOrganizationsBigQueryExportsListRequestGetParentFromNamedArgumentsparentorganizations_bigQueryExports>SecuritycenterOrganizationsLocationsBigQueryExportsListRequestValidateAndGetLocation'organizations_locations_bigQueryExports	page_sizer$   r   YieldFromList)	selfargsversionmessagesclientrequestendpointr/   locations	            r   RunList.RunQ   s    ..G %009H",,W5F$NNPg;;DAgn55h 
Q
Q
S  33D9f00t<h XJ7gn??h~~G ##'>> r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r>   __static_attributes__r@   r   r   r   r      s5    6

.="-H 0 0r   r   N)rE   
__future__r   r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.sccr   googlecloudsdk.callioper	   googlecloudsdk.command_lib.sccr
   r   r   r)   (googlecloudsdk.command_lib.scc.bqexportsr   ReleaseTracksReleaseTrackGAListCommandr   r@   r   r   <module>rS      sd     J &  % ' ' < ( = ; M D%%(()P4 P *Pr   