Class AssistantMessage (0.19.0)

public final class AssistantMessage extends GeneratedMessage implements AssistantMessageOrBuilder

A message in an assistant session.

Protobuf type google.cloud.ces.v1beta.AssistantMessage

Static Fields

ATTACHED_GCS_URIS_FIELD_NUMBER

public static final int ATTACHED_GCS_URIS_FIELD_NUMBER
Field Value
Type Description
int

CHUNKS_FIELD_NUMBER

public static final int CHUNKS_FIELD_NUMBER
Field Value
Type Description
int

EVENT_TIME_FIELD_NUMBER

public static final int EVENT_TIME_FIELD_NUMBER
Field Value
Type Description
int

ROLE_FIELD_NUMBER

public static final int ROLE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AssistantMessage getDefaultInstance()
Returns
Type Description
AssistantMessage

getDescriptor()

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

newBuilder()

public static AssistantMessage.Builder newBuilder()
Returns
Type Description
AssistantMessage.Builder

newBuilder(AssistantMessage prototype)

public static AssistantMessage.Builder newBuilder(AssistantMessage prototype)
Parameter
Name Description
prototype AssistantMessage
Returns
Type Description
AssistantMessage.Builder

parseDelimitedFrom(InputStream input)

public static AssistantMessage parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AssistantMessage
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AssistantMessage parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistantMessage
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AssistantMessage parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AssistantMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AssistantMessage parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistantMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AssistantMessage parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AssistantMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AssistantMessage parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistantMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AssistantMessage parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AssistantMessage
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AssistantMessage parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistantMessage
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AssistantMessage parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AssistantMessage
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AssistantMessage parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistantMessage
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AssistantMessage parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AssistantMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AssistantMessage parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AssistantMessage
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AssistantMessage> parser()
Returns
Type Description
Parser<AssistantMessage>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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

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

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.

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

getParserForType()

public Parser<AssistantMessage> getParserForType()
Returns
Type Description
Parser<AssistantMessage>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AssistantMessage.Builder newBuilderForType()
Returns
Type Description
AssistantMessage.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected AssistantMessage.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AssistantMessage.Builder
Overrides

toBuilder()

public AssistantMessage.Builder toBuilder()
Returns
Type Description
AssistantMessage.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException