#[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
pub fn new() -> Self
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more