
    M                     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dlmZ  G d	 d
e      Z ej                  ej                   j"                  ej                   j$                  ej                   j&                         G d deej(                               Zy)7Lists all available service tiers for Google Cloud SQL.    )absolute_import)division)unicode_literals)api_util)base)flags)
propertiesc                   &    e Zd ZdZed        Zd Zy)	_BaseListr   c                     | j                   j                  t        j                         t        j                  |        y )N)display_info	AddFormatr	   TIERS_FORMATAddShowEdition)parsers    lib/surface/sql/tiers/list.pyArgsz_BaseList.Args   s*    
!!%"4"45	     c                    |j                   r-|j                         j                  t        j                         t        j                  t
        j                        }|j                  }|j                  }|j                  j                  |j                  t        j                  j                  j                   j#                  d                  }t%        |j&                        S )a  Lists all available service tiers for Google Cloud SQL.

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

    Returns:
      A dict object that has the list of tier resources if the command ran
      successfully.
    T)required)project)show_editionGetDisplayInfor   r	   TIERS_FORMAT_EDITIONr   	SqlClientAPI_VERSION_DEFAULT
sql_clientsql_messagestiersListSqlTiersListRequestr
   VALUEScorer   Getiteritems)selfargsclientr   r   results         r   Runz_BaseList.Run#   s     
%%e&@&@A < <=F""J&&L""((%%**22666E 	) 	GHF r   N)__name__
__module____qualname____doc__staticmethodr   r,    r   r   r   r      s    ?! !r   r   c                       e Zd ZdZy)r!   r   N)r-   r.   r/   r0   r2   r   r   r!   r!   ;   s     @r   r!   N)r0   
__future__r   r   r   googlecloudsdk.api_lib.sqlr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sqlr	   googlecloudsdk.corer
   objectr   ReleaseTracksReleaseTrackGABETAALPHAListCommandr!   r2   r   r   <module>r@      s    > &  ' / ( 0 * @ D%%(($*;*;*@*@%%++-@9d&& @-@r   