#[non_exhaustive]pub struct DetectIntentResponse {
pub response_id: String,
pub query_result: Option<QueryResult>,
pub webhook_status: Option<Status>,
pub output_audio: Bytes,
pub output_audio_config: Option<OutputAudioConfig>,
/* private fields */
}participants or sessions only.Expand description
The message returned from the [DetectIntent][] method.
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.response_id: StringThe unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
query_result: Option<QueryResult>The selected results of the conversational query or event processing.
See alternative_query_results for additional potential results.
webhook_status: Option<Status>Specifies the status of the webhook request.
output_audio: BytesThe audio data bytes encoded as specified in the request.
Note: The output audio is generated based on the values of default platform
text responses found in the query_result.fulfillment_messages field. If
multiple default text responses exist, they will be concatenated when
generating audio. If no default platform text responses exist, the
generated audio content will be empty.
In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
output_audio_config: Option<OutputAudioConfig>The config used by the speech synthesizer to generate the output audio.
Implementations§
Source§impl DetectIntentResponse
impl DetectIntentResponse
Sourcepub fn set_response_id<T: Into<String>>(self, v: T) -> Self
pub fn set_response_id<T: Into<String>>(self, v: T) -> Self
Sets the value of response_id.
§Example
let x = DetectIntentResponse::new().set_response_id("example");Sourcepub fn set_query_result<T>(self, v: T) -> Selfwhere
T: Into<QueryResult>,
pub fn set_query_result<T>(self, v: T) -> Selfwhere
T: Into<QueryResult>,
Sets the value of query_result.
§Example
use google_cloud_dialogflow_v2::model::QueryResult;
let x = DetectIntentResponse::new().set_query_result(QueryResult::default()/* use setters */);Sourcepub fn set_or_clear_query_result<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryResult>,
pub fn set_or_clear_query_result<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryResult>,
Sets or clears the value of query_result.
§Example
use google_cloud_dialogflow_v2::model::QueryResult;
let x = DetectIntentResponse::new().set_or_clear_query_result(Some(QueryResult::default()/* use setters */));
let x = DetectIntentResponse::new().set_or_clear_query_result(None::<QueryResult>);Sourcepub fn set_webhook_status<T>(self, v: T) -> Self
pub fn set_webhook_status<T>(self, v: T) -> Self
Sets the value of webhook_status.
§Example
use google_cloud_rpc::model::Status;
let x = DetectIntentResponse::new().set_webhook_status(Status::default()/* use setters */);Sourcepub fn set_or_clear_webhook_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_webhook_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of webhook_status.
§Example
use google_cloud_rpc::model::Status;
let x = DetectIntentResponse::new().set_or_clear_webhook_status(Some(Status::default()/* use setters */));
let x = DetectIntentResponse::new().set_or_clear_webhook_status(None::<Status>);Sourcepub fn set_output_audio<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_output_audio<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of output_audio.
§Example
let x = DetectIntentResponse::new().set_output_audio(bytes::Bytes::from_static(b"example"));Sourcepub fn set_output_audio_config<T>(self, v: T) -> Selfwhere
T: Into<OutputAudioConfig>,
pub fn set_output_audio_config<T>(self, v: T) -> Selfwhere
T: Into<OutputAudioConfig>,
Sets the value of output_audio_config.
§Example
use google_cloud_dialogflow_v2::model::OutputAudioConfig;
let x = DetectIntentResponse::new().set_output_audio_config(OutputAudioConfig::default()/* use setters */);Sourcepub fn set_or_clear_output_audio_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<OutputAudioConfig>,
pub fn set_or_clear_output_audio_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<OutputAudioConfig>,
Sets or clears the value of output_audio_config.
§Example
use google_cloud_dialogflow_v2::model::OutputAudioConfig;
let x = DetectIntentResponse::new().set_or_clear_output_audio_config(Some(OutputAudioConfig::default()/* use setters */));
let x = DetectIntentResponse::new().set_or_clear_output_audio_config(None::<OutputAudioConfig>);Trait Implementations§
Source§impl Clone for DetectIntentResponse
impl Clone for DetectIntentResponse
Source§fn clone(&self) -> DetectIntentResponse
fn clone(&self) -> DetectIntentResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DetectIntentResponse
impl Debug for DetectIntentResponse
Source§impl Default for DetectIntentResponse
impl Default for DetectIntentResponse
Source§fn default() -> DetectIntentResponse
fn default() -> DetectIntentResponse
Source§impl Message for DetectIntentResponse
impl Message for DetectIntentResponse
Source§impl PartialEq for DetectIntentResponse
impl PartialEq for DetectIntentResponse
impl StructuralPartialEq for DetectIntentResponse
Auto Trait Implementations§
impl !Freeze for DetectIntentResponse
impl RefUnwindSafe for DetectIntentResponse
impl Send for DetectIntentResponse
impl Sync for DetectIntentResponse
impl Unpin for DetectIntentResponse
impl UnsafeUnpin for DetectIntentResponse
impl UnwindSafe for DetectIntentResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request