#[non_exhaustive]pub struct GeneratorSuggestion {
pub suggestion: Option<Suggestion>,
/* private fields */
}Available on crate features
conversations or generators or participants only.Expand description
Suggestion generated using a Generator.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.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_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());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());Trait Implementations§
Source§impl Clone for GeneratorSuggestion
impl Clone for GeneratorSuggestion
Source§fn clone(&self) -> GeneratorSuggestion
fn clone(&self) -> GeneratorSuggestion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Returns the “default value” for a type. Read more
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 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
Mutably borrows from an owned value. Read more