Class Geoip.Builder
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 Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Configuration for dynamically extracting the client IP address used for geolocation lookups.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Geoip driver specific configuration which depends on the driver being instantiated.The prefix to use when emitting statistics.clone()Configuration for dynamically extracting the client IP address used for geolocation lookups.com.google.protobuf.ByteStringConfiguration for dynamically extracting the client IP address used for geolocation lookups.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorGeoip driver specific configuration which depends on the driver being instantiated.Geoip driver specific configuration which depends on the driver being instantiated.Geoip driver specific configuration which depends on the driver being instantiated.The prefix to use when emitting statistics.com.google.protobuf.ByteStringThe prefix to use when emitting statistics.booleanGeoip driver specific configuration which depends on the driver being instantiated.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Geoip driver specific configuration which depends on the driver being instantiated.final Geoip.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setClientIp(String value) Configuration for dynamically extracting the client IP address used for geolocation lookups.setClientIpBytes(com.google.protobuf.ByteString value) Configuration for dynamically extracting the client IP address used for geolocation lookups.setProvider(TypedExtensionConfig value) Geoip driver specific configuration which depends on the driver being instantiated.setProvider(TypedExtensionConfig.Builder builderForValue) Geoip driver specific configuration which depends on the driver being instantiated.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setStatPrefix(String value) The prefix to use when emitting statistics.setStatPrefixBytes(com.google.protobuf.ByteString value) The prefix to use when emitting statistics.final Geoip.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
setField
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
setRepeatedField
public Geoip.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
addRepeatedField
public Geoip.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Geoip.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Geoip.Builder>- Throws:
IOException
-
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:
getStatPrefixin interfaceGeoipOrBuilder- 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:
getStatPrefixBytesin interfaceGeoipOrBuilder- Returns:
- The bytes for statPrefix.
-
setStatPrefix
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
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
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:
hasProviderin interfaceGeoipOrBuilder- Returns:
- Whether the provider field is set.
-
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:
getProviderin interfaceGeoipOrBuilder- Returns:
- The provider.
-
setProvider
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
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
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
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
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
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:
getProviderOrBuilderin interfaceGeoipOrBuilder
-
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:
getClientIpin interfaceGeoipOrBuilder- 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:
getClientIpBytesin interfaceGeoipOrBuilder- Returns:
- The bytes for clientIp.
-
setClientIp
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
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
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
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Geoip.Builder>
-