
    5                     n   S r SSKJr  SSKJr  SSKJr   " S S\R                  5      r " S S\5      r " S	 S
\5      r " S S\5      r	 " S S\5      r
 " S S\5      r " S S\5      rS\R                  S\4S jr " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      rg )!zManagement API gcloud errors.    )	constants)
exceptions)	resourcesc                       \ rS rSrSrSrg)Error   zBase error for this module. N__name__
__module____qualname____firstlineno____doc____static_attributes__r	       3lib/googlecloudsdk/command_lib/scc/manage/errors.pyr   r      s    #r   r   c                   4   ^  \ rS rSrSrS\4U 4S jjrSrU =r$ )InvalidParentError   ,An error representing an invalid CRM parent.bad_parent_argc                 4   > [         [        U ]  SU S35        g )N"zh" is not a valid parent. The parent name should begin with "organizations/", "projects/", or "folders/".superr   __init__selfr   	__class__s     r   r   InvalidParentError.__init__   s&    	%
N D 	Dr   r	   	r   r   r   r   r   strr   r   __classcell__r   s   @r   r   r          4S  r   r   c                   4   ^  \ rS rSrSrS\4U 4S jjrSrU =r$ )InvalidParentFlagError$   r   r   c                 ,   > [         TU ]  SU S35        g )Nr   zZ" is not a valid parent. The parent name should begin with "organizations/"or "projects/".)r   r   r   s     r   r   InvalidParentFlagError.__init__'   s"    	G
N 6 	6r   r	   r!   r$   s   @r   r'   r'   $   r%   r   r'   c                   4   ^  \ rS rSrSrS\4U 4S jjrSrU =r$ )InvalidServiceNameError.   z.An error representing an invalid service name.bad_service_name_argc                    > SR                  [        R                   Vs/ s H  n[        U5      PM     sn5      n[        [
        U ]  SU SU S35        g s  snf )Nu   
		• 'uH   ' is not a valid service name.

	The service name must be one of:
		• 
)joinr   SUPPORTED_SERVICESr"   r   r   r   )r   r.   servicevalid_service_namesr   s       r   r    InvalidServiceNameError.__init__1   se    &++%.%A%AB%A'W%AB 
%
 ! "22E1Fb	J 	Cs   Ar	   r!   r$   s   @r   r,   r,   .   s    63  r   r,   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ ) MissingCustomModuleNameOrIdError<   z9An error representing a missing custom module name or id.c                 ,   > [         [        U ]  S5        g )Nz!Missing custom module name or ID.r   )r   r   s    r   r   )MissingCustomModuleNameOrIdError.__init__?   s    	% CDr   r	   )r   r   r   r   r   r   r   r#   r$   s   @r   r8   r8   <   s    AE Er   r8   c                   4   ^  \ rS rSrSrS\4U 4S jjrSrU =r$ )InvalidCustomModuleIdErrorC   zZAn error representing a custom module ID that does not conform to _CUSTOM_MODULE_ID_REGEX.bad_module_id_argc                 b   > Uc  [         [        U ]  S5        g [         [        U ]  SU S35        g )NzMissing custom module ID.r   zj" is not a valid custom module ID. The ID should consist only of numbers and be 1-20 characters in length.r   )r   r?   r   s     r   r   #InvalidCustomModuleIdError.__init__F   s=     E4!"=>E4!  !N Nr   r	   r!   r$   s   @r   r=   r=   C   s    b  r   r=   c                   8   ^  \ rS rSrSrS\S\4U 4S jjrSrU =r$ )InvalidCustomModuleNameErrorP   z4An error representing an invalid custom module name.bad_module_name_argmodule_typec                 n   > SR                  [        U5      5      n[        [        U ]  SU SU S35        g )Nz

		r   zI" is not a valid custom module name.

	The expected format is one of:

		r1   )r2   _GetValidNameFormatForModuler   r   r   )r   rE   rF   valid_formatsr   s       r   r   %InvalidCustomModuleNameError.__init__S   sA    OO$@$MNM	%
  !..;_B	@r   r	   r!   r$   s   @r   rC   rC   P   s    <# C  r   rC   rF   returnc                     SU  3SU  3SU  3/nU Vs/ s H1  n[         R                  R                  U5      R                  S5      PM3     sn$ s  snf )z@Returns a list of name format strings for the given module_type.z1securitycentermanagement.organizations.locations.z,securitycentermanagement.projects.locations.z+securitycentermanagement.folders.locations. )r   REGISTRYGetCollectionInfoGetPath)rF   collections
collections      r   rH   rH   \   sl     	:+G4[MB3K=A+ $
#* **:6>>rB#
  
s   8Ac                       \ rS rSrSrSrg)InvalidCustomConfigFileErrorm   z6Error if a custom config file is improperly formatted.r	   Nr
   r	   r   r   rT   rT   m   s    >r   rT   c                       \ rS rSrSrSrg)InvalidResourceFileErrorq   z2Error if a test data file is improperly formatted.r	   Nr
   r	   r   r   rW   rW   q   s    :r   rW   c                       \ rS rSrSrSrg)InvalidConfigValueFileErroru   z5Error if a config value file is improperly formatted.r	   Nr
   r	   r   r   rZ   rZ   u   s    =r   rZ   c                       \ rS rSrSrSrg)InvalidUpdateMaskInputErrory   zTError if neither a custom configuration or an enablement state were given to update.r	   Nr
   r	   r   r   r]   r]   y   s    \r   r]   c                       \ rS rSrSrSrg)InvalidEnablementStateError}   zAError if an enablement state is anything but ENABLED or DISABLED.r	   Nr
   r	   r   r   r`   r`   }   s    Ir   r`   N)r   %googlecloudsdk.command_lib.scc.manager   googlecloudsdk.corer   r   r   r   r'   r,   r8   r=   rC   CustomModuleTyper"   rH   rT   rW   rZ   r]   r`   r	   r   r   <module>re      s    $ ; * )$J $ U e Eu E
 
	5 	++"?5 ?;u ;>% >]% ]J% Jr   