Class Suggestion.Article.Builder (4.7.5)

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

Represents suggested article.

Protobuf type google.cloud.dialogflow.v2beta1.Suggestion.Article

Static Methods

getDescriptor()

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

Methods

addAllSnippets(Iterable<String> values)

public Suggestion.Article.Builder addAllSnippets(Iterable<String> values)

Output only. Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
valuesIterable<String>

The snippets to add.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSnippets(String value)

public Suggestion.Article.Builder addSnippets(String value)

Output only. Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
valueString

The snippets to add.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

addSnippetsBytes(ByteString value)

public Suggestion.Article.Builder addSnippetsBytes(ByteString value)

Output only. Article snippets.

repeated string snippets = 3;

Parameter
NameDescription
valueByteString

The bytes of the snippets to add.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

build()

public Suggestion.Article build()
Returns
TypeDescription
Suggestion.Article

buildPartial()

public Suggestion.Article buildPartial()
Returns
TypeDescription
Suggestion.Article

clear()

public Suggestion.Article.Builder clear()
Returns
TypeDescription
Suggestion.Article.Builder
Overrides

clearAnswerRecord()

public Suggestion.Article.Builder clearAnswerRecord()

Output only. 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
Suggestion.Article.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMetadata()

public Suggestion.Article.Builder clearMetadata()
Returns
TypeDescription
Suggestion.Article.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSnippets()

public Suggestion.Article.Builder clearSnippets()

Output only. Article snippets.

repeated string snippets = 3;

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

clearTitle()

public Suggestion.Article.Builder clearTitle()

Output only. The article title.

string title = 1;

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

clearUri()

public Suggestion.Article.Builder clearUri()

Output only. The article URI.

string uri = 2;

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

clone()

public Suggestion.Article.Builder clone()
Returns
TypeDescription
Suggestion.Article.Builder
Overrides

containsMetadata(String key)

public boolean containsMetadata(String key)

Output only. 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()

Output only. 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()

Output only. 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.

getDefaultInstanceForType()

public Suggestion.Article getDefaultInstanceForType()
Returns
TypeDescription
Suggestion.Article

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

Output only. 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()

Output only. 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)

Output only. 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)

Output only. 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)

Output only. 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)

Output only. 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()

Output only. Article snippets.

repeated string snippets = 3;

Returns
TypeDescription
int

The count of snippets.

getSnippetsList()

public ProtocolStringList getSnippetsList()

Output only. Article snippets.

repeated string snippets = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the snippets.

getTitle()

public String getTitle()

Output only. The article title.

string title = 1;

Returns
TypeDescription
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Output only. The article title.

string title = 1;

Returns
TypeDescription
ByteString

The bytes for title.

getUri()

public String getUri()

Output only. The article URI.

string uri = 2;

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Output only. 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(Suggestion.Article other)

public Suggestion.Article.Builder mergeFrom(Suggestion.Article other)
Parameter
NameDescription
otherSuggestion.Article
Returns
TypeDescription
Suggestion.Article.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllMetadata(Map<String,String> values)

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

Output only. 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
Suggestion.Article.Builder

putMetadata(String key, String value)

public Suggestion.Article.Builder putMetadata(String key, String value)

Output only. 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
Suggestion.Article.Builder

removeMetadata(String key)

public Suggestion.Article.Builder removeMetadata(String key)

Output only. 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
Suggestion.Article.Builder

setAnswerRecord(String value)

public Suggestion.Article.Builder setAnswerRecord(String value)

Output only. 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
Suggestion.Article.Builder

This builder for chaining.

setAnswerRecordBytes(ByteString value)

public Suggestion.Article.Builder setAnswerRecordBytes(ByteString value)

Output only. 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
Suggestion.Article.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSnippets(int index, String value)

public Suggestion.Article.Builder setSnippets(int index, String value)

Output only. Article snippets.

repeated string snippets = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The snippets to set.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

setTitle(String value)

public Suggestion.Article.Builder setTitle(String value)

Output only. The article title.

string title = 1;

Parameter
NameDescription
valueString

The title to set.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public Suggestion.Article.Builder setTitleBytes(ByteString value)

Output only. The article title.

string title = 1;

Parameter
NameDescription
valueByteString

The bytes for title to set.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUri(String value)

public Suggestion.Article.Builder setUri(String value)

Output only. The article URI.

string uri = 2;

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.

setUriBytes(ByteString value)

public Suggestion.Article.Builder setUriBytes(ByteString value)

Output only. The article URI.

string uri = 2;

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
Suggestion.Article.Builder

This builder for chaining.