
    A                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSK	Jr  SS	KJr  SS
KJr  SSKr\R"                  " \R$                  R&                  5      \R(                   " S S\R*                  5      5       5       r\R"                  " \R$                  R.                  5       " S S\5      5       r\R"                  " \R$                  R2                  5       " S S\5      5       rg)z-Command to create a new external VPN gateway.    )absolute_import)division)unicode_literals)base_classes)external_vpn_gateways_utils)arg_parsers)base)resource_manager_tags_utils)flagsNc                   F    \ rS rSrSrSS0rSr\S 5       rS r	S r
S	 rS
rg)Create   a  Create a new Compute Engine external VPN gateway.

*{command}* creates a new external VPN gateway.

External VPN gateway is the on-premises VPN gateway or another cloud
provider's VPN gateway that connects to your Google Cloud VPN gateway.
To create a highly available VPN from Google Cloud to your on-premises side
or another Cloud provider's VPN gateway, you must create an external VPN
gateway resource in Google Cloud, which provides the information to
Google Cloud about your external VPN gateway.
EXAMPLESzw          To create an external VPN gateway, run:

              $ {command} my-external-gateway --interfaces=0=8.9.9.9Fc                    UR                   R                  [        R                  5        [        R                  " 5       U l        U R
                  R                  USS9  U R                  (       a%  UR                  S[        R                  " 5       SSS9  [        R                  " U5        UR                   R                  [        R                  5        g)z"Set up arguments for this command.create)operation_typez--resource-manager-tagsz	KEY=VALUEzj            A comma-separated list of Resource Manager tags to apply to the external VPN gateway.
        )typemetavarhelpN)display_info	AddFormatr   DEFAULT_LIST_FORMATExternalVpnGatewayArgumentEXTERNAL_VPN_GATEWAY_ARGAddArgument_support_tagging_at_creationadd_argumentr   ArgDictAddCreateExternalVpnGatewayArgsAddCacheUpdaterExternalVpnGatewaysCompleter)clsparsers     3lib/surface/compute/external_vpn_gateways/create.pyArgsCreate.Args4   s     !!%";";<#(#C#C#EC   ,,VH,M
''
#""$	   
))&1
''(J(JK    c           	         [         R                  " U R                  5       5      n[        R                  " U5      nU R
                  R                  XR                  5      nUR                  R                  n[        R                  " UR                  U5      n[        R                  " UR                  U5      nU R                  (       a)  UR                  b  U R!                  XQR                  5      nOSnUR#                  UR%                  5       UR&                  UUUU R                  S9n	UR)                  XI5      n
UR+                  XJS5      nU$ )z8Issues the request to create a new external VPN gateway.N)namedescription
interfacesredundancy_typeparamssupport_tagging_at_creationzCreating external VPN gateway)r   ComputeApiHolderReleaseTrackr   ExternalVpnGatewayHelperr   ResolveAsResource	resourcesclientmessagesr   ParseInterfacesr+   InferAndGetRedundancyTyper   resource_manager_tags_CreateExternalVpnGatewayParamsGetExternalVpnGatewayForInsertNamer*   r   WaitForOperation)selfargsholderhelperrefr5   r+   r,   r-   external_vpn_gateway_to_insertoperation_refrets               r$   _RunCreate._RunF   s$   **4+<+<+>?F(AA&IF

'
'
9
9C }}%%H&&tAJ55dooxPO))&&233
..f f%+%J%JXXZ$$'$($E$E &K &" MM#FM

!
!;C Jr'   c           	         [         R                  " U5      nUR                  n[        [        R
                  " U5      5       VVs/ s H  u  pVUR                  R                  XVS9PM      nnnU" UR                  US9S9$ s  snnf )N)keyvalue)additionalProperties)resourceManagerTags)r
   GetResourceManagerTagsExternalVpnGatewayParamssortedsix	iteritemsResourceManagerTagsValueAdditionalProperty)r=   r5   r8   resource_manager_tags_mapr-   rH   rI   additional_propertiess           r$   r9   &Create._CreateExternalVpnGatewayParamsi   s    #::!	
 
 ..F !/H!IJJJC 	''::s:PJ   ";;!6 < 
 	s   %B c                 $    U R                  U5      $ )z7Issues API requests to construct external VPN gateways.)rE   )r=   r>   s     r$   Run
Create.Runz   s    99T?r'    N)__name__
__module____qualname____firstlineno____doc__detailed_helpr   classmethodr%   rE   r9   rW   __static_attributes__rY   r'   r$   r   r      sF    
   H I-
 "'L L"!F"r'   r   c                       \ rS rSrSrSrSrg)
CreateBeta   zaCreate a new Compute Engine external VPN gateway.

*{command} creates a new External Vpn Gateway
FrY   NrZ   r[   r\   r]   r^   r   ra   rY   r'   r$   rc   rc      s     "'r'   rc   c                       \ rS rSrSrSrSrg)CreateAlpha   zdCreate a new Compute Engine external VPN gateway.

*{command}* creates a new external VPN gateway.

TrY   Nre   rY   r'   r$   rg   rg      s    
 "&r'   rg   )r^   
__future__r   r   r   googlecloudsdk.api_lib.computer   4googlecloudsdk.api_lib.compute.external_vpn_gatewaysr   googlecloudsdk.callioper   r	   "googlecloudsdk.command_lib.computer
   8googlecloudsdk.command_lib.compute.external_vpn_gatewaysr   rO   ReleaseTracksr0   GAUniverseCompatibleCreateCommandr   BETArc   ALPHArg   rY   r'   r$   <module>ru      s    4 &  ' 7 \ / ( J J 
 D%%(()\T \  *\~ D%%**+' ' ,' D%%++,&& & -&r'   