
                         P   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  SSKJr  SSKJr  \
R.                  \
R0                  " \
R2                  R4                  5      \
R6                   " S S\
R8                  5      5       5       5       rg)z?Command to add an attestation rule on a workload identity pool.    )absolute_import)division)unicode_literals)util)waiter)base)concepts)identity_pool_waiter)	yaml_data)concept_parsers)log)	resourcesc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
AddAttestationRule    z4Add an attestation rule on a workload identity pool.z{description}a)            The following command adds an attestation rule with a Google Cloud
          resource on a workload identity pool `my-pool`.

            $ {command} my-pool             --location="global"             --google-cloud-resource="//run.googleapis.com/projects/123/type/Service/*"
          )DESCRIPTIONEXAMPLESc                 T   [         R                  R                  S5      n[        R                  R                  S[        R                  R                  UR                  5       SS9SSS9R                  U 5        U R                  SSSS	9  [        R                  R                  U 5        g )
Nziam.workload_identity_poolworkload_identity_poolT)is_positionalz:The workload identity pool to add the attestation rule on.)requiredz--google-cloud-resourcezpA single workload running on Google Cloud. This will be set
                in the attestation rule to be added.)helpr   )r   ResourceYAMLDataFromPathr   ConceptParserForResourcer	   ResourceSpecFromYamlGetDataAddToParseradd_argumentr   
ASYNC_FLAG)parserworkload_pool_datas     ?lib/surface/iam/workload_identity_pools/add_attestation_rule.pyArgsAddAttestationRule.Args2   s    "33<<$ !!-- &&&&( 	' 	
 	E .  k&
!8	   	OO'    c                 :   [         R                  " 5       u  p#UR                  R                  R	                  5       nUR                  UR                  UR                  S9S9nUR                  R                  UR                  UR                  5       US95      n[        R                  R                  SR                  UR                   5      5        UR"                  (       a  U$ [$        R&                  " [(        R*                  " UR                  UR,                  5      [.        R0                  R3                  UR4                  SS9SR                  UR4                  5      SS	9n[        R                  R                  S
R                  UR                   5      5        U$ )N)googleCloudResource)attestationRule)resourceaddAttestationRuleRequestz-Add attestation rule request issued for: [{}]z7iam.projects.locations.workloadIdentityPools.operations)
collectionz&Waiting for operation [{}] to completei )polleroperation_refmessagemax_wait_msz Added attestation rule for [{}].)r   GetClientAndMessagesCONCEPTSr   ParseAddAttestationRuleRequestAttestationRulegoogle_cloud_resource(projects_locations_workloadIdentityPoolsr   BIamProjectsLocationsWorkloadIdentityPoolsAddAttestationRuleRequestRelativeNamer   statusPrintformatworkloadIdentityPoolsIdasync_r   WaitForr
   &IdentityPoolOperationPollerNoResources3projects_locations_workloadIdentityPools_operationssdkresourcesREGISTRYParseRelativeNamename)selfargsclientmessagesworkload_pool_refadd_attestation_rule_requestlro_refresults           r%   RunAddAttestationRule.RunG   sq   002F<<BBD#+#E#E 00 $ : : 1 
 $F $  ==PPSS&335&B 	T 	
G JJ7>>55	
 {{n^^#JJ;;FF
 #++==LLI > 
 9??M F" JJ*1155	
 Mr(    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr&   rP   __static_attributes__rR   r(   r%   r   r       s1     = %
- ( ((1r(   r   N)rW   
__future__r   r   r   googlecloudsdk.api_lib.iamr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper    googlecloudsdk.calliope.conceptsr	   googlecloudsdk.command_lib.iamr
   $googlecloudsdk.command_lib.util.apisr   (googlecloudsdk.command_lib.util.conceptsr   googlecloudsdk.corer   r   rD   DefaultUniverseOnlyReleaseTracksReleaseTrackGAHiddenCommandr   rR   r(   r%   <module>rj      s    F &  ' + . ( 5 ? : D # 9 D%%(()U U  * Ur(   