
                         t    S r SSKJr  SSKJr  SSKJr  SSKJr  SS jrS rSS jr	S	 r
SS jrS rS rS rg
)zACode that's shared between multiple target-*-proxies subcommands.    )absolute_import)division)unicode_literals)arg_parsersc                 .    U R                  SSSS.USS9  g)z:Adds parser arguments for creation related to ProxyHeader.z--proxy-headerzNo proxy header is added.zMEnables PROXY protocol (version 1) for passing client connection information.)NONEPROXY_V1z<The type of proxy protocol header to be sent to the backend.choicesdefaulthelpNadd_argumentparserr   s     :lib/googlecloudsdk/api_lib/compute/target_proxies_utils.pyAddProxyHeaderRelatedCreateArgsr      s/     	-( I      c                     [        U SS9  g)z8Adds parser arguments for update related to ProxyHeader.Nr   )r   r   s    r   AddProxyHeaderRelatedUpdateArgsr   )   s     "&$7r   c                 0    U R                  SSSSS.USS9  g)	z;Adds parser arguments for creation related to QuicOverride.z--quic-overridez1Allows Google to control when QUIC is rolled out.z4Allows load balancer to negotiate QUIC with clients.z7Disallows load balancer to negotiate QUIC with clients.)r   ENABLEDISABLEzControls whether load balancer may negotiate QUIC with clients. QUIC is a new transport which reduces latency compared to that of TCP. See https://www.chromium.org/quic for more details.r
   Nr   r   s     r   AddQuicOverrideCreateArgsr   /   s3     	EJN
 A  r   c                     [        U SS9  g)z9Adds parser arguments for update related to QuicOverride.Nr   )r   r   s    r   AddQuicOverrideUpdateArgsr   B        FD1r   Nc                 0    U R                  SSSSS.USS9  g)	z;Adds parser arguments for creation related to TlsEarlyData.z--tls-early-datazeTLS 1.3 Early Data is not advertised, and any (invalid) attempts to send Early Data will be rejected.zEnables TLS 1.3 Early Data for requests with safe HTTP methods, and HTTP requests that do not have query parameters. Requests that send Early Data containing non-idempotent HTTP methods or with query parameters will be rejected with a HTTP 425.a  Enables TLS 1.3 Early Data for requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode does not enforce any other limitations for requests with Early Data. The application owner should validate that Early Data is acceptable for a given request path.)DISABLEDSTRICT
PERMISSIVEaM  TLS 1.3 Early Data ("0-RTT" or "zero round trip") allows clients to include HTTP request data alongside a TLS handshake. This can improve application performance, especially on networks where connection interruptions may be common, such as on mobile. This applies to both HTTP over TCP (ie: HTTP/1.1 and HTTP/2) and HTTP/3 over QUIC.r
   Nr   r   s     r   AddTlsEarlyDataCreateArgsr$   H   s9     	6I& /  r   c                     [        U SS9  g)z9Adds parser arguments for update related to TlsEarlyData.Nr   )r$   r   s    r   AddTlsEarlyDataUpdateArgsr&   l   r   r   c                 P    U R                  S[        R                  " SS5      SS9  g).Adds the http keep alive timeout sec argument.z--http-keep-alive-timeout-sec   i  a        Represents the maximum amount of time that a TCP connection can be idle
      between the (downstream) client and the target HTTP proxy. If an HTTP
      keepalive  timeout is not specified, the default value is 610 seconds.
      For global external Application Load Balancers, the minimum allowed
      value is 5 seconds and the maximum allowed value is 1200 seconds.
      )typer   N)r   r   
BoundedIntr   s    r   AddHttpKeepAliveTimeoutSecr,   r   s-    %!!!T*
  
r   c                 (    U R                  SSSSS9  g)r(   z#--clear-http-keep-alive-timeout-sec
store_trueFzE      Clears the previously configured HTTP keepalive timeout.
      )actionr   r   Nr   r   s    r   AddClearHttpKeepAliveTimeoutSecr0      s#    +
	  r   )r   )N)__doc__
__future__r   r   r   googlecloudsdk.callioper   r   r   r   r   r$   r&   r,   r0    r   r   <module>r5      s@    H &  ' /"8&2!H2	r   