public final class Answer extends GeneratedMessage implements AnswerOrBuilder
Defines an answer.
Protobuf type google.cloud.discoveryengine.v1.Answer
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
ANSWER_SKIPPED_REASONS_FIELD_NUMBER
public static final int ANSWER_SKIPPED_REASONS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
ANSWER_TEXT_FIELD_NUMBER
public static final int ANSWER_TEXT_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
CITATIONS_FIELD_NUMBER
public static final int CITATIONS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
COMPLETE_TIME_FIELD_NUMBER
public static final int COMPLETE_TIME_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
GROUNDING_SCORE_FIELD_NUMBER
public static final int GROUNDING_SCORE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
GROUNDING_SUPPORTS_FIELD_NUMBER
public static final int GROUNDING_SUPPORTS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
QUERY_UNDERSTANDING_INFO_FIELD_NUMBER
public static final int QUERY_UNDERSTANDING_INFO_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
REFERENCES_FIELD_NUMBER
public static final int REFERENCES_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
public static final int RELATED_QUESTIONS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
SAFETY_RATINGS_FIELD_NUMBER
public static final int SAFETY_RATINGS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
STEPS_FIELD_NUMBER
public static final int STEPS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Answer getDefaultInstance()
| Returns |
| Type |
Description |
Answer |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Answer.Builder newBuilder()
newBuilder(Answer prototype)
public static Answer.Builder newBuilder(Answer prototype)
| Parameter |
| Name |
Description |
prototype |
Answer
|
public static Answer parseDelimitedFrom(InputStream input)
| Returns |
| Type |
Description |
Answer |
|
public static Answer parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Answer |
|
parseFrom(byte[] data)
public static Answer parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
| Returns |
| Type |
Description |
Answer |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Answer parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Answer |
|
parseFrom(ByteString data)
public static Answer parseFrom(ByteString data)
| Returns |
| Type |
Description |
Answer |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Answer parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Answer |
|
public static Answer parseFrom(CodedInputStream input)
| Returns |
| Type |
Description |
Answer |
|
public static Answer parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Answer |
|
public static Answer parseFrom(InputStream input)
| Returns |
| Type |
Description |
Answer |
|
public static Answer parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Answer |
|
parseFrom(ByteBuffer data)
public static Answer parseFrom(ByteBuffer data)
| Returns |
| Type |
Description |
Answer |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Answer parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
| Returns |
| Type |
Description |
Answer |
|
parser()
public static Parser<Answer> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getAnswerSkippedReasons(int index)
public Answer.AnswerSkippedReason getAnswerSkippedReasons(int index)
Additional answer-skipped reasons. This provides the reason for ignored
cases. If nothing is skipped, this field is not set.
repeated .google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason answer_skipped_reasons = 11;
| Parameter |
| Name |
Description |
index |
int
The index of the element to return.
|
getAnswerSkippedReasonsCount()
public int getAnswerSkippedReasonsCount()
Additional answer-skipped reasons. This provides the reason for ignored
cases. If nothing is skipped, this field is not set.
repeated .google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason answer_skipped_reasons = 11;
| Returns |
| Type |
Description |
int |
The count of answerSkippedReasons.
|
getAnswerSkippedReasonsList()
public List<Answer.AnswerSkippedReason> getAnswerSkippedReasonsList()
Additional answer-skipped reasons. This provides the reason for ignored
cases. If nothing is skipped, this field is not set.
repeated .google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason answer_skipped_reasons = 11;
getAnswerSkippedReasonsValue(int index)
public int getAnswerSkippedReasonsValue(int index)
Additional answer-skipped reasons. This provides the reason for ignored
cases. If nothing is skipped, this field is not set.
repeated .google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason answer_skipped_reasons = 11;
| Parameter |
| Name |
Description |
index |
int
The index of the value to return.
|
| Returns |
| Type |
Description |
int |
The enum numeric value on the wire of answerSkippedReasons at the given index.
|
getAnswerSkippedReasonsValueList()
public List<Integer> getAnswerSkippedReasonsValueList()
Additional answer-skipped reasons. This provides the reason for ignored
cases. If nothing is skipped, this field is not set.
repeated .google.cloud.discoveryengine.v1.Answer.AnswerSkippedReason answer_skipped_reasons = 11;
| Returns |
| Type |
Description |
List<Integer> |
A list containing the enum numeric values on the wire for answerSkippedReasons.
|
getAnswerText()
public String getAnswerText()
The textual answer.
string answer_text = 3;
| Returns |
| Type |
Description |
String |
The answerText.
|
getAnswerTextBytes()
public ByteString getAnswerTextBytes()
The textual answer.
string answer_text = 3;
| Returns |
| Type |
Description |
ByteString |
The bytes for answerText.
|
getCitations(int index)
public Answer.Citation getCitations(int index)
Citations.
repeated .google.cloud.discoveryengine.v1.Answer.Citation citations = 4;
| Parameter |
| Name |
Description |
index |
int
|
getCitationsCount()
public int getCitationsCount()
Citations.
repeated .google.cloud.discoveryengine.v1.Answer.Citation citations = 4;
| Returns |
| Type |
Description |
int |
|
getCitationsList()
public List<Answer.Citation> getCitationsList()
Citations.
repeated .google.cloud.discoveryengine.v1.Answer.Citation citations = 4;
getCitationsOrBuilder(int index)
public Answer.CitationOrBuilder getCitationsOrBuilder(int index)
Citations.
repeated .google.cloud.discoveryengine.v1.Answer.Citation citations = 4;
| Parameter |
| Name |
Description |
index |
int
|
getCitationsOrBuilderList()
public List<? extends Answer.CitationOrBuilder> getCitationsOrBuilderList()
Citations.
repeated .google.cloud.discoveryengine.v1.Answer.Citation citations = 4;
| Returns |
| Type |
Description |
List<? extends com.google.cloud.discoveryengine.v1.Answer.CitationOrBuilder> |
|
getCompleteTime()
public Timestamp getCompleteTime()
Output only. Answer completed timestamp.
.google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
Timestamp |
The completeTime.
|
getCompleteTimeOrBuilder()
public TimestampOrBuilder getCompleteTimeOrBuilder()
Output only. Answer completed timestamp.
.google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTime()
public Timestamp getCreateTime()
Output only. Answer creation timestamp.
.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
Timestamp |
The createTime.
|
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. Answer creation timestamp.
.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDefaultInstanceForType()
public Answer getDefaultInstanceForType()
| Returns |
| Type |
Description |
Answer |
|
getGroundingScore()
public double getGroundingScore()
A score in the range of [0, 1] describing how grounded the answer is by the
reference chunks.
optional double grounding_score = 12;
| Returns |
| Type |
Description |
double |
The groundingScore.
|
getGroundingSupports(int index)
public Answer.GroundingSupport getGroundingSupports(int index)
Optional. Grounding supports.
repeated .google.cloud.discoveryengine.v1.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
getGroundingSupportsCount()
public int getGroundingSupportsCount()
Optional. Grounding supports.
repeated .google.cloud.discoveryengine.v1.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
|
getGroundingSupportsList()
public List<Answer.GroundingSupport> getGroundingSupportsList()
Optional. Grounding supports.
repeated .google.cloud.discoveryengine.v1.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL];
getGroundingSupportsOrBuilder(int index)
public Answer.GroundingSupportOrBuilder getGroundingSupportsOrBuilder(int index)
Optional. Grounding supports.
repeated .google.cloud.discoveryengine.v1.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
getGroundingSupportsOrBuilderList()
public List<? extends Answer.GroundingSupportOrBuilder> getGroundingSupportsOrBuilderList()
Optional. Grounding supports.
repeated .google.cloud.discoveryengine.v1.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.discoveryengine.v1.Answer.GroundingSupportOrBuilder> |
|
getName()
Immutable. Fully qualified name
projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
| Returns |
| Type |
Description |
String |
The name.
|
getNameBytes()
public ByteString getNameBytes()
Immutable. Fully qualified name
projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
| Returns |
| Type |
Description |
ByteString |
The bytes for name.
|
getParserForType()
public Parser<Answer> getParserForType()
Overrides
getQueryUnderstandingInfo()
public Answer.QueryUnderstandingInfo getQueryUnderstandingInfo()
Query understanding information.
.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo query_understanding_info = 10;
getQueryUnderstandingInfoOrBuilder()
public Answer.QueryUnderstandingInfoOrBuilder getQueryUnderstandingInfoOrBuilder()
Query understanding information.
.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo query_understanding_info = 10;
getReferences(int index)
public Answer.Reference getReferences(int index)
References.
repeated .google.cloud.discoveryengine.v1.Answer.Reference references = 5;
| Parameter |
| Name |
Description |
index |
int
|
getReferencesCount()
public int getReferencesCount()
References.
repeated .google.cloud.discoveryengine.v1.Answer.Reference references = 5;
| Returns |
| Type |
Description |
int |
|
getReferencesList()
public List<Answer.Reference> getReferencesList()
References.
repeated .google.cloud.discoveryengine.v1.Answer.Reference references = 5;
getReferencesOrBuilder(int index)
public Answer.ReferenceOrBuilder getReferencesOrBuilder(int index)
References.
repeated .google.cloud.discoveryengine.v1.Answer.Reference references = 5;
| Parameter |
| Name |
Description |
index |
int
|
getReferencesOrBuilderList()
public List<? extends Answer.ReferenceOrBuilder> getReferencesOrBuilderList()
References.
repeated .google.cloud.discoveryengine.v1.Answer.Reference references = 5;
| Returns |
| Type |
Description |
List<? extends com.google.cloud.discoveryengine.v1.Answer.ReferenceOrBuilder> |
|
public String getRelatedQuestions(int index)
Suggested related questions.
repeated string related_questions = 6;
| Parameter |
| Name |
Description |
index |
int
The index of the element to return.
|
| Returns |
| Type |
Description |
String |
The relatedQuestions at the given index.
|
public ByteString getRelatedQuestionsBytes(int index)
Suggested related questions.
repeated string related_questions = 6;
| Parameter |
| Name |
Description |
index |
int
The index of the value to return.
|
| Returns |
| Type |
Description |
ByteString |
The bytes of the relatedQuestions at the given index.
|
public int getRelatedQuestionsCount()
Suggested related questions.
repeated string related_questions = 6;
| Returns |
| Type |
Description |
int |
The count of relatedQuestions.
|
public ProtocolStringList getRelatedQuestionsList()
Suggested related questions.
repeated string related_questions = 6;
getSafetyRatings(int index)
public SafetyRating getSafetyRatings(int index)
Optional. Safety ratings.
repeated .google.cloud.discoveryengine.v1.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
getSafetyRatingsCount()
public int getSafetyRatingsCount()
Optional. Safety ratings.
repeated .google.cloud.discoveryengine.v1.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
|
getSafetyRatingsList()
public List<SafetyRating> getSafetyRatingsList()
Optional. Safety ratings.
repeated .google.cloud.discoveryengine.v1.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL];
getSafetyRatingsOrBuilder(int index)
public SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index)
Optional. Safety ratings.
repeated .google.cloud.discoveryengine.v1.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
getSafetyRatingsOrBuilderList()
public List<? extends SafetyRatingOrBuilder> getSafetyRatingsOrBuilderList()
Optional. Safety ratings.
repeated .google.cloud.discoveryengine.v1.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.discoveryengine.v1.SafetyRatingOrBuilder> |
|
getSerializedSize()
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
getState()
public Answer.State getState()
The state of the answer generation.
.google.cloud.discoveryengine.v1.Answer.State state = 2;
getStateValue()
public int getStateValue()
The state of the answer generation.
.google.cloud.discoveryengine.v1.Answer.State state = 2;
| Returns |
| Type |
Description |
int |
The enum numeric value on the wire for state.
|
getSteps(int index)
public Answer.Step getSteps(int index)
Answer generation steps.
repeated .google.cloud.discoveryengine.v1.Answer.Step steps = 7;
| Parameter |
| Name |
Description |
index |
int
|
getStepsCount()
public int getStepsCount()
Answer generation steps.
repeated .google.cloud.discoveryengine.v1.Answer.Step steps = 7;
| Returns |
| Type |
Description |
int |
|
getStepsList()
public List<Answer.Step> getStepsList()
Answer generation steps.
repeated .google.cloud.discoveryengine.v1.Answer.Step steps = 7;
getStepsOrBuilder(int index)
public Answer.StepOrBuilder getStepsOrBuilder(int index)
Answer generation steps.
repeated .google.cloud.discoveryengine.v1.Answer.Step steps = 7;
| Parameter |
| Name |
Description |
index |
int
|
getStepsOrBuilderList()
public List<? extends Answer.StepOrBuilder> getStepsOrBuilderList()
Answer generation steps.
repeated .google.cloud.discoveryengine.v1.Answer.Step steps = 7;
| Returns |
| Type |
Description |
List<? extends com.google.cloud.discoveryengine.v1.Answer.StepOrBuilder> |
|
hasCompleteTime()
public boolean hasCompleteTime()
Output only. Answer completed timestamp.
.google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
boolean |
Whether the completeTime field is set.
|
hasCreateTime()
public boolean hasCreateTime()
Output only. Answer creation timestamp.
.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
boolean |
Whether the createTime field is set.
|
hasGroundingScore()
public boolean hasGroundingScore()
A score in the range of [0, 1] describing how grounded the answer is by the
reference chunks.
optional double grounding_score = 12;
| Returns |
| Type |
Description |
boolean |
Whether the groundingScore field is set.
|
hasQueryUnderstandingInfo()
public boolean hasQueryUnderstandingInfo()
Query understanding information.
.google.cloud.discoveryengine.v1.Answer.QueryUnderstandingInfo query_understanding_info = 10;
| Returns |
| Type |
Description |
boolean |
Whether the queryUnderstandingInfo field is set.
|
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Answer.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected Answer.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public Answer.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides