
                            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      \R*                   " S S\R,                  5      5       5       r\R$                  " \R&                  R0                  5      \R*                   " S S\R,                  5      5       5       rg)z;Command for listing an organization IaC validation reports.    )absolute_import)division)print_function)unicode_literals)
list_pager)util)base)errors)flagsc                   :    \ rS rSrSrSSSS.r\S 5       rS rS	r	g
)List   ]Lists all the Cloud Security Command Center (SCC) IaC validation reports for an organization.r
          Lists all the Cloud Security Command Center (SCC) IaC validation
          reports for an organization.(  
          To list Cloud Security Command Center IaC validation reports for organization `123` in the `global` location, run:

            $ {command} organizations/123/locations/global/reports

          Or using flags:

            $ {command} --organization=123 --location=global

            z
      This command uses the securityposture/v1 API. For more information,
      see Security Command Center API. (https://cloud.google.com/security-command-center)DESCRIPTIONEXAMPLESzAPI REFERENCEc                 n    [         R                  R                  U 5        [        R                  " U 5        g Nr	   URI_FLAGRemoveFromParserr   AddParentOrFlagsGroupparsers    .lib/surface/scc/iac_validation_reports/list.pyArgs	List.Args:   &     	MM""6* 
'    c           	      J   [         R                  " USS9n[        R                  " [        R
                  R                  5      n[        R                  " [        R
                  R                  5      n[         R                  " X5      nUR                  (       a8  UR                  (       a'  UR                  (       a  [        R                  " S5      eUR                  S5      (       a  UR                  nO^UR                  S5      (       a2  UR                  S5      (       a  [         R                   " U5       SU 3nO[        R                  " S5      eUR#                  U[%        US	S 5      [%        US
S 5      S9n[&        R(                  " UR*                  USUR,                  SS9$ NT)"version_specific_existing_resourcez^Cannot provide both a positional `PARENT` and argument (`--organization`, `--location`) flags.PARENTorganizationlocationz/locations/zXMust provide either positional `PARENT` or both `--organization` and `--location` flags.filter	page_size)parentr(   pageSizer+   reports)batch_size_attribute
batch_sizefield)scc_utilGetVersionFromArgumentssecurityposture_clientGetMessagesModuler	   ReleaseTrackGAGetClientInstanceValidateAndGetLocationr%   r&   r'   r
   InvalidSCCInputErrorIsKnownAndSpecifiedIsSpecified GetParentFromPositionalArguments7SecuritypostureOrganizationsLocationsReportsListRequestgetattrr   YieldFromListorganizations_locations_reportsr)   selfargsversionmessagesclientr'   r*   requests           r   RunList.RunB   s`   ..G &778I8I8L8LMH#55d6G6G6J6JKF..t=H$++''4 
 	  **{{f


>
*
*t/?/?
/K/K;;DAB+hZXf''$  NNtXt,{D1 O G ##..'>> r!    N
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   rG   __static_attributes__rI   r!   r   r   r      s8    
 f*	]!-* ( ('r!   r   c                   :    \ rS rSrSrSSSS.r\S 5       rS rS	r	g
)	ListAlphal   r   r   r   z
      This command uses the securityposture/v1alpha API. The full documentation for this API can be found at:
      https://cloud.google.com/security-command-centerr   c                 n    [         R                  R                  U 5        [        R                  " U 5        g r   r   r   s    r   r   ListAlpha.Args   r    r!   c           	      J   [         R                  " USS9n[        R                  " [        R
                  R                  5      n[        R                  " [        R
                  R                  5      n[         R                  " X5      nUR                  (       a8  UR                  (       a'  UR                  (       a  [        R                  " S5      eUR                  S5      (       a  UR                  nO^UR                  S5      (       a2  UR                  S5      (       a  [         R                   " U5       SU 3nO[        R                  " S5      eUR#                  U[%        US	S 5      [%        US
S 5      S9n[&        R(                  " UR*                  USUR,                  SS9$ r#   )r0   r1   r2   r3   r	   r4   ALPHAr6   r7   r%   r&   r'   r
   r8   r9   r:   r;   r<   r=   r   r>   r?   r)   r@   s           r   rG   ListAlpha.Run   s`   ..G &778I8I8O8OPH#55d6G6G6M6MNF..t=H$++''4 
 	  **{{f


>
*
*t/?/?
/K/K;;DAB+hZXf''$  NNtXt,{D1 O G ##..'>> r!   rI   NrJ   rI   r!   r   rT   rT   l   s7    
 f*	:!-* ( ('r!   rT   N)rO   
__future__r   r   r   r   apitools.base.pyr   #googlecloudsdk.api_lib.scc.posturesr   r2   googlecloudsdk.callioper	   googlecloudsdk.command_lib.sccr
   r0   5googlecloudsdk.command_lib.scc.iac_validation_reportsr   ReleaseTracksr4   r5   DefaultUniverseOnlyListCommandr   rY   rT   rI   r!   r   <module>rd      s    B &  % ' ' N ( 1 ; G  G4 G GT  G   G Gr!   