Class KnowledgeAssistAnswer.KnowledgeAnswer.Builder (4.59.0)

public static final class KnowledgeAssistAnswer.KnowledgeAnswer.Builder extends GeneratedMessageV3.Builder<KnowledgeAssistAnswer.KnowledgeAnswer.Builder> implements KnowledgeAssistAnswer.KnowledgeAnswerOrBuilder

Represents an answer from Knowledge. Currently supports FAQ and Generative answers.

Protobuf type google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

build()

public KnowledgeAssistAnswer.KnowledgeAnswer build()
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer

buildPartial()

public KnowledgeAssistAnswer.KnowledgeAnswer buildPartial()
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer

clear()

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clear()
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

clearAnswerText()

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clearAnswerText()

The piece of text from the source that answers this suggested query.

string answer_text = 1;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

This builder for chaining.

clearFaqSource()

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clearFaqSource()

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

clearField(Descriptors.FieldDescriptor field)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

clearGenerativeSource()

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clearGenerativeSource()

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

clearSource()

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clearSource()
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

clone()

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder clone()
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

getAnswerText()

public String getAnswerText()

The piece of text from the source that answers this suggested query.

string answer_text = 1;

Returns
Type Description
String

The answerText.

getAnswerTextBytes()

public ByteString getAnswerTextBytes()

The piece of text from the source that answers this suggested query.

string answer_text = 1;

Returns
Type Description
ByteString

The bytes for answerText.

getDefaultInstanceForType()

public KnowledgeAssistAnswer.KnowledgeAnswer getDefaultInstanceForType()
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFaqSource()

public KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource getFaqSource()

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource

The faqSource.

getFaqSourceBuilder()

public KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource.Builder getFaqSourceBuilder()

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource.Builder

getFaqSourceOrBuilder()

public KnowledgeAssistAnswer.KnowledgeAnswer.FaqSourceOrBuilder getFaqSourceOrBuilder()

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.FaqSourceOrBuilder

getGenerativeSource()

public KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource getGenerativeSource()

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource

The generativeSource.

getGenerativeSourceBuilder()

public KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Builder getGenerativeSourceBuilder()

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Builder

getGenerativeSourceOrBuilder()

public KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSourceOrBuilder getGenerativeSourceOrBuilder()

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSourceOrBuilder

getSourceCase()

public KnowledgeAssistAnswer.KnowledgeAnswer.SourceCase getSourceCase()
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.SourceCase

hasFaqSource()

public boolean hasFaqSource()

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Returns
Type Description
boolean

Whether the faqSource field is set.

hasGenerativeSource()

public boolean hasGenerativeSource()

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Returns
Type Description
boolean

Whether the generativeSource field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFaqSource(KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder mergeFaqSource(KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource value)

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Parameter
Name Description
value KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

mergeFrom(KnowledgeAssistAnswer.KnowledgeAnswer other)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder mergeFrom(KnowledgeAssistAnswer.KnowledgeAnswer other)
Parameter
Name Description
other KnowledgeAssistAnswer.KnowledgeAnswer
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

mergeGenerativeSource(KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder mergeGenerativeSource(KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource value)

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Parameter
Name Description
value KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KnowledgeAssistAnswer.KnowledgeAnswer.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

setAnswerText(String value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setAnswerText(String value)

The piece of text from the source that answers this suggested query.

string answer_text = 1;

Parameter
Name Description
value String

The answerText to set.

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

This builder for chaining.

setAnswerTextBytes(ByteString value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setAnswerTextBytes(ByteString value)

The piece of text from the source that answers this suggested query.

string answer_text = 1;

Parameter
Name Description
value ByteString

The bytes for answerText to set.

Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

This builder for chaining.

setFaqSource(KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setFaqSource(KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource value)

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Parameter
Name Description
value KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

setFaqSource(KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource.Builder builderForValue)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setFaqSource(KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource.Builder builderForValue)

Populated if the prediction came from FAQ.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource faq_source = 3;

Parameter
Name Description
builderForValue KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource.Builder
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

setGenerativeSource(KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setGenerativeSource(KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource value)

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Parameter
Name Description
value KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

setGenerativeSource(KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Builder builderForValue)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setGenerativeSource(KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Builder builderForValue)

Populated if the prediction was Generative.

.google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource generative_source = 4;

Parameter
Name Description
builderForValue KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Builder
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public KnowledgeAssistAnswer.KnowledgeAnswer.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KnowledgeAssistAnswer.KnowledgeAnswer.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KnowledgeAssistAnswer.KnowledgeAnswer.Builder
Overrides