#[non_exhaustive]pub struct Action {
pub observation: Option<Observation>,
pub action: Option<Action>,
/* private fields */
}Available on crate features
conversational-search-service or session-service only.Expand description
Action.
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.observation: Option<Observation>Observation.
action: Option<Action>The action.
Implementations§
Source§impl Action
impl Action
pub fn new() -> Self
Sourcepub fn set_observation<T>(self, v: T) -> Selfwhere
T: Into<Observation>,
pub fn set_observation<T>(self, v: T) -> Selfwhere
T: Into<Observation>,
Sets the value of observation.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer::step::action::Observation;
let x = Action::new().set_observation(Observation::default()/* use setters */);Sourcepub fn set_or_clear_observation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Observation>,
pub fn set_or_clear_observation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Observation>,
Sets or clears the value of observation.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer::step::action::Observation;
let x = Action::new().set_or_clear_observation(Some(Observation::default()/* use setters */));
let x = Action::new().set_or_clear_observation(None::<Observation>);Sourcepub fn set_action<T: Into<Option<Action>>>(self, v: T) -> Self
pub fn set_action<T: Into<Option<Action>>>(self, v: T) -> Self
Sets the value of action.
Note that all the setters affecting action are mutually
exclusive.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer::step::action::SearchAction;
let x = Action::new().set_action(Some(
google_cloud_discoveryengine_v1::model::answer::step::action::Action::SearchAction(SearchAction::default().into())));Sourcepub fn search_action(&self) -> Option<&Box<SearchAction>>
pub fn search_action(&self) -> Option<&Box<SearchAction>>
The value of action
if it holds a SearchAction, None if the field is not set or
holds a different branch.
Sourcepub fn set_search_action<T: Into<Box<SearchAction>>>(self, v: T) -> Self
pub fn set_search_action<T: Into<Box<SearchAction>>>(self, v: T) -> Self
Sets the value of action
to hold a SearchAction.
Note that all the setters affecting action are
mutually exclusive.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer::step::action::SearchAction;
let x = Action::new().set_search_action(SearchAction::default()/* use setters */);
assert!(x.search_action().is_some());Trait Implementations§
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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