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