#[non_exhaustive]pub struct GeneratorSuggestion {
pub tool_call_info: Vec<ToolCallInfo>,
pub suggestion: Option<Suggestion>,
/* private fields */
}answer-records or conversations or generator-evaluations or generators or participants only.Expand description
Suggestion generated using a Generator.
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.tool_call_info: Vec<ToolCallInfo>Optional. List of request and response for tool calls executed.
suggestion: Option<Suggestion>The suggestion could be one of the many types
Implementations§
Source§impl GeneratorSuggestion
impl GeneratorSuggestion
pub fn new() -> Self
Sourcepub fn set_tool_call_info<T, V>(self, v: T) -> Self
pub fn set_tool_call_info<T, V>(self, v: T) -> Self
Sets the value of tool_call_info.
§Example
use google_cloud_dialogflow_v2::model::generator_suggestion::ToolCallInfo;
let x = GeneratorSuggestion::new()
.set_tool_call_info([
ToolCallInfo::default()/* use setters */,
ToolCallInfo::default()/* use (different) setters */,
]);Sourcepub fn set_suggestion<T: Into<Option<Suggestion>>>(self, v: T) -> Self
pub fn set_suggestion<T: Into<Option<Suggestion>>>(self, v: T) -> Self
Sets the value of suggestion.
Note that all the setters affecting suggestion are mutually
exclusive.
§Example
use google_cloud_dialogflow_v2::model::FreeFormSuggestion;
let x = GeneratorSuggestion::new().set_suggestion(Some(
google_cloud_dialogflow_v2::model::generator_suggestion::Suggestion::FreeFormSuggestion(FreeFormSuggestion::default().into())));Sourcepub fn free_form_suggestion(&self) -> Option<&Box<FreeFormSuggestion>>
pub fn free_form_suggestion(&self) -> Option<&Box<FreeFormSuggestion>>
The value of suggestion
if it holds a FreeFormSuggestion, None if the field is not set or
holds a different branch.
Sourcepub fn set_free_form_suggestion<T: Into<Box<FreeFormSuggestion>>>(
self,
v: T,
) -> Self
pub fn set_free_form_suggestion<T: Into<Box<FreeFormSuggestion>>>( self, v: T, ) -> Self
Sets the value of suggestion
to hold a FreeFormSuggestion.
Note that all the setters affecting suggestion are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::FreeFormSuggestion;
let x = GeneratorSuggestion::new().set_free_form_suggestion(FreeFormSuggestion::default()/* use setters */);
assert!(x.free_form_suggestion().is_some());
assert!(x.summary_suggestion().is_none());
assert!(x.agent_coaching_suggestion().is_none());Sourcepub fn summary_suggestion(&self) -> Option<&Box<SummarySuggestion>>
pub fn summary_suggestion(&self) -> Option<&Box<SummarySuggestion>>
The value of suggestion
if it holds a SummarySuggestion, None if the field is not set or
holds a different branch.
Sourcepub fn set_summary_suggestion<T: Into<Box<SummarySuggestion>>>(
self,
v: T,
) -> Self
pub fn set_summary_suggestion<T: Into<Box<SummarySuggestion>>>( self, v: T, ) -> Self
Sets the value of suggestion
to hold a SummarySuggestion.
Note that all the setters affecting suggestion are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::SummarySuggestion;
let x = GeneratorSuggestion::new().set_summary_suggestion(SummarySuggestion::default()/* use setters */);
assert!(x.summary_suggestion().is_some());
assert!(x.free_form_suggestion().is_none());
assert!(x.agent_coaching_suggestion().is_none());Sourcepub fn agent_coaching_suggestion(&self) -> Option<&Box<AgentCoachingSuggestion>>
pub fn agent_coaching_suggestion(&self) -> Option<&Box<AgentCoachingSuggestion>>
The value of suggestion
if it holds a AgentCoachingSuggestion, None if the field is not set or
holds a different branch.
Sourcepub fn set_agent_coaching_suggestion<T: Into<Box<AgentCoachingSuggestion>>>(
self,
v: T,
) -> Self
pub fn set_agent_coaching_suggestion<T: Into<Box<AgentCoachingSuggestion>>>( self, v: T, ) -> Self
Sets the value of suggestion
to hold a AgentCoachingSuggestion.
Note that all the setters affecting suggestion are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::AgentCoachingSuggestion;
let x = GeneratorSuggestion::new().set_agent_coaching_suggestion(AgentCoachingSuggestion::default()/* use setters */);
assert!(x.agent_coaching_suggestion().is_some());
assert!(x.free_form_suggestion().is_none());
assert!(x.summary_suggestion().is_none());Trait Implementations§
Source§impl Clone for GeneratorSuggestion
impl Clone for GeneratorSuggestion
Source§fn clone(&self) -> GeneratorSuggestion
fn clone(&self) -> GeneratorSuggestion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more