Class ArticleAnswer.Builder (4.5.11)

public static final class ArticleAnswer.Builder extends GeneratedMessageV3.Builder<ArticleAnswer.Builder> implements ArticleAnswerOrBuilder

Represents article answer.

Protobuf type google.cloud.dialogflow.v2.ArticleAnswer

Static Methods

getDescriptor()

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

Methods

addAllSnippets(Iterable<String> values)

public ArticleAnswer.Builder addAllSnippets(Iterable<String> values)

Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
valuesIterable<String>

The snippets to add.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSnippets(String value)

public ArticleAnswer.Builder addSnippets(String value)

Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
valueString

The snippets to add.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

addSnippetsBytes(ByteString value)

public ArticleAnswer.Builder addSnippetsBytes(ByteString value)

Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
valueByteString

The bytes of the snippets to add.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

build()

public ArticleAnswer build()
Returns
TypeDescription
ArticleAnswer

buildPartial()

public ArticleAnswer buildPartial()
Returns
TypeDescription
ArticleAnswer

clear()

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

clearAnswerRecord()

public ArticleAnswer.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
ArticleAnswer.Builder

This builder for chaining.

clearConfidence()

public ArticleAnswer.Builder clearConfidence()

Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).

float confidence = 4;

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMetadata()

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSnippets()

public ArticleAnswer.Builder clearSnippets()

Article snippets.

repeated string snippets = 3;

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

clearTitle()

public ArticleAnswer.Builder clearTitle()

The article title.

string title = 1;

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

clearUri()

public ArticleAnswer.Builder clearUri()

The article URI.

string uri = 2;

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

clone()

public ArticleAnswer.Builder clone()
Returns
TypeDescription
ArticleAnswer.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

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()

Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).

float confidence = 4;

Returns
TypeDescription
float

The confidence.

getDefaultInstanceForType()

public ArticleAnswer getDefaultInstanceForType()
Returns
TypeDescription
ArticleAnswer

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>

getSnippets(int index)

public String getSnippets(int index)

Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The snippets at the given index.

getSnippetsBytes(int index)

public ByteString getSnippetsBytes(int index)

Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the snippets at the given index.

getSnippetsCount()

public int getSnippetsCount()

Article snippets.

repeated string snippets = 3;

Returns
TypeDescription
int

The count of snippets.

getSnippetsList()

public ProtocolStringList getSnippetsList()

Article snippets.

repeated string snippets = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the snippets.

getTitle()

public String getTitle()

The article title.

string title = 1;

Returns
TypeDescription
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

The article title.

string title = 1;

Returns
TypeDescription
ByteString

The bytes for title.

getUri()

public String getUri()

The article URI.

string uri = 2;

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

The article URI.

string uri = 2;

Returns
TypeDescription
ByteString

The bytes for uri.

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(ArticleAnswer other)

public ArticleAnswer.Builder mergeFrom(ArticleAnswer other)
Parameter
NameDescription
otherArticleAnswer
Returns
TypeDescription
ArticleAnswer.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllMetadata(Map<String,String> values)

public ArticleAnswer.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
ArticleAnswer.Builder

putMetadata(String key, String value)

public ArticleAnswer.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
ArticleAnswer.Builder

removeMetadata(String key)

public ArticleAnswer.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
ArticleAnswer.Builder

setAnswerRecord(String value)

public ArticleAnswer.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
ArticleAnswer.Builder

This builder for chaining.

setAnswerRecordBytes(ByteString value)

public ArticleAnswer.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
ArticleAnswer.Builder

This builder for chaining.

setConfidence(float value)

public ArticleAnswer.Builder setConfidence(float value)

Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).

float confidence = 4;

Parameter
NameDescription
valuefloat

The confidence to set.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSnippets(int index, String value)

public ArticleAnswer.Builder setSnippets(int index, String value)

Article snippets.

repeated string snippets = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The snippets to set.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

setTitle(String value)

public ArticleAnswer.Builder setTitle(String value)

The article title.

string title = 1;

Parameter
NameDescription
valueString

The title to set.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public ArticleAnswer.Builder setTitleBytes(ByteString value)

The article title.

string title = 1;

Parameter
NameDescription
valueByteString

The bytes for title to set.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUri(String value)

public ArticleAnswer.Builder setUri(String value)

The article URI.

string uri = 2;

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.

setUriBytes(ByteString value)

public ArticleAnswer.Builder setUriBytes(ByteString value)

The article URI.

string uri = 2;

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
ArticleAnswer.Builder

This builder for chaining.