public static final class Answer.GroundingSupport.Builder extends com.google.protobuf.GeneratedMessage.Builder<Answer.GroundingSupport.Builder> implements Answer.GroundingSupportOrBuilder
Grounding support for a claim in `answer_text`.Protobuf type
google.cloud.discoveryengine.v1.Answer.GroundingSupportaddRepeatedField, 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<Answer.GroundingSupport.Builder>public Answer.GroundingSupport.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<Answer.GroundingSupport.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<Answer.GroundingSupport.Builder>public Answer.GroundingSupport getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Answer.GroundingSupport build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Answer.GroundingSupport buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Answer.GroundingSupport.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Answer.GroundingSupport.Builder>public Answer.GroundingSupport.Builder mergeFrom(Answer.GroundingSupport other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<Answer.GroundingSupport.Builder>public Answer.GroundingSupport.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<Answer.GroundingSupport.Builder>IOExceptionpublic long getStartIndex()
Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];getStartIndex in interface Answer.GroundingSupportOrBuilderpublic Answer.GroundingSupport.Builder setStartIndex(long value)
Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];value - The startIndex to set.public Answer.GroundingSupport.Builder clearStartIndex()
Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];public long getEndIndex()
Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];getEndIndex in interface Answer.GroundingSupportOrBuilderpublic Answer.GroundingSupport.Builder setEndIndex(long value)
Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];value - The endIndex to set.public Answer.GroundingSupport.Builder clearEndIndex()
Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];public boolean hasGroundingScore()
A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;hasGroundingScore in interface Answer.GroundingSupportOrBuilderpublic double getGroundingScore()
A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;getGroundingScore in interface Answer.GroundingSupportOrBuilderpublic Answer.GroundingSupport.Builder setGroundingScore(double value)
A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;value - The groundingScore to set.public Answer.GroundingSupport.Builder clearGroundingScore()
A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
optional double grounding_score = 3;public boolean hasGroundingCheckRequired()
Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
optional bool grounding_check_required = 4;hasGroundingCheckRequired in interface Answer.GroundingSupportOrBuilderpublic boolean getGroundingCheckRequired()
Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
optional bool grounding_check_required = 4;getGroundingCheckRequired in interface Answer.GroundingSupportOrBuilderpublic Answer.GroundingSupport.Builder setGroundingCheckRequired(boolean value)
Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
optional bool grounding_check_required = 4;value - The groundingCheckRequired to set.public Answer.GroundingSupport.Builder clearGroundingCheckRequired()
Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
optional bool grounding_check_required = 4;public List<Answer.CitationSource> getSourcesList()
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
getSourcesList in interface Answer.GroundingSupportOrBuilderpublic int getSourcesCount()
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
getSourcesCount in interface Answer.GroundingSupportOrBuilderpublic Answer.CitationSource getSources(int index)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
getSources in interface Answer.GroundingSupportOrBuilderpublic Answer.GroundingSupport.Builder setSources(int index, Answer.CitationSource value)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder setSources(int index, Answer.CitationSource.Builder builderForValue)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder addSources(Answer.CitationSource value)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder addSources(int index, Answer.CitationSource value)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder addSources(Answer.CitationSource.Builder builderForValue)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder addSources(int index, Answer.CitationSource.Builder builderForValue)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder addAllSources(Iterable<? extends Answer.CitationSource> values)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder clearSources()
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.GroundingSupport.Builder removeSources(int index)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.CitationSource.Builder getSourcesBuilder(int index)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.CitationSourceOrBuilder getSourcesOrBuilder(int index)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
getSourcesOrBuilder in interface Answer.GroundingSupportOrBuilderpublic List<? extends Answer.CitationSourceOrBuilder> getSourcesOrBuilderList()
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
getSourcesOrBuilderList in interface Answer.GroundingSupportOrBuilderpublic Answer.CitationSource.Builder addSourcesBuilder()
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public Answer.CitationSource.Builder addSourcesBuilder(int index)
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
public List<Answer.CitationSource.Builder> getSourcesBuilderList()
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
Copyright © 2026 Google LLC. All rights reserved.