#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnswerRecord
impl Debug for AnswerRecord
Source§impl Default for AnswerRecord
impl Default for AnswerRecord
Source§fn default() -> AnswerRecord
fn default() -> AnswerRecord
Source§impl Message for AnswerRecord
impl Message for AnswerRecord
Source§impl PartialEq for AnswerRecord
impl PartialEq for AnswerRecord
impl StructuralPartialEq for AnswerRecord
Auto Trait Implementations§
impl Freeze for AnswerRecord
impl RefUnwindSafe for AnswerRecord
impl Send for AnswerRecord
impl Sync for AnswerRecord
impl Unpin for AnswerRecord
impl UnsafeUnpin for AnswerRecord
impl UnwindSafe for AnswerRecord
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