
                            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  SS
KJr  \R                  " \R                   R"                  \R                   R$                  5       " S S\R&                  5      5       rg)z&Command to delete a ETD custom module.    )absolute_import)division)unicode_literals)clients)base)	constants)flags)parsing)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Delete   a  Delete an Event Threat Detection custom module.

Delete a Event Threat Detection custom module. User specifies the custom
module as well as the parent of the module to delete. A validation_only flag
is optional. When set to true only validations (including IAM checks) will
done for the request (module will not be deleted).

## EXAMPLES

To delete an Event Threat Detection custom module with ID
`123456` for organization `123`, run:

  $ {command} 123456 --organization=123

To delete a Event Threat Detection custom module with ID
`123456` for folder `456`, run:

  $ {command} 123456 --folder=456

To delete a Event Threat Detection custom module with ID
`123456` for project `789`, run:

  $ {command} 123456 --project=789

You can also specify the parent more generally:

  $ {command} 123456 --parent=organizations/123

Or just specify the fully qualified module name:

  $ {command}
  organizations/123/locations/global/eventThreatDetectionCustomModules/123456
c                    [         R                  " [        R                  R                  S9R                  U 5        [         R                  " SS9R                  U 5        [         R                  " SS9R                  U 5        g )Nmodule_typeF)required)r	   CreateModuleIdOrNameArgr   CustomModuleTypeETDAddToParserCreateParentFlagCreateValidateOnlyFlag)parsers    3lib/surface/scc/manage/custom_modules/etd/delete.pyArgsDelete.ArgsA   s[    	!!..22k&	E*66v>	  %0<<VD    c                    [         R                  " U[        R                  R                  S9nUR
                  nU(       d$  [        R                  " SR                  U5      SS9  [        R                  " 5       nUR                  X#S9$ )Nr   zMAre you sure you want to delete the Event Threat Detection custom module {}?
T)messagecancel_on_no)namevalidate_only)r
   GetModuleNameFromArgsr   r   r   r"   r   PromptContinueformatr   ETDCustomModuleClientr   )selfargsr!   r"   clients        r   Run
Delete.RunI   ss    (()4488D &&M%%+VD\ **,F==d=@@r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r*   __static_attributes__r,   r   r   r   r      s$     D E EAr   r   N)r1   
__future__r   r   r   %googlecloudsdk.api_lib.scc.manage.etdr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.scc.manager   r	   r
   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGAALPHADeleteCommandr   r,   r   r   <module>r>      so    - &  ' 9 ( ; 7 9 2 D%%(($*;*;*A*AB=AT =A C=Ar   