
    F                     4   d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d dej                        Z G d d	ej                        Z	 G d
 dej                        Z
 G d dej                        Z G d dej                        Z G d dej                        Zy)zHelpers for raising exceptions.    )absolute_import)division)unicode_literals)
exceptionsc                       e Zd ZdZy)FileOutputErrorz.Error thrown for issues with writing to files.N__name__
__module____qualname____doc__     6lib/googlecloudsdk/command_lib/privateca/exceptions.pyr   r      s    6r   r   c                       e Zd ZdZy)$InvalidCertificateAuthorityTypeErrorz;Error thrown for performing a command on the wrong CA type.Nr	   r   r   r   r   r          Cr   r   c                       e Zd ZdZy)NoUpdateExceptionzCError thrown when an update command is run resulting in no updates.Nr	   r   r   r   r   r       s    Kr   r   c                       e Zd ZdZy)UserAbortExceptionz/Error thrown when an a user aborts the command.Nr	   r   r   r   r   r   $   s    7r   r   c                   "     e Zd ZdZ fdZ xZS )InsufficientPermissionExceptionzGIndicates that a user is missing required permissions for an operation.c                 j    t         t        |   dj                  dj	                  |      |             y)zCreate a new InsufficientPermissionException.

    Args:
      resource: str, The resource on which the user needs permissions.
      missing_permissions: iterable, The missing permissions.
    zThe current user does not have permissions for this operation. Please ensure you have {} permissions on the {} and that you are logged-in as the correct user and try again.,N)superr   __init__formatjoin)selfresourcemissing_permissions	__class__s      r   r   z(InsufficientPermissionException.__init__+   s4     

)49	??EvHH()8@56r   )r
   r   r   r   r   __classcell__)r#   s   @r   r   r   (   s    O6 6r   r   c                       e Zd ZdZy)UnsupportedKmsKeyTypeExceptionz;Indicates that a user is using an unsupported KMS key type.Nr	   r   r   r   r&   r&   9   r   r   r&   N)r   
__future__r   r   r   googlecloudsdk.corer   Errorr   r   r   r   r   r&   r   r   r   <module>r*      s    & &  ' *7j&& 7D:+;+; DL
(( L8)) 86j&6&6 6"DZ%5%5 Dr   