Package build.buf.validate
Class FieldPathElement
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
build.buf.validate.FieldPathElement
- All Implemented Interfaces:
FieldPathElementOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class FieldPathElement
extends com.google.protobuf.GeneratedMessage
implements FieldPathElementOrBuilder
`FieldPathElement` provides enough information to nest through a single protobuf field. If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. The `field_type` field allows unambiguous resolution of a field even if descriptors are not available.Protobuf type
buf.validate.FieldPathElement- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class`FieldPathElement` provides enough information to nest through a single protobuf field.static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanboolean`bool_key` specifies a map key of type bool.static FieldPathElementstatic final com.google.protobuf.Descriptors.Descriptor`field_name` contains the field name this path element refers to.com.google.protobuf.ByteString`field_name` contains the field name this path element refers to.int`field_number` is the field number this path element refers to.com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type`field_type` specifies the type of this field.longgetIndex()`index` specifies a 0-based index into a repeated field.long`int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64.com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type`key_type` specifies the map key type of this field.com.google.protobuf.Parser<FieldPathElement> int`string_key` specifies a map key of type string.com.google.protobuf.ByteString`string_key` specifies a map key of type string.long`uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64.com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type`value_type` specifies map value type of this field.boolean`bool_key` specifies a map key of type bool.boolean`field_name` contains the field name this path element refers to.boolean`field_number` is the field number this path element refers to.boolean`field_type` specifies the type of this field.inthashCode()booleanhasIndex()`index` specifies a 0-based index into a repeated field.boolean`int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64.boolean`key_type` specifies the map key type of this field.boolean`string_key` specifies a map key of type string.boolean`uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64.boolean`value_type` specifies map value type of this field.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic FieldPathElement.Builderstatic FieldPathElement.BuildernewBuilder(FieldPathElement prototype) protected FieldPathElement.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static FieldPathElementparseDelimitedFrom(InputStream input) static FieldPathElementparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FieldPathElementparseFrom(byte[] data) static FieldPathElementparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FieldPathElementparseFrom(com.google.protobuf.ByteString data) static FieldPathElementparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FieldPathElementparseFrom(com.google.protobuf.CodedInputStream input) static FieldPathElementparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FieldPathElementparseFrom(InputStream input) static FieldPathElementparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static FieldPathElementparseFrom(ByteBuffer data) static FieldPathElementparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<FieldPathElement> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
FIELD_NUMBER_FIELD_NUMBER
public static final int FIELD_NUMBER_FIELD_NUMBER- See Also:
-
FIELD_NAME_FIELD_NUMBER
public static final int FIELD_NAME_FIELD_NUMBER- See Also:
-
FIELD_TYPE_FIELD_NUMBER
public static final int FIELD_TYPE_FIELD_NUMBER- See Also:
-
KEY_TYPE_FIELD_NUMBER
public static final int KEY_TYPE_FIELD_NUMBER- See Also:
-
VALUE_TYPE_FIELD_NUMBER
public static final int VALUE_TYPE_FIELD_NUMBER- See Also:
-
INDEX_FIELD_NUMBER
public static final int INDEX_FIELD_NUMBER- See Also:
-
BOOL_KEY_FIELD_NUMBER
public static final int BOOL_KEY_FIELD_NUMBER- See Also:
-
INT_KEY_FIELD_NUMBER
public static final int INT_KEY_FIELD_NUMBER- See Also:
-
UINT_KEY_FIELD_NUMBER
public static final int UINT_KEY_FIELD_NUMBER- See Also:
-
STRING_KEY_FIELD_NUMBER
public static final int STRING_KEY_FIELD_NUMBER- See Also:
-
-
Method Details
-
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
-
getSubscriptCase
- Specified by:
getSubscriptCasein interfaceFieldPathElementOrBuilder
-
hasFieldNumber
public boolean hasFieldNumber()`field_number` is the field number this path element refers to.
optional int32 field_number = 1 [json_name = "fieldNumber"];- Specified by:
hasFieldNumberin interfaceFieldPathElementOrBuilder- Returns:
- Whether the fieldNumber field is set.
-
getFieldNumber
public int getFieldNumber()`field_number` is the field number this path element refers to.
optional int32 field_number = 1 [json_name = "fieldNumber"];- Specified by:
getFieldNumberin interfaceFieldPathElementOrBuilder- Returns:
- The fieldNumber.
-
hasFieldName
public boolean hasFieldName()`field_name` contains the field name this path element refers to. This can be used to display a human-readable path even if the field number is unknown.
optional string field_name = 2 [json_name = "fieldName"];- Specified by:
hasFieldNamein interfaceFieldPathElementOrBuilder- Returns:
- Whether the fieldName field is set.
-
getFieldName
`field_name` contains the field name this path element refers to. This can be used to display a human-readable path even if the field number is unknown.
optional string field_name = 2 [json_name = "fieldName"];- Specified by:
getFieldNamein interfaceFieldPathElementOrBuilder- Returns:
- The fieldName.
-
getFieldNameBytes
public com.google.protobuf.ByteString getFieldNameBytes()`field_name` contains the field name this path element refers to. This can be used to display a human-readable path even if the field number is unknown.
optional string field_name = 2 [json_name = "fieldName"];- Specified by:
getFieldNameBytesin interfaceFieldPathElementOrBuilder- Returns:
- The bytes for fieldName.
-
hasFieldType
public boolean hasFieldType()`field_type` specifies the type of this field. When using reflection, this value is not needed. This value is provided to make it possible to traverse unknown fields through wire data. When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. [1]: https://protobuf.dev/programming-guides/encoding/#packed [2]: https://protobuf.dev/programming-guides/encoding/#groups N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and can be explicitly used in Protocol Buffers 2023 Edition.
optional .google.protobuf.FieldDescriptorProto.Type field_type = 3 [json_name = "fieldType"];- Specified by:
hasFieldTypein interfaceFieldPathElementOrBuilder- Returns:
- Whether the fieldType field is set.
-
getFieldType
public com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type getFieldType()`field_type` specifies the type of this field. When using reflection, this value is not needed. This value is provided to make it possible to traverse unknown fields through wire data. When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. [1]: https://protobuf.dev/programming-guides/encoding/#packed [2]: https://protobuf.dev/programming-guides/encoding/#groups N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and can be explicitly used in Protocol Buffers 2023 Edition.
optional .google.protobuf.FieldDescriptorProto.Type field_type = 3 [json_name = "fieldType"];- Specified by:
getFieldTypein interfaceFieldPathElementOrBuilder- Returns:
- The fieldType.
-
hasKeyType
public boolean hasKeyType()`key_type` specifies the map key type of this field. This value is useful when traversing unknown fields through wire data: specifically, it allows handling the differences between different integer encodings.
optional .google.protobuf.FieldDescriptorProto.Type key_type = 4 [json_name = "keyType"];- Specified by:
hasKeyTypein interfaceFieldPathElementOrBuilder- Returns:
- Whether the keyType field is set.
-
getKeyType
public com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type getKeyType()`key_type` specifies the map key type of this field. This value is useful when traversing unknown fields through wire data: specifically, it allows handling the differences between different integer encodings.
optional .google.protobuf.FieldDescriptorProto.Type key_type = 4 [json_name = "keyType"];- Specified by:
getKeyTypein interfaceFieldPathElementOrBuilder- Returns:
- The keyType.
-
hasValueType
public boolean hasValueType()`value_type` specifies map value type of this field. This is useful if you want to display a value inside unknown fields through wire data.
optional .google.protobuf.FieldDescriptorProto.Type value_type = 5 [json_name = "valueType"];- Specified by:
hasValueTypein interfaceFieldPathElementOrBuilder- Returns:
- Whether the valueType field is set.
-
getValueType
public com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type getValueType()`value_type` specifies map value type of this field. This is useful if you want to display a value inside unknown fields through wire data.
optional .google.protobuf.FieldDescriptorProto.Type value_type = 5 [json_name = "valueType"];- Specified by:
getValueTypein interfaceFieldPathElementOrBuilder- Returns:
- The valueType.
-
hasIndex
public boolean hasIndex()`index` specifies a 0-based index into a repeated field.
uint64 index = 6 [json_name = "index"];- Specified by:
hasIndexin interfaceFieldPathElementOrBuilder- Returns:
- Whether the index field is set.
-
getIndex
public long getIndex()`index` specifies a 0-based index into a repeated field.
uint64 index = 6 [json_name = "index"];- Specified by:
getIndexin interfaceFieldPathElementOrBuilder- Returns:
- The index.
-
hasBoolKey
public boolean hasBoolKey()`bool_key` specifies a map key of type bool.
bool bool_key = 7 [json_name = "boolKey"];- Specified by:
hasBoolKeyin interfaceFieldPathElementOrBuilder- Returns:
- Whether the boolKey field is set.
-
getBoolKey
public boolean getBoolKey()`bool_key` specifies a map key of type bool.
bool bool_key = 7 [json_name = "boolKey"];- Specified by:
getBoolKeyin interfaceFieldPathElementOrBuilder- Returns:
- The boolKey.
-
hasIntKey
public boolean hasIntKey()`int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64.
int64 int_key = 8 [json_name = "intKey"];- Specified by:
hasIntKeyin interfaceFieldPathElementOrBuilder- Returns:
- Whether the intKey field is set.
-
getIntKey
public long getIntKey()`int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64.
int64 int_key = 8 [json_name = "intKey"];- Specified by:
getIntKeyin interfaceFieldPathElementOrBuilder- Returns:
- The intKey.
-
hasUintKey
public boolean hasUintKey()`uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64.
uint64 uint_key = 9 [json_name = "uintKey"];- Specified by:
hasUintKeyin interfaceFieldPathElementOrBuilder- Returns:
- Whether the uintKey field is set.
-
getUintKey
public long getUintKey()`uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64.
uint64 uint_key = 9 [json_name = "uintKey"];- Specified by:
getUintKeyin interfaceFieldPathElementOrBuilder- Returns:
- The uintKey.
-
hasStringKey
public boolean hasStringKey()`string_key` specifies a map key of type string.
string string_key = 10 [json_name = "stringKey"];- Specified by:
hasStringKeyin interfaceFieldPathElementOrBuilder- Returns:
- Whether the stringKey field is set.
-
getStringKey
`string_key` specifies a map key of type string.
string string_key = 10 [json_name = "stringKey"];- Specified by:
getStringKeyin interfaceFieldPathElementOrBuilder- Returns:
- The stringKey.
-
getStringKeyBytes
public com.google.protobuf.ByteString getStringKeyBytes()`string_key` specifies a map key of type string.
string string_key = 10 [json_name = "stringKey"];- Specified by:
getStringKeyBytesin interfaceFieldPathElementOrBuilder- Returns:
- The bytes for stringKey.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static FieldPathElement parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FieldPathElement parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FieldPathElement parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FieldPathElement parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FieldPathElement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static FieldPathElement parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static FieldPathElement parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static FieldPathElement parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static FieldPathElement parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static FieldPathElement parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected FieldPathElement.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-