
    h                        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  e
j&                  e
j(                  j*                         G d de
j,                               Zy)z(Delete GitLab Enterprise config command.    )absolute_import)division)unicode_literals)cloudbuild_util)waiter)base)resource_args)concept_parsers)log)
properties)	resourcesc                   &    e Zd ZdZed        Zd Zy)DeleteAlphaz3Delete a GitLab Enterprise config from Cloud Build.c                     t         j                  j                  dt        j                         dd      j                  |        y)zRegister flags for this command.

    Args:
      parser: An argparse.ArgumentParser-like object. It is mocked out in order
        to capture some information, but behaves like an ArgumentParser.
    CONFIGzGitLab Enterprise config.TrequiredN)r
   ConceptParserForResourcer	   GetGitLabConfigResourceSpecAddToParser)parsers    5lib/surface/builds/enterprise_config/gitlab/delete.pyArgszDeleteAlpha.Args#   s>     !!--113#	 .  #{6*    c           	         t        j                         }t        j                         }t        j                  j
                  j                  j                  d      }|j                  }t        j                  j                  ddd||j                  |d      }|j                  j                  |j                  |j!                                     }t        j                  j#                  |j$                  d	
      }t'        j(                  t'        j*                  |j,                        |d       t/        j0                  |d       y)zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Nothing on success.
    Tr   Nz+cloudbuild.projects.locations.gitLabConfigsv1)
projectsIdlocationsIdgitLabConfigsId)
collectionapi_versionparams)namez(cloudbuild.projects.locations.operations)r!   z!Deleting GitLab Enterprise configenterprise_config)kind)r   GetClientInstanceGetMessagesModuler   VALUEScoreprojectGetr   r   REGISTRYParseregion projects_locations_gitLabConfigsDelete5CloudbuildProjectsLocationsGitLabConfigsDeleteRequestRelativeNameParseRelativeNamer$   r   WaitForCloudOperationPollerNoResourcesprojects_locations_operationsr   DeletedResource)	selfargsclientmessagesparent	config_idgitlab_config_resource
deleted_opop_resources	            r   RunzDeleteAlpha.Run1   s#    ..0F002H##++///>FI '//55@ ;;(
	 6  88??FF'446 	G 	89J $$66$N 7 PK
NN..00	23>+- 	(;<r   N)__name__
__module____qualname____doc__staticmethodr   rB    r   r   r   r      s    ;+ +'=r   r   N)rF   
__future__r   r   r   !googlecloudsdk.api_lib.cloudbuildr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.cloudbuildr	   (googlecloudsdk.command_lib.util.conceptsr
   googlecloudsdk.corer   r   r   ReleaseTracksReleaseTrackALPHADeleteCommandr   rH   r   r   <module>rT      se    / &  ' = . ( ? D # * ) D%%++,8=$$$ 8= -8=r   