#[non_exhaustive]pub struct Example {
pub name: String,
pub playbook_input: Option<PlaybookInput>,
pub playbook_output: Option<PlaybookOutput>,
pub actions: Vec<Action>,
pub display_name: String,
pub description: String,
pub token_count: i64,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub conversation_state: OutputState,
pub language_code: String,
/* private fields */
}examples or playbooks only.Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe unique identifier of the playbook example.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>.
playbook_input: Option<PlaybookInput>Optional. The input to the playbook in the example.
playbook_output: Option<PlaybookOutput>Optional. The output of the playbook in the example.
actions: Vec<Action>Required. The ordered list of actions performed by the end user and the Dialogflow agent.
display_name: StringRequired. The display name of the example.
description: StringOptional. The high level concise description of the example. The max number of characters is 200.
token_count: i64Output only. Estimated number of tokes current example takes when sent to the LLM.
create_time: Option<Timestamp>Output only. The timestamp of initial example creation.
update_time: Option<Timestamp>Output only. Last time the example was updated.
conversation_state: OutputStateRequired. Example’s output state.
language_code: StringOptional. 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. Note: example’s language code is not currently used in dialogflow agents.
Implementations§
Source§impl Example
impl Example
Sourcepub fn set_playbook_input<T>(self, v: T) -> Selfwhere
T: Into<PlaybookInput>,
pub fn set_playbook_input<T>(self, v: T) -> Selfwhere
T: Into<PlaybookInput>,
Sets the value of playbook_input.
§Example
use google_cloud_dialogflow_cx_v3::model::PlaybookInput;
let x = Example::new().set_playbook_input(PlaybookInput::default()/* use setters */);Sourcepub fn set_or_clear_playbook_input<T>(self, v: Option<T>) -> Selfwhere
T: Into<PlaybookInput>,
pub fn set_or_clear_playbook_input<T>(self, v: Option<T>) -> Selfwhere
T: Into<PlaybookInput>,
Sets or clears the value of playbook_input.
§Example
use google_cloud_dialogflow_cx_v3::model::PlaybookInput;
let x = Example::new().set_or_clear_playbook_input(Some(PlaybookInput::default()/* use setters */));
let x = Example::new().set_or_clear_playbook_input(None::<PlaybookInput>);Sourcepub fn set_playbook_output<T>(self, v: T) -> Selfwhere
T: Into<PlaybookOutput>,
pub fn set_playbook_output<T>(self, v: T) -> Selfwhere
T: Into<PlaybookOutput>,
Sets the value of playbook_output.
§Example
use google_cloud_dialogflow_cx_v3::model::PlaybookOutput;
let x = Example::new().set_playbook_output(PlaybookOutput::default()/* use setters */);Sourcepub fn set_or_clear_playbook_output<T>(self, v: Option<T>) -> Selfwhere
T: Into<PlaybookOutput>,
pub fn set_or_clear_playbook_output<T>(self, v: Option<T>) -> Selfwhere
T: Into<PlaybookOutput>,
Sets or clears the value of playbook_output.
§Example
use google_cloud_dialogflow_cx_v3::model::PlaybookOutput;
let x = Example::new().set_or_clear_playbook_output(Some(PlaybookOutput::default()/* use setters */));
let x = Example::new().set_or_clear_playbook_output(None::<PlaybookOutput>);Sourcepub fn set_actions<T, V>(self, v: T) -> Self
pub fn set_actions<T, V>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_token_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_token_count<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Example::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Example::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_conversation_state<T: Into<OutputState>>(self, v: T) -> Self
pub fn set_conversation_state<T: Into<OutputState>>(self, v: T) -> Self
Sets the value of conversation_state.
§Example
use google_cloud_dialogflow_cx_v3::model::OutputState;
let x0 = Example::new().set_conversation_state(OutputState::Ok);
let x1 = Example::new().set_conversation_state(OutputState::Cancelled);
let x2 = Example::new().set_conversation_state(OutputState::Failed);