
    (!                     $   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KJr  SrSrSrSrSrSrSrS r SS jrS rS r S S jr S!S jr S"S jr\R@                  " S5      4S jr!S r" S#S jr#g)$z6Flags for Firewall Plus Endpoint Association commands.    )absolute_import)division)unicode_literalsN)activation_api)arg_parsers)concepts)deps)concept_parsers)presentation_specs)	resourcesFIREWALL_ENDPOINT_ASSOCIATIONz?networksecurity.projects.locations.firewallEndpointAssociationsz"networksecurity.projects.locationsFIREWALL_ENDPOINTz--tls-inspection-policyz9networksecurity.organizations.locations.firewallEndpointsz8networksecurity.projects.locations.tlsInspectionPoliciesc                 V   [         R                  " U 5      n[        R                  " [        SU[        R
                  [        R                  " SSSS9[        R                  " SSSS9S	9n[        R                  " [        US
SS9n[        R                  " U/5      R                  U5      $ )zAdds Association resource.zfirewall endpoint associationzoneZone of the {resource}.locationsIdparameter_namezassociation-nameName of the {resource}firewallEndpointAssociationsId)api_version
projectsIdr   r   TFirewall Plus.nameconcept_specrequired
group_help)r   GetApiVersionr   ResourceSpecASSOCIATION_RESOURCE_COLLECTION DEFAULT_PROJECT_ATTRIBUTE_CONFIG ResourceParameterAttributeConfigr   ResourcePresentationSpecASSOCIATION_RESOURCE_NAMEr
   ConceptParserAddToParser)release_trackparserr   resource_specpresentation_specs        Dlib/googlecloudsdk/command_lib/network_security/association_flags.pyAddAssociationResourcer-   /   s    ,,];+''%%::;;

#&
 &.%N%N

"9&-  )AA$ !	 
	&	&(9':	;	G	G	OO    c                 (    U R                  SUSS S9  g )Nassociation_id?)helpnargsdefaultadd_argumentr)   	help_texts     r,   AddAssociationIDArgr9   K   s     	&Yc4Pr.   c                 J   [         R                  " U 5      n[        R                  R	                  5       R                  [        U5      n[        R                  " [        SU[        R                  " SSSS9[        R                  " SSS[        R                  " S	5      [        R                  " [        R                  " [        5      /US5      /S
9[        R                  " SSSS9S9n[        R                   " SUSSS9n["        R$                  " U/5      R'                  U5      $ )z%Adds Firewall Plus endpoint resource.zfirewall endpointorganizationz2Organization ID to which the changes should apply.organizationsIdr   zendpoint-zoner   r   --zoner   fallthroughszendpoint-namer   firewallEndpointsId)r   r<   r   r@   z
--endpointTr   r   )r   r   r   REGISTRYCloneGetCollectionInfor!   r   r    ENDPOINT_RESOURCE_COLLECTIONr#   r	   ArgFallthroughFullySpecifiedAnchorFallthroughr%   r   r$   r
   r&   r'   )r(   r)   r   collection_infor*   r+   s         r,   AddEndpointResourcerH   R   s   ,,];+&&,,.@@%{/ ''"??

>*
 ;;

#&!!(+22&&'@AB!	 #CC

".--8 )AA !	 
	&	&(9':	;	G	G	OOr.   c                     [         R                  " SSS[         R                  [         R                  " SSSS9S9n[        R
                  " SUS	S
S9n[        R                  " U/5      R                  U 5      $ )zAdds network resource.zcompute.networksnetworkv1znetwork-namer   r   )r   projectrJ   z	--networkTr   r   )	r   r    r"   r#   r   r$   r
   r&   r'   )r)   r*   r+   s      r,   AddNetworkResourcerM   }   s|    ''7777

""
- )AA !	 
	&	&(9':	;	G	G	OOr.   c           	      R    U R                  SSSUU[        R                  " 5       S9  g)zAdds --max-wait flag.z
--max-waitmax_waitF)destr   r4   r2   typeN)r6   r   Duration)r)   default_max_waitr8   s      r,   
AddMaxWaitrT      s2     	!  r.   c                 R   [         R                  " U 5      n[        R                  R	                  5       R                  [        U5      n[        R                  " [        SU[        R                  " SSS[        R                  " S5      [        R                  " [        R                  " [        5      /US5      /S9[        R                  " SSS	S
9[        R                  " SSSS
9S9n[        R                   " ["        USUS9n[$        R&                  " U/5      R)                  U5      $ )z$Adds TLS Inspection Policy resource.zTLS Inspection Policyztls-inspection-policy-projectzProject of the {resource}.r   z	--projectr>   ztls-inspection-policy-regionz
          Region of the {resource}.
          NOTE: TLS Inspection Policy needs to be
          in the same region as Firewall Plus endpoint resource.
          r   r   tls_inspection_policyr   tlsInspectionPoliciesId)r   r   r   rW   Fr   )r   r   r   rA   rB   rC   r!   r   r    )TLS_INSPECTION_POLICY_RESOURCE_COLLECTIONr#   r	   rE   rF   r%   r   r$   #TLS_INSPECTION_POLICY_RESOURCE_NAMEr
   r&   r'   )r(   r)   r8   r   rG   r*   r+   s          r,   AddTLSInspectionPolicyrZ      s    ,,];+&&,,.@@%{/ ''/::
)
&%!!+.22&&'@AB!	 ;;
(
 ' 'GG
!
"25-@ )AA. 	 
	&	&(9':	;	G	G	OOr.   c                 &    U R                  SSUS9  g )Nz--no-tls-inspection-policy
store_true)actionr2   r5   r7   s     r,   AddNoTLSInspectionPolicyArgr^      s     	"<i  r.   z      Disable a firewall endpoint association. To enable a disabled association, use:

       $ {parent_command} update MY-ASSOCIATION --no-disabled

      c                 (    U R                  SSS US9  g )Nz
--disabledr\   )r]   r4   r2   r5   r7   s     r,   AddDisabledArgr`      s#     		  r.   c                    ^  U 4S j$ )Nc                 J   > [         R                  " T5      U R                  -   $ )N)r   GetEffectiveApiEndpointr   )xr(   s    r,   <lambda> MakeGetUriFunc.<locals>.<lambda>   s    66}ENr.    )r(   s   `r,   MakeGetUriFuncrh      s    Nr.   c                 (    U R                  SUSUS9  g )Nr=   -)r   r4   r2   r5   )r)   r   r8   s      r,   
AddZoneArgrk      s     	h3YOr.   )zTName to give the association. If not specified, an auto-generated UUID will be used.)zTime to synchronously wait for the operation to complete, after which the operation continues asynchronously. Ignored if --no-async isn't specified. See $ gcloud topic datetimes for information on time formats.)zjPath to TLS Inspection Policy configuration to use for intercepting TLS-encrypted traffic in this network.)z3Remove TLS inspection policy from this association.)Tz'Zone of a firewall endpoint association)$__doc__
__future__r   r   r   textwrap:googlecloudsdk.api_lib.network_security.firewall_endpointsr   googlecloudsdk.callioper    googlecloudsdk.calliope.conceptsr   r	   (googlecloudsdk.command_lib.util.conceptsr
   r   googlecloudsdk.corer   r%   r!   &ASSOCIATION_PARENT_RESOURCE_COLLECTIONENDPOINT_RESOURCE_NAMErY   rD   rX   r-   r9   rH   rM   rT   rZ   r^   dedentr`   rh   rk   rg   r.   r,   <module>rw      s    = &  '  U / 5 1 D G ) < E   *N &, &? #?  ? *
P< eQ(PVP2 c& {0Ph L oo 
 " &OPr.   