#[non_exhaustive]pub struct EventInput {
pub name: String,
pub parameters: Option<Struct>,
pub language_code: String,
/* private fields */
}participants or sessions only.Expand description
Events allow for matching intents by event name instead of the natural
language input. For instance, input <event: { name: "welcome_event", parameters: { name: "Sam" } }> can trigger a personalized welcome response.
The parameter name may be used by the agent in the response:
"Hello #welcome_event.name! What can I do for you today?".
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: StringRequired. The unique identifier of the event.
parameters: Option<Struct>The collection of parameters associated with the event.
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
- MapKey type: string
- MapKey value: parameter name
- MapValue type: If parameter’s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
- MapValue value: If parameter’s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
language_code: StringRequired. The language of this query. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
This field is ignored when used in the context of a WebhookResponse.followup_event_input field, because the language was already defined in the originating detect intent request.
Implementations§
Source§impl EventInput
impl EventInput
pub fn new() -> Self
Sourcepub fn set_parameters<T>(self, v: T) -> Self
pub fn set_parameters<T>(self, v: T) -> Self
Sets the value of parameters.
§Example
use wkt::Struct;
let x = EventInput::new().set_parameters(Struct::default()/* use setters */);Sourcepub fn set_or_clear_parameters<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_parameters<T>(self, v: Option<T>) -> Self
Sets or clears the value of parameters.
§Example
use wkt::Struct;
let x = EventInput::new().set_or_clear_parameters(Some(Struct::default()/* use setters */));
let x = EventInput::new().set_or_clear_parameters(None::<Struct>);Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for EventInput
impl Clone for EventInput
Source§fn clone(&self) -> EventInput
fn clone(&self) -> EventInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more