
    @                     j   S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr  SS	KJr  S
SS.r\	R                  \	R                   " \	R"                  R$                  \	R"                  R&                  \	R"                  R(                  5       " S S\	R*                  5      5       5       r\\l        g)zCreate endpoint group command.    )absolute_import)division)unicode_literalsN)api)base)endpoint_group_flags)labels_utilaV  
          Create a intercept endpoint group. Successful creation of an endpoint group results
          in an endpoint group in ACTIVE state. Check the progress of endpoint group creation
          by using `gcloud network-security intercept-endpoint-groups list`.

          For more examples, refer to the EXAMPLES section below.

        a  
            To create a intercept endpoint group called `my-endpoint-group`, in project ID `my-project`, run:
            $ {command} my-endpoint-group --project=my-project --location=global --intercept-deployment-group=my-deployment-group

            OR

            $ {command} my-endpoint-group --project=my-project --location=global
            --intercept-deployment-group=projects/my-project/locations/global/interceptDeploymentGroups/my-deployment-group

            OR

            $ {command} projects/my-project/locations/global/interceptEndpointGroups/my-endpoint-group
            --intercept-deployment-group=projects/my-project/locations/global/interceptDeploymentGroups/my-deployment-group

            OR

            $ {command} my-endpoint-group --project=my-project --location=global
            --mirroring-deployment-group=projects/my-project/locations/global/interceptDeploymentGroups/my-deployment-group
            --description='new description'

        )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Create=   z"Create a Intercept Endpoint Group.c                    [         R                  " U R                  5       U5        [         R                  " U R                  5       U5        [         R                  " US5        [         R
                  " U5        [        R                  R                  U5        [        R                  R                  US5        [        R                  " U5        g )N20mT)r   AddEndpointGroupResourceReleaseTrack#AddInterceptDeploymentGroupResource
AddMaxWaitAddDescriptionArgr   
ASYNC_FLAGAddToParser
SetDefaultr	   AddCreateLabelsFlags)clsparsers     @lib/surface/network_security/intercept_endpoint_groups/create.pyArgsCreate.ArgsD   s    11#2B2B2DfM<<F ## **62OO'OOvt,$$V,    c                 
   [         R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  R                  R                  5       n[        R                  " XR                  R                  R                  5      nUR                  n[        R                  " UR                  S9nUR!                  UR#                  5       UR%                  5       R'                  5       UR'                  5       U[)        USS5      S9nU(       a  UR+                  S5      (       d  SUl        U$ UR/                  UR1                  U5      SR-                  UR'                  5       5      SUS	9$ )
N)secondsdescription )endpoint_group_idparentintercept_deployment_grouplabelsr"   formatdefaultz7waiting for intercept endpoint group [{}] to be createdT)operation_refmessage
has_resultmax_wait)r   Clientr   CONCEPTSintercept_endpoint_groupParser&   r	   ParseCreateArgsmessagesInterceptEndpointGroupLabelsValueasync_datetime	timedeltar-   CreateEndpointGroupNameParentRelativeNamegetattrIsSpecifiedr(   WaitForOperationGetOperationRef)	selfargsclientendpoint_groupr&   r'   is_asyncr-   	operations	            r   Run
Create.RunS   sP   ZZ))+,F]];;AACN00668  ((oo44@@F {{H!!$--8H **(--/$$&335#=#J#J#LD-4 + I  h''"",,Y7ELL++-  # 	 	r    N)	__name__
__module____qualname____firstlineno____doc__classmethodr   rG   __static_attributes__rI   r   r   r   r   =   s    
 +- -'r   r   )rN   
__future__r   r   r   r7   Agooglecloudsdk.api_lib.network_security.intercept_endpoint_groupsr   googlecloudsdk.callioper   5googlecloudsdk.command_lib.network_security.interceptr   $googlecloudsdk.command_lib.util.argsr	   DETAILED_HELPDefaultUniverseOnlyReleaseTracksr   ALPHABETAGACreateCommandr   detailed_helprI   r   r   <module>r^      s    % &  '  Q ( V <B T..33T5F5F5I5I9T 9 9x % r   