
    ,                     d   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 Z ej                  ej                  j                         G d	 d
ej                               Z ej                  ej                  j"                  ej                  j$                         G d de             Zy)z8Lists customizable flags for Google Cloud SQL instances.    )absolute_import)division)unicode_literals)api_util)base)flagsc                 :    | j                   j                  d       y)z(Adds flags common to all release tracks.z
    table(
        name,
        type,
        appliesTo.list():label=DATABASE_VERSION,
        allowedStringValues.list():label=ALLOWED_VALUES
      )
    N)display_info	AddFormatparsers    lib/surface/sql/flags/list.py_AddCommonFlagsr      s     ! 	    c                   &    e Zd ZdZed        Zd Zy)List7List customizable flags for Google Cloud SQL instances.c                 D    t        |        t        j                  |        y)a  Args is called by calliope to gather arguments for this command.

    Please add arguments in alphabetical order except for no- or a clear-
    pair for that argument which can follow the argument itself.

    Args:
      parser: An argparse parser that you can use to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    Nr   r   AddDatabaseVersionr   s    r   Argsz	List.Args*   s     F	V$r   c                    t        j                  t         j                        }|j                  }|j                  }|j
                  j                  |j                  |j                              }t        |j                        S )a  List customizable flags for Google Cloud SQL instances.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
      with.

    Returns:
      A dict object that has the list of flag resources if the command ran
      successfully.
    )databaseVersion)r   	SqlClientAPI_VERSION_DEFAULT
sql_clientsql_messagesr   r   SqlFlagsListRequestdatabase_versioniteritems)selfargsclientr   r   results         r   RunzList.Run9   sm      < <=F""J&&L""((9N9N(OQFr   N)__name__
__module____qualname____doc__staticmethodr   r&    r   r   r   r   &   s    ?% %r   r   c                        e Zd ZdZed        Zy)ListAlphaBetar   c                 H    t        |        t        j                  | d       y)ay  Args is called by calliope to gather arguments for this command.

    Please add arguments in alphabetical order except for no- or a clear-
    pair for that argument which can follow the argument itself.

    Args:
      parser: An argparse parser that you can use to add arguments that go on
        the command line after this command. Positional arguments are allowed.
    F)restrict_choicesNr   r   s    r   r   zListAlphaBeta.ArgsR   s     F	Ve<r   N)r'   r(   r)   r*   r+   r   r,   r   r   r.   r.   N   s    ?= =r   r.   N)r*   
__future__r   r   r   googlecloudsdk.api_lib.sqlr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sqlr   r   ReleaseTracksReleaseTrackGAListCommandr   ALPHABETAr.   r,   r   r   <module>r;      s    ? &  ' / ( 0		 D%%(()$4 $ *$N D%%++T->->-C-CD=D = E=r   