Class MetadataKey.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.Builder>
-
- io.envoyproxy.envoy.type.metadata.v2.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 general interface using `key` and `path` to retrieve value from :ref:`Metadata <envoy_api_msg_core.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 typeenvoy.type.metadata.v2.MetadataKey
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataKey.BuilderaddAllPath(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.MetadataKey.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)MetadataKeybuild()MetadataKeybuildPartial()MetadataKey.Builderclear()MetadataKey.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)MetadataKey.BuilderclearKey()The key name of Metadata to retrieve the Struct from the metadata.MetadataKey.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)MetadataKey.BuilderclearPath()The path to retrieve the Value from the Struct.MetadataKey.Builderclone()MetadataKeygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()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.List<MetadataKey.PathSegment.Builder>getPathBuilderList()The path to retrieve the Value from the Struct.intgetPathCount()The path to retrieve the Value from the Struct.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.List<? extends MetadataKey.PathSegmentOrBuilder>getPathOrBuilderList()The path to retrieve the Value from the Struct.protected com.google.protobuf.GeneratedMessageV3.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.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)MetadataKey.BuilderremovePath(int index)The path to retrieve the Value from the Struct.MetadataKey.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)MetadataKey.BuildersetKey(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.MetadataKey.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)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, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, 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
-
-
-
-
Method Detail
-
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
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.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
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
-
clone
public MetadataKey.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
public MetadataKey.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MetadataKey.Builder>
-
clearOneof
public MetadataKey.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- 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
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.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
public 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(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.
-
getPathList
public 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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.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.v2.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
addAllPath
public MetadataKey.Builder addAllPath(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.v2.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.v2.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.v2.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.v2.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.v2.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }- Specified by:
getPathOrBuilderin interfaceMetadataKeyOrBuilder
-
getPathOrBuilderList
public 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.v2.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.v2.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.v2.MetadataKey.PathSegment path = 2 [(.validate.rules) = { ... }
-
getPathBuilderList
public 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.v2.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>
-
-