Record Class CortexProperties.S3.Proxy

java.lang.Object
java.lang.Record
ai.chatur.cortex.spring.CortexProperties.S3.Proxy
Record Components:
endpoint - the proxy endpoint, for example http://proxy.internal:3128; when unset, no proxy is used unless one of the discovery settings below is enabled
username - the proxy username, when it requires authentication
password - the proxy password, when it requires authentication
nonProxyHosts - hosts to reach directly, bypassing the proxy; when unset, everything goes through it
useSystemPropertyValues - whether to fall back to the http.proxyHost/ https.proxyHost family of JVM system properties for anything not set here
useEnvironmentVariableValues - whether to fall back to the HTTP_PROXY/ HTTPS_PROXY/NO_PROXY environment variables for anything not set here
Enclosing class:
CortexProperties.S3

public static record CortexProperties.S3.Proxy(String endpoint, String username, String password, Set<String> nonProxyHosts, boolean useSystemPropertyValues, boolean useEnvironmentVariableValues) extends Record
HTTP proxy settings for the S3 client.

The proxy is applied when endpoint is set; there is deliberately no separate enabling flag, so a configured proxy can never be silently ignored — and, by the same reasoning, an unconfigured proxy is never silently applied. That second half is why useSystemPropertyValues and useEnvironmentVariableValues both default to false here, where the AWS SDK defaults them to true: left at the SDK's defaults, an ambient https.proxyHost or HTTPS_PROXY in the deployment environment would silently route backups through a proxy that appears nowhere in this configuration. These settings determine the S3 client's proxy on their own.

  • Constructor Details

    • Proxy

      public Proxy(String endpoint, String username, String password, Set<String> nonProxyHosts, @DefaultValue("false") boolean useSystemPropertyValues, @DefaultValue("false") boolean useEnvironmentVariableValues)
      Creates an instance of a Proxy record class.
      Parameters:
      endpoint - the value for the endpoint record component
      username - the value for the username record component
      password - the value for the password record component
      nonProxyHosts - the value for the nonProxyHosts record component
      useSystemPropertyValues - the value for the useSystemPropertyValues record component
      useEnvironmentVariableValues - the value for the useEnvironmentVariableValues record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • endpoint

      public String endpoint()
      Returns the value of the endpoint record component.
      Returns:
      the value of the endpoint record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component
    • nonProxyHosts

      public Set<String> nonProxyHosts()
      Returns the value of the nonProxyHosts record component.
      Returns:
      the value of the nonProxyHosts record component
    • useSystemPropertyValues

      public boolean useSystemPropertyValues()
      Returns the value of the useSystemPropertyValues record component.
      Returns:
      the value of the useSystemPropertyValues record component
    • useEnvironmentVariableValues

      public boolean useEnvironmentVariableValues()
      Returns the value of the useEnvironmentVariableValues record component.
      Returns:
      the value of the useEnvironmentVariableValues record component