Class SuggestArticlesResponse.Builder (4.34.0)

public static final class SuggestArticlesResponse.Builder extends GeneratedMessageV3.Builder<SuggestArticlesResponse.Builder> implements SuggestArticlesResponseOrBuilder

The response message for Participants.SuggestArticles.

Protobuf type google.cloud.dialogflow.v2.SuggestArticlesResponse

Static Methods

getDescriptor()

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

Methods

addAllArticleAnswers(Iterable<? extends ArticleAnswer> values)

public SuggestArticlesResponse.Builder addAllArticleAnswers(Iterable<? extends ArticleAnswer> values)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2.ArticleAnswer>
Returns
Type Description
SuggestArticlesResponse.Builder

addArticleAnswers(ArticleAnswer value)

public SuggestArticlesResponse.Builder addArticleAnswers(ArticleAnswer value)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
value ArticleAnswer
Returns
Type Description
SuggestArticlesResponse.Builder

addArticleAnswers(ArticleAnswer.Builder builderForValue)

public SuggestArticlesResponse.Builder addArticleAnswers(ArticleAnswer.Builder builderForValue)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
builderForValue ArticleAnswer.Builder
Returns
Type Description
SuggestArticlesResponse.Builder

addArticleAnswers(int index, ArticleAnswer value)

public SuggestArticlesResponse.Builder addArticleAnswers(int index, ArticleAnswer value)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameters
Name Description
index int
value ArticleAnswer
Returns
Type Description
SuggestArticlesResponse.Builder

addArticleAnswers(int index, ArticleAnswer.Builder builderForValue)

public SuggestArticlesResponse.Builder addArticleAnswers(int index, ArticleAnswer.Builder builderForValue)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameters
Name Description
index int
builderForValue ArticleAnswer.Builder
Returns
Type Description
SuggestArticlesResponse.Builder

addArticleAnswersBuilder()

public ArticleAnswer.Builder addArticleAnswersBuilder()

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Returns
Type Description
ArticleAnswer.Builder

addArticleAnswersBuilder(int index)

public ArticleAnswer.Builder addArticleAnswersBuilder(int index)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
index int
Returns
Type Description
ArticleAnswer.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SuggestArticlesResponse build()
Returns
Type Description
SuggestArticlesResponse

buildPartial()

public SuggestArticlesResponse buildPartial()
Returns
Type Description
SuggestArticlesResponse

clear()

public SuggestArticlesResponse.Builder clear()
Returns
Type Description
SuggestArticlesResponse.Builder
Overrides

clearArticleAnswers()

public SuggestArticlesResponse.Builder clearArticleAnswers()

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Returns
Type Description
SuggestArticlesResponse.Builder

clearContextSize()

public SuggestArticlesResponse.Builder clearContextSize()

Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.

int32 context_size = 3;

Returns
Type Description
SuggestArticlesResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearLatestMessage()

public SuggestArticlesResponse.Builder clearLatestMessage()

The name of the latest conversation message used to compile suggestion for.

Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

string latest_message = 2;

Returns
Type Description
SuggestArticlesResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public SuggestArticlesResponse.Builder clone()
Returns
Type Description
SuggestArticlesResponse.Builder
Overrides

getArticleAnswers(int index)

public ArticleAnswer getArticleAnswers(int index)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
index int
Returns
Type Description
ArticleAnswer

getArticleAnswersBuilder(int index)

public ArticleAnswer.Builder getArticleAnswersBuilder(int index)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
index int
Returns
Type Description
ArticleAnswer.Builder

getArticleAnswersBuilderList()

public List<ArticleAnswer.Builder> getArticleAnswersBuilderList()

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Returns
Type Description
List<Builder>

getArticleAnswersCount()

public int getArticleAnswersCount()

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Returns
Type Description
int

getArticleAnswersList()

public List<ArticleAnswer> getArticleAnswersList()

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Returns
Type Description
List<ArticleAnswer>

getArticleAnswersOrBuilder(int index)

public ArticleAnswerOrBuilder getArticleAnswersOrBuilder(int index)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
index int
Returns
Type Description
ArticleAnswerOrBuilder

getArticleAnswersOrBuilderList()

public List<? extends ArticleAnswerOrBuilder> getArticleAnswersOrBuilderList()

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2.ArticleAnswerOrBuilder>

getContextSize()

public int getContextSize()

Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.

int32 context_size = 3;

Returns
Type Description
int

The contextSize.

getDefaultInstanceForType()

public SuggestArticlesResponse getDefaultInstanceForType()
Returns
Type Description
SuggestArticlesResponse

getDescriptorForType()

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

getLatestMessage()

public String getLatestMessage()

The name of the latest conversation message used to compile suggestion for.

Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

string latest_message = 2;

Returns
Type Description
String

The latestMessage.

getLatestMessageBytes()

public ByteString getLatestMessageBytes()

The name of the latest conversation message used to compile suggestion for.

Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

string latest_message = 2;

Returns
Type Description
ByteString

The bytes for latestMessage.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SuggestArticlesResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeArticleAnswers(int index)

public SuggestArticlesResponse.Builder removeArticleAnswers(int index)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameter
Name Description
index int
Returns
Type Description
SuggestArticlesResponse.Builder

setArticleAnswers(int index, ArticleAnswer value)

public SuggestArticlesResponse.Builder setArticleAnswers(int index, ArticleAnswer value)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameters
Name Description
index int
value ArticleAnswer
Returns
Type Description
SuggestArticlesResponse.Builder

setArticleAnswers(int index, ArticleAnswer.Builder builderForValue)

public SuggestArticlesResponse.Builder setArticleAnswers(int index, ArticleAnswer.Builder builderForValue)

Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2.ArticleAnswer article_answers = 1;

Parameters
Name Description
index int
builderForValue ArticleAnswer.Builder
Returns
Type Description
SuggestArticlesResponse.Builder

setContextSize(int value)

public SuggestArticlesResponse.Builder setContextSize(int value)

Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.

int32 context_size = 3;

Parameter
Name Description
value int

The contextSize to set.

Returns
Type Description
SuggestArticlesResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setLatestMessage(String value)

public SuggestArticlesResponse.Builder setLatestMessage(String value)

The name of the latest conversation message used to compile suggestion for.

Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

string latest_message = 2;

Parameter
Name Description
value String

The latestMessage to set.

Returns
Type Description
SuggestArticlesResponse.Builder

This builder for chaining.

setLatestMessageBytes(ByteString value)

public SuggestArticlesResponse.Builder setLatestMessageBytes(ByteString value)

The name of the latest conversation message used to compile suggestion for.

Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

string latest_message = 2;

Parameter
Name Description
value ByteString

The bytes for latestMessage to set.

Returns
Type Description
SuggestArticlesResponse.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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