Class AssistantMessage.Builder (0.19.0)

public static final class AssistantMessage.Builder extends GeneratedMessage.Builder<AssistantMessage.Builder> implements AssistantMessageOrBuilder

A message in an assistant session.

Protobuf type google.cloud.ces.v1beta.AssistantMessage

Static Methods

getDescriptor()

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

Methods

addAllAttachedGcsUris(Iterable<String> values)

public AssistantMessage.Builder addAllAttachedGcsUris(Iterable<String> values)

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The attachedGcsUris to add.

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.

addAllChunks(Iterable<? extends AssistantChunk> values)

public AssistantMessage.Builder addAllChunks(Iterable<? extends AssistantChunk> values)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.ces.v1beta.AssistantChunk>
Returns
Type Description
AssistantMessage.Builder

addAttachedGcsUris(String value)

public AssistantMessage.Builder addAttachedGcsUris(String value)

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The attachedGcsUris to add.

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.

addAttachedGcsUrisBytes(ByteString value)

public AssistantMessage.Builder addAttachedGcsUrisBytes(ByteString value)

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the attachedGcsUris to add.

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.

addChunks(AssistantChunk value)

public AssistantMessage.Builder addChunks(AssistantChunk value)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AssistantChunk
Returns
Type Description
AssistantMessage.Builder

addChunks(AssistantChunk.Builder builderForValue)

public AssistantMessage.Builder addChunks(AssistantChunk.Builder builderForValue)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue AssistantChunk.Builder
Returns
Type Description
AssistantMessage.Builder

addChunks(int index, AssistantChunk value)

public AssistantMessage.Builder addChunks(int index, AssistantChunk value)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AssistantChunk
Returns
Type Description
AssistantMessage.Builder

addChunks(int index, AssistantChunk.Builder builderForValue)

public AssistantMessage.Builder addChunks(int index, AssistantChunk.Builder builderForValue)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AssistantChunk.Builder
Returns
Type Description
AssistantMessage.Builder

addChunksBuilder()

public AssistantChunk.Builder addChunksBuilder()

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AssistantChunk.Builder

addChunksBuilder(int index)

public AssistantChunk.Builder addChunksBuilder(int index)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AssistantChunk.Builder

build()

public AssistantMessage build()
Returns
Type Description
AssistantMessage

buildPartial()

public AssistantMessage buildPartial()
Returns
Type Description
AssistantMessage

clear()

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

clearAttachedGcsUris()

public AssistantMessage.Builder clearAttachedGcsUris()

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.

clearChunks()

public AssistantMessage.Builder clearChunks()

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AssistantMessage.Builder

clearEventTime()

public AssistantMessage.Builder clearEventTime()

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AssistantMessage.Builder

clearRole()

public AssistantMessage.Builder clearRole()

Required. Role within the conversation "user" or "model".

string role = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.

getAttachedGcsUris(int index)

public String getAttachedGcsUris(int index)

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The attachedGcsUris at the given index.

getAttachedGcsUrisBytes(int index)

public ByteString getAttachedGcsUrisBytes(int index)

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the attachedGcsUris at the given index.

getAttachedGcsUrisCount()

public int getAttachedGcsUrisCount()

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of attachedGcsUris.

getAttachedGcsUrisList()

public ProtocolStringList getAttachedGcsUrisList()

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the attachedGcsUris.

getChunks(int index)

public AssistantChunk getChunks(int index)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AssistantChunk

getChunksBuilder(int index)

public AssistantChunk.Builder getChunksBuilder(int index)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AssistantChunk.Builder

getChunksBuilderList()

public List<AssistantChunk.Builder> getChunksBuilderList()

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getChunksCount()

public int getChunksCount()

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getChunksList()

public List<AssistantChunk> getChunksList()

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<AssistantChunk>

getChunksOrBuilder(int index)

public AssistantChunkOrBuilder getChunksOrBuilder(int index)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AssistantChunkOrBuilder

getChunksOrBuilderList()

public List<? extends AssistantChunkOrBuilder> getChunksOrBuilderList()

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.ces.v1beta.AssistantChunkOrBuilder>

getDefaultInstanceForType()

public AssistantMessage getDefaultInstanceForType()
Returns
Type Description
AssistantMessage

getDescriptorForType()

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

getEventTime()

public Timestamp getEventTime()

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The eventTime.

getEventTimeBuilder()

public Timestamp.Builder getEventTimeBuilder()

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getEventTimeOrBuilder()

public TimestampOrBuilder getEventTimeOrBuilder()

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getRole()

public String getRole()

Required. Role within the conversation "user" or "model".

string role = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The role.

getRoleBytes()

public ByteString getRoleBytes()

Required. Role within the conversation "user" or "model".

string role = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for role.

hasEventTime()

public boolean hasEventTime()

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the eventTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEventTime(Timestamp value)

public AssistantMessage.Builder mergeEventTime(Timestamp value)

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
AssistantMessage.Builder

mergeFrom(AssistantMessage other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

removeChunks(int index)

public AssistantMessage.Builder removeChunks(int index)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AssistantMessage.Builder

setAttachedGcsUris(int index, String value)

public AssistantMessage.Builder setAttachedGcsUris(int index, String value)

Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"

repeated string attached_gcs_uris = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The attachedGcsUris to set.

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.

setChunks(int index, AssistantChunk value)

public AssistantMessage.Builder setChunks(int index, AssistantChunk value)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AssistantChunk
Returns
Type Description
AssistantMessage.Builder

setChunks(int index, AssistantChunk.Builder builderForValue)

public AssistantMessage.Builder setChunks(int index, AssistantChunk.Builder builderForValue)

Optional. Content of the message as chunks.

repeated .google.cloud.ces.v1beta.AssistantChunk chunks = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AssistantChunk.Builder
Returns
Type Description
AssistantMessage.Builder

setEventTime(Timestamp value)

public AssistantMessage.Builder setEventTime(Timestamp value)

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
AssistantMessage.Builder

setEventTime(Timestamp.Builder builderForValue)

public AssistantMessage.Builder setEventTime(Timestamp.Builder builderForValue)

Required. Timestamp when the message was sent or received.

.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AssistantMessage.Builder

setRole(String value)

public AssistantMessage.Builder setRole(String value)

Required. Role within the conversation "user" or "model".

string role = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The role to set.

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.

setRoleBytes(ByteString value)

public AssistantMessage.Builder setRoleBytes(ByteString value)

Required. Role within the conversation "user" or "model".

string role = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for role to set.

Returns
Type Description
AssistantMessage.Builder

This builder for chaining.