#[non_exhaustive]pub struct QueryInput {
pub input: Option<Input>,
/* private fields */
}sessions only.Expand description
Represents the query input. It can contain either:
-
An audio config which instructs the speech recognizer how to process the speech audio.
-
A conversational query in the form of text.
-
An event that specifies which intent to trigger.
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.input: Option<Input>Required. The input specification.
Implementations§
Source§impl QueryInput
impl QueryInput
pub fn new() -> Self
Sourcepub fn set_input<T: Into<Option<Input>>>(self, v: T) -> Self
pub fn set_input<T: Into<Option<Input>>>(self, v: T) -> Self
Sets the value of input.
Note that all the setters affecting input are mutually
exclusive.
§Example
use google_cloud_dialogflow_v2::model::InputAudioConfig;
let x = QueryInput::new().set_input(Some(
google_cloud_dialogflow_v2::model::query_input::Input::AudioConfig(InputAudioConfig::default().into())));Sourcepub fn audio_config(&self) -> Option<&Box<InputAudioConfig>>
pub fn audio_config(&self) -> Option<&Box<InputAudioConfig>>
The value of input
if it holds a AudioConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_audio_config<T: Into<Box<InputAudioConfig>>>(self, v: T) -> Self
pub fn set_audio_config<T: Into<Box<InputAudioConfig>>>(self, v: T) -> Self
Sets the value of input
to hold a AudioConfig.
Note that all the setters affecting input are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::InputAudioConfig;
let x = QueryInput::new().set_audio_config(InputAudioConfig::default()/* use setters */);
assert!(x.audio_config().is_some());
assert!(x.text().is_none());
assert!(x.event().is_none());Sourcepub fn text(&self) -> Option<&Box<TextInput>>
pub fn text(&self) -> Option<&Box<TextInput>>
The value of input
if it holds a Text, None if the field is not set or
holds a different branch.
Sourcepub fn set_text<T: Into<Box<TextInput>>>(self, v: T) -> Self
pub fn set_text<T: Into<Box<TextInput>>>(self, v: T) -> Self
Sets the value of input
to hold a Text.
Note that all the setters affecting input are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::TextInput;
let x = QueryInput::new().set_text(TextInput::default()/* use setters */);
assert!(x.text().is_some());
assert!(x.audio_config().is_none());
assert!(x.event().is_none());Sourcepub fn event(&self) -> Option<&Box<EventInput>>
pub fn event(&self) -> Option<&Box<EventInput>>
The value of input
if it holds a Event, None if the field is not set or
holds a different branch.
Sourcepub fn set_event<T: Into<Box<EventInput>>>(self, v: T) -> Self
pub fn set_event<T: Into<Box<EventInput>>>(self, v: T) -> Self
Sets the value of input
to hold a Event.
Note that all the setters affecting input are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::EventInput;
let x = QueryInput::new().set_event(EventInput::default()/* use setters */);
assert!(x.event().is_some());
assert!(x.audio_config().is_none());
assert!(x.text().is_none());Trait Implementations§
Source§impl Clone for QueryInput
impl Clone for QueryInput
Source§fn clone(&self) -> QueryInput
fn clone(&self) -> QueryInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more