
                             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	iZ G d
 dej                        Zee_        y)z7The 'gcloud firebase test android models list' command.    )absolute_import)division)unicode_literals)util)base)logEXAMPLESz
    To list all models which are available for testing, run:

      $ {command}

    To list all models made by Samsung, run:

      $ {command} --filter=Samsung

    To list all virtual device models, run:

      $ {command} --filter=virtual
    c                   :     e Zd ZdZed        Zd Zd fd	Z xZS )Listz.List all Android models available for testing.c                 x    | j                   j                  d       t        j                  j	                  |        y)zMethod called by Calliope to register flags for this command.

    Args:
      parser: An argparse parser used to add arguments that follow this
          command in the CLI. Positional arguments are allowed.
    a  
        table[box](
          id:label=MODEL_ID,
          manufacturer:label=MAKE,
          name:label=MODEL_NAME,
          form.color(blue=VIRTUAL,yellow=PHYSICAL,green=EMULATOR):label=FORM,
          format("{0:4} x {1}", screenY, screenX):label=RESOLUTION,
          supportedVersionIds.list(undefined="none"):label=OS_VERSION_IDS,
          tags.join(sep=", ").color(green=default,red=deprecated,yellow=preview)
        )
    N)display_info	AddFormatr   URI_FLAGRemoveFromParser)parsers    0lib/surface/firebase/test/android/models/list.pyArgsz	List.Args/   s1     !! 
# 
	 	MM""6*    c                     t        j                  | j                        }|j                  D cg c]  }|j                  s| }}t        j
                  |d      | _        |S c c}w )a  Run the 'gcloud firebase test android models list' command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation (i.e. group and command arguments combined).

    Returns:
      The list of device models we want to have printed later. Obsolete models
      with no currently supported OS versions are filtered out.
    android)r   GetAndroidCatalogcontextmodelssupportedVersionIdsGetDeprecatedTagWarning_epilog)selfargscatalogmodelfiltered_modelss        r   RunzList.RunD   sa     $$T\\2G">>)%U-F-F>   //KDLs   A# A#c                     t         t        |   |       | j                  r t	        j
                  | j                         y y )N)superr   Epilogr   r   warning)r   resources_were_displayed	__class__s     r   r%   zList.EpilogW   s/    	$56||	kk$,, r   )T)	__name__
__module____qualname____doc__staticmethodr   r"   r%   __classcell__)r(   s   @r   r   r   ,   s'    6+ +(&   r   r   N)r,   
__future__r   r   r   $googlecloudsdk.api_lib.firebase.testr   googlecloudsdk.callioper   googlecloudsdk.corer   DETAILED_HELPListCommandr   detailed_help r   r   <module>r7      sJ     > &  ' 5 ( #  "/ 4 / d # r   