
                         6    S r SSKJr  SSKJr  SSKJr  SrS r	g)z)Helpers for interacting with the IAM API.    )util)iam_util)log   c                    [         R                  " 5       u  p4UR                  U S9nUR                  R	                  US9nSnU H(  nU[
        R                  " UR                  XhU5      -  nM*     U(       d  [        R                  " S5        g[        R                  " S5        UR                  U UR                  US9S9n	UR                  R                  U	S9ng)	z?Adds IAM policy bindings for members with the role on resource.)resource)requestFz2Skipped setting IAM policy, no changes are needed.NzSetting the updated IAM policy.)policy)r   setIamPolicyRequest)iam_apiGetClientAndMessages-IamProjectsServiceAccountsGetIamPolicyRequestprojects_serviceAccountsGetIamPolicyr   AddBindingToIamPolicyBindingr   debug-IamProjectsServiceAccountsSetIamPolicyRequestSetIamPolicyRequestSetIamPolicy)
r   membersrole
iam_clientiam_messagesr	   
iam_policybinding_updatedmemberset_requests
             2lib/googlecloudsdk/api_lib/dataproc/iam_helpers.pyAddIamPolicyBindingsr       s    $99;*FF G '22???P*/fx55l6J6J6@$P PO  
IIBC
))-.JJ&::*:M K O+ 22?? @ *    N)
__doc__googlecloudsdk.api_lib.iamr   r   googlecloudsdk.command_lib.iamr   googlecloudsdk.corer   !MAX_LIBRARY_IAM_SUPPORTED_VERSIONr     r!   r   <module>r(      s"    0 7 3 # %& !r!   