
                            d Z ddl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(                   G d
 de	j*                  ej,                                      Zy)z<Command to delete a database migration conversion workspace.    N)Optional)resource_args)base)command_mixin)flags)
console_io)datamigration_v1_messagesc                       e Zd ZdZdddZed        Zedej                  ddfd	       Z	d
ej                  deej                     fdZy)Deletez1Delete a Database Migration conversion workspace.zA
        Delete a Database Migration conversion workspace.
      z        To delete a conversion workspace called 'my-conversion-workspace', run:

            $ {command} my-conversion-workspace --region=us-central1
      )DESCRIPTIONEXAMPLESc                 Z    t        j                  | d       t        j                  |        y)zCommon arguments for all release tracks.

    Args:
      parser: An argparse parser that you can use to add arguments that go on
        the command line after this command. Positional arguments are allowed.
    z	to deleteN)r   !AddConversionWorkspaceResourceArgpc_flagsAddNoAsyncFlagparsers    >lib/surface/database_migration/conversion_workspaces/delete.py
CommonArgszDelete.CommonArgs,   s"     33FKHF#    r   returnNc                 .    t         j                  |        y)z@Args is called by calliope to gather arguments for this command.N)r   r   r   s    r   ArgszDelete.Args7   s     fr   argsc                 N   |j                   j                  j                         }t        j                  d|j                          d      sy| j                  j                  j                  |j                               }| j                  ||d|j                  d      d	      S )
a7  Delete a Database Migration conversion workspace.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
        with.

    Returns:
      An Optional[dict] object representing the operations resource describing
      the delete
      operation if the delete was successful.
    z-You are about to delete conversion workspace z.
Are you sure?)messageN)nameDeletedno_asyncF)conversion_workspace_refresult_operationoperation_namesynchas_resource)CONCEPTSconversion_workspaceParser   PromptContinueRelativeNameclientcrudr   HandleOperationResultIsKnownAndSpecified)selfr   r    r!   s       r   Runz
Delete.Run<   s      $}}AAGGI$$(5578 9 {{''..%224 /  %%!9) %%j1 &  r   )__name__
__module____qualname____doc__detailed_helpstaticmethodr   argparseArgumentParserr   	Namespacer   messages	Operationr/    r   r   r   r      sx     :

		- $ $ 8** t  !h(( !Xh6H6H-I !r   r   )r3   r6   typingr   )googlecloudsdk.api_lib.database_migrationr   googlecloudsdk.callioper   Cgooglecloudsdk.command_lib.database_migration.conversion_workspacesr   r   r   googlecloudsdk.core.consoler   6googlecloudsdk.generated_clients.apis.datamigration.v1r	   r9   ReleaseTracksReleaseTrackGADefaultUniverseOnly ConversionWorkspacesCommandMixinCommandr   r;   r   r   <module>rH      sq    C   C ( ] a 2 h D%%(()?];;T\\ ?  *?r   