Class FaqAnswer.Builder (4.4.0)

public static final class FaqAnswer.Builder extends GeneratedMessageV3.Builder<FaqAnswer.Builder> implements FaqAnswerOrBuilder

Represents answer from "frequently asked questions".

Protobuf type google.cloud.dialogflow.v2beta1.FaqAnswer

Implements

FaqAnswerOrBuilder

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FaqAnswer.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FaqAnswer.Builder
Overrides

build()

public FaqAnswer build()
Returns
TypeDescription
FaqAnswer

buildPartial()

public FaqAnswer buildPartial()
Returns
TypeDescription
FaqAnswer

clear()

public FaqAnswer.Builder clear()
Returns
TypeDescription
FaqAnswer.Builder
Overrides

clearAnswer()

public FaqAnswer.Builder clearAnswer()

The piece of text from the source knowledge base document.

string answer = 1;

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

clearAnswerRecord()

public FaqAnswer.Builder clearAnswerRecord()

The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"

string answer_record = 6;

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

clearConfidence()

public FaqAnswer.Builder clearConfidence()

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).

float confidence = 2;

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FaqAnswer.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
FaqAnswer.Builder
Overrides

clearMetadata()

public FaqAnswer.Builder clearMetadata()
Returns
TypeDescription
FaqAnswer.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public FaqAnswer.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
FaqAnswer.Builder
Overrides

clearQuestion()

public FaqAnswer.Builder clearQuestion()

The corresponding FAQ question.

string question = 3;

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

clearSource()

public FaqAnswer.Builder clearSource()

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

string source = 4;

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

clone()

public FaqAnswer.Builder clone()
Returns
TypeDescription
FaqAnswer.Builder
Overrides

containsMetadata(String key)

public boolean containsMetadata(String key)

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAnswer()

public String getAnswer()

The piece of text from the source knowledge base document.

string answer = 1;

Returns
TypeDescription
String

The answer.

getAnswerBytes()

public ByteString getAnswerBytes()

The piece of text from the source knowledge base document.

string answer = 1;

Returns
TypeDescription
ByteString

The bytes for answer.

getAnswerRecord()

public String getAnswerRecord()

The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"

string answer_record = 6;

Returns
TypeDescription
String

The answerRecord.

getAnswerRecordBytes()

public ByteString getAnswerRecordBytes()

The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"

string answer_record = 6;

Returns
TypeDescription
ByteString

The bytes for answerRecord.

getConfidence()

public float getConfidence()

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).

float confidence = 2;

Returns
TypeDescription
float

The confidence.

getDefaultInstanceForType()

public FaqAnswer getDefaultInstanceForType()
Returns
TypeDescription
FaqAnswer

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMetadata()

public Map<String,String> getMetadata()

Use #getMetadataMap() instead.

Returns
TypeDescription
Map<String,String>

getMetadataCount()

public int getMetadataCount()

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Returns
TypeDescription
int

getMetadataMap()

public Map<String,String> getMetadataMap()

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Returns
TypeDescription
Map<String,String>

getMetadataOrDefault(String key, String defaultValue)

public String getMetadataOrDefault(String key, String defaultValue)

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getMetadataOrThrow(String key)

public String getMetadataOrThrow(String key)

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableMetadata()

public Map<String,String> getMutableMetadata()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getQuestion()

public String getQuestion()

The corresponding FAQ question.

string question = 3;

Returns
TypeDescription
String

The question.

getQuestionBytes()

public ByteString getQuestionBytes()

The corresponding FAQ question.

string question = 3;

Returns
TypeDescription
ByteString

The bytes for question.

getSource()

public String getSource()

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

string source = 4;

Returns
TypeDescription
String

The source.

getSourceBytes()

public ByteString getSourceBytes()

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

string source = 4;

Returns
TypeDescription
ByteString

The bytes for source.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(FaqAnswer other)

public FaqAnswer.Builder mergeFrom(FaqAnswer other)
Parameter
NameDescription
otherFaqAnswer
Returns
TypeDescription
FaqAnswer.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FaqAnswer.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FaqAnswer.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public FaqAnswer.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
FaqAnswer.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FaqAnswer.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FaqAnswer.Builder
Overrides

putAllMetadata(Map<String,String> values)

public FaqAnswer.Builder putAllMetadata(Map<String,String> values)

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
FaqAnswer.Builder

putMetadata(String key, String value)

public FaqAnswer.Builder putMetadata(String key, String value)

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
FaqAnswer.Builder

removeMetadata(String key)

public FaqAnswer.Builder removeMetadata(String key)

A map that contains metadata about the answer and the document from which it originates.

map<string, string> metadata = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
FaqAnswer.Builder

setAnswer(String value)

public FaqAnswer.Builder setAnswer(String value)

The piece of text from the source knowledge base document.

string answer = 1;

Parameter
NameDescription
valueString

The answer to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setAnswerBytes(ByteString value)

public FaqAnswer.Builder setAnswerBytes(ByteString value)

The piece of text from the source knowledge base document.

string answer = 1;

Parameter
NameDescription
valueByteString

The bytes for answer to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setAnswerRecord(String value)

public FaqAnswer.Builder setAnswerRecord(String value)

The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"

string answer_record = 6;

Parameter
NameDescription
valueString

The answerRecord to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setAnswerRecordBytes(ByteString value)

public FaqAnswer.Builder setAnswerRecordBytes(ByteString value)

The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"

string answer_record = 6;

Parameter
NameDescription
valueByteString

The bytes for answerRecord to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setConfidence(float value)

public FaqAnswer.Builder setConfidence(float value)

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).

float confidence = 2;

Parameter
NameDescription
valuefloat

The confidence to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public FaqAnswer.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FaqAnswer.Builder
Overrides

setQuestion(String value)

public FaqAnswer.Builder setQuestion(String value)

The corresponding FAQ question.

string question = 3;

Parameter
NameDescription
valueString

The question to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setQuestionBytes(ByteString value)

public FaqAnswer.Builder setQuestionBytes(ByteString value)

The corresponding FAQ question.

string question = 3;

Parameter
NameDescription
valueByteString

The bytes for question to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

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

public FaqAnswer.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
FaqAnswer.Builder
Overrides

setSource(String value)

public FaqAnswer.Builder setSource(String value)

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

string source = 4;

Parameter
NameDescription
valueString

The source to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setSourceBytes(ByteString value)

public FaqAnswer.Builder setSourceBytes(ByteString value)

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

string source = 4;

Parameter
NameDescription
valueByteString

The bytes for source to set.

Returns
TypeDescription
FaqAnswer.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final FaqAnswer.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FaqAnswer.Builder
Overrides