Class MetadataKey.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<MetadataKey.Builder>
implements MetadataKeyOrBuilder
MetadataKey provides a way to retrieve values from
:ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>` using a ``key`` and a ``path``.
For example, consider the following Metadata:
.. code-block:: yaml
filter_metadata:
envoy.xxx:
prop:
foo: bar
xyz:
hello: envoy
The following MetadataKey would retrieve the string value "bar" from the Metadata:
.. code-block:: yaml
key: envoy.xxx
path:
- key: prop
- key: foo
Protobuf type envoy.type.metadata.v3.MetadataKey-
Method Summary
Modifier and TypeMethodDescriptionaddAllPath(Iterable<? extends MetadataKey.PathSegment> values) The path used to retrieve a specific Value from the Struct.addPath(int index, MetadataKey.PathSegment value) The path used to retrieve a specific Value from the Struct.addPath(int index, MetadataKey.PathSegment.Builder builderForValue) The path used to retrieve a specific Value from the Struct.addPath(MetadataKey.PathSegment value) The path used to retrieve a specific Value from the Struct.addPath(MetadataKey.PathSegment.Builder builderForValue) The path used to retrieve a specific Value from the Struct.The path used to retrieve a specific Value from the Struct.addPathBuilder(int index) The path used to retrieve a specific Value from the Struct.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearKey()The key name of the Metadata from which to retrieve the Struct.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The path used to retrieve a specific Value from the Struct.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetKey()The key name of the Metadata from which to retrieve the Struct.com.google.protobuf.ByteStringThe key name of the Metadata from which to retrieve the Struct.getPath(int index) The path used to retrieve a specific Value from the Struct.getPathBuilder(int index) The path used to retrieve a specific Value from the Struct.The path used to retrieve a specific Value from the Struct.intThe path used to retrieve a specific Value from the Struct.The path used to retrieve a specific Value from the Struct.getPathOrBuilder(int index) The path used to retrieve a specific Value from the Struct.List<? extends MetadataKey.PathSegmentOrBuilder>The path used to retrieve a specific Value from the Struct.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(MetadataKey other) final MetadataKey.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removePath(int index) The path used to retrieve a specific Value from the Struct.The key name of the Metadata from which to retrieve the Struct.setKeyBytes(com.google.protobuf.ByteString value) The key name of the Metadata from which to retrieve the Struct.setPath(int index, MetadataKey.PathSegment value) The path used to retrieve a specific Value from the Struct.setPath(int index, MetadataKey.PathSegment.Builder builderForValue) The path used to retrieve a specific Value from the Struct.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final MetadataKey.BuildersetUnknownFields(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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.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<MetadataKey.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<MetadataKey.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<MetadataKey.Builder>
-
setField
public MetadataKey.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<MetadataKey.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.Builder>
-
setRepeatedField
public MetadataKey.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<MetadataKey.Builder>
-
addRepeatedField
public MetadataKey.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<MetadataKey.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MetadataKey.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.Builder>
-
mergeFrom
public MetadataKey.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<MetadataKey.Builder>- Throws:
IOException
-
getKey
The key name of the Metadata from which to retrieve the Struct. This typically represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }- Specified by:
getKeyin interfaceMetadataKeyOrBuilder- Returns:
- The key.
-
getKeyBytes
public com.google.protobuf.ByteString getKeyBytes()The key name of the Metadata from which to retrieve the Struct. This typically represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }- Specified by:
getKeyBytesin interfaceMetadataKeyOrBuilder- Returns:
- The bytes for key.
-
setKey
The key name of the Metadata from which to retrieve the Struct. This typically 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 the Metadata from which to retrieve the Struct. This typically represents a builtin subsystem or custom extension.
string key = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setKeyBytes
The key name of the Metadata from which to retrieve the Struct. This typically 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.
-
getPathList
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }- Specified by:
getPathListin interfaceMetadataKeyOrBuilder
-
getPathCount
public int getPathCount()The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }- Specified by:
getPathCountin interfaceMetadataKeyOrBuilder
-
getPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }- Specified by:
getPathin interfaceMetadataKeyOrBuilder
-
setPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
setPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
addPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
addPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
addPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
addPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
addAllPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
clearPath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
removePath
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
getPathBuilder
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
getPathOrBuilder
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }- Specified by:
getPathOrBuilderin interfaceMetadataKeyOrBuilder
-
getPathOrBuilderList
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }- Specified by:
getPathOrBuilderListin interfaceMetadataKeyOrBuilder
-
addPathBuilder
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
addPathBuilder
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
getPathBuilderList
The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string in the example above. .. note:: Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
repeated .envoy.type.metadata.v3.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... } -
setUnknownFields
public final MetadataKey.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.Builder>
-
mergeUnknownFields
public final MetadataKey.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.Builder>
-