Class Message.Builder (0.1.0)

public static final class Message.Builder extends GeneratedMessage.Builder<Message.Builder> implements MessageOrBuilder

A message within a conversation.

Protobuf type google.cloud.ces.v1.Message

Implements

MessageOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllChunks(Iterable<? extends Chunk> values)

public Message.Builder addAllChunks(Iterable<? extends Chunk> values)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.ces.v1.Chunk>
Returns
Type Description
Message.Builder

addChunks(Chunk value)

public Message.Builder addChunks(Chunk value)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
value Chunk
Returns
Type Description
Message.Builder

addChunks(Chunk.Builder builderForValue)

public Message.Builder addChunks(Chunk.Builder builderForValue)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
builderForValue Chunk.Builder
Returns
Type Description
Message.Builder

addChunks(int index, Chunk value)

public Message.Builder addChunks(int index, Chunk value)

Optional. Content of the message as a series of chunks.

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

Parameters
Name Description
index int
value Chunk
Returns
Type Description
Message.Builder

addChunks(int index, Chunk.Builder builderForValue)

public Message.Builder addChunks(int index, Chunk.Builder builderForValue)

Optional. Content of the message as a series of chunks.

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

Parameters
Name Description
index int
builderForValue Chunk.Builder
Returns
Type Description
Message.Builder

addChunksBuilder()

public Chunk.Builder addChunksBuilder()

Optional. Content of the message as a series of chunks.

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

Returns
Type Description
Chunk.Builder

addChunksBuilder(int index)

public Chunk.Builder addChunksBuilder(int index)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
index int
Returns
Type Description
Chunk.Builder

build()

public Message build()
Returns
Type Description
Message

buildPartial()

public Message buildPartial()
Returns
Type Description
Message

clear()

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

clearChunks()

public Message.Builder clearChunks()

Optional. Content of the message as a series of chunks.

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

Returns
Type Description
Message.Builder

clearEventTime()

public Message.Builder clearEventTime()

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Message.Builder

clearRole()

public Message.Builder clearRole()

Optional. The role within the conversation, e.g., user, agent.

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

Returns
Type Description
Message.Builder

This builder for chaining.

getChunks(int index)

public Chunk getChunks(int index)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
index int
Returns
Type Description
Chunk

getChunksBuilder(int index)

public Chunk.Builder getChunksBuilder(int index)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
index int
Returns
Type Description
Chunk.Builder

getChunksBuilderList()

public List<Chunk.Builder> getChunksBuilderList()

Optional. Content of the message as a series of chunks.

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

Returns
Type Description
List<Builder>

getChunksCount()

public int getChunksCount()

Optional. Content of the message as a series of chunks.

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

Returns
Type Description
int

getChunksList()

public List<Chunk> getChunksList()

Optional. Content of the message as a series of chunks.

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

Returns
Type Description
List<Chunk>

getChunksOrBuilder(int index)

public ChunkOrBuilder getChunksOrBuilder(int index)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
index int
Returns
Type Description
ChunkOrBuilder

getChunksOrBuilderList()

public List<? extends ChunkOrBuilder> getChunksOrBuilderList()

Optional. Content of the message as a series of chunks.

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

Returns
Type Description
List<? extends com.google.cloud.ces.v1.ChunkOrBuilder>

getDefaultInstanceForType()

public Message getDefaultInstanceForType()
Returns
Type Description
Message

getDescriptorForType()

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

getEventTime()

public Timestamp getEventTime()

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The eventTime.

getEventTimeBuilder()

public Timestamp.Builder getEventTimeBuilder()

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getEventTimeOrBuilder()

public TimestampOrBuilder getEventTimeOrBuilder()

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getRole()

public String getRole()

Optional. The role within the conversation, e.g., user, agent.

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

Returns
Type Description
String

The role.

getRoleBytes()

public ByteString getRoleBytes()

Optional. The role within the conversation, e.g., user, agent.

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

Returns
Type Description
ByteString

The bytes for role.

hasEventTime()

public boolean hasEventTime()

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

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 Message.Builder mergeEventTime(Timestamp value)

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Message.Builder

mergeFrom(Message other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

removeChunks(int index)

public Message.Builder removeChunks(int index)

Optional. Content of the message as a series of chunks.

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

Parameter
Name Description
index int
Returns
Type Description
Message.Builder

setChunks(int index, Chunk value)

public Message.Builder setChunks(int index, Chunk value)

Optional. Content of the message as a series of chunks.

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

Parameters
Name Description
index int
value Chunk
Returns
Type Description
Message.Builder

setChunks(int index, Chunk.Builder builderForValue)

public Message.Builder setChunks(int index, Chunk.Builder builderForValue)

Optional. Content of the message as a series of chunks.

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

Parameters
Name Description
index int
builderForValue Chunk.Builder
Returns
Type Description
Message.Builder

setEventTime(Timestamp value)

public Message.Builder setEventTime(Timestamp value)

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
Message.Builder

setEventTime(Timestamp.Builder builderForValue)

public Message.Builder setEventTime(Timestamp.Builder builderForValue)

Optional. Timestamp when the message was sent or received. Should not be used if the message is part of an example.

.google.protobuf.Timestamp event_time = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Message.Builder

setRole(String value)

public Message.Builder setRole(String value)

Optional. The role within the conversation, e.g., user, agent.

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

Parameter
Name Description
value String

The role to set.

Returns
Type Description
Message.Builder

This builder for chaining.

setRoleBytes(ByteString value)

public Message.Builder setRoleBytes(ByteString value)

Optional. The role within the conversation, e.g., user, agent.

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

Parameter
Name Description
value ByteString

The bytes for role to set.

Returns
Type Description
Message.Builder

This builder for chaining.