
                         z   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S.r\R$                  " \R&                  R(                  \R&                  R*                  \R&                  R,                  5      \R.                   " S S\R0                  5      5       5       r\\l        g)zECreate command to create a new resource of threat prevention profile.    )absolute_import)division)unicode_literals)tpp_api)base)sp_flags)labels_util)
exceptions)logzH

          Create a new Security Profile with the given name.

        z
          To create a Security Profile with the name `my-security-profile` and an optional description as `New Security Profile`, run:

              $ {command} my-security-profile --description="New Security Profile"

        )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)CreateProfile+   z'Create a new Threat Prevention Profile.c                 "   [         R                  " XR                  5       5        [         R                  " U5        [        R
                  R                  U5        [        R
                  R                  US5        [        R                  " U5        g )NF)
r   AddSecurityProfileResourceReleaseTrackAddProfileDescriptionr   
ASYNC_FLAGAddToParser
SetDefaultr	   AddCreateLabelsFlags)clsparsers     Jlib/surface/network_security/security_profiles/threat_prevention/create.pyArgsCreateProfile.Args2   s[    ''0@0@0BC""6*OO'OOvu-$$V,    c                 D   [         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                  S5      (       d  SUl        UR                  S:w  a#  [        R                   " SUR                  -  5      eUR#                  UR%                  5       UR'                  5       UR)                  5       R%                  5       UU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descriptionz*Security Profile of type Threat Preventionglobalz0Only `global` location is supported, but got: %s)namesp_idparentr    labelsz9Check 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_IsSpecifiedlocationcore_exceptionsErrorCreateThreatPreventionProfileRelativeNameNameParentr"   r   statusPrintWaitForOperationGetOperationsRefformat)	selfargsclientr+   r    r%   is_asyncresponseoperation_ids	            r   RunCreateProfile.Run:   sm   ^^D--/0F}}55;;=""K((oo--99F {{HM**Ed}} !!
<t}}
L  33**,##%&&(557 4 H ]]l	jj
E
 o ""--h7AHH))+
  #  r    N)	__name__
__module____qualname____firstlineno____doc__classmethodr   rE   __static_attributes__rG   r   r   r   r   +   s    
 0- -)r   r   N)rL   
__future__r   r   r   9googlecloudsdk.api_lib.network_security.security_profilesr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.network_securityr   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   r4   r   DETAILED_HELPReleaseTracksr   ALPHABETAGADefaultUniverseOnlyCreateCommandr   detailed_helprG   r   r   <module>r]      s    L &  ' M ( @ < = #
 T..33T5F5F5I5I 4D&& 4 4n , r   