
    J	                        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 d	 Z ej"                  ej$                  j&                         G d
 dej(                               Z ej"                  ej$                  j,                         G d de             Z ej"                  ej$                  j0                         G d de             Zy)1List regions available to Google Cloud Functions.    )absolute_import)division)unicode_literals)util)base)flags)commandc                     | j                   j                  d       | j                   j                  t        j                         t        j
                  | d       y )Nztable(name)F)operates_on_existing_function)display_info	AddFormat
AddUriFuncr	   GetLocationsUriAddGen2Flagparsers    %lib/surface/functions/regions/list.py_CommonArgsr      s@    .  !6!67F%@    c                   D    e Zd ZdZed        Zej                  d        Zy)Listr   c                     t        |        y)z!Registers flags for this command.N)r   r   s    r   Argsz	List.Args'   s     r   c                     t        j                         r$t        j                  || j	                               S t        j                  |      S )aq  This 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:
      List of cloudfunctions_v1.Location or cloudfunctions_v2.Location:
        List of GCF regions

    Raises:
      FunctionsError: If the user doesn't confirm on prompt.
    )r	   ShouldUseGen2
command_v2RunReleaseTrack
command_v1)selfargss     r   r   zList.Run,   s9     ^^D$"3"3"566^^D!!r   N)	__name__
__module____qualname____doc__staticmethodr   r    CatchHTTPErrorRaiseHTTPExceptionr    r   r   r   r   #   s1    9  ((" )"r   r   c                       e Zd ZdZy)ListBetar   Nr#   r$   r%   r&   r)   r   r   r+   r+   A       9r   r+   c                       e Zd ZdZy)	ListAlphar   Nr,   r)   r   r   r/   r/   F   r-   r   r/   N)r&   
__future__r   r   r   #googlecloudsdk.api_lib.functions.v1r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.functionsr	   4googlecloudsdk.command_lib.functions.v1.regions.listr
   r    4googlecloudsdk.command_lib.functions.v2.regions.listr   r   ReleaseTracksr   GAListCommandr   BETAr+   ALPHAr/   r)   r   r   <module>r;      s     8 &  ' 4 ( 6 V VA D%%(()"4 " *": D%%**+:t : ,: D%%++,: : -:r   