
    	                        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  \R                  " \R                   R"                  5      \R$                   " S
 S\R&                  5      5       5       rg)zACommand to set the IAM policy for a BigLake Iceberg REST catalog.    )absolute_import)division)unicode_literals)util)base)flags)iam_util)
propertiesc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
SetIamPolicy   z6Set the IAM policy for a BigLake Iceberg REST catalog.z7Sets the IAM policy for a BigLake Iceberg REST catalog.z          To set the IAM policy for the catalog `my-catalog` with the policy in `policy.json` run:

            $ {command} my-catalog policy.json
          )DESCRIPTIONEXAMPLESc                 ^    [         R                  " U S5        [        R                  " U 5        g )Nzto set the IAM policy for)r   AddCatalogResourceArgr	   AddArgForPolicyFile)parsers    6lib/surface/biglake/iceberg/catalogs/set_iam_policy.pyArgsSetIamPolicy.Args*   s!    	(CD  (    c           	          [         R                  " U R                  5       5      n[         R                  " U R                  5       5      nUR                  =(       d1    [
        R                  R                  R                  R                  SS9nSU SUR                   3n[        R                  " UR                  UR                  5      nUR                  R                  UR!                  UUR#                  US9S95      $ )z9This is what gets called when the user runs this command.T)requiredz	projects/z
/catalogs/)policy)resourcesetIamPolicyRequest)r   GetClientInstanceReleaseTrackGetMessagesModuleprojectr
   VALUEScoreGetcatalogr	   ParsePolicyFilepolicy_filePolicyprojects_catalogsr   *BiglakeProjectsCatalogsSetIamPolicyRequestSetIamPolicyRequest)selfargsclientmessagesr    catalog_namer   s          r   RunSetIamPolicy.Run/   s    ##D$5$5$78F%%d&7&7&9:HllOj//44<<@@$@OGwiz$,,@L%%d&6&6HF##00;;! ( < <F < K 	< 	
 r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r0   __static_attributes__r2   r   r   r   r      s2     ? O- ) )r   r   N)r7   
__future__r   r   r   googlecloudsdk.api_lib.biglaker   googlecloudsdk.callioper   "googlecloudsdk.command_lib.biglaker   googlecloudsdk.command_lib.iamr	   googlecloudsdk.corer
   ReleaseTracksr   ALPHADefaultUniverseOnlyCommandr   r2   r   r   <module>rE      sg    H &  ' / ( 4 3 * D%%++,4<<   -r   