
    
                         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&List Bitbucket Server configs command.    )absolute_import)division)unicode_literals)cloudbuild_util)base)flags)
properties)	resourcesc                   &    e Zd ZdZed        Zd Zy)	ListAlphaz<List all Bitbucket Server configs in a Google Cloud project.c                 d    t        j                  |        | j                  j                  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.
    z
          table(
            name,
            createTime.date('%Y-%m-%dT%H:%M:%S%Oz', undefined='-'),
            host_uri
          )
        N)build_flagsAddRegionFlagdisplay_info	AddFormat)parsers    <lib/surface/builds/enterprise_config/bitbucketserver/list.pyArgszListAlpha.Args    s+     f%
!! #     c                 0   t        j                         }t        j                         }t        j                  j
                  j                  j                  d      }t        j                  j                  j                  j                         }|j                  xs |xs t         j                  }t        j                  j                  d||      }|j                  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)requiredzcloudbuild.projects.locations)
collection
projectsIdlocationsId)parent)r   GetClientInstanceGetMessagesModuler	   VALUEScoreprojectGetbuildsregionDEFAULT_REGIONr
   REGISTRYCreate)projects_locations_bitbucketServerConfigsList<CloudbuildProjectsLocationsBitbucketServerConfigsListRequestRelativeNamebitbucketServerConfigs)	selfargsclientmessagesr   
regionprop
bbs_regionparent_resourcebbs_lists	            r   RunzListAlpha.Run1   s     ..0F002H##++///>F""))00446JL
Lo.L.LJ((//2 0  O ??DDMM"//1 	N 	344J4J  Or   N)__name__
__module____qualname____doc__staticmethodr   r4    r   r   r   r      s    D  r   r   N)r8   
__future__r   r   r   !googlecloudsdk.api_lib.cloudbuildr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.buildsr   r   googlecloudsdk.corer	   r
   ReleaseTracksReleaseTrackALPHAListCommandr   r:   r   r   <module>rD      s\    - &  ' = ( B * ) D%%++,0   0 -0r   