Class CustomHeaderConfig.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
- io.envoyproxy.envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,CustomHeaderConfigOrBuilder,Cloneable
- Enclosing class:
- CustomHeaderConfig
public static final class CustomHeaderConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder> implements CustomHeaderConfigOrBuilder
This extension allows for the original downstream remote IP to be detected by reading the value from a configured header name. If the value is successfully parsed as an IP, it'll be treated as the effective downstream remote address and seen as such by all filters. See :ref:`original_ip_detection_extensions <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.original_ip_detection_extensions>` for an overview of how extensions operate and what happens when an extension fails to detect the remote IP. [#extension: envoy.http.original_ip_detection.custom_header]
Protobuf typeenvoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomHeaderConfig.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)CustomHeaderConfigbuild()CustomHeaderConfigbuildPartial()CustomHeaderConfig.Builderclear()CustomHeaderConfig.BuilderclearAllowExtensionToSetAddressAsTrusted()If set to true, the extension could decide that the detected address should be treated as trusted by the HCM.CustomHeaderConfig.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)CustomHeaderConfig.BuilderclearHeaderName()The header name containing the original downstream remote address, if present.CustomHeaderConfig.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)CustomHeaderConfig.BuilderclearRejectWithStatus()If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.CustomHeaderConfig.Builderclone()booleangetAllowExtensionToSetAddressAsTrusted()If set to true, the extension could decide that the detected address should be treated as trusted by the HCM.CustomHeaderConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetHeaderName()The header name containing the original downstream remote address, if present.com.google.protobuf.ByteStringgetHeaderNameBytes()The header name containing the original downstream remote address, if present.HttpStatusgetRejectWithStatus()If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.HttpStatus.BuildergetRejectWithStatusBuilder()If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.HttpStatusOrBuildergetRejectWithStatusOrBuilder()If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.booleanhasRejectWithStatus()If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()CustomHeaderConfig.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)CustomHeaderConfig.BuildermergeFrom(com.google.protobuf.Message other)CustomHeaderConfig.BuildermergeFrom(CustomHeaderConfig other)CustomHeaderConfig.BuildermergeRejectWithStatus(HttpStatus value)If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.CustomHeaderConfig.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)CustomHeaderConfig.BuildersetAllowExtensionToSetAddressAsTrusted(boolean value)If set to true, the extension could decide that the detected address should be treated as trusted by the HCM.CustomHeaderConfig.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)CustomHeaderConfig.BuildersetHeaderName(String value)The header name containing the original downstream remote address, if present.CustomHeaderConfig.BuildersetHeaderNameBytes(com.google.protobuf.ByteString value)The header name containing the original downstream remote address, if present.CustomHeaderConfig.BuildersetRejectWithStatus(HttpStatus value)If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.CustomHeaderConfig.BuildersetRejectWithStatus(HttpStatus.Builder builderForValue)If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.CustomHeaderConfig.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)CustomHeaderConfig.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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<CustomHeaderConfig.Builder>
-
clear
public CustomHeaderConfig.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<CustomHeaderConfig.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<CustomHeaderConfig.Builder>
-
getDefaultInstanceForType
public CustomHeaderConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public CustomHeaderConfig build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public CustomHeaderConfig buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
-
setField
public CustomHeaderConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
clearField
public CustomHeaderConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
clearOneof
public CustomHeaderConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
setRepeatedField
public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
-
addRepeatedField
public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
-
mergeFrom
public CustomHeaderConfig.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CustomHeaderConfig.Builder>
-
mergeFrom
public CustomHeaderConfig.Builder mergeFrom(CustomHeaderConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
mergeFrom
public CustomHeaderConfig.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<CustomHeaderConfig.Builder>- Throws:
IOException
-
getHeaderName
public String getHeaderName()
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Specified by:
getHeaderNamein interfaceCustomHeaderConfigOrBuilder- Returns:
- The headerName.
-
getHeaderNameBytes
public com.google.protobuf.ByteString getHeaderNameBytes()
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Specified by:
getHeaderNameBytesin interfaceCustomHeaderConfigOrBuilder- Returns:
- The bytes for headerName.
-
setHeaderName
public CustomHeaderConfig.Builder setHeaderName(String value)
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Parameters:
value- The headerName to set.- Returns:
- This builder for chaining.
-
clearHeaderName
public CustomHeaderConfig.Builder clearHeaderName()
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setHeaderNameBytes
public CustomHeaderConfig.Builder setHeaderNameBytes(com.google.protobuf.ByteString value)
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Parameters:
value- The bytes for headerName to set.- Returns:
- This builder for chaining.
-
getAllowExtensionToSetAddressAsTrusted
public boolean getAllowExtensionToSetAddressAsTrusted()
If set to true, the extension could decide that the detected address should be treated as trusted by the HCM. If the address is considered :ref:`trusted<config_http_conn_man_headers_x-forwarded-for_trusted_client_address>`, it might be used as input to determine if the request is internal (among other things).
bool allow_extension_to_set_address_as_trusted = 2;- Specified by:
getAllowExtensionToSetAddressAsTrustedin interfaceCustomHeaderConfigOrBuilder- Returns:
- The allowExtensionToSetAddressAsTrusted.
-
setAllowExtensionToSetAddressAsTrusted
public CustomHeaderConfig.Builder setAllowExtensionToSetAddressAsTrusted(boolean value)
If set to true, the extension could decide that the detected address should be treated as trusted by the HCM. If the address is considered :ref:`trusted<config_http_conn_man_headers_x-forwarded-for_trusted_client_address>`, it might be used as input to determine if the request is internal (among other things).
bool allow_extension_to_set_address_as_trusted = 2;- Parameters:
value- The allowExtensionToSetAddressAsTrusted to set.- Returns:
- This builder for chaining.
-
clearAllowExtensionToSetAddressAsTrusted
public CustomHeaderConfig.Builder clearAllowExtensionToSetAddressAsTrusted()
If set to true, the extension could decide that the detected address should be treated as trusted by the HCM. If the address is considered :ref:`trusted<config_http_conn_man_headers_x-forwarded-for_trusted_client_address>`, it might be used as input to determine if the request is internal (among other things).
bool allow_extension_to_set_address_as_trusted = 2;- Returns:
- This builder for chaining.
-
hasRejectWithStatus
public boolean hasRejectWithStatus()
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;- Specified by:
hasRejectWithStatusin interfaceCustomHeaderConfigOrBuilder- Returns:
- Whether the rejectWithStatus field is set.
-
getRejectWithStatus
public HttpStatus getRejectWithStatus()
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;- Specified by:
getRejectWithStatusin interfaceCustomHeaderConfigOrBuilder- Returns:
- The rejectWithStatus.
-
setRejectWithStatus
public CustomHeaderConfig.Builder setRejectWithStatus(HttpStatus value)
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;
-
setRejectWithStatus
public CustomHeaderConfig.Builder setRejectWithStatus(HttpStatus.Builder builderForValue)
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;
-
mergeRejectWithStatus
public CustomHeaderConfig.Builder mergeRejectWithStatus(HttpStatus value)
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;
-
clearRejectWithStatus
public CustomHeaderConfig.Builder clearRejectWithStatus()
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;
-
getRejectWithStatusBuilder
public HttpStatus.Builder getRejectWithStatusBuilder()
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;
-
getRejectWithStatusOrBuilder
public HttpStatusOrBuilder getRejectWithStatusOrBuilder()
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;- Specified by:
getRejectWithStatusOrBuilderin interfaceCustomHeaderConfigOrBuilder
-
setUnknownFields
public final CustomHeaderConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
mergeUnknownFields
public final CustomHeaderConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
-