Class Answer.GroundingSupport.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Answer.GroundingSupport.Builder>
com.google.cloud.discoveryengine.v1.Answer.GroundingSupport.Builder
- All Implemented Interfaces:
Answer.GroundingSupportOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Answer.GroundingSupport
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.GroundingSupport-
Method Summary
Modifier and TypeMethodDescriptionaddAllSources(Iterable<? extends Answer.CitationSource> values) Optional.addSources(int index, Answer.CitationSource value) Optional.addSources(int index, Answer.CitationSource.Builder builderForValue) Optional.addSources(Answer.CitationSource value) Optional.addSources(Answer.CitationSource.Builder builderForValue) Optional.Optional.addSourcesBuilder(int index) Optional.build()clear()Required.Indicates that this claim required grounding check.A score in the range of [0, 1] describing how grounded is a specific claim by the references.Optional.Required.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorlongRequired.booleanIndicates that this claim required grounding check.doubleA score in the range of [0, 1] describing how grounded is a specific claim by the references.getSources(int index) Optional.getSourcesBuilder(int index) Optional.Optional.intOptional.Optional.getSourcesOrBuilder(int index) Optional.List<? extends Answer.CitationSourceOrBuilder>Optional.longRequired.booleanIndicates that this claim required grounding check.booleanA score in the range of [0, 1] describing how grounded is a specific claim by the references.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(Answer.GroundingSupport other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeSources(int index) Optional.setEndIndex(long value) Required.setGroundingCheckRequired(boolean value) Indicates that this claim required grounding check.setGroundingScore(double value) A score in the range of [0, 1] describing how grounded is a specific claim by the references.setSources(int index, Answer.CitationSource value) Optional.setSources(int index, Answer.CitationSource.Builder builderForValue) Optional.setStartIndex(long value) Required.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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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.Builder<Answer.GroundingSupport.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<Answer.GroundingSupport.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<Answer.GroundingSupport.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Answer.GroundingSupport.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Answer.GroundingSupport.Builder>
-
mergeFrom
public Answer.GroundingSupport.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<Answer.GroundingSupport.Builder>- Throws:
IOException
-
getStartIndex
public 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];- Specified by:
getStartIndexin interfaceAnswer.GroundingSupportOrBuilder- Returns:
- The startIndex.
-
setStartIndex
Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The startIndex to set.- Returns:
- This builder for chaining.
-
clearStartIndex
Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
getEndIndex
public long getEndIndex()Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getEndIndexin interfaceAnswer.GroundingSupportOrBuilder- Returns:
- The endIndex.
-
setEndIndex
Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The endIndex to set.- Returns:
- This builder for chaining.
-
clearEndIndex
Required. End of the claim, exclusive.
int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
hasGroundingScore
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;- Specified by:
hasGroundingScorein interfaceAnswer.GroundingSupportOrBuilder- Returns:
- Whether the groundingScore field is set.
-
getGroundingScore
public 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;- Specified by:
getGroundingScorein interfaceAnswer.GroundingSupportOrBuilder- Returns:
- The groundingScore.
-
setGroundingScore
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;- Parameters:
value- The groundingScore to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
hasGroundingCheckRequired
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;- Specified by:
hasGroundingCheckRequiredin interfaceAnswer.GroundingSupportOrBuilder- Returns:
- Whether the groundingCheckRequired field is set.
-
getGroundingCheckRequired
public 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;- Specified by:
getGroundingCheckRequiredin interfaceAnswer.GroundingSupportOrBuilder- Returns:
- The groundingCheckRequired.
-
setGroundingCheckRequired
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;- Parameters:
value- The groundingCheckRequired to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
getSourcesList
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourcesListin interfaceAnswer.GroundingSupportOrBuilder
-
getSourcesCount
public int getSourcesCount()Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourcesCountin interfaceAnswer.GroundingSupportOrBuilder
-
getSources
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourcesin interfaceAnswer.GroundingSupportOrBuilder
-
setSources
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
setSources
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]; -
addSources
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addSources
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addSources
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addSources
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]; -
addAllSources
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]; -
clearSources
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
removeSources
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getSourcesBuilder
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getSourcesOrBuilder
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourcesOrBuilderin interfaceAnswer.GroundingSupportOrBuilder
-
getSourcesOrBuilderList
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourcesOrBuilderListin interfaceAnswer.GroundingSupportOrBuilder
-
addSourcesBuilder
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
addSourcesBuilder
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getSourcesBuilderList
Optional. Citation sources for the claim.
repeated .google.cloud.discoveryengine.v1.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL];
-