
                         ^   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
dZ ej                   ej"                  j$                         G d dej&                               Z ej                   ej"                  j*                         G d dej&                               Zy)zCreate Command for Application.    )absolute_import)division)unicode_literals)utils)client)base)flagsz{description}z         To create the Application `my-app` with scope type `REGIONAL`
        in location `us-east1`, run:

          $ {command} my-app --location=us-east1 --scope-type=REGIONAL
        )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)CreateGACreate an Apphub application.c                 b    t        j                  | t        j                  j                         y Nrelease_track)r	   CreateApplicationFlagsr   ReleaseTrackGAparsers    )lib/surface/apphub/applications/create.pyArgszCreateGA.Args,   s    	  t7H7H7K7KL    c           
         t        j                  t        j                  j                        }t        j                  |      }|j                         }t        j                  |t        j                  j                        }|j                  |j                         |j                  |j                  |j                  ||j                  |j                               S zRun the create command.r   )app_id
scope_typedisplay_namedescription
attributes
async_flagparent)apisApplicationsClientr   r   r   api_lib_utilsGetApplicationRefParentPopulateAttributesCreateNamer   r   r    async_RelativeNameselfargsr   app_ref
parent_refr!   s         r   RunzCreateGA.Run0   s    $$43D3D3G3GHF--d3G!J11D--00J ==||~??&&$$;;&&(   r   N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r3    r   r   r   r   &   s#    % -M Mr   r   c                   *    e Zd ZdZeZed        Zd Zy)CreateAlphar   c                 b    t        j                  | t        j                  j                         y r   )r	   r   r   r   ALPHAr   s    r   r   zCreateAlpha.ArgsK   s    	  t7H7H7N7NOr   c           
         t        j                  t        j                  j                        }t        j                  |      }|j                         }t        j                  |t        j                  j                        }|j                  |j                         |j                  |j                  |j                  ||j                  |j                               S r   )r$   r%   r   r   r@   r&   r'   r(   r)   r*   r+   r   r   r    r,   r-   r.   s         r   r3   zCreateAlpha.RunO   s    $$43D3D3J3JKF--d3G!J11D--33J ==||~??&&$$;;&&(   r   Nr4   r<   r   r   r>   r>   E   s#    % -P Pr   r>   N)r8   
__future__r   r   r   googlecloudsdk.api_lib.apphubr   r&   *googlecloudsdk.api_lib.apphub.applicationsr   r$   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apphubr	   r9   ReleaseTracksr   r   CreateCommandr   r@   r>   r<   r   r   <module>rI      s    & &  ' @ E ( 3 # D%%(()t!!  *< D%%++,$$$  -r   