Class Suggestion.Builder (4.61.0)

public static final class Suggestion.Builder extends GeneratedMessageV3.Builder<Suggestion.Builder> implements SuggestionOrBuilder

Represents a suggestion for a human agent.

Protobuf type google.cloud.dialogflow.v2beta1.Suggestion

Implements

SuggestionOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllArticles(Iterable<? extends Suggestion.Article> values)

public Suggestion.Builder addAllArticles(Iterable<? extends Suggestion.Article> values)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2beta1.Suggestion.Article>
Returns
Type Description
Suggestion.Builder

addAllFaqAnswers(Iterable<? extends Suggestion.FaqAnswer> values)

public Suggestion.Builder addAllFaqAnswers(Iterable<? extends Suggestion.FaqAnswer> values)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer>
Returns
Type Description
Suggestion.Builder

addArticles(Suggestion.Article value)

public Suggestion.Builder addArticles(Suggestion.Article value)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
value Suggestion.Article
Returns
Type Description
Suggestion.Builder

addArticles(Suggestion.Article.Builder builderForValue)

public Suggestion.Builder addArticles(Suggestion.Article.Builder builderForValue)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
builderForValue Suggestion.Article.Builder
Returns
Type Description
Suggestion.Builder

addArticles(int index, Suggestion.Article value)

public Suggestion.Builder addArticles(int index, Suggestion.Article value)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameters
Name Description
index int
value Suggestion.Article
Returns
Type Description
Suggestion.Builder

addArticles(int index, Suggestion.Article.Builder builderForValue)

public Suggestion.Builder addArticles(int index, Suggestion.Article.Builder builderForValue)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameters
Name Description
index int
builderForValue Suggestion.Article.Builder
Returns
Type Description
Suggestion.Builder

addArticlesBuilder()

public Suggestion.Article.Builder addArticlesBuilder()

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Returns
Type Description
Suggestion.Article.Builder

addArticlesBuilder(int index)

public Suggestion.Article.Builder addArticlesBuilder(int index)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.Article.Builder

addFaqAnswers(Suggestion.FaqAnswer value)

public Suggestion.Builder addFaqAnswers(Suggestion.FaqAnswer value)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
value Suggestion.FaqAnswer
Returns
Type Description
Suggestion.Builder

addFaqAnswers(Suggestion.FaqAnswer.Builder builderForValue)

public Suggestion.Builder addFaqAnswers(Suggestion.FaqAnswer.Builder builderForValue)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
builderForValue Suggestion.FaqAnswer.Builder
Returns
Type Description
Suggestion.Builder

addFaqAnswers(int index, Suggestion.FaqAnswer value)

public Suggestion.Builder addFaqAnswers(int index, Suggestion.FaqAnswer value)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameters
Name Description
index int
value Suggestion.FaqAnswer
Returns
Type Description
Suggestion.Builder

addFaqAnswers(int index, Suggestion.FaqAnswer.Builder builderForValue)

public Suggestion.Builder addFaqAnswers(int index, Suggestion.FaqAnswer.Builder builderForValue)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameters
Name Description
index int
builderForValue Suggestion.FaqAnswer.Builder
Returns
Type Description
Suggestion.Builder

addFaqAnswersBuilder()

public Suggestion.FaqAnswer.Builder addFaqAnswersBuilder()

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Returns
Type Description
Suggestion.FaqAnswer.Builder

addFaqAnswersBuilder(int index)

public Suggestion.FaqAnswer.Builder addFaqAnswersBuilder(int index)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.FaqAnswer.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Suggestion build()
Returns
Type Description
Suggestion

buildPartial()

public Suggestion buildPartial()
Returns
Type Description
Suggestion

clear()

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

clearArticles()

public Suggestion.Builder clearArticles()

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Returns
Type Description
Suggestion.Builder

clearCreateTime()

public Suggestion.Builder clearCreateTime()

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Suggestion.Builder

clearFaqAnswers()

public Suggestion.Builder clearFaqAnswers()

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Returns
Type Description
Suggestion.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLatestMessage()

public Suggestion.Builder clearLatestMessage()

Output only. Latest message used as context to compile this suggestion.

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

string latest_message = 7;

Returns
Type Description
Suggestion.Builder

This builder for chaining.

clearName()

public Suggestion.Builder clearName()

