
                            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  SS
KJr  SSKJr  SSKJr  \	R,                  " \	R.                  R0                  \	R.                  R2                  \	R.                  R4                  5      \	R6                   " S S\	R8                  5      5       5       rg)zICommand for deleting a Cloud Security Command Center notification config.    )absolute_import)division)print_function)unicode_literals)securitycenter_client)base)flags)util)notification_util)log)
console_ioc                   :    \ rS rSrSrSSSS.r\S 5       rS rS	r	g
)Delete    z5Delete a Security Command Center notification config.a        Delete a Security Command Center notification config.

      Notification configs that are created with Security Command Center API V2
      and later include a `location` attribute. If the `location` attribute is
      included in the resource name of a Notification configs, you must specify
      it when referencing the Notification config. For example, the following
      Notification configs name has `location=eu`:
      `organizations/123/locations/eu/notificationConfigs/test-config`.
      a        Delete notification config 'test-config' from organization `123`

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

      Delete notification config 'test-config' from folder `456`

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

      Delete notification config 'test-config' from project `789`

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

      Delete notification config 'test-config' with location `global` from
      organization `123`

        $ {command} test-config --organization=123 --location=global

      Delete notification config 'test-config' with `location=eu` from
      organization `123`

        $ {command} test-config --organization=123 --location=eu
      z      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                     [         R                  " U 5        [         R                  " U 5        [        R                  R                  U 5        [         R                  R                  U 5        g )N)notifications_flagsAddParentGroup'AddNotificationConfigPositionalArgument	scc_flagsAPI_VERSION_FLAGAddToParser(DELETE_NOTIFICATION_CONFIG_LOCATION_FLAG)parsers    'lib/surface/scc/notifications/delete.pyArgsDelete.ArgsO   sK     &&v.??G**62@@LL    c                    [         R                  " SSS9  [        R                  " U5      n[        R
                  " X5        [        R                  " XR                  SS9n[        R                  " U5      n[        R                  " U5      nUS:X  aG  UR                  5       n[        R                  " U5      Ul        UR                  R                  U5      nOFUR!                  5       n[        R"                  " U5      Ul        UR$                  R                  U5      n[&        R(                  R+                  S5        U$ )Nz7Are you sure you want to delete a notification config?
T)messagecancel_on_no)"version_specific_existing_resourcev1zDeleted.)r   PromptContinuescc_utilGetParentFromNamedArgumentsr    ValidateMutexOnConfigIdAndParentGetVersionFromArgumentsNOTIFICATIONCONFIGIDr   GetMessages	GetClient;SecuritycenterOrganizationsNotificationConfigsDeleteRequest&ValidateAndGetNotificationConfigV1Namename!organizations_notificationConfigsr   DSecuritycenterOrganizationsLocationsNotificationConfigsDeleteRequest&ValidateAndGetNotificationConfigV2Name+organizations_locations_notificationConfigsr   statusPrint)selfargsparentversionmessagesclientreqresults           r   Run
Delete.RunZ   s    J 11$7F66tD
 ..''DG %009H",,W5F$

N
N
P 
 #II$Och77>>sCf 
W
W
Y 
 #II$OchAAHHMfJJZ Mr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r>   __static_attributes__r@   r   r   r   r       s8    
 >	

.
E&-P  "r   r   N)rE   
__future__r   r   r   r   googlecloudsdk.api_lib.sccr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sccr	   r   r
   r&   ,googlecloudsdk.command_lib.scc.notificationsr   r   googlecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGABETAALPHADefaultUniverseOnlyDeleteCommandr   r@   r   r   <module>rW      s    P &  % ' < ( = ; U J # 2 $++00$2C2C2I2I XT X Xr   