
    	                        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)zKCommand to set the IAM policy for a BigLake Iceberg REST catalog namespace.    )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   z@Set the IAM policy for a BigLake Iceberg REST catalog namespace.zASets the IAM policy for a BigLake Iceberg REST catalog namespace.z          To set the IAM policy for the catalog `my-catalog` and namespace `my-namespace` with the policy in `policy.json` run:

            $ {command} my-namespace policy.json --catalog=my-catalog
          )DESCRIPTIONEXAMPLESc                 ^    [         R                  " U S5        [        R                  " U 5        g )Nzto set the IAM policy for)r   AddNamespaceResourceArgr	   AddArgForPolicyFile)parsers    8lib/surface/biglake/iceberg/namespaces/set_iam_policy.pyArgsSetIamPolicy.Args+   s!    	!!&*EF  (    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                   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/z/namespaces/)policy)resourcesetIamPolicyRequest)r   GetClientInstanceReleaseTrackGetMessagesModuleprojectr
   VALUEScoreGetcatalog	namespacer	   ParsePolicyFilepolicy_filePolicyprojects_catalogs_namespacesr   4BiglakeProjectsCatalogsNamespacesSetIamPolicyRequestSetIamPolicyRequest)selfargsclientmessagesr    namespace_namer   s          r   RunSetIamPolicy.Run0   s    ##D$5$5$78F%%d&7&7&9:HllOj//44<<@@$@OG 	DLL>dnnM]^N%%d&6&6HF..;;EE# ( < <F < K 	F 	
 r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r1   __static_attributes__r3   r   r   r   r      s2     I#- ) )r   r   N)r8   
__future__r   r   r   googlecloudsdk.api_lib.biglaker   googlecloudsdk.callioper   "googlecloudsdk.command_lib.biglaker   googlecloudsdk.command_lib.iamr	   googlecloudsdk.corer
   ReleaseTracksr   ALPHADefaultUniverseOnlyCommandr   r3   r   r   <module>rF      sg    R &  ' / ( 4 3 * D%%++,4<<   -r   