
    N                     >   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 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	j0                               Zy)z>Command to Delete a Cloud Security Command Center mute config.    )absolute_import)division)print_function)unicode_literals)securitycenter_client)base)flags)util)log)
console_ioc                   2    e Zd ZdZddddZed        Zd Zy)Deletez-Delete a Security Command Center mute config.au  
        To delete a mute config given organization ``123'' with id ``test-mute-config'', run:

        $ {command} test-mute-config --organization=123

      To delete a mute config given folder ``456'' with id
      ``test-mute-config'', run:

        $ {command} test-mute-config --folder=456

      To delete a mute config given project ``789'' with id
      ``test-mute-config'', run:

        $ {command} test-mute-config --project=789

      To delete a mute config given organization ``123'' with id
      ``test-mute-config'' and `location=eu`, run:

        $ {command} test-mute-config --organization=123 --location=euz
      This command uses the Security Command Center API. For more information,
      see [Security Command Center API.](https://cloud.google.com/security-command-center/docs/reference/rest))DESCRIPTIONEXAMPLESzAPI REFERENCEc                     t         j                  j                  |        t        j                  |        t        j
                  j                  |        t        j                  j                  |        y )N)r	   MUTE_CONFIG_FLAGAddToParserAddParentGroup	scc_flagsAPI_VERSION_FLAGLOCATION_FLAG)parsers    %lib/surface/scc/muteconfigs/delete.pyArgszDelete.Args>   sN     
&&v.	 **62''/    c                    d}t        j                  |d       t        j                  ||j                        }t        j                  |      }|j                         }t        j                  |||      }t        j                  |      }|j                  j                  |      }t        j                  j                  d       |S )Nz/Are you sure you want to delete a mute config?
T)cancel_on_nozDeleted.)r   PromptContinuescc_utilGetVersionFromArgumentsmute_configr   GetMessages3SecuritycenterOrganizationsMuteConfigsDeleteRequestr
   GenerateMuteConfigName	GetClientorganizations_muteConfigsr   r   statusPrint)selfargspromptversionmessagesrequestclientresponses           r   Runz
Delete.RunF   s    CFf48 ..tT5E5EFG$009HJJLG ))$AG",,W5F//66w?HJJZ Or   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r1    r   r   r   r       s7    5 EI&r+-4 0 0r   r   N)r5   
__future__r   r   r   r   googlecloudsdk.api_lib.sccr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sccr	   r   r
   r   *googlecloudsdk.command_lib.scc.muteconfigsgooglecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGAALPHADeleteCommandr   r8   r   r   <module>rE      sx    E &  % ' < ( = ; < ; # 2 D%%(($*;*;*A*AB5T 5 C5r   