Class Answer (0.39.0)

public final class Answer extends GeneratedMessageV3 implements AnswerOrBuilder

Defines an answer.

Protobuf type google.cloud.discoveryengine.v1alpha.Answer

Implements

AnswerOrBuilder

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

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

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()
Returns
Type Description
Descriptor

newBuilder()

public static Answer.Builder newBuilder()
Returns
Type Description
Answer.Builder

newBuilder(Answer prototype)

public static Answer.Builder newBuilder(Answer prototype)
Parameter
Name Description
prototype Answer
Returns
Type Description
Answer.Builder

parseDelimitedFrom(InputStream input)

public static Answer parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Answer
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Answer parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Answer
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Answer parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Answer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Answer parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Answer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Answer parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Answer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Answer parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Answer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Answer parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Answer
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Answer parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Answer
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Answer parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Answer
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Answer parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Answer
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Answer parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Answer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Answer parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Answer
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Answer> parser()
Returns
Type Description
Parser<Answer>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.v1alpha.Answer.AnswerSkippedReason answer_skipped_reasons = 11;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
Answer.AnswerSkippedReason

The answerSkippedReasons at the given index.

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.v1alpha.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.v1alpha.Answer.AnswerSkippedReason answer_skipped_reasons = 11;

Returns
Type Description
List<AnswerSkippedReason>

A list containing the answerSkippedReasons.

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.v1alpha.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.v1alpha.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.v1alpha.Answer.Citation citations = 4;

Parameter
Name Description
index int
Returns
Type Description
Answer.Citation

getCitationsCount()

public int getCitationsCount()

Citations.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Citation citations = 4;

Returns
Type Description
int

getCitationsList()

public List<Answer.Citation> getCitationsList()

Citations.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Citation citations = 4;

Returns
Type Description
List<Citation>

getCitationsOrBuilder(int index)

public Answer.CitationOrBuilder getCitationsOrBuilder(int index)

Citations.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Citation citations = 4;

Parameter
Name Description
index int
Returns
Type Description
Answer.CitationOrBuilder

getCitationsOrBuilderList()

public List<? extends Answer.CitationOrBuilder> getCitationsOrBuilderList()

Citations.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Citation citations = 4;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1alpha.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];

Returns
Type Description
TimestampOrBuilder

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];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Answer getDefaultInstanceForType()
Returns
Type Description
Answer

getName()

public String 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()
Returns
Type Description
Parser<Answer>
Overrides

getQueryUnderstandingInfo()

public Answer.QueryUnderstandingInfo getQueryUnderstandingInfo()

Query understanding information.

.google.cloud.discoveryengine.v1alpha.Answer.QueryUnderstandingInfo query_understanding_info = 10;

Returns
Type Description
Answer.QueryUnderstandingInfo

The queryUnderstandingInfo.

getQueryUnderstandingInfoOrBuilder()

public Answer.QueryUnderstandingInfoOrBuilder getQueryUnderstandingInfoOrBuilder()

Query understanding information.

.google.cloud.discoveryengine.v1alpha.Answer.QueryUnderstandingInfo query_understanding_info = 10;

Returns
Type Description
Answer.QueryUnderstandingInfoOrBuilder

getReferences(int index)

public Answer.Reference getReferences(int index)

References.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Reference references = 5;

Parameter
Name Description
index int
Returns
Type Description
Answer.Reference

getReferencesCount()

public int getReferencesCount()

References.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Reference references = 5;

Returns
Type Description
int

getReferencesList()

public List<Answer.Reference> getReferencesList()

References.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Reference references = 5;

Returns
Type Description
List<Reference>

getReferencesOrBuilder(int index)

public Answer.ReferenceOrBuilder getReferencesOrBuilder(int index)

References.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Reference references = 5;

Parameter
Name Description
index int
Returns
Type Description
Answer.ReferenceOrBuilder

getReferencesOrBuilderList()

public List<? extends Answer.ReferenceOrBuilder> getReferencesOrBuilderList()

References.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Reference references = 5;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1alpha.Answer.ReferenceOrBuilder>

getRelatedQuestions(int index)

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.

getRelatedQuestionsBytes(int 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.

getRelatedQuestionsCount()

public int getRelatedQuestionsCount()

Suggested related questions.

repeated string related_questions = 6;

Returns
Type Description
int

The count of relatedQuestions.

getRelatedQuestionsList()

public ProtocolStringList getRelatedQuestionsList()

Suggested related questions.

repeated string related_questions = 6;

Returns
Type Description
ProtocolStringList

A list containing the relatedQuestions.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public Answer.State getState()

The state of the answer generation.

.google.cloud.discoveryengine.v1alpha.Answer.State state = 2;

Returns
Type Description
Answer.State

The state.

getStateValue()

public int getStateValue()

The state of the answer generation.

.google.cloud.discoveryengine.v1alpha.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.v1alpha.Answer.Step steps = 7;

Parameter
Name Description
index int
Returns
Type Description
Answer.Step

getStepsCount()

public int getStepsCount()

Answer generation steps.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Step steps = 7;

Returns
Type Description
int

getStepsList()

public List<Answer.Step> getStepsList()

Answer generation steps.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Step steps = 7;

Returns
Type Description
List<Step>

getStepsOrBuilder(int index)

public Answer.StepOrBuilder getStepsOrBuilder(int index)

Answer generation steps.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Step steps = 7;

Parameter
Name Description
index int
Returns
Type Description
Answer.StepOrBuilder

getStepsOrBuilderList()

public List<? extends Answer.StepOrBuilder> getStepsOrBuilderList()

Answer generation steps.

repeated .google.cloud.discoveryengine.v1alpha.Answer.Step steps = 7;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1alpha.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.

hasQueryUnderstandingInfo()

public boolean hasQueryUnderstandingInfo()

Query understanding information.

.google.cloud.discoveryengine.v1alpha.Answer.QueryUnderstandingInfo query_understanding_info = 10;

Returns
Type Description
boolean

Whether the queryUnderstandingInfo field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Answer.Builder newBuilderForType()
Returns
Type Description
Answer.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Answer.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Answer.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Answer.Builder toBuilder()
Returns
Type Description
Answer.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException