
                            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
lmZ  ej                  ej                   j"                  ej                   j$                         G d dej&                               Zy)z&Command to delete a SHA custom module.    )absolute_import)division)unicode_literals)clients)base)	constants)flags)parsing)
console_ioc                   &    e Zd ZdZed        Zd Zy)Deletea  Delete a Security Health Analytics custom module.

  Delete a Security Health Analytics 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 Security Health Analytics custom module with ID
  `123456` for organization `123`, run:

    $ {command} 123456 --organization=123

  To delete a Security Health Analytics custom module with ID
  `123456` for folder `456`, run:

    $ {command} 123456 --folder=456

  To delete a Security Health Analytics 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/securityHealthAnalyticsCustomModules/123456
  c                    t        j                  t        j                  j                        j                  |        t        j                  d      j                  |        t        j                  d      j                  |        y )Nmodule_typeF)required)r	   CreateModuleIdOrNameArgr   CustomModuleTypeSHAAddToParserCreateParentFlagCreateValidateOnlyFlag)parsers    3lib/surface/scc/manage/custom_modules/sha/delete.pyArgszDelete.ArgsA   s[    	!!..22k&	E*66v>	  %0<<VD    c                    t        j                  |t        j                  j                        }|j
                  }|s&t        j                  dj                  |      d       t        j                         }|j                  ||      S )Nr   zPAre you sure you want to delete the Security Health Analytics custom module {}?
T)messagecancel_on_no)namevalidate_only)r
   GetModuleNameFromArgsr   r   r   r    r   PromptContinueformatr   SHACustomModuleClientr   )selfargsr   r    clients        r   Runz
Delete.RunI   su    (()4488D &&M%%+VD\ **,F==d-=@@r   N)__name__
__module____qualname____doc__staticmethodr   r(    r   r   r   r      s$     D E EAr   r   N)r,   
__future__r   r   r   %googlecloudsdk.api_lib.scc.manage.shar   googlecloudsdk.callioper   %googlecloudsdk.command_lib.scc.manager   r	   r
   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGAALPHADeleteCommandr   r.   r   r   <module>r9      sq    - &  ' 9 ( ; 7 9 2 D%%(($*;*;*A*AB=AT =A C=Ar   