Class Example (0.52.0)

public final class Example extends GeneratedMessageV3 implements ExampleOrBuilder

Example represents a sample execution of the playbook in the conversation.

An example consists of a list of ordered actions performed by end user or Dialogflow agent according the playbook instructions to fulfill the task.

Protobuf type google.cloud.dialogflow.cx.v3beta1.Example

Implements

ExampleOrBuilder

Static Fields

ACTIONS_FIELD_NUMBER

public static final int ACTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

CONVERSATION_STATE_FIELD_NUMBER

public static final int CONVERSATION_STATE_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PLAYBOOK_INPUT_FIELD_NUMBER

public static final int PLAYBOOK_INPUT_FIELD_NUMBER
Field Value
TypeDescription
int

PLAYBOOK_OUTPUT_FIELD_NUMBER

public static final int PLAYBOOK_OUTPUT_FIELD_NUMBER
Field Value
TypeDescription
int

TOKEN_COUNT_FIELD_NUMBER

public static final int TOKEN_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Example getDefaultInstance()
Returns
TypeDescription
Example

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Example.Builder newBuilder()
Returns
TypeDescription
Example.Builder

newBuilder(Example prototype)

public static Example.Builder newBuilder(Example prototype)
Parameter
NameDescription
prototypeExample
Returns
TypeDescription
Example.Builder

parseDelimitedFrom(InputStream input)

public static Example parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Example
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Example parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Example
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Example parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Example
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Example parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Example
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Example parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Example
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Example parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Example
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Example parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Example
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Example parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Example
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Example parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Example
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Example parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Example
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Example parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Example
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Example parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Example
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Example> parser()
Returns
TypeDescription
Parser<Example>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getActions(int index)

public Action getActions(int index)

Required. The ordered list of actions performed by the end user and the Dialogflow agent.

repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
Action

getActionsCount()

public int getActionsCount()

Required. The ordered list of actions performed by the end user and the Dialogflow agent.

repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

getActionsList()

public List<Action> getActionsList()

Required. The ordered list of actions performed by the end user and the Dialogflow agent.

repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<Action>

getActionsOrBuilder(int index)

public ActionOrBuilder getActionsOrBuilder(int index)

Required. The ordered list of actions performed by the end user and the Dialogflow agent.

repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
ActionOrBuilder

getActionsOrBuilderList()

public List<? extends ActionOrBuilder> getActionsOrBuilderList()

Required. The ordered list of actions performed by the end user and the Dialogflow agent.

repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder>

getConversationState()

public OutputState getConversationState()

Required. Example's output state.

.google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OutputState

The conversationState.

getConversationStateValue()

public int getConversationStateValue()

Required. Example's output state.

.google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for conversationState.

getCreateTime()

public Timestamp getCreateTime()

Output only. The timestamp of initial example creation.

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The timestamp of initial example creation.

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Example getDefaultInstanceForType()
Returns
TypeDescription
Example

getDescription()

public String getDescription()

Optional. The high level concise description of the example. The max number of characters is 200.

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

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The high level concise description of the example. The max number of characters is 200.

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

Returns
TypeDescription
ByteString

The bytes for description.

getDisplayName()

public String getDisplayName()

Required. The display name of the example.

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

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the example.

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

Returns
TypeDescription
ByteString

The bytes for displayName.

getLanguageCode()

public String getLanguageCode()

Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used.

string language_code = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used.

string language_code = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for languageCode.

getName()

public String getName()

The unique identifier of the playbook example. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook ID>/examples/<Example ID>.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the playbook example. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook ID>/examples/<Example ID>.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Example> getParserForType()
Returns
TypeDescription
Parser<Example>
Overrides

getPlaybookInput()

public PlaybookInput getPlaybookInput()

Optional. The input to the playbook in the example.

.google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PlaybookInput

The playbookInput.

getPlaybookInputOrBuilder()

public PlaybookInputOrBuilder getPlaybookInputOrBuilder()

Optional. The input to the playbook in the example.

.google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PlaybookInputOrBuilder

getPlaybookOutput()

public PlaybookOutput getPlaybookOutput()

Optional. The output of the playbook in the example.

.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PlaybookOutput

The playbookOutput.

getPlaybookOutputOrBuilder()

public PlaybookOutputOrBuilder getPlaybookOutputOrBuilder()

Optional. The output of the playbook in the example.

.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PlaybookOutputOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTokenCount()

public long getTokenCount()

Output only. Estimated number of tokes current example takes when sent to the LLM.

int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The tokenCount.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Last time the example was updated.

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

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last time the example was updated.

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

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The timestamp of initial example creation.

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasPlaybookInput()

public boolean hasPlaybookInput()

Optional. The input to the playbook in the example.

.google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the playbookInput field is set.

hasPlaybookOutput()

public boolean hasPlaybookOutput()

Optional. The output of the playbook in the example.

.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the playbookOutput field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Last time the example was updated.

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

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Example.Builder newBuilderForType()
Returns
TypeDescription
Example.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Example.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Example.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Example.Builder toBuilder()
Returns
TypeDescription
Example.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException