
                             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(Create GitLab Enterprise config command.    )absolute_import)division)unicode_literals)cloudbuild_util)waiter)base)gitlab_flags)log)
properties)	resourcesc                   .    \ rS rSrSr\S 5       rS rSrg)CreateAlpha   z9Create a GitLab Enterprise config for use by Cloud Build.c                 0    [         R                  " U 5      n 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.
N)r	   AddGitLabConfigCreateArgs)parsers    5lib/surface/builds/enterprise_config/gitlab/create.pyArgsCreateAlpha.Args"   s     33F;F    c                    [         R                  " 5       n[         R                  " 5       n[         R                  " U5      n[        R
                  R                  R                  R                  SS9n[        R                  R                  SUUR                  S9nUR                  R                  UR                  UR                  5       UUR                   S95      n[        R                  R#                  UR                   SS9n[$        R&                  " [$        R(                  " UR                  UR*                  5      US5      n	[,        R.                  " U	R                   S	S
9  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)requiredzcloudbuild.projects.locations)
collection
projectsIdlocationsId)parentgitLabConfiggitlabConfigIdz(cloudbuild.projects.locations.operations)r   z!Creating GitLab Enterprise configenterprise_config)kind)r   GetClientInstanceGetMessagesModuleGitLabConfigFromArgsr   VALUEScoreprojectGetr   REGISTRYCreateregion projects_locations_gitLabConfigs5CloudbuildProjectsLocationsGitLabConfigsCreateRequestRelativeNamenameParseRelativeNamer   WaitForCloudOperationPollerprojects_locations_operationsr
   CreatedResource)
selfargsclientmessagesgitlab_configr   parent_resource
created_opop_resourcecreated_configs
             r   RunCreateAlpha.Run,   s>    ..0F002H#88>M##++///>F  ((//2KK 0 !O 88??FF"//1&99 	G 	&'J $$66$N 7 PK ^^##F$K$K$*$H$H	J8:N
 ++2EFr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r=   __static_attributes__r?   r   r   r   r      s    A< <&r   r   N)rD   
__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   r?   r   r   <module>rQ      s`    / &  ' = . ( > # * ) D%%++,3$$$ 3 -3r   