
    	                         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  ej                  ej                  j                  ej                  j                         G d dej                               Z G d	 d
      Zy)z#`gcloud app runtimes list` command.    )absolute_import)division)unicode_literals)appengine_api_client)basec                   .    e Zd ZdZddiZed        Zd Zy)ListzList the available runtimes.

  This command lists all the available runtimes and their current stages, for
  example,
  GA, BETA or END OF SUPPORT.
  EXAMPLESz          To list all the runtimes in the App Engine standard environment, run:

            $ {command} --environment=standard

          c                 f    | j                  dddgd       | j                  j                  d       y )Nz--environmentTstandardz Environment for the application.)requiredchoiceshelpzK
      table(
        name,
        stage,
        environment
      )
    )add_argumentdisplay_info	AddFormat)parsers     lib/surface/app/runtimes/list.pyArgsz	List.Args+   s>    
/	   !! # 	    c                    t        j                  | j                               }|j                  j                  j
                  j                  }|j                  dk(  r*|j                  j                  j
                  j                  }|j                  |      }|j                  D cg c]  }t        |       c}S c c}w )Nr   )r   GetApiClientForTrackReleaseTrackmessages AppengineAppsListRuntimesRequestEnvironmentValueValuesEnumSTANDARDenvironmentListRuntimesruntimesRuntime)selfargs
api_clientr   responsers         r   RunzList.Run;   s    %::4;L;L;NOJ<<WW``  :%



>
>
Y
Y
b
b  &&{3H ( 1 12 11GAJ 1222s   &B;N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r'    r   r   r	   r	      s1      - 	 	
3r   r	   c                       e Zd ZdZd Zy)r!   zRuntimes wrapper for ListRuntimesResponse#Runtimes.

  Attributes:
    name: A string name of the runtime.
    stage: An enum of the release state of the runtime, e.g., GA, BETA, etc.
    environment: Environment of the runtime.
  c                 j    |j                   | _         |j                  | _        |j                  | _        y )N)namestager   )r"   runtimes     r   __init__zRuntime.__init__Q   s&    DIDJ**Dr   N)r(   r)   r*   r+   r4   r.   r   r   r!   r!   H   s    +r   r!   N)r+   
__future__r   r   r   googlecloudsdk.api_lib.appr   googlecloudsdk.callioper   ReleaseTracksr   BETAGAListCommandr	   r!   r.   r   r   <module>r<      sm    * &  ' ; ( D%%**D,=,=,@,@A+34 +3 B+3\+ +r   