java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
io.envoyproxy.envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, MappedAttributeBuilderOrBuilder, Cloneable
Enclosing class:
MappedAttributeBuilder

public static final class MappedAttributeBuilder.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder> implements MappedAttributeBuilderOrBuilder
 Extension to build custom attributes in the :ref:`request
 <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>` based on a configurable mapping. The
 native implementation uses the CEL expression as the key, which is not always desirable. Using this
 extension, one can re-map a CEL expression that references internal filter state into a more
 user-friendly key that decouples the value from the underlying filter implementation.

 If a given CEL expression fails to eval, it will not be present in the attributes struct.

 If this extension is configured, then the original :ref:`ProcessingRequest
 <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>`'s ``request_attributes`` are ignored,
 and all attributes should be explicitly set via this extension.

 An example configuration may look like so:

 .. code-block:: yaml

    mapped_request_attributes:
      "request.path": "request.path"
      "source.country": "metadata.filter_metadata['com.example.location_filter']['country_code']"

 In the above example, the complex filter_metadata expression is evaluated via CEL, and the value
 is stored under the friendlier ``source.country`` key. ``The ProcessingRequest`` would look like:

 .. code-block:: text

    attributes {
      key: "envoy.filters.http.ext_proc"
      value {
        fields {
          key: "request.path"
          value {
            string_value: "/profile"
          }
        }
        fields {
          key: "source.country"
          value {
            string_value: "US"
          }
        }
      }
    }

 .. note::
   Processing request modifiers are currently in alpha.
 
Protobuf type envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.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<MappedAttributeBuilder.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<MappedAttributeBuilder.Builder>
    • getDefaultInstanceForType

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

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

      public MappedAttributeBuilder 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<MappedAttributeBuilder.Builder>
    • setField

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

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

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

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

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

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

      public MappedAttributeBuilder.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<MappedAttributeBuilder.Builder>
      Throws:
      IOException
    • getMappedRequestAttributesCount

      public int getMappedRequestAttributesCount()
      Description copied from interface: MappedAttributeBuilderOrBuilder
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
      Specified by:
      getMappedRequestAttributesCount in interface MappedAttributeBuilderOrBuilder
    • containsMappedRequestAttributes

      public boolean containsMappedRequestAttributes(String key)
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
      Specified by:
      containsMappedRequestAttributes in interface MappedAttributeBuilderOrBuilder
    • getMappedRequestAttributes

      @Deprecated public Map<String,String> getMappedRequestAttributes()
      Deprecated.
      Specified by:
      getMappedRequestAttributes in interface MappedAttributeBuilderOrBuilder
    • getMappedRequestAttributesMap

      public Map<String,String> getMappedRequestAttributesMap()
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
      Specified by:
      getMappedRequestAttributesMap in interface MappedAttributeBuilderOrBuilder
    • getMappedRequestAttributesOrDefault

      public String getMappedRequestAttributesOrDefault(String key, String defaultValue)
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
      Specified by:
      getMappedRequestAttributesOrDefault in interface MappedAttributeBuilderOrBuilder
    • getMappedRequestAttributesOrThrow

      public String getMappedRequestAttributesOrThrow(String key)
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
      Specified by:
      getMappedRequestAttributesOrThrow in interface MappedAttributeBuilderOrBuilder
    • clearMappedRequestAttributes

      public MappedAttributeBuilder.Builder clearMappedRequestAttributes()
    • removeMappedRequestAttributes

      public MappedAttributeBuilder.Builder removeMappedRequestAttributes(String key)
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
    • getMutableMappedRequestAttributes

      @Deprecated public Map<String,String> getMutableMappedRequestAttributes()
      Deprecated.
      Use alternate mutation accessors instead.
    • putMappedRequestAttributes

      public MappedAttributeBuilder.Builder putMappedRequestAttributes(String key, String value)
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
    • putAllMappedRequestAttributes

      public MappedAttributeBuilder.Builder putAllMappedRequestAttributes(Map<String,String> values)
       A map of request attributes to set in the attributes struct.
       The key is the attribute name, the value is the attribute value,
       interpretable by CEL. This allows for the re-mapping of attributes, which is not supported
       by the native attribute building logic.
       
      map<string, string> mapped_request_attributes = 1;
    • getMappedResponseAttributesCount

      public int getMappedResponseAttributesCount()
      Description copied from interface: MappedAttributeBuilderOrBuilder
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
      Specified by:
      getMappedResponseAttributesCount in interface MappedAttributeBuilderOrBuilder
    • containsMappedResponseAttributes

      public boolean containsMappedResponseAttributes(String key)
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
      Specified by:
      containsMappedResponseAttributes in interface MappedAttributeBuilderOrBuilder
    • getMappedResponseAttributes

      @Deprecated public Map<String,String> getMappedResponseAttributes()
      Deprecated.
      Specified by:
      getMappedResponseAttributes in interface MappedAttributeBuilderOrBuilder
    • getMappedResponseAttributesMap

      public Map<String,String> getMappedResponseAttributesMap()
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
      Specified by:
      getMappedResponseAttributesMap in interface MappedAttributeBuilderOrBuilder
    • getMappedResponseAttributesOrDefault

      public String getMappedResponseAttributesOrDefault(String key, String defaultValue)
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
      Specified by:
      getMappedResponseAttributesOrDefault in interface MappedAttributeBuilderOrBuilder
    • getMappedResponseAttributesOrThrow

      public String getMappedResponseAttributesOrThrow(String key)
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
      Specified by:
      getMappedResponseAttributesOrThrow in interface MappedAttributeBuilderOrBuilder
    • clearMappedResponseAttributes

      public MappedAttributeBuilder.Builder clearMappedResponseAttributes()
    • removeMappedResponseAttributes

      public MappedAttributeBuilder.Builder removeMappedResponseAttributes(String key)
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
    • getMutableMappedResponseAttributes

      @Deprecated public Map<String,String> getMutableMappedResponseAttributes()
      Deprecated.
      Use alternate mutation accessors instead.
    • putMappedResponseAttributes

      public MappedAttributeBuilder.Builder putMappedResponseAttributes(String key, String value)
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
    • putAllMappedResponseAttributes

      public MappedAttributeBuilder.Builder putAllMappedResponseAttributes(Map<String,String> values)
       Similar to ``mapped_request_attributes``, but for response attributes. The
       response nomenclature here just indicates that the attributes, whatever they may be, are sent
       with a response headers, body, or trailers ext_proc call.
       If a value contains a request key, e.g., ``request.host``, then the attribute would
       just be sent along in the response. This is useful if a given ext_proc extension is only
       enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request
       metadata.
       
      map<string, string> mapped_response_attributes = 2;
    • setUnknownFields

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

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