
                             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
KJr  SSKJr  SSS.r " S S\	R&                  5      r\\l        g)z$Create endpoint association command.    )absolute_import)division)unicode_literalsN)association_api)base)association_flags)labels_util)
exceptions)
propertiesa{  
        Associate the specified network with the firewall endpoint. Successful
        creation of a firewall endpoint association results in an association
        in READY state. Check the progress of association creation by using
        `gcloud network-security firewall-endpoint-associations list`.

        For more examples, refer to the EXAMPLES section below.

        a  
        To associate a network with a firewall endpoint, run:

            $ {command} --network=projects/my-project/networks/global/myNetwork --endpoint=organizations/1234/locations/us-central1-a/firewallEndpoints/my-endpoint  --zone=us-central1-a  --project=my-project
        )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Create0   z,Create a Firewall Plus endpoint association.c                    [         R                  " U5        [         R                  " U5        [         R                  " U R	                  5       U5        [         R
                  " U5        [         R                  " US5        [         R                  " U R	                  5       U5        [        R                  R                  U5        [        R                  R                  US5        [        R                  " U5        g )N60mT)r   AddAssociationIDArg
AddZoneArgAddEndpointResourceReleaseTrackAddNetworkResource
AddMaxWaitAddTLSInspectionPolicyr   
ASYNC_FLAGAddToParser
SetDefaultr	   AddCreateLabelsFlags)clsparsers     Elib/surface/network_security/firewall_endpoint_associations/create.pyArgsCreate.Args3   s    ))&1  ())#*:*:*<fE((0  /,,S-=-=-?HOO'OOvt,$$V,    c           	         [         R                  " U R                  5       5      nUR                  =(       d2    [        R
                  R                  R                  R                  5       nUR                  nSR                  X45      nUR                  n[        R                  " XR                  R                  R                  5      nUR                   n["        R$                  " UR&                  S9n	UR(                  R*                  R-                  5       n
UR(                  R.                  R-                  5       nS nUR1                  S5      (       a=  UR(                  R2                  R-                  5       nUc  [4        R6                  " S5      eUR9                  UUU
R;                  5       UR;                  5       Ub  UR;                  5       OS US9nU(       a  UR1                  S5      (       d  SUl	        U$ U(       a  SR                  XV5      nO.S	R                  U
R;                  5       UR;                  5       5      nUR=                  UR?                  U5      S
R                  U5      SU	S9$ )Nzprojects/{}/locations/{})secondstls_inspection_policyzTLS Inspection Policy resource path is either malformed or missing necessary flag `--tls-inspection-policy-region`.
NOTE: TLS Inspection Policy needs to be in the same region as Firewall Plus endpoint resource.)association_idparentnetworkfirewall_endpointr&   labelsformatdefaultz"{}/firewallEndpointAssociations/{}zbetween {} and {}z:waiting for firewall endpoint association {} to be createdT)operation_refmessage
has_resultmax_wait) r   Clientr   projectr   VALUEScore	GetOrFailzoner,   r'   r	   ParseCreateArgsmessagesFirewallEndpointAssociationLabelsValueasync_datetime	timedeltar1   CONCEPTSr)   ParseendpointIsSpecifiedr&   core_exceptionsErrorCreateAssociationRelativeNameWaitForOperationGetOperationRef)selfargsclientr3   r7   r(   r'   r+   is_asyncr1   r)   rA   r&   	operationassociation_names                  r    Run
Create.Run?   s   ##D$5$5$78FllHj//44<<FFHG99D'..w=F((N((oo99EEF {{H!!$--8Hmm##))+G}}%%++-H /00"mmAAGGI		&##"
 	
 ((%$$&"//1 , 4@@B ) 	I  h''=DD
 -33



 ("7"7"9 "",,Y7HOO   # 	 	r#    N)	__name__
__module____qualname____firstlineno____doc__classmethodr!   rO   __static_attributes__rQ   r#   r    r   r   0   s    4	- 	-@r#   r   )rV   
__future__r   r   r   r=   Fgooglecloudsdk.api_lib.network_security.firewall_endpoint_associationsr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.network_securityr   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   rC   r   DETAILED_HELPCreateCommandr   detailed_helprQ   r#   r    <module>rb      sX    + &  '  b ( I < = *$OT Od % r#   