Ë
    €Ï	  ã                   ó¸   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ dd	l
mZ d
diZej                   G d„ dej                  «      «       Zy)zCommand for deleting a role.é    )Úabsolute_import)Údivision)Úunicode_literals)Úutil)Úbase)Ú
exceptions)Úflags)Úiam_utilÚEXAMPLESaA            To delete the role ``ProjectUpdater'' of the organization ``1234567'',
          run:

            $ {command} ProjectUpdater --organization=1234567

          To delete the role ``ProjectUpdater'' of the project ``myproject'',
          run:

            $ {command} ProjectUpdater --project=myproject
        c                   ó*   — e Zd ZdZeZed„ «       Zd„ Zy)ÚDeletezýDelete a custom role from an organization or a project.

  This command deletes a role.

  This command can fail for the following reasons:
  * The role specified does not exist.
  * The active user does not have permission to access the given role.

  c                 óx   — t        j                  | d«       t        j                  d«      j                  | «       y )NÚdelete)r	   ÚAddParentFlagsÚGetCustomRoleFlagÚAddToParser)Úparsers    úlib/surface/iam/roles/delete.pyÚArgszDelete.Args;   s+   € ä	×Ñ˜ Ô*Ü	×Ñ˜HÓ%×1Ñ1°&Õ9ó    c                 óL  — t        j                  |j                  |j                  |j                  «      }t        j                  «       \  }}|j                  €"|j                  €t        j                  dd«      ‚|j                  j                  |j                  |¬«      «      S )NÚROLE_IDz-You can not delete a curated/predefined role.)Úname)r
   ÚGetRoleNameÚorganizationÚprojectÚroler   ÚGetClientAndMessagesr   ÚInvalidArgumentExceptionÚorganizations_rolesr   Ú"IamOrganizationsRolesDeleteRequest)ÚselfÚargsÚ	role_nameÚclientÚmessagess        r   ÚRunz
Delete.Run@   s“   € Ü×$Ñ$ T×%6Ñ%6¸¿¹ÀdÇiÁiÓP€IÜ×0Ñ0Ó2Ñ€FˆHØ×ÑÐ  T§\¡\Ð%9Ü×/Ñ/Ø
Ø
9ó;ð ;ð ×%Ñ%×,Ñ,Ø×3Ñ3¸Ð3ÓCóEð Er   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚDETAILED_HELPÚdetailed_helpÚstaticmethodr   r'   © r   r   r   r   -   s&   „ ñð  €-àñ:ó ð:óEr   r   N)r+   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.iamr   Úgooglecloudsdk.callioper   r   Úgooglecloudsdk.command_lib.iamr	   r
   r,   ÚUniverseCompatibleÚDescribeCommandr   r/   r   r   Ú<module>r6      s]   ðñ  #å &Ý Ý 'å +Ý (Ý .Ý 0Ý 3ð ð
	ð€ð  ×ÑôEˆT×!Ñ!ó Eó ñEr   