
    C                         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	  \R                   " S S\R                  5      5       rg	)
z=Implementation of delete command for Insights dataset config.    )insights_api)base)log_util)resource_args)
console_ioc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Delete   z#Delete dataset config for Insights.z0
      Delete an Insights dataset config.
      a|  

      To delete a dataset config with config name "my_config" in location
      "us-central1":

          $ {command} my_config --location=us-central1

      To delete the same dataset config with fully specified name:

          ${command} projects/foo/locations/us-central1/datasetConfigs/my_config

      To delete the same dataset config and unlink it from the BigQuery
      instance:

          $ {command} my_config --location=us-central1 --auto-delete-link

      To delete the same dataset config without taking user consent:

          $ {command} my_config --location=us-central1 --auto-delete-link
          --force
      )DESCRIPTIONEXAMPLESc                 v    [         R                  " U S5        U R                  SSSS9  U R                  SSSS9  g )Nz	to deletez--auto-delete-link
store_truezMDelete the BigQuery instance links before the config gets deleted explicitly.)actionhelpz--forcez0Force delete the config by skipping the consent.)r   add_dataset_config_resource_argadd_argument)parsers    6lib/surface/storage/insights/dataset_configs/delete.pyArgsDelete.Args8   sN    11&+F
	   ?      c                    [         R                  " 5       nUR                  R                  R	                  5       R                  5       nUR                  (       d'  SR                  U5      n[        R                  " USSS9  UR                  (       a3  UR                  U5      n[        R                  " SUUR                  5        UR                  U5      n[        R                  " SUUR                  5        g )Nz*You are about to delete dataset config: {}T)messagethrow_if_unattendedcancel_on_nozDelete linkr	   )r   InsightsApiCONCEPTSdataset_configParseRelativeNameforceformatr   PromptContinueauto_delete_linkdelete_dataset_config_linkr   /dataset_config_operation_started_and_status_lognamedelete_dataset_config)selfargsclientdataset_config_relative_namer   $delete_dataset_config_link_operationdelete_dataset_config_operations          r   Run
Delete.RunI   s    %%'F$$**,99; ! ::<CC
&g t$ -3-N-N
&.* >>

&
.
3
3 '-&B&B$'# <<$',,r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r/   __static_attributes__r1   r   r   r	   r	      s/    +

	-6   r   r	   N)r6   googlecloudsdk.api_lib.storager   googlecloudsdk.callioper   ;googlecloudsdk.command_lib.storage.insights.dataset_configsr   r   googlecloudsdk.core.consoler   DefaultUniverseOnlyCommandr	   r1   r   r   <module>r@      sB     D 7 ( P U 2 NT\\ N Nr   