Class MetadataKey.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<MetadataKey.Builder>
com.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
io.envoyproxy.envoy.type.metadata.v3.MetadataKey.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,MetadataKeyOrBuilder
,Cloneable
- Enclosing class:
MetadataKey
public static final class MetadataKey.Builder
extends com.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
implements MetadataKeyOrBuilder
MetadataKey provides a general interface using ``key`` and ``path`` to retrieve value from :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>`. For example, for the following Metadata: .. code-block:: yaml filter_metadata: envoy.xxx: prop: foo: bar xyz: hello: envoy The following MetadataKey will retrieve a string value "bar" from the Metadata. .. code-block:: yaml key: envoy.xxx path: - key: prop - key: fooProtobuf type
envoy.type.metadata.v3.MetadataKey
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private Object
private List
<MetadataKey.PathSegment> private com.google.protobuf.RepeatedFieldBuilder
<MetadataKey.PathSegment, MetadataKey.PathSegment.Builder, MetadataKey.PathSegmentOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllPath
(Iterable<? extends MetadataKey.PathSegment> values) The path to retrieve the Value from the Struct.addPath
(int index, MetadataKey.PathSegment value) The path to retrieve the Value from the Struct.addPath
(int index, MetadataKey.PathSegment.Builder builderForValue) The path to retrieve the Value from the Struct.addPath
(MetadataKey.PathSegment value) The path to retrieve the Value from the Struct.addPath
(MetadataKey.PathSegment.Builder builderForValue) The path to retrieve the Value from the Struct.The path to retrieve the Value from the Struct.addPathBuilder
(int index) The path to retrieve the Value from the Struct.build()
private void
buildPartial0
(MetadataKey result) private void
clear()
clearKey()
The key name of Metadata to retrieve the Struct from the metadata.The path to retrieve the Value from the Struct.private void
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getKey()
The key name of Metadata to retrieve the Struct from the metadata.com.google.protobuf.ByteString
The key name of Metadata to retrieve the Struct from the metadata.getPath
(int index) The path to retrieve the Value from the Struct.getPathBuilder
(int index) The path to retrieve the Value from the Struct.The path to retrieve the Value from the Struct.int
The path to retrieve the Value from the Struct.private com.google.protobuf.RepeatedFieldBuilder
<MetadataKey.PathSegment, MetadataKey.PathSegment.Builder, MetadataKey.PathSegmentOrBuilder> The path to retrieve the Value from the Struct.getPathOrBuilder
(int index) The path to retrieve the Value from the Struct.List
<? extends MetadataKey.PathSegmentOrBuilder> The path to retrieve the Value from the Struct.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(MetadataKey other) removePath
(int index) The path to retrieve the Value from the Struct.The key name of Metadata to retrieve the Struct from the metadata.setKeyBytes
(com.google.protobuf.ByteString value) The key name of Metadata to retrieve the Struct from the metadata.setPath
(int index, MetadataKey.PathSegment value) The path to retrieve the Value from the Struct.setPath
(int index, MetadataKey.PathSegment.Builder builderForValue) The path to retrieve the Value from the Struct.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, 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
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
bitField0_
private int bitField0_ -
key_
-
path_
-
pathBuilder_
private com.google.protobuf.RepeatedFieldBuilder<MetadataKey.PathSegment,MetadataKey.PathSegment.Builder, pathBuilder_MetadataKey.PathSegmentOrBuilder>
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<MetadataKey.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
-
mergeFrom
public MetadataKey.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<MetadataKey.Builder>
- Throws:
IOException
-
getKey
The key name of Metadata to retrieve the Struct from the metadata. Typically, it represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }
- Specified by:
getKey
in interfaceMetadataKeyOrBuilder
- Returns:
- The key.
-
getKeyBytes
public com.google.protobuf.ByteString getKeyBytes()The key name of Metadata to retrieve the Struct from the metadata. Typically, it represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }
- Specified by:
getKeyBytes
in interfaceMetadataKeyOrBuilder
- Returns:
- The bytes for key.
-
setKey
The key name of Metadata to retrieve the Struct from the metadata. Typically, it represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }
- Parameters:
value
- The key to set.- Returns:
- This builder for chaining.
-
clearKey
The key name of Metadata to retrieve the Struct from the metadata. Typically, it represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }
- Returns:
- This builder for chaining.
-
setKeyBytes
The key name of Metadata to retrieve the Struct from the metadata. Typically, it represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }
- Parameters:
value
- The bytes for key to set.- Returns:
- This builder for chaining.
-
ensurePathIsMutable
private void ensurePathIsMutable() -
getPathList
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
- Specified by:
getPathList
in interfaceMetadataKeyOrBuilder
-
getPathCount
public int getPathCount()The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
- Specified by:
getPathCount
in interfaceMetadataKeyOrBuilder
-
getPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
- Specified by:
getPath
in interfaceMetadataKeyOrBuilder
-
setPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
setPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
addPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
addPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
addPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
addPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
addAllPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
clearPath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
removePath
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
getPathBuilder
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
getPathOrBuilder
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
- Specified by:
getPathOrBuilder
in interfaceMetadataKeyOrBuilder
-
getPathOrBuilderList
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
- Specified by:
getPathOrBuilderList
in interfaceMetadataKeyOrBuilder
-
addPathBuilder
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
addPathBuilder
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
getPathBuilderList
The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, which depends on the particular scenario. Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
getPathFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<MetadataKey.PathSegment,MetadataKey.PathSegment.Builder, getPathFieldBuilder()MetadataKey.PathSegmentOrBuilder>
-