
    k	                         S r SSKrSSKJr  SSKJr  SSKJr  SSK	J
r
  \R                   " S S\R                  5      5       rg)	z:Command to add an IAM policy binding for an investigation.    N)args)util)base)iam_utilc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	AddIamPolicyBinding   z0Adds an IAM policy binding for an investigation.EXAMPLESaA            To add an IAM policy binding for the role of 'roles/geminicloudassist.investigationViewer'
          for the user 'test-user@gmail.com' on the investigation
          'project/my-project/locations/my-location/investigations/my-investigation', run:

            $ {command} project/my-project/locations/my-location/investigations/my-investigation --member='user:test-user@gmail.com' --role='roles/geminicloudassist.investigationViewer'

          See https://cloud.google.com/iam/docs/managing-policies for details of
          policy role and member types.
          c                 ^    [         R                  " U S5        [        R                  " U 5        g)zHRegisters flags for this command.

Args:
  parser: The argparse parser.
zto add IAM policy binding forN)geminicloudassist_argsAddInvestigationResourceArgr   AddArgsForAddIamPolicyBinding)parsers    Hlib/surface/gemini/cloud_assist/investigations/add_iam_policy_binding.pyArgsAddIamPolicyBinding.Args+   s(     66/ **62    c                 n    [         R                  " UR                  UR                  UR                  5      $ )zAdds an IAM policy binding for an investigation.

Args:
  args: An argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  The updated IAM policy.
)geminicloudassist_util AddInvestigationIamPolicyBindinginvestigationmemberrole)selfr   s     r   RunAddIamPolicyBinding.Run7   s,     "BBDKK r    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r   __static_attributes__r   r   r   r   r      s:    8 (// 	# 	- 	3 	3r   r   )r"   r#   *googlecloudsdk.api_lib.gemini_cloud_assistr   r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iamr   UniverseCompatibleCommandr   r   r   r   <module>r-      s?     A  U U ( 3 ($,, ( (r   