Class MappedAttributeBuilder.Builder
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 Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone()booleanA map of request attributes to set in the attributes struct.booleanSimilar to ``mapped_request_attributes``, but for response attributes.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.intA map of request attributes to set in the attributes struct.A map of request attributes to set in the attributes struct.getMappedRequestAttributesOrDefault(String key, String defaultValue) A map of request attributes to set in the attributes struct.A map of request attributes to set in the attributes struct.Deprecated.intSimilar to ``mapped_request_attributes``, but for response attributes.Similar to ``mapped_request_attributes``, but for response attributes.getMappedResponseAttributesOrDefault(String key, String defaultValue) Similar to ``mapped_request_attributes``, but for response attributes.Similar to ``mapped_request_attributes``, but for response attributes.Deprecated.Deprecated.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(MappedAttributeBuilder other) mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) putAllMappedRequestAttributes(Map<String, String> values) A map of request attributes to set in the attributes struct.putAllMappedResponseAttributes(Map<String, String> values) Similar to ``mapped_request_attributes``, but for response attributes.putMappedRequestAttributes(String key, String value) A map of request attributes to set in the attributes struct.putMappedResponseAttributes(String key, String value) Similar to ``mapped_request_attributes``, but for response attributes.A map of request attributes to set in the attributes struct.Similar to ``mapped_request_attributes``, but for response attributes.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(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, internalGetMutableMapField, 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() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.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<MappedAttributeBuilder.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<MappedAttributeBuilder.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<MappedAttributeBuilder.Builder>
-
setField
public MappedAttributeBuilder.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<MappedAttributeBuilder.Builder>
-
clearField
public MappedAttributeBuilder.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
-
clearOneof
public MappedAttributeBuilder.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
-
setRepeatedField
public MappedAttributeBuilder.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<MappedAttributeBuilder.Builder>
-
addRepeatedField
public MappedAttributeBuilder.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<MappedAttributeBuilder.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MappedAttributeBuilder.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MappedAttributeBuilder.Builder>- Throws:
IOException
-
getMappedRequestAttributesCount
public int getMappedRequestAttributesCount()Description copied from interface:MappedAttributeBuilderOrBuilderA 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:
getMappedRequestAttributesCountin interfaceMappedAttributeBuilderOrBuilder
-
containsMappedRequestAttributes
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:
containsMappedRequestAttributesin interfaceMappedAttributeBuilderOrBuilder
-
getMappedRequestAttributes
Deprecated.UsegetMappedRequestAttributesMap()instead.- Specified by:
getMappedRequestAttributesin interfaceMappedAttributeBuilderOrBuilder
-
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:
getMappedRequestAttributesMapin interfaceMappedAttributeBuilderOrBuilder
-
getMappedRequestAttributesOrDefault
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:
getMappedRequestAttributesOrDefaultin interfaceMappedAttributeBuilderOrBuilder
-
getMappedRequestAttributesOrThrow
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:
getMappedRequestAttributesOrThrowin interfaceMappedAttributeBuilderOrBuilder
-
clearMappedRequestAttributes
-
removeMappedRequestAttributes
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.Use alternate mutation accessors instead. -
putMappedRequestAttributes
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
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:MappedAttributeBuilderOrBuilderSimilar 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:
getMappedResponseAttributesCountin interfaceMappedAttributeBuilderOrBuilder
-
containsMappedResponseAttributes
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:
containsMappedResponseAttributesin interfaceMappedAttributeBuilderOrBuilder
-
getMappedResponseAttributes
Deprecated.UsegetMappedResponseAttributesMap()instead.- Specified by:
getMappedResponseAttributesin interfaceMappedAttributeBuilderOrBuilder
-
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:
getMappedResponseAttributesMapin interfaceMappedAttributeBuilderOrBuilder
-
getMappedResponseAttributesOrDefault
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:
getMappedResponseAttributesOrDefaultin interfaceMappedAttributeBuilderOrBuilder
-
getMappedResponseAttributesOrThrow
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:
getMappedResponseAttributesOrThrowin interfaceMappedAttributeBuilderOrBuilder
-
clearMappedResponseAttributes
-
removeMappedResponseAttributes
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.Use alternate mutation accessors instead. -
putMappedResponseAttributes
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
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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
-
mergeUnknownFields
public final MappedAttributeBuilder.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MappedAttributeBuilder.Builder>
-