Class MetadataKey.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- 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,java.lang.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: foo
Protobuf typeenvoy.type.metadata.v3.MetadataKey
-
-
Field Summary
Fields Modifier and Type Field Description private intbitField0_private java.lang.Objectkey_private java.util.List<MetadataKey.PathSegment>path_private com.google.protobuf.RepeatedFieldBuilder<MetadataKey.PathSegment,MetadataKey.PathSegment.Builder,MetadataKey.PathSegmentOrBuilder>pathBuilder_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataKey.BuilderaddAllPath(java.lang.Iterable<? extends MetadataKey.PathSegment> values)The path to retrieve the Value from the Struct.MetadataKey.BuilderaddPath(int index, MetadataKey.PathSegment value)The path to retrieve the Value from the Struct.MetadataKey.BuilderaddPath(int index, MetadataKey.PathSegment.Builder builderForValue)The path to retrieve the Value from the Struct.MetadataKey.BuilderaddPath(MetadataKey.PathSegment value)The path to retrieve the Value from the Struct.MetadataKey.BuilderaddPath(MetadataKey.PathSegment.Builder builderForValue)The path to retrieve the Value from the Struct.MetadataKey.PathSegment.BuilderaddPathBuilder()The path to retrieve the Value from the Struct.MetadataKey.PathSegment.BuilderaddPathBuilder(int index)The path to retrieve the Value from the Struct.MetadataKeybuild()MetadataKeybuildPartial()private voidbuildPartial0(MetadataKey result)private voidbuildPartialRepeatedFields(MetadataKey result)MetadataKey.Builderclear()MetadataKey.BuilderclearKey()The key name of Metadata to retrieve the Struct from the metadata.MetadataKey.BuilderclearPath()The path to retrieve the Value from the Struct.private voidensurePathIsMutable()MetadataKeygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()java.lang.StringgetKey()The key name of Metadata to retrieve the Struct from the metadata.com.google.protobuf.ByteStringgetKeyBytes()The key name of Metadata to retrieve the Struct from the metadata.MetadataKey.PathSegmentgetPath(int index)The path to retrieve the Value from the Struct.MetadataKey.PathSegment.BuildergetPathBuilder(int index)The path to retrieve the Value from the Struct.java.util.List<MetadataKey.PathSegment.Builder>getPathBuilderList()The path to retrieve the Value from the Struct.intgetPathCount()The path to retrieve the Value from the Struct.private com.google.protobuf.RepeatedFieldBuilder<MetadataKey.PathSegment,MetadataKey.PathSegment.Builder,MetadataKey.PathSegmentOrBuilder>getPathFieldBuilder()java.util.List<MetadataKey.PathSegment>getPathList()The path to retrieve the Value from the Struct.MetadataKey.PathSegmentOrBuildergetPathOrBuilder(int index)The path to retrieve the Value from the Struct.java.util.List<? extends MetadataKey.PathSegmentOrBuilder>getPathOrBuilderList()The path to retrieve the Value from the Struct.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()MetadataKey.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)MetadataKey.BuildermergeFrom(com.google.protobuf.Message other)MetadataKey.BuildermergeFrom(MetadataKey other)MetadataKey.BuilderremovePath(int index)The path to retrieve the Value from the Struct.MetadataKey.BuildersetKey(java.lang.String value)The key name of Metadata to retrieve the Struct from the metadata.MetadataKey.BuildersetKeyBytes(com.google.protobuf.ByteString value)The key name of Metadata to retrieve the Struct from the metadata.MetadataKey.BuildersetPath(int index, MetadataKey.PathSegment value)The path to retrieve the Value from the Struct.MetadataKey.BuildersetPath(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
-
-
-
-
Field Detail
-
bitField0_
private int bitField0_
-
key_
private java.lang.Object key_
-
path_
private java.util.List<MetadataKey.PathSegment> path_
-
pathBuilder_
private com.google.protobuf.RepeatedFieldBuilder<MetadataKey.PathSegment,MetadataKey.PathSegment.Builder,MetadataKey.PathSegmentOrBuilder> pathBuilder_
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
-
clear
public MetadataKey.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<MetadataKey.Builder>
-
getDefaultInstanceForType
public MetadataKey getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public MetadataKey build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public MetadataKey buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
private void buildPartialRepeatedFields(MetadataKey result)
-
buildPartial0
private void buildPartial0(MetadataKey result)
-
mergeFrom
public MetadataKey.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MetadataKey.Builder>
-
mergeFrom
public MetadataKey.Builder mergeFrom(MetadataKey other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<MetadataKey.Builder>
-
mergeFrom
public MetadataKey.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.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:
java.io.IOException
-
getKey
public java.lang.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) = { ... }- Specified by:
getKeyin 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:
getKeyBytesin interfaceMetadataKeyOrBuilder- Returns:
- The bytes for key.
-
setKey
public MetadataKey.Builder setKey(java.lang.String value)
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
public MetadataKey.Builder 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
public MetadataKey.Builder setKeyBytes(com.google.protobuf.ByteString value)
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
public java.util.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) = { ... }- Specified by:
getPathListin 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:
getPathCountin interfaceMetadataKeyOrBuilder
-
getPath
public 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) = { ... }- Specified by:
getPathin interfaceMetadataKeyOrBuilder
-
setPath
public MetadataKey.Builder setPath(int index, MetadataKey.PathSegment value)
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
public MetadataKey.Builder setPath(int index, MetadataKey.PathSegment.Builder builderForValue)
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
public MetadataKey.Builder addPath(MetadataKey.PathSegment value)
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
public MetadataKey.Builder addPath(int index, MetadataKey.PathSegment value)
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
public MetadataKey.Builder addPath(MetadataKey.PathSegment.Builder builderForValue)
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
public MetadataKey.Builder addPath(int index, MetadataKey.PathSegment.Builder builderForValue)
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
public MetadataKey.Builder addAllPath(java.lang.Iterable<? extends MetadataKey.PathSegment> values)
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
public MetadataKey.Builder 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
public MetadataKey.Builder removePath(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) = { ... }
-
getPathBuilder
public MetadataKey.PathSegment.Builder getPathBuilder(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
public 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) = { ... }- Specified by:
getPathOrBuilderin interfaceMetadataKeyOrBuilder
-
getPathOrBuilderList
public java.util.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) = { ... }- Specified by:
getPathOrBuilderListin interfaceMetadataKeyOrBuilder
-
addPathBuilder
public MetadataKey.PathSegment.Builder 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
public MetadataKey.PathSegment.Builder addPathBuilder(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) = { ... }
-
getPathBuilderList
public java.util.List<MetadataKey.PathSegment.Builder> 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,MetadataKey.PathSegmentOrBuilder> getPathFieldBuilder()
-
-