public final class MetadataKey extends com.google.protobuf.GeneratedMessageV3 implements MetadataKeyOrBuilder
MetadataKey provides a general interface using `key` and `path` to retrieve value from
:ref:`Metadata <envoy_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: foo
Protobuf type envoy.type.metadata.v3.MetadataKey| Modifier and Type | Class and Description |
|---|---|
static class |
MetadataKey.Builder
MetadataKey provides a general interface using `key` and `path` to retrieve value from
:ref:`Metadata <envoy_api_msg_config.core.v3.Metadata>`.
|
static class |
MetadataKey.PathSegment
Specifies the segment in a path to retrieve value from Metadata.
|
static interface |
MetadataKey.PathSegmentOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_FIELD_NUMBER |
static int |
PATH_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static MetadataKey |
getDefaultInstance() |
MetadataKey |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getKey()
The key name of Metadata to retrieve the Struct from the metadata.
|
com.google.protobuf.ByteString |
getKeyBytes()
The key name of Metadata to retrieve the Struct from the metadata.
|
com.google.protobuf.Parser<MetadataKey> |
getParserForType() |
MetadataKey.PathSegment |
getPath(int index)
The path to retrieve the Value from the Struct.
|
int |
getPathCount()
The path to retrieve the Value from the Struct.
|
List<MetadataKey.PathSegment> |
getPathList()
The path to retrieve the Value from the Struct.
|
MetadataKey.PathSegmentOrBuilder |
getPathOrBuilder(int index)
The path to retrieve the Value from the Struct.
|
List<? extends MetadataKey.PathSegmentOrBuilder> |
getPathOrBuilderList()
The path to retrieve the Value from the Struct.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static MetadataKey.Builder |
newBuilder() |
static MetadataKey.Builder |
newBuilder(MetadataKey prototype) |
MetadataKey.Builder |
newBuilderForType() |
protected MetadataKey.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static MetadataKey |
parseDelimitedFrom(InputStream input) |
static MetadataKey |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MetadataKey |
parseFrom(byte[] data) |
static MetadataKey |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MetadataKey |
parseFrom(ByteBuffer data) |
static MetadataKey |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MetadataKey |
parseFrom(com.google.protobuf.ByteString data) |
static MetadataKey |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MetadataKey |
parseFrom(com.google.protobuf.CodedInputStream input) |
static MetadataKey |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MetadataKey |
parseFrom(InputStream input) |
static MetadataKey |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<MetadataKey> |
parser() |
MetadataKey.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int KEY_FIELD_NUMBER
public static final int PATH_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String 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) = { ... }getKey in interface MetadataKeyOrBuilderpublic 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) = { ... }getKeyBytes in interface MetadataKeyOrBuilderpublic List<MetadataKey.PathSegment> 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) = { ... }getPathList in interface MetadataKeyOrBuilderpublic List<? extends MetadataKey.PathSegmentOrBuilder> 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) = { ... }getPathOrBuilderList in interface MetadataKeyOrBuilderpublic 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) = { ... }getPathCount in interface MetadataKeyOrBuilderpublic MetadataKey.PathSegment getPath(int index)
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) = { ... }getPath in interface MetadataKeyOrBuilderpublic MetadataKey.PathSegmentOrBuilder getPathOrBuilder(int index)
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 in interface MetadataKeyOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static MetadataKey parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MetadataKey parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MetadataKey parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MetadataKey parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MetadataKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MetadataKey parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MetadataKey parseFrom(InputStream input) throws IOException
IOExceptionpublic static MetadataKey parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static MetadataKey parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static MetadataKey parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static MetadataKey parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static MetadataKey parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic MetadataKey.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static MetadataKey.Builder newBuilder()
public static MetadataKey.Builder newBuilder(MetadataKey prototype)
public MetadataKey.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected MetadataKey.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static MetadataKey getDefaultInstance()
public static com.google.protobuf.Parser<MetadataKey> parser()
public com.google.protobuf.Parser<MetadataKey> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public MetadataKey getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.