#[non_exhaustive]pub struct DialogflowAssistAnswer {
pub answer_record: String,
pub result: Option<Result>,
/* private fields */
}answer-records only.Expand description
Represents a Dialogflow assist answer.
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.answer_record: StringThe name of answer record, in the format of “projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>”
result: Option<Result>Result from DetectIntent for one matched intent.
Implementations§
Source§impl DialogflowAssistAnswer
impl DialogflowAssistAnswer
Sourcepub fn set_answer_record<T: Into<String>>(self, v: T) -> Self
pub fn set_answer_record<T: Into<String>>(self, v: T) -> Self
Sets the value of answer_record.
§Example
let x = DialogflowAssistAnswer::new().set_answer_record("example");Sourcepub fn set_result<T: Into<Option<Result>>>(self, v: T) -> Self
pub fn set_result<T: Into<Option<Result>>>(self, v: T) -> Self
Sets the value of result.
Note that all the setters affecting result are mutually
exclusive.
§Example
use google_cloud_dialogflow_v2::model::QueryResult;
let x = DialogflowAssistAnswer::new().set_result(Some(
google_cloud_dialogflow_v2::model::dialogflow_assist_answer::Result::QueryResult(QueryResult::default().into())));Sourcepub fn query_result(&self) -> Option<&Box<QueryResult>>
pub fn query_result(&self) -> Option<&Box<QueryResult>>
The value of result
if it holds a QueryResult, None if the field is not set or
holds a different branch.
Sourcepub fn set_query_result<T: Into<Box<QueryResult>>>(self, v: T) -> Self
pub fn set_query_result<T: Into<Box<QueryResult>>>(self, v: T) -> Self
Sets the value of result
to hold a QueryResult.
Note that all the setters affecting result are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::QueryResult;
let x = DialogflowAssistAnswer::new().set_query_result(QueryResult::default()/* use setters */);
assert!(x.query_result().is_some());
assert!(x.intent_suggestion().is_none());Sourcepub fn intent_suggestion(&self) -> Option<&Box<IntentSuggestion>>
pub fn intent_suggestion(&self) -> Option<&Box<IntentSuggestion>>
The value of result
if it holds a IntentSuggestion, None if the field is not set or
holds a different branch.
Sourcepub fn set_intent_suggestion<T: Into<Box<IntentSuggestion>>>(self, v: T) -> Self
pub fn set_intent_suggestion<T: Into<Box<IntentSuggestion>>>(self, v: T) -> Self
Sets the value of result
to hold a IntentSuggestion.
Note that all the setters affecting result are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::IntentSuggestion;
let x = DialogflowAssistAnswer::new().set_intent_suggestion(IntentSuggestion::default()/* use setters */);
assert!(x.intent_suggestion().is_some());
assert!(x.query_result().is_none());Trait Implementations§
Source§impl Clone for DialogflowAssistAnswer
impl Clone for DialogflowAssistAnswer
Source§fn clone(&self) -> DialogflowAssistAnswer
fn clone(&self) -> DialogflowAssistAnswer
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 DialogflowAssistAnswer
impl Debug for DialogflowAssistAnswer
Source§impl Default for DialogflowAssistAnswer
impl Default for DialogflowAssistAnswer
Source§fn default() -> DialogflowAssistAnswer
fn default() -> DialogflowAssistAnswer
Source§impl Message for DialogflowAssistAnswer
impl Message for DialogflowAssistAnswer
Source§impl PartialEq for DialogflowAssistAnswer
impl PartialEq for DialogflowAssistAnswer
impl StructuralPartialEq for DialogflowAssistAnswer
Auto Trait Implementations§
impl Freeze for DialogflowAssistAnswer
impl RefUnwindSafe for DialogflowAssistAnswer
impl Send for DialogflowAssistAnswer
impl Sync for DialogflowAssistAnswer
impl Unpin for DialogflowAssistAnswer
impl UnsafeUnpin for DialogflowAssistAnswer
impl UnwindSafe for DialogflowAssistAnswer
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