ó
    €Ïú  ã                   ó°   • 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                   " S
 S\R                  5      5       rg)zCommand for undeleting a role.é    )Úabsolute_import)Údivision)Úunicode_literals)Úutil)Úbase)Ú
exceptions)Úflags)Úiam_utilc                   ó.   • \ rS rSrSr\S 5       rS rSrg)ÚUndeleteé   aL  Undelete a custom role from an organization or a project.

This command undeletes a role. Roles that have been deleted for certain long
time can't be undeleted.

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.

## EXAMPLES

To undelete the role ``ProjectUpdater'' of the organization ``1234567'', run:

  $ {command} ProjectUpdater --organization=1234567

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

  $ {command} ProjectUpdater --project=myproject
c                 ó|   • [         R                  " U S5        [         R                  " S5      R                  U 5        g )NÚundelete)r	   ÚAddParentFlagsÚGetCustomRoleFlagÚAddToParser)Úparsers    Ú!lib/surface/iam/roles/undelete.pyÚArgsÚUndelete.Args4   s+   € ä	×Ò˜ Ô,Ü	×Ò˜JÓ'×3Ñ3°FÕ;ó    c                 óN  • [         R                  " 5       u  p#[        R                  " UR                  UR
                  UR                  5      nUR                  c$  UR
                  c  [        R                  " SS5      eUR                  R                  UR                  US95      $ )NÚROLE_IDz/You can not undelete a curated/predefined role.)Úname)r   ÚGetClientAndMessagesr
   ÚGetRoleNameÚorganizationÚprojectÚroler   ÚInvalidArgumentExceptionÚorganizations_rolesr   Ú$IamOrganizationsRolesUndeleteRequest)ÚselfÚargsÚclientÚmessagesÚ	role_names        r   ÚRunÚUndelete.Run9   s‘   € Ü×0Ò0Ó2Ñ€FÜ×$Ò$ T×%6Ñ%6¸¿¹ÀdÇiÁiÓP€IØ×ÑÑ  T§\¡\Ñ%9Ü×/Ò/Ø
Ø
;ó=ð =ð ×%Ñ%×.Ñ.Ø×5Ñ5¸9Ð5ÐEóGð Gr   © N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ústaticmethodr   r(   Ú__static_attributes__r*   r   r   r   r      s!   † ñð* ñ<ó ð<õGr   r   N)r/   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.iamr   Úgooglecloudsdk.callioper   r   Úgooglecloudsdk.command_lib.iamr	   r
   ÚUniverseCompatibleÚDescribeCommandr   r*   r   r   Ú<module>r8      sL   ðñ  %å &Ý Ý 'å +Ý (Ý .Ý 0Ý 3ð ×Ñô#Gˆt×#Ñ#ó #Gó ñ#Gr   