
                            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  \R                  " \R                  R                  5      \R                    " S S\R"                  5      5       5       r\R                  " \R                  R&                  5      \R                    " S	 S
\R"                  5      5       5       rg)zWCommand for listing all the Cloud Security Command Center postures for an organization.    )
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   ILists all the Cloud Security Command Center postures for an organization.^
          Lists all the Cloud Security Command Center postures for an
          organization.  
          To list all the Cloud Security Command Center postures for an
          organization `123`
          and in the `global` location, run:

            $ {command} organizations/123/locations/global

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

            z
      This command uses the securityposture/v1 API. The full documentation for
    this API can be found at: 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/postures/list.pyArgs	List.Args4   &     	MM""6* 
'    c           	      2   [         R                  " USS9n[        R                  " [        R
                  R                  5      n[        R                  " [        R
                  R                  5      n[         R                  " X5      nUR                  S5      (       a  UR                  nO[         R                  " U5       SU 3n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_resourcePARENT/locations/filter	page_sizeparentr#   pageSizer'   posturesbatch_size_attribute
batch_sizefield)scc_utilGetVersionFromArgumentssecurityposture_clientGetMessagesModuler   ReleaseTrackGAGetClientInstanceValidateAndGetLocationIsKnownAndSpecifiedr!    GetParentFromPositionalArguments8SecuritypostureOrganizationsLocationsPosturesListRequestgetattrr   YieldFromList organizations_locations_posturesr$   selfargsversionmessagesclientlocationr&   requests           r   RunList.Run<   s    ..G &778I8I8L8LMH#55d6G6G6J6JKF..t=H  **{{f;;DAB+hZXf OOtXt,{D1 P G ##//'>> r    N
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   rC   __static_attributes__rE   r   r   r	   r	      s8     R	R-* ( (r   r	   c                   :    \ rS rSrSrSSSS.r\S 5       rS rS	r	g
)	ListAlpha[   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.Argst   r   r   c           	      h   [         R                  " USS9n[        R                  " [        R
                  R                  5      n[        R                  " [        R
                  R                  5      n[         R                  " X5      nUR                  S5      (       aB  UR                  S5      (       a,  UR                  S5      (       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$ )NTr   r!   organizationrA   z^Cannot provide both a positional `PARENT` and argument (`--organization`, `--location`) flags.r"   zXMust provide either positional `PARENT` or both `--organization` and `--location` flags.r#   r$   r%   r'   r(   r)   )r-   r.   r/   r0   r   r1   ALPHAr3   r4   r5   IsSpecifiedr   InvalidSCCInputErrorr!   r6   r7   r8   r   r9   r:   r$   r;   s           r   rC   ListAlpha.Run|   s}   ..G &778I8I8O8OPH#55d6G6G6M6MNF..t=H  **((T-=-=j-I-I''4 
 	  **{{f


>
*
*t/?/?
/K/K;;DAB+hZXf''$  OOtXt,{D1 P G ##//'>> r   rE   NrF   rE   r   r   rP   rP   [   s7     R	:-( ( ()r   rP   N)rK   apitools.base.pyr   #googlecloudsdk.api_lib.scc.posturesr   r/   googlecloudsdk.callioper   googlecloudsdk.command_lib.sccr   r-   'googlecloudsdk.command_lib.scc.posturesr   ReleaseTracksr1   r2   DefaultUniverseOnlyListCommandr	   rV   rP   rE   r   r   <module>rb      s    ^ ( N ( 1 ; 9 D%%(()<4 <  *<~ D%%++,H   H  -Hr   