
    #
                     z    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
  G d d	ej                        Zy
)z3The 'gcloud firebase test ios models list' command.    )absolute_import)division)unicode_literals)util)base)logc                   D     e Zd ZdZdddZed        Zd Zd fd	Z xZ	S )Listz*List all iOS models available for testing.zA
To list all iOS models available for testing, run:

  {command}
)DESCRIPTIONEXAMPLESc                 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.
    z
        table[box](
          id:label=MODEL_ID,
          name,
          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    ,lib/surface/firebase/test/ios/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 ios 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.
    ios)r   GetIosCatalogcontextmodelssupportedVersionIdsGetDeprecatedTagWarning_epilog)selfargscatalogmodelfiltered_modelss        r   RunzList.Run9   sa       .G">>)%U-F-F>   //GDL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.EpilogL   s/    	$56||	kk$,, r   )T)
__name__
__module____qualname____doc__detailed_helpstaticmethodr   r#   r&   __classcell__)r)   s   @r   r
   r
      s;    2 B- + +"&   r   r
   N)r-   
__future__r   r   r   $googlecloudsdk.api_lib.firebase.testr   googlecloudsdk.callioper   googlecloudsdk.corer   ListCommandr
    r   r   <module>r7      s.     : &  ' 5 ( #5 4 5 r   