
    >                         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  ej                  ej                   j"                         G d
 dej$                               Zy)z*Describe github enterprise config command.    )absolute_import)division)unicode_literals)cloudbuild_util)base)flags)
properties)	resourcesc                   &    e Zd ZdZed        Zd Zy)DescribeAlphaz;Describe a github enterprise config used by Cloud Build.
  c                 Z    | j                  dd       t        j                  | dd       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&The id of the GitHub Enterprise Config)helpF)hiddenrequiredN)add_argumentbuild_flagsAddRegionFlag)parsers    7lib/surface/builds/enterprise_config/github/describe.pyArgszDescribeAlpha.Args!   s/     E  GfUUC    c           	      B   t        j                         }t        j                         }t        j                  j
                  j                  j                  d      }|j                  }t        j                  j                  j                  j                         }|j                  xs |xs t         j                  }t        j                  j                  ddd|||d      }|j                  j                  |j!                  |j#                         ||            }	|	S )	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)r   Nz5cloudbuild.projects.locations.githubEnterpriseConfigsv1)
projectsIdgithubEnterpriseConfigsIdlocationsId)
collectionapi_versionparams)nameconfigId	projectId)r   GetClientInstanceGetMessagesModuler	   VALUEScoreprojectGetr   buildsregionDEFAULT_REGIONr
   REGISTRYParse*projects_locations_githubEnterpriseConfigs<CloudbuildProjectsLocationsGithubEnterpriseConfigsGetRequestRelativeName)
selfargsclientmessagesparent	config_id
regionproplocationghe_resourceghes
             r   RunzDescribeAlpha.Run-   s     ..0F002H##++///>FI""))00446J{{JjJO,J,JH %%++J )2#
	 , L 
;
;
?
?MM**, 	N 	C Jr   N)__name__
__module____qualname____doc__staticmethodr   r<    r   r   r   r      s"     	D 	D&r   r   N)r@   
__future__r   r   r   !googlecloudsdk.api_lib.cloudbuildr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.buildsr   r   googlecloudsdk.corer	   r
   ReleaseTracksReleaseTrackALPHADescribeCommandr   rB   r   r   <module>rL      s\    1 &  ' = ( B * ) D%%++,6D(( 6 -6r   