Output only. The name of this suggestion. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/*/suggestions/<Suggestion ID>.

string name = 1;

Returns
Type Description
Suggestion.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getArticles(int index)

public Suggestion.Article getArticles(int index)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.Article

getArticlesBuilder(int index)

public Suggestion.Article.Builder getArticlesBuilder(int index)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.Article.Builder

getArticlesBuilderList()

public List<Suggestion.Article.Builder> getArticlesBuilderList()

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Returns
Type Description
List<Builder>

getArticlesCount()

public int getArticlesCount()

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Returns
Type Description
int

getArticlesList()

public List<Suggestion.Article> getArticlesList()

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Returns
Type Description
List<Article>

getArticlesOrBuilder(int index)

public Suggestion.ArticleOrBuilder getArticlesOrBuilder(int index)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.ArticleOrBuilder

getArticlesOrBuilderList()

public List<? extends Suggestion.ArticleOrBuilder> getArticlesOrBuilderList()

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2beta1.Suggestion.ArticleOrBuilder>

getCreateTime()

public Timestamp getCreateTime()

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Suggestion getDefaultInstanceForType()
Returns
Type Description
Suggestion

getDescriptorForType()

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

getFaqAnswers(int index)

public Suggestion.FaqAnswer getFaqAnswers(int index)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.FaqAnswer

getFaqAnswersBuilder(int index)

public Suggestion.FaqAnswer.Builder getFaqAnswersBuilder(int index)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.FaqAnswer.Builder

getFaqAnswersBuilderList()

public List<Suggestion.FaqAnswer.Builder> getFaqAnswersBuilderList()

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Returns
Type Description
List<Builder>

getFaqAnswersCount()

public int getFaqAnswersCount()

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Returns
Type Description
int

getFaqAnswersList()

public List<Suggestion.FaqAnswer> getFaqAnswersList()

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Returns
Type Description
List<FaqAnswer>

getFaqAnswersOrBuilder(int index)

public Suggestion.FaqAnswerOrBuilder getFaqAnswersOrBuilder(int index)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.FaqAnswerOrBuilder

getFaqAnswersOrBuilderList()

public List<? extends Suggestion.FaqAnswerOrBuilder> getFaqAnswersOrBuilderList()

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswerOrBuilder>

getLatestMessage()

public String getLatestMessage()

Output only. Latest message used as context to compile this suggestion.

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

string latest_message = 7;

Returns
Type Description
String

The latestMessage.

getLatestMessageBytes()

public ByteString getLatestMessageBytes()

Output only. Latest message used as context to compile this suggestion.

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

string latest_message = 7;

Returns
Type Description
ByteString

The bytes for latestMessage.

getName()

public String getName()

Output only. The name of this suggestion. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/*/suggestions/<Suggestion ID>.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The name of this suggestion. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/*/suggestions/<Suggestion ID>.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Returns
Type Description
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Suggestion.Builder mergeCreateTime(Timestamp value)

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Suggestion.Builder

mergeFrom(Suggestion other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeArticles(int index)

public Suggestion.Builder removeArticles(int index)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.Builder

removeFaqAnswers(int index)

public Suggestion.Builder removeFaqAnswers(int index)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameter
Name Description
index int
Returns
Type Description
Suggestion.Builder

setArticles(int index, Suggestion.Article value)

public Suggestion.Builder setArticles(int index, Suggestion.Article value)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameters
Name Description
index int
value Suggestion.Article
Returns
Type Description
Suggestion.Builder

setArticles(int index, Suggestion.Article.Builder builderForValue)

public Suggestion.Builder setArticles(int index, Suggestion.Article.Builder builderForValue)

Output only. Articles ordered by score in descending order.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.Article articles = 2;

Parameters
Name Description
index int
builderForValue Suggestion.Article.Builder
Returns
Type Description
Suggestion.Builder

setCreateTime(Timestamp value)

public Suggestion.Builder setCreateTime(Timestamp value)

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Suggestion.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Suggestion.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time the suggestion was created.

.google.protobuf.Timestamp create_time = 5;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Suggestion.Builder

setFaqAnswers(int index, Suggestion.FaqAnswer value)

public Suggestion.Builder setFaqAnswers(int index, Suggestion.FaqAnswer value)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameters
Name Description
index int
value Suggestion.FaqAnswer
Returns
Type Description
Suggestion.Builder

setFaqAnswers(int index, Suggestion.FaqAnswer.Builder builderForValue)

public Suggestion.Builder setFaqAnswers(int index, Suggestion.FaqAnswer.Builder builderForValue)

Output only. Answers extracted from FAQ documents.

repeated .google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer faq_answers = 4;

Parameters
Name Description
index int
builderForValue Suggestion.FaqAnswer.Builder
Returns
Type Description
Suggestion.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setLatestMessage(String value)

public Suggestion.Builder setLatestMessage(String value)

Output only. Latest message used as context to compile this suggestion.

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

string latest_message = 7;

Parameter
Name Description
value String

The latestMessage to set.

Returns
Type Description
Suggestion.Builder

This builder for chaining.

setLatestMessageBytes(ByteString value)

public Suggestion.Builder setLatestMessageBytes(ByteString value)

Output only. Latest message used as context to compile this suggestion.

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

string latest_message = 7;

Parameter
Name Description
value ByteString

The bytes for latestMessage to set.

Returns
Type Description
Suggestion.Builder

This builder for chaining.

setName(String value)

public Suggestion.Builder setName(String value)

Output only. The name of this suggestion. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/*/suggestions/<Suggestion ID>.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Suggestion.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Suggestion.Builder setNameBytes(ByteString value)

Output only. The name of this suggestion. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/*/suggestions/<Suggestion ID>.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Suggestion.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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