Class Example.Builder (0.1.0)

public static final class Example.Builder extends GeneratedMessage.Builder<Example.Builder> implements ExampleOrBuilder

An example represents a sample conversation between the user and the agent(s).

Protobuf type google.cloud.ces.v1.Example

Implements

ExampleOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllMessages(Iterable<? extends Message> values)

public Example.Builder addAllMessages(Iterable<? extends Message> values)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

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

addMessages(Message value)

public Example.Builder addMessages(Message value)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Message
Returns
Type Description
Example.Builder

addMessages(Message.Builder builderForValue)

public Example.Builder addMessages(Message.Builder builderForValue)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

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

addMessages(int index, Message value)

public Example.Builder addMessages(int index, Message value)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

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

addMessages(int index, Message.Builder builderForValue)

public Example.Builder addMessages(int index, Message.Builder builderForValue)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

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

addMessagesBuilder()

public Message.Builder addMessagesBuilder()

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Message.Builder

addMessagesBuilder(int index)

public Message.Builder addMessagesBuilder(int index)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Message.Builder

build()

public Example build()
Returns
Type Description
Example

buildPartial()

public Example buildPartial()
Returns
Type Description
Example

clear()

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

clearCreateTime()

public Example.Builder clearCreateTime()

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Example.Builder

clearDescription()

public Example.Builder clearDescription()

Optional. Human-readable description of the example.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Example.Builder

This builder for chaining.

clearDisplayName()

public Example.Builder clearDisplayName()

Required. Display name of the example.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Example.Builder

This builder for chaining.

clearEntryAgent()

public Example.Builder clearEntryAgent()

Optional. The agent that initially handles the conversation. If not specified, the example represents a conversation that is handled by the root agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

string entry_agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
Example.Builder

This builder for chaining.

clearEtag()

public Example.Builder clearEtag()

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 9;

Returns
Type Description
Example.Builder

This builder for chaining.

clearInvalid()

public Example.Builder clearInvalid()

Output only. The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.

bool invalid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Example.Builder

This builder for chaining.

clearMessages()

public Example.Builder clearMessages()

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Example.Builder

clearName()

public Example.Builder clearName()

Identifier. The unique identifier of the example. Format: projects/{project}/locations/{location}/apps/{app}/examples/{example}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Example.Builder

This builder for chaining.

clearUpdateTime()

public Example.Builder clearUpdateTime()

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Example.Builder

getCreateTime()

public Timestamp getCreateTime()

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Example getDefaultInstanceForType()
Returns
Type Description
Example

getDescription()

public String getDescription()

Optional. Human-readable description of the example.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Human-readable description of the example.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. Display name of the example.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Display name of the example.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getEntryAgent()

public String getEntryAgent()

Optional. The agent that initially handles the conversation. If not specified, the example represents a conversation that is handled by the root agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

string entry_agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The entryAgent.

getEntryAgentBytes()

public ByteString getEntryAgentBytes()

Optional. The agent that initially handles the conversation. If not specified, the example represents a conversation that is handled by the root agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

string entry_agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for entryAgent.

getEtag()

public String getEtag()

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 9;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 9;

Returns
Type Description
ByteString

The bytes for etag.

getInvalid()

public boolean getInvalid()

Output only. The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.

bool invalid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The invalid.

getMessages(int index)

public Message getMessages(int index)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Message

getMessagesBuilder(int index)

public Message.Builder getMessagesBuilder(int index)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Message.Builder

getMessagesBuilderList()

public List<Message.Builder> getMessagesBuilderList()

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getMessagesCount()

public int getMessagesCount()

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getMessagesList()

public List<Message> getMessagesList()

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Message>

getMessagesOrBuilder(int index)

public MessageOrBuilder getMessagesOrBuilder(int index)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
MessageOrBuilder

getMessagesOrBuilderList()

public List<? extends MessageOrBuilder> getMessagesOrBuilderList()

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

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

getName()

public String getName()

Identifier. The unique identifier of the example. Format: projects/{project}/locations/{location}/apps/{app}/examples/{example}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The unique identifier of the example. Format: projects/{project}/locations/{location}/apps/{app}/examples/{example}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Example.Builder mergeCreateTime(Timestamp value)

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Example.Builder

mergeFrom(Example other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUpdateTime(Timestamp value)

public Example.Builder mergeUpdateTime(Timestamp value)

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Example.Builder

removeMessages(int index)

public Example.Builder removeMessages(int index)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Example.Builder

setCreateTime(Timestamp value)

public Example.Builder setCreateTime(Timestamp value)

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Example.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Example.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when the example was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Example.Builder

setDescription(String value)

public Example.Builder setDescription(String value)

Optional. Human-readable description of the example.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Example.Builder setDescriptionBytes(ByteString value)

Optional. Human-readable description of the example.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setDisplayName(String value)

public Example.Builder setDisplayName(String value)

Required. Display name of the example.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Example.Builder setDisplayNameBytes(ByteString value)

Required. Display name of the example.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setEntryAgent(String value)

public Example.Builder setEntryAgent(String value)

Optional. The agent that initially handles the conversation. If not specified, the example represents a conversation that is handled by the root agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

string entry_agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The entryAgent to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setEntryAgentBytes(ByteString value)

public Example.Builder setEntryAgentBytes(ByteString value)

Optional. The agent that initially handles the conversation. If not specified, the example represents a conversation that is handled by the root agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

string entry_agent = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for entryAgent to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setEtag(String value)

public Example.Builder setEtag(String value)

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 9;

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public Example.Builder setEtagBytes(ByteString value)

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

string etag = 9;

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setInvalid(boolean value)

public Example.Builder setInvalid(boolean value)

Output only. The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.

bool invalid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The invalid to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setMessages(int index, Message value)

public Example.Builder setMessages(int index, Message value)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

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

setMessages(int index, Message.Builder builderForValue)

public Example.Builder setMessages(int index, Message.Builder builderForValue)

Optional. The collection of messages that make up the conversation.

repeated .google.cloud.ces.v1.Message messages = 5 [(.google.api.field_behavior) = OPTIONAL];

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

setName(String value)

public Example.Builder setName(String value)

Identifier. The unique identifier of the example. Format: projects/{project}/locations/{location}/apps/{app}/examples/{example}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Example.Builder setNameBytes(ByteString value)

Identifier. The unique identifier of the example. Format: projects/{project}/locations/{location}/apps/{app}/examples/{example}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setUpdateTime(Timestamp value)

public Example.Builder setUpdateTime(Timestamp value)

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Example.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Example.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when the example was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Example.Builder