
    -                         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'Update Bitbucket Server config command.    )absolute_import)division)unicode_literals)cloudbuild_util)waiter)base)bitbucketserver_flags)log)
properties)	resourcesc                   .    \ rS rSrSr\S 5       rS rSrg)CreateAlpha   z8Update a Bitbucket Server config for use by Cloud Build.c                 f    [         R                  " U 5      n U R                  R                  S5        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.
z
          table(
            name,
            createTime.date('%Y-%m-%dT%H:%M:%S%Oz', undefined='-'),
            host_uri
          )
        N)r	   "AddBitbucketServerConfigUpdateArgsdisplay_info	AddFormat)parsers    >lib/surface/builds/enterprise_config/bitbucketserver/update.pyArgsCreateAlpha.Args"   s-     #EEfMF
!! #     c           	         [         R                  " 5       n[         R                  " 5       nUR                  n[         R                  " US5      n[
        R                  R                  R                  R                  SS9n[
        R                  R                  R                  R                  5       nUR                  =(       d    U=(       d    [         R                  n[        R                  R                  SSSUUUS.S9n	[         R                   " U5      n
UR#                  U	R%                  5       USR'                  U
5      S	9nUR(                  R+                  U5      n[        R                  R-                  UR.                  S
S9n[0        R2                  " [0        R4                  " UR(                  UR6                  5      US5      n[8        R:                  " U	5        U$ )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:
  Some value that we want to have printed later.
T)requiredNz4cloudbuild.projects.locations.bitbucketServerConfigsv1)
projectsIdlocationsIdbitbucketServerConfigsId)
collectionapi_versionparams,)namebitbucketServerConfig
updateMaskz(cloudbuild.projects.locations.operations)r   z Updating Bitbucket Server config)r   GetClientInstanceGetMessagesModuleCONFIGBitbucketServerConfigFromArgsr   VALUEScoreprojectGetbuildsregionDEFAULT_REGIONr   REGISTRYParseMessageToFieldPaths=CloudbuildProjectsLocationsBitbucketServerConfigsPatchRequestRelativeNamejoin)projects_locations_bitbucketServerConfigsPatchParseRelativeNamer#   r   WaitForCloudOperationPollerprojects_locations_operationsr
   UpdatedResource)selfargsclientmessages	config_idbbsparent
regionprop
bbs_regionbbs_resourceupdate_maskreq
updated_opop_resourceupdated_bbss                  r   RunCreateAlpha.Run3   s    ..0F002HI

7
7d
CC##++///>F""))00446JL
Lo.L.LJ %%++I %(1
	 , L "55c:K

P
P&&(!88K( Q *C
 AAGGLJ$$66$N 7 PK ..##<<00	23>*	,K %r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   rM   __static_attributes__rO   r   r   r   r      s    @  2r   r   N)rT   
__future__r   r   r   !googlecloudsdk.api_lib.cloudbuildr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.cloudbuildr	   googlecloudsdk.corer
   r   r   ReleaseTracksReleaseTrackALPHACreateCommandr   rO   r   r   <module>ra      sc    . &  ' = . ( G # * ) D%%++,F$$$ F -Fr   