public static final class AssistantGroundedContent.TextGroundingMetadata.Segment.Builder extends com.google.protobuf.GeneratedMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.Segment.Builder> implements AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilder
Grounding information for a segment of the text.Protobuf type
google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.SegmentaddRepeatedField, 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, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.Segment.Builder>public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.Segment.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.Segment.Builder>public AssistantGroundedContent.TextGroundingMetadata.Segment getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic AssistantGroundedContent.TextGroundingMetadata.Segment build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic AssistantGroundedContent.TextGroundingMetadata.Segment buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic AssistantGroundedContent.TextGroundingMetadata.Segment.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.Segment.Builder>public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder mergeFrom(AssistantGroundedContent.TextGroundingMetadata.Segment other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.Segment.Builder>public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<AssistantGroundedContent.TextGroundingMetadata.Segment.Builder>IOExceptionpublic long getStartIndex()
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
int64 start_index = 1;getStartIndex in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderpublic AssistantGroundedContent.TextGroundingMetadata.Segment.Builder setStartIndex(long value)
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
int64 start_index = 1;value - The startIndex to set.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder clearStartIndex()
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
int64 start_index = 1;public long getEndIndex()
End of the segment, exclusive.
int64 end_index = 2;getEndIndex in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderpublic AssistantGroundedContent.TextGroundingMetadata.Segment.Builder setEndIndex(long value)
End of the segment, exclusive.
int64 end_index = 2;value - The endIndex to set.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder clearEndIndex()
End of the segment, exclusive.
int64 end_index = 2;public List<Integer> getReferenceIndicesList()
References for the segment.
repeated int32 reference_indices = 4;getReferenceIndicesList in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderpublic int getReferenceIndicesCount()
References for the segment.
repeated int32 reference_indices = 4;getReferenceIndicesCount in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderpublic int getReferenceIndices(int index)
References for the segment.
repeated int32 reference_indices = 4;getReferenceIndices in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderindex - The index of the element to return.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder setReferenceIndices(int index, int value)
References for the segment.
repeated int32 reference_indices = 4;index - The index to set the value at.value - The referenceIndices to set.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder addReferenceIndices(int value)
References for the segment.
repeated int32 reference_indices = 4;value - The referenceIndices to add.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder addAllReferenceIndices(Iterable<? extends Integer> values)
References for the segment.
repeated int32 reference_indices = 4;values - The referenceIndices to add.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder clearReferenceIndices()
References for the segment.
repeated int32 reference_indices = 4;public float getGroundingScore()
Score for the segment.
float grounding_score = 5;getGroundingScore in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderpublic AssistantGroundedContent.TextGroundingMetadata.Segment.Builder setGroundingScore(float value)
Score for the segment.
float grounding_score = 5;value - The groundingScore to set.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder clearGroundingScore()
Score for the segment.
float grounding_score = 5;public String getText()
The text segment itself.
string text = 6;getText in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderpublic com.google.protobuf.ByteString getTextBytes()
The text segment itself.
string text = 6;getTextBytes in interface AssistantGroundedContent.TextGroundingMetadata.SegmentOrBuilderpublic AssistantGroundedContent.TextGroundingMetadata.Segment.Builder setText(String value)
The text segment itself.
string text = 6;value - The text to set.public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder clearText()
The text segment itself.
string text = 6;public AssistantGroundedContent.TextGroundingMetadata.Segment.Builder setTextBytes(com.google.protobuf.ByteString value)
The text segment itself.
string text = 6;value - The bytes for text to set.Copyright © 2026 Google LLC. All rights reserved.