
                            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  \	R                  " \	R                  R                   5      \	R"                   " S
 S\	R$                  5      5       5       rg)zPCommand for deleting a Cloud Security Command Center RemediationIntent resource.    )absolute_import)division)print_function)unicode_literals)sps_api)base)flags)logc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Delete   z&Deletes a remediation intent resource.zZ
        Deletes a Cloud Security Command Center (SCC)
        RemediationIntent resource.a  
          Sample usage:
          Delete a remediation intent resource of name organizations/123456789/locations/global/remediationIntents/123:
          $ {{command}} scc remediation-intents delete organizations/123456789/locations/global/remediationIntents/123
          )DESCRIPTIONEXAMPLESc                     [         R                  R                  U 5        [         R                  R                  U S5        [        R
                  R                  U 5        [        R                  " U 5        g )NF)r   
ASYNC_FLAGAddToParser
SetDefaultr	   	ETAG_FLAGAddRemediationIntentResourceArg)parsers    -lib/surface/scc/remediation_intents/delete.pyArgsDelete.Args-   sH    OO'OOvu-	OO'	))&1    c                 Z   [         R                  " [        R                  R                  5      n[         R
                  " [        R                  R                  5      nUR                  R                  R                  5       nUR                  5       nUR                  UUR                  S9nUR                  R                  US9nUR                  nUR                  (       a"  [         R"                  R%                  SU5        U$ [         R&                  " [         R(                  " U5      SSS9$ )zThe main function which is called when the user runs this command.

Args:
  args: An argparse namespace. All the arguments that were provided to this
    command invocation.
Returns:
  Operation resource containing success or error.
)nameetag)requestz9Check for operation completion status using operation ID:z,Waiting for remediation intent to be deletedF)operation_refmessage
has_result)r   GetClientInstancer   ReleaseTrackALPHAGetMessagesModuleCONCEPTSremediationintentParseRelativeNameDSecuritypostureOrganizationsLocationsRemediationIntentsDeleteRequestr   *organizations_locations_remediationIntentsr   r   async_r
   statusPrintWaitForOperationGetOperationsRef)	selfargsclientmessagesri_refri_namer   	operationoperation_ids	            r   Run
Delete.Run4   s     &&t'8'8'>'>?F(():):)@)@AH ]],,224F!!#G[[YY \ G
 AAHH I I >>L{{	jj
E
 %%00>@ r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r9   __static_attributes__r;   r   r   r   r      s1     /'
- 2 2%r   r   N)r@   
__future__r   r   r   r   .googlecloudsdk.api_lib.scc.remediation_intentsr   googlecloudsdk.callioper   2googlecloudsdk.command_lib.scc.remediation_intentsr	   googlecloudsdk.corer
   ReleaseTracksr#   r$   UniverseCompatibleDeleteCommandr   r;   r   r   <module>rL      si    W &  % ' B ( D # D%%++,;T ;  -;r   