
    M                         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  \
R$                  " \
R&                  R(                  5       " S S\
R*                  5      5       rg)z'Delete Bitbucket Server config command.    )absolute_import)division)unicode_literals)cloudbuild_util)waiter)base)flags)log)
properties)	resourcesc                   .    \ rS rSrSr\S 5       rS rSrg)DeleteAlpha   z2Delete a Bitbucket Server config from Cloud Build.c                 P    [         R                  " U 5        U R                  SSS9  g)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%The id of the Bitbucket Server Config)helpN)build_flagsAddRegionFlagadd_argument)parsers    >lib/surface/builds/enterprise_config/bitbucketserver/delete.pyArgsDeleteAlpha.Args"   s&     f%
'NO    c           	      *   [         R                  " 5       n[         R                  " 5       n[        R                  R
                  R                  R                  SS9n[        R                  R                  R                  R                  5       nUR                  =(       d    U=(       d    [         R                  nUR                  n[        R                  R                  SSSUUUS.S9nUR                  R!                  UR#                  UR%                  5       S95      n	[        R                  R'                  U	R(                  S	S
9n
[*        R,                  " [*        R.                  " UR0                  5      U
S5        [2        R4                  " U5        g)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.
T)requiredNz4cloudbuild.projects.locations.bitbucketServerConfigsv1)
projectsIdlocationsIdbitbucketServerConfigsId)
collectionapi_versionparams)namez(cloudbuild.projects.locations.operations)r!   z Deleting Bitbucket Server config)r   GetClientInstanceGetMessagesModuler   VALUEScoreprojectGetbuildsregionDEFAULT_REGIONr   r   REGISTRYParse)projects_locations_bitbucketServerConfigsDelete>CloudbuildProjectsLocationsBitbucketServerConfigsDeleteRequestRelativeNameParseRelativeNamer$   r   WaitForCloudOperationPollerNoResourcesprojects_locations_operationsr
   DeletedResource)selfargsclientmessagesparent
regionprop
bbs_region	config_idbbs_resource
deleted_opop_resources              r   RunDeleteAlpha.Run-   sT    ..0F002H##++///>F""))00446JL
Lo.L.LJI %%++I %(1
	 , L AAHHOO**, 	P 	./J $$66$N 7 PK
NN..00	23>*, %r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   rD   __static_attributes__rF   r   r   r   r      s    :P P(&r   r   N)rK   
__future__r   r   r   !googlecloudsdk.api_lib.cloudbuildr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.buildsr	   r   googlecloudsdk.corer
   r   r   ReleaseTracksReleaseTrackALPHADeleteCommandr   rF   r   r   <module>rX      s`    . &  ' = . ( B # * ) D%%++,6&$$$ 6& -6&r   