java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
io.envoyproxy.envoy.extensions.filters.network.geoip.v3.Geoip.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GeoipOrBuilder, Cloneable
Enclosing class:
Geoip

public static final class Geoip.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder> implements GeoipOrBuilder
 The network geolocation filter performs IP geolocation lookups on incoming connections
 and stores the results in the connection's filter state under the well-known key
 ``envoy.geoip``. The stored data is a ``GeoipInfo`` object that supports
 serialization for access logging and field-level access.

 See :ref:`well known filter state <well_known_filter_state>` for details on accessing
 the geolocation data.
 
Protobuf type envoy.extensions.filters.network.geoip.v3.Geoip
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • clear

      public Geoip.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • getDefaultInstanceForType

      public Geoip getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Geoip build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Geoip buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Geoip.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • setField

      public Geoip.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • clearField

      public Geoip.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • clearOneof

      public Geoip.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • setRepeatedField

      public Geoip.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • addRepeatedField

      public Geoip.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • mergeFrom

      public Geoip.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Geoip.Builder>
    • mergeFrom

      public Geoip.Builder mergeFrom(Geoip other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • mergeFrom

      public Geoip.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Geoip.Builder>
      Throws:
      IOException
    • getStatPrefix

      public String getStatPrefix()
       The prefix to use when emitting statistics. This is useful when there are multiple
       listeners configured with geoip filters, allowing stats to be grouped per listener.
       For example, with ``stat_prefix: "listener_1."``, stats would be emitted as
       ``listener_1.geoip.total``.
       
      string stat_prefix = 1;
      Specified by:
      getStatPrefix in interface GeoipOrBuilder
      Returns:
      The statPrefix.
    • getStatPrefixBytes

      public com.google.protobuf.ByteString getStatPrefixBytes()
       The prefix to use when emitting statistics. This is useful when there are multiple
       listeners configured with geoip filters, allowing stats to be grouped per listener.
       For example, with ``stat_prefix: "listener_1."``, stats would be emitted as
       ``listener_1.geoip.total``.
       
      string stat_prefix = 1;
      Specified by:
      getStatPrefixBytes in interface GeoipOrBuilder
      Returns:
      The bytes for statPrefix.
    • setStatPrefix

      public Geoip.Builder setStatPrefix(String value)
       The prefix to use when emitting statistics. This is useful when there are multiple
       listeners configured with geoip filters, allowing stats to be grouped per listener.
       For example, with ``stat_prefix: "listener_1."``, stats would be emitted as
       ``listener_1.geoip.total``.
       
      string stat_prefix = 1;
      Parameters:
      value - The statPrefix to set.
      Returns:
      This builder for chaining.
    • clearStatPrefix

      public Geoip.Builder clearStatPrefix()
       The prefix to use when emitting statistics. This is useful when there are multiple
       listeners configured with geoip filters, allowing stats to be grouped per listener.
       For example, with ``stat_prefix: "listener_1."``, stats would be emitted as
       ``listener_1.geoip.total``.
       
      string stat_prefix = 1;
      Returns:
      This builder for chaining.
    • setStatPrefixBytes

      public Geoip.Builder setStatPrefixBytes(com.google.protobuf.ByteString value)
       The prefix to use when emitting statistics. This is useful when there are multiple
       listeners configured with geoip filters, allowing stats to be grouped per listener.
       For example, with ``stat_prefix: "listener_1."``, stats would be emitted as
       ``listener_1.geoip.total``.
       
      string stat_prefix = 1;
      Parameters:
      value - The bytes for statPrefix to set.
      Returns:
      This builder for chaining.
    • hasProvider

      public boolean hasProvider()
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
      Specified by:
      hasProvider in interface GeoipOrBuilder
      Returns:
      Whether the provider field is set.
    • getProvider

      public TypedExtensionConfig getProvider()
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
      Specified by:
      getProvider in interface GeoipOrBuilder
      Returns:
      The provider.
    • setProvider

      public Geoip.Builder setProvider(TypedExtensionConfig value)
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
    • setProvider

      public Geoip.Builder setProvider(TypedExtensionConfig.Builder builderForValue)
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
    • mergeProvider

      public Geoip.Builder mergeProvider(TypedExtensionConfig value)
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
    • clearProvider

      public Geoip.Builder clearProvider()
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
    • getProviderBuilder

      public TypedExtensionConfig.Builder getProviderBuilder()
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
    • getProviderOrBuilder

      public TypedExtensionConfigOrBuilder getProviderOrBuilder()
       Geoip driver specific configuration which depends on the driver being instantiated.
       [#extension-category: envoy.geoip_providers]
       
      .envoy.config.core.v3.TypedExtensionConfig provider = 2 [(.validate.rules) = { ... }
      Specified by:
      getProviderOrBuilder in interface GeoipOrBuilder
    • getClientIp

      public String getClientIp()
       Configuration for dynamically extracting the client IP address used for geolocation lookups.
      
       This field accepts the same :ref:`format specifiers <config_access_log_format>` as used for
       :ref:`HTTP access logging <config_access_log>` to extract the client IP.
       The formatted result must be a valid IPv4 or IPv6 address string. For example:
      
       * ``%FILTER_STATE(my.custom.client.ip:PLAIN)%`` - Read from filter state populated by a preceding filter.
       * ``%DYNAMIC_METADATA(namespace:key)%`` - Read from dynamic metadata.
       * ``%REQ(X-Forwarded-For)%`` - Extract from request header (if applicable in context).
      
       If not specified, defaults to the downstream connection's remote address.
       If specified but the result is empty, ``-``, or not a valid IP address, the filter
       falls back to the downstream connection's remote address.
      
       Example reading from filter state:
      
       .. code-block:: yaml
      
         client_ip: "%FILTER_STATE(my.custom.client.ip:PLAIN)%"
       
      string client_ip = 3;
      Specified by:
      getClientIp in interface GeoipOrBuilder
      Returns:
      The clientIp.
    • getClientIpBytes

      public com.google.protobuf.ByteString getClientIpBytes()
       Configuration for dynamically extracting the client IP address used for geolocation lookups.
      
       This field accepts the same :ref:`format specifiers <config_access_log_format>` as used for
       :ref:`HTTP access logging <config_access_log>` to extract the client IP.
       The formatted result must be a valid IPv4 or IPv6 address string. For example:
      
       * ``%FILTER_STATE(my.custom.client.ip:PLAIN)%`` - Read from filter state populated by a preceding filter.
       * ``%DYNAMIC_METADATA(namespace:key)%`` - Read from dynamic metadata.
       * ``%REQ(X-Forwarded-For)%`` - Extract from request header (if applicable in context).
      
       If not specified, defaults to the downstream connection's remote address.
       If specified but the result is empty, ``-``, or not a valid IP address, the filter
       falls back to the downstream connection's remote address.
      
       Example reading from filter state:
      
       .. code-block:: yaml
      
         client_ip: "%FILTER_STATE(my.custom.client.ip:PLAIN)%"
       
      string client_ip = 3;
      Specified by:
      getClientIpBytes in interface GeoipOrBuilder
      Returns:
      The bytes for clientIp.
    • setClientIp

      public Geoip.Builder setClientIp(String value)
       Configuration for dynamically extracting the client IP address used for geolocation lookups.
      
       This field accepts the same :ref:`format specifiers <config_access_log_format>` as used for
       :ref:`HTTP access logging <config_access_log>` to extract the client IP.
       The formatted result must be a valid IPv4 or IPv6 address string. For example:
      
       * ``%FILTER_STATE(my.custom.client.ip:PLAIN)%`` - Read from filter state populated by a preceding filter.
       * ``%DYNAMIC_METADATA(namespace:key)%`` - Read from dynamic metadata.
       * ``%REQ(X-Forwarded-For)%`` - Extract from request header (if applicable in context).
      
       If not specified, defaults to the downstream connection's remote address.
       If specified but the result is empty, ``-``, or not a valid IP address, the filter
       falls back to the downstream connection's remote address.
      
       Example reading from filter state:
      
       .. code-block:: yaml
      
         client_ip: "%FILTER_STATE(my.custom.client.ip:PLAIN)%"
       
      string client_ip = 3;
      Parameters:
      value - The clientIp to set.
      Returns:
      This builder for chaining.
    • clearClientIp

      public Geoip.Builder clearClientIp()
       Configuration for dynamically extracting the client IP address used for geolocation lookups.
      
       This field accepts the same :ref:`format specifiers <config_access_log_format>` as used for
       :ref:`HTTP access logging <config_access_log>` to extract the client IP.
       The formatted result must be a valid IPv4 or IPv6 address string. For example:
      
       * ``%FILTER_STATE(my.custom.client.ip:PLAIN)%`` - Read from filter state populated by a preceding filter.
       * ``%DYNAMIC_METADATA(namespace:key)%`` - Read from dynamic metadata.
       * ``%REQ(X-Forwarded-For)%`` - Extract from request header (if applicable in context).
      
       If not specified, defaults to the downstream connection's remote address.
       If specified but the result is empty, ``-``, or not a valid IP address, the filter
       falls back to the downstream connection's remote address.
      
       Example reading from filter state:
      
       .. code-block:: yaml
      
         client_ip: "%FILTER_STATE(my.custom.client.ip:PLAIN)%"
       
      string client_ip = 3;
      Returns:
      This builder for chaining.
    • setClientIpBytes

      public Geoip.Builder setClientIpBytes(com.google.protobuf.ByteString value)
       Configuration for dynamically extracting the client IP address used for geolocation lookups.
      
       This field accepts the same :ref:`format specifiers <config_access_log_format>` as used for
       :ref:`HTTP access logging <config_access_log>` to extract the client IP.
       The formatted result must be a valid IPv4 or IPv6 address string. For example:
      
       * ``%FILTER_STATE(my.custom.client.ip:PLAIN)%`` - Read from filter state populated by a preceding filter.
       * ``%DYNAMIC_METADATA(namespace:key)%`` - Read from dynamic metadata.
       * ``%REQ(X-Forwarded-For)%`` - Extract from request header (if applicable in context).
      
       If not specified, defaults to the downstream connection's remote address.
       If specified but the result is empty, ``-``, or not a valid IP address, the filter
       falls back to the downstream connection's remote address.
      
       Example reading from filter state:
      
       .. code-block:: yaml
      
         client_ip: "%FILTER_STATE(my.custom.client.ip:PLAIN)%"
       
      string client_ip = 3;
      Parameters:
      value - The bytes for clientIp to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Geoip.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
    • mergeUnknownFields

      public final Geoip.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>