java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
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 type envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig
  • 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<CustomHeaderConfig.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<CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • getDefaultInstanceForType

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

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

      public CustomHeaderConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<CustomHeaderConfig.Builder>
    • setField

      public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • clearField

      public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • clearOneof

      public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • setRepeatedField

      public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • addRepeatedField

      public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • mergeFrom

      public CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      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<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:
      getHeaderName in interface CustomHeaderConfigOrBuilder
      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:
      getHeaderNameBytes in interface CustomHeaderConfigOrBuilder
      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:
      getAllowExtensionToSetAddressAsTrusted in interface CustomHeaderConfigOrBuilder
      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:
      hasRejectWithStatus in interface CustomHeaderConfigOrBuilder
      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:
      getRejectWithStatus in interface CustomHeaderConfigOrBuilder
      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:
      getRejectWithStatusOrBuilder in interface CustomHeaderConfigOrBuilder
    • setUnknownFields

      public final CustomHeaderConfig.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<CustomHeaderConfig.Builder>
    • mergeUnknownFields

      public final CustomHeaderConfig.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<CustomHeaderConfig.Builder>