Class GroundingChunk.RetrievedContext.Builder (4.105.0)

public static final class GroundingChunk.RetrievedContext.Builder extends GeneratedMessage.Builder<GroundingChunk.RetrievedContext.Builder> implements GroundingChunk.RetrievedContextOrBuilder

Context retrieved from a data source to ground the model's response. This is used when a retrieval tool fetches information from a user-provided corpus or a public dataset.

Protobuf type google.cloud.dialogflow.v2.GroundingChunk.RetrievedContext

Static Methods

getDescriptor()

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

Methods

build()

public GroundingChunk.RetrievedContext build()
Returns
Type Description
GroundingChunk.RetrievedContext

buildPartial()

public GroundingChunk.RetrievedContext buildPartial()
Returns
Type Description
GroundingChunk.RetrievedContext

clear()

public GroundingChunk.RetrievedContext.Builder clear()
Returns
Type Description
GroundingChunk.RetrievedContext.Builder
Overrides

clearText()

public GroundingChunk.RetrievedContext.Builder clearText()

Output only. The content of the retrieved data source.

string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

clearTitle()

public GroundingChunk.RetrievedContext.Builder clearTitle()

Output only. The title of the retrieved data source.

string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

clearUri()

public GroundingChunk.RetrievedContext.Builder clearUri()

Output only. The URI of the retrieved data source.

string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

getDefaultInstanceForType()

public GroundingChunk.RetrievedContext getDefaultInstanceForType()
Returns
Type Description
GroundingChunk.RetrievedContext

getDescriptorForType()

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

getText()

public String getText()

Output only. The content of the retrieved data source.

string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

Output only. The content of the retrieved data source.

string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for text.

getTitle()

public String getTitle()

Output only. The title of the retrieved data source.

string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Output only. The title of the retrieved data source.

string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for title.

getUri()

public String getUri()

Output only. The URI of the retrieved data source.

string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Output only. The URI of the retrieved data source.

string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uri.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GroundingChunk.RetrievedContext other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setText(String value)

public GroundingChunk.RetrievedContext.Builder setText(String value)

Output only. The content of the retrieved data source.

string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The text to set.

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

setTextBytes(ByteString value)

public GroundingChunk.RetrievedContext.Builder setTextBytes(ByteString value)

Output only. The content of the retrieved data source.

string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

setTitle(String value)

public GroundingChunk.RetrievedContext.Builder setTitle(String value)

Output only. The title of the retrieved data source.

string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The title to set.

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public GroundingChunk.RetrievedContext.Builder setTitleBytes(ByteString value)

Output only. The title of the retrieved data source.

string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

setUri(String value)

public GroundingChunk.RetrievedContext.Builder setUri(String value)

Output only. The URI of the retrieved data source.

string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.

setUriBytes(ByteString value)

public GroundingChunk.RetrievedContext.Builder setUriBytes(ByteString value)

Output only. The URI of the retrieved data source.

string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
GroundingChunk.RetrievedContext.Builder

This builder for chaining.