
                            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 dd	lmZ dd
lmZ dddZej"                   ej$                  ej&                  j(                         G d dej*                                      Zej"                   ej$                  ej&                  j.                         G d dej*                                      Zy)zThe app create command.    )absolute_import)division)unicode_literals)appengine_api_client)base)create_util)log)
properties)
console_ioz        {description}
        a          To create an app with region chosen interactively, run:

            $ {command}

        To create an app in the us-central region, run:

            $ {command} --region=us-central

        To create an app that with a user-managed service account, run:

            $ {command} --service-account=SERVICE_ACCOUNT

        To create an app with minimum SSL policy allowing TLS 1.2 and above, run:

          $ {command} --ssl-policy=TLS_VERSION_1_2
        )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)CreateACreate an App Engine app within the current Google Cloud Project.c                 .    t        j                  |        y Nr   AddAppCreateFlagsparsers    lib/surface/app/create.pyArgszCreate.Args;       !!&)    c                 T   t         j                  j                  j                  j	                  d      }t        j                  | j                               }|j                  r9t        j                  |||j                  |j                  |j                         nmt        j                         rDt        j                  ||       t        j                   |||j                  |j                         nt        j"                  d      t$        j&                  j)                  d       y NT)required)service_account
ssl_policyzPrompts are disabled. Region must be specified either by the `--region` flag or interactively. Use `gcloud app regions list` to list available regions.zYSuccess! The app is now created. Please use `gcloud app deploy` to deploy your first app.r
   VALUEScoreprojectGetr   GetApiClientForTrackReleaseTrackregionr   	CreateAppr   r   r   	CanPromptCheckAppNotExistsCreateAppInteractivelyUnspecifiedRegionErrorr	   statusPrintselfargsr#   
api_clients       r   Runz
Create.Run?   s    $$,,00$0?G%::4;L;L;NOJ{{


++..__ 
			##J8((

..__	 ..-. . JJ E Fr   N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r3    r   r   r   r   4   s%     J -* *Fr   r   c                   *    e Zd ZdZeZed        Zd Zy)
CreateBetar   c                 .    t        j                  |        y r   r   r   s    r   r   zCreateBeta.Argsb   r   r   c                 T   t         j                  j                  j                  j	                  d      }t        j                  | j                               }|j                  r9t        j                  |||j                  |j                  |j                         nmt        j                         rDt        j                  ||       t        j                   |||j                  |j                         nt        j"                  d      t$        j&                  j)                  d       y r   r    r/   s       r   r3   zCreateBeta.Runf   s    $$,,00$0?G%::4;L;L;NOJ{{


++..__ 
			##J8((

..__	 ..- 
 JJ	8r   Nr4   r<   r   r   r>   r>   [   s$     J -* *r   r>   N)r8   
__future__r   r   r   googlecloudsdk.api_lib.appr   googlecloudsdk.callioper   googlecloudsdk.command_lib.appr   googlecloudsdk.corer	   r
   googlecloudsdk.core.consoler   r9   DefaultUniverseOnlyReleaseTracksr&   GACreateCommandr   BETAr>   r<   r   r   <module>rL      s     &  ' ; ( 6 # * 2	0 D%%(()"FT "F * "FJ D%%**+%## % , %r   