
                         x   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Jr  SSS.r\R*                  \R,                  " \R.                  R0                  \R.                  R2                  \R.                  R4                  5       " S S\R6                  5      5       5       rg)zDCreate command to create a new resource of Custom Intercept profile.    )absolute_import)division)unicode_literals)intercept_api)base)sp_flags) endpoint_group_association_flags)labels_util)
exceptions)logzE

          Create a new Custom Intercept Security Profile.

        aO  
          To create a Custom Intercept Security Profile named `intercept-profile` linked to a Intercept Endpoint Group (q.v.), run:

              $ {command} intercept-profile --description="An Intercept Profile"                 --intercept-endpoint-group=projects/my-project/locations/global/interceptEndpointGroups/my-mep

        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create-   z&Create a new Custom Intercept Profile.c                 l   [         R                  " XR                  5       5        [         R                  " U5        [        R
                  R                  U5        [        R
                  R                  US5        [        R                  " U5        [        R                  " U R                  5       U5        g )NF)r   AddSecurityProfileResourceReleaseTrackAddProfileDescriptionr   
ASYNC_FLAGAddToParser
SetDefaultr
   AddCreateLabelsFlagsintercept_flags!AddInterceptEndpointGroupResource)clsparsers     Ilib/surface/network_security/security_profiles/custom_intercept/create.pyArgsCreate.Args6   sw    ''0@0@0BC""6*OO'OOvu-$$V,55F    c                 R   [         R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  n[        R                  " XR                  R                  R                  5      nUR                  nUR                  R                  R                  5       nUR                  S:w  a#  [        R                   " SUR                  -  5      eUR#                  UR%                  5       UR'                  5       R)                  5       UUUR)                  5       S9nU(       a.  UR*                  n	[,        R.                  R1                  SU	5        U$ UR3                  UR5                  U5      SR7                  UR)                  5       5      SS9$ )Nglobalz0Only `global` location is supported, but got: %s)sp_idparentdescriptionlabelsintercept_endpoint_groupz9Check for operation completion status using operation ID:z/Waiting for security-profile [{}] to be createdT)operation_refmessage
has_result)r   Clientr   CONCEPTSsecurity_profileParser&   r
   ParseCreateArgsmessagesSecurityProfileLabelsValueasync_r(   locationcore_exceptionsErrorCreateCustomInterceptProfileNameParentRelativeNamenamer   statusPrintWaitForOperationGetOperationsRefformat)
selfargsclientr.   r&   r'   is_asyncr(   responseoperation_ids
             r   Run
Create.RunA   so   !!$"3"3"56F}}55;;=""K((oo--99F {{H#}}EEKKM}} !!
<t}}
L  22##%&&(557!9!F!F!H 3 H ]]l	jj
E
 o ""--h7AHH))+
  #  r!    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpclassmethodr   rH   __static_attributes__rJ   r!   r   r   r   -   s#    
 /- 'r!   r   N)rO   
__future__r   r   r   9googlecloudsdk.api_lib.network_security.security_profilesr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.network_securityr   5googlecloudsdk.command_lib.network_security.interceptr	   r   $googlecloudsdk.command_lib.util.argsr
   googlecloudsdk.corer   r6   r   rP   DefaultUniverseOnlyReleaseTracksr   ALPHABETAGACreateCommandr   rJ   r!   r   <module>ra      s    K &  ' S ( @ u < = #
  T..33T5F5F5I5I7T 7 7r!   