
                             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lmZ  G d	 d
e
j                        Zy)z4Command for creating network edge security services.    )absolute_import)division)unicode_literals)base_classes)client)base)flagsc                   .    e Zd ZdZdZdZed        Zd Zy)Createa  Create a Compute Engine network edge security service.

  *{command}* is used to create network edge security services.

  ## EXAMPLES

  To create a network edge security service with the name 'my-service' in region
  'us-central1', run:

    $ {command} my-service \
      --region=us-central1

  To create a network edge security service with the name 'my-service' with
  security policy 'my-policy' attached in region 'us-central1', run:

    $ {command} my-service \
      --security-policy=my-policy \
      --region=us-central1
  Nc                 T   t        j                         | _        | j                  j                  |d       t	        j
                  d      | _        | j                  j                  |       |j                  dd       |j                  j                  t         j                         y )Ncreate)operation_typeznetwork edge security service)resourcez--descriptionzGAn optional, textual description for the network edge security service.)help)r	   "NetworkEdgeSecurityServiceArgument!NETWORK_EDGE_SECURITY_SERVICE_ARGAddArgumentsecurity_policy_flags/SecurityPolicyRegionalArgumentForTargetResourceSECURITY_POLICY_ARGadd_argumentdisplay_infoAddCacheUpdater$NetworkEdgeSecurityServicesCompleter)clsparsers     <lib/surface/compute/network_edge_security_services/create.pyArgszCreate.Args5   s     	002 )))55x 6 ) 	MM4	6  ''/
  
 ''224    c                    t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  ||j                        }|j                  j                  j                  |j                         |j                        }|j                  d      r;| j                  j	                  ||j
                        j                         }||_        |j                  |      S )N)compute_client)namedescriptionsecurity_policy)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   NetworkEdgeSecurityServicemessagesNamer#   IsSpecifiedr   SelfLinksecurityPolicyr   )selfargsholderrefnetwork_edge_security_servicer   security_policy_refs          r   Runz
Create.RunH   s    **4+<+<+>?F

0
0
B
Bf C$*$E$EFMM%+! }}%%@@XXZT%5%5 A 7H)* 44FF
  ""*(*  3h(//99r   )	__name__
__module____qualname____doc__r   r   classmethodr   r5    r   r   r   r      s,    ( '+#4 4$:r   r   N)r9   
__future__r   r   r   googlecloudsdk.api_lib.computer   =googlecloudsdk.api_lib.compute.network_edge_security_servicesr   googlecloudsdk.callioper   Agooglecloudsdk.command_lib.compute.network_edge_security_servicesr	   4googlecloudsdk.command_lib.compute.security_policiesr   CreateCommandr   r;   r   r   <module>rC      s6    ; &  ' 7 P ( S$9:T 9:r   