#[non_exhaustive]pub struct AnswerRecord {
pub name: String,
pub answer_feedback: Option<AnswerFeedback>,
pub record: Option<Record>,
/* private fields */
}answer-records only.Expand description
Answer records are records to manage answer history and feedbacks for Dialogflow.
Currently, answer record includes:
- human agent assistant article suggestion
- human agent assistant faq article
It doesn’t include:
DetectIntentintent matchingDetectIntentknowledge
Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there’s a human agent assistant suggestion generated.
A typical workflow for customers provide feedback to an answer is:
- For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers.
- The customer uses the AnswerRecord.name to call the AnswerRecords.UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.
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: StringThe unique identifier of this answer record.
Format: projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>.
answer_feedback: Option<AnswerFeedback>Required. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer.
record: Option<Record>The record for this answer.
Implementations§
Source§impl AnswerRecord
impl AnswerRecord
pub fn new() -> Self
Sourcepub fn set_answer_feedback<T>(self, v: T) -> Selfwhere
T: Into<AnswerFeedback>,
pub fn set_answer_feedback<T>(self, v: T) -> Selfwhere
T: Into<AnswerFeedback>,
Sets the value of answer_feedback.
§Example
use google_cloud_dialogflow_v2::model::AnswerFeedback;
let x = AnswerRecord::new().set_answer_feedback(AnswerFeedback::default()/* use setters */);Sourcepub fn set_or_clear_answer_feedback<T>(self, v: Option<T>) -> Selfwhere
T: Into<AnswerFeedback>,
pub fn set_or_clear_answer_feedback<T>(self, v: Option<T>) -> Selfwhere
T: Into<AnswerFeedback>,
Sets or clears the value of answer_feedback.
§Example
use google_cloud_dialogflow_v2::model::AnswerFeedback;
let x = AnswerRecord::new().set_or_clear_answer_feedback(Some(AnswerFeedback::default()/* use setters */));
let x = AnswerRecord::new().set_or_clear_answer_feedback(None::<AnswerFeedback>);Sourcepub fn set_record<T: Into<Option<Record>>>(self, v: T) -> Self
pub fn set_record<T: Into<Option<Record>>>(self, v: T) -> Self
Sets the value of record.
Note that all the setters affecting record are mutually
exclusive.
§Example
use google_cloud_dialogflow_v2::model::AgentAssistantRecord;
let x = AnswerRecord::new().set_record(Some(
google_cloud_dialogflow_v2::model::answer_record::Record::AgentAssistantRecord(AgentAssistantRecord::default().into())));Sourcepub fn agent_assistant_record(&self) -> Option<&Box<AgentAssistantRecord>>
pub fn agent_assistant_record(&self) -> Option<&Box<AgentAssistantRecord>>
The value of record
if it holds a AgentAssistantRecord, None if the field is not set or
holds a different branch.
Sourcepub fn set_agent_assistant_record<T: Into<Box<AgentAssistantRecord>>>(
self,
v: T,
) -> Self
pub fn set_agent_assistant_record<T: Into<Box<AgentAssistantRecord>>>( self, v: T, ) -> Self
Sets the value of record
to hold a AgentAssistantRecord.
Note that all the setters affecting record are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::AgentAssistantRecord;
let x = AnswerRecord::new().set_agent_assistant_record(AgentAssistantRecord::default()/* use setters */);
assert!(x.agent_assistant_record().is_some());Trait Implementations§
Source§impl Clone for AnswerRecord
impl Clone for AnswerRecord
Source§fn clone(&self) -> AnswerRecord
fn clone(&self) -> AnswerRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more