Class ConversationContext.Builder (0.36.0)

public static final class ConversationContext.Builder extends GeneratedMessageV3.Builder<ConversationContext.Builder> implements ConversationContextOrBuilder

Defines context of the conversation

Protobuf type google.cloud.discoveryengine.v1.ConversationContext

Static Methods

getDescriptor()

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

Methods

addAllContextDocuments(Iterable<String> values)

public ConversationContext.Builder addAllContextDocuments(Iterable<String> values)

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Parameter
NameDescription
valuesIterable<String>

The contextDocuments to add.

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

addContextDocuments(String value)

public ConversationContext.Builder addContextDocuments(String value)

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Parameter
NameDescription
valueString

The contextDocuments to add.

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

addContextDocumentsBytes(ByteString value)

public ConversationContext.Builder addContextDocumentsBytes(ByteString value)

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Parameter
NameDescription
valueByteString

The bytes of the contextDocuments to add.

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ConversationContext build()
Returns
TypeDescription
ConversationContext

buildPartial()

public ConversationContext buildPartial()
Returns
TypeDescription
ConversationContext

clear()

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

clearActiveDocument()

public ConversationContext.Builder clearActiveDocument()

The current active document the user opened. It contains the document resource reference.

string active_document = 2;

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

clearContextDocuments()

public ConversationContext.Builder clearContextDocuments()

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getActiveDocument()

public String getActiveDocument()

The current active document the user opened. It contains the document resource reference.

string active_document = 2;

Returns
TypeDescription
String

The activeDocument.

getActiveDocumentBytes()

public ByteString getActiveDocumentBytes()

The current active document the user opened. It contains the document resource reference.

string active_document = 2;

Returns
TypeDescription
ByteString

The bytes for activeDocument.

getContextDocuments(int index)

public String getContextDocuments(int index)

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The contextDocuments at the given index.

getContextDocumentsBytes(int index)

public ByteString getContextDocumentsBytes(int index)

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the contextDocuments at the given index.

getContextDocumentsCount()

public int getContextDocumentsCount()

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Returns
TypeDescription
int

The count of contextDocuments.

getContextDocumentsList()

public ProtocolStringList getContextDocumentsList()

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the contextDocuments.

getDefaultInstanceForType()

public ConversationContext getDefaultInstanceForType()
Returns
TypeDescription
ConversationContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ConversationContext other)

public ConversationContext.Builder mergeFrom(ConversationContext other)
Parameter
NameDescription
otherConversationContext
Returns
TypeDescription
ConversationContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setActiveDocument(String value)

public ConversationContext.Builder setActiveDocument(String value)

The current active document the user opened. It contains the document resource reference.

string active_document = 2;

Parameter
NameDescription
valueString

The activeDocument to set.

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

setActiveDocumentBytes(ByteString value)

public ConversationContext.Builder setActiveDocumentBytes(ByteString value)

The current active document the user opened. It contains the document resource reference.

string active_document = 2;

Parameter
NameDescription
valueByteString

The bytes for activeDocument to set.

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

setContextDocuments(int index, String value)

public ConversationContext.Builder setContextDocuments(int index, String value)

The current list of documents the user is seeing. It contains the document resource references.

repeated string context_documents = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The contextDocuments to set.

Returns
TypeDescription
ConversationContext.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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