#[non_exhaustive]pub struct LifecycleHandler {
pub lifecycle_stage: String,
pub condition: String,
pub fulfillment: Option<Fulfillment>,
/* private fields */
}Available on crate feature
playbooks only.Expand description
A handler that is triggered on the specific lifecycle_stage of the playbook execution.
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.lifecycle_stage: StringRequired. The name of the lifecycle stage that triggers this handler. Supported values:
playbook-startpre-action-selectionpre-action-execution
condition: StringOptional. The condition that must be satisfied to trigger this handler.
fulfillment: Option<Fulfillment>Required. The fulfillment to call when this handler is triggered.
Implementations§
Source§impl LifecycleHandler
impl LifecycleHandler
Sourcepub fn set_lifecycle_stage<T: Into<String>>(self, v: T) -> Self
pub fn set_lifecycle_stage<T: Into<String>>(self, v: T) -> Self
Sets the value of lifecycle_stage.
§Example
ⓘ
let x = LifecycleHandler::new().set_lifecycle_stage("example");Sourcepub fn set_condition<T: Into<String>>(self, v: T) -> Self
pub fn set_condition<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_fulfillment<T>(self, v: T) -> Selfwhere
T: Into<Fulfillment>,
pub fn set_fulfillment<T>(self, v: T) -> Selfwhere
T: Into<Fulfillment>,
Sets the value of fulfillment.
§Example
ⓘ
use google_cloud_dialogflow_cx_v3::model::Fulfillment;
let x = LifecycleHandler::new().set_fulfillment(Fulfillment::default()/* use setters */);Sourcepub fn set_or_clear_fulfillment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Fulfillment>,
pub fn set_or_clear_fulfillment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Fulfillment>,
Sets or clears the value of fulfillment.
§Example
ⓘ
use google_cloud_dialogflow_cx_v3::model::Fulfillment;
let x = LifecycleHandler::new().set_or_clear_fulfillment(Some(Fulfillment::default()/* use setters */));
let x = LifecycleHandler::new().set_or_clear_fulfillment(None::<Fulfillment>);Trait Implementations§
Source§impl Clone for LifecycleHandler
impl Clone for LifecycleHandler
Source§fn clone(&self) -> LifecycleHandler
fn clone(&self) -> LifecycleHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LifecycleHandler
impl Debug for LifecycleHandler
Source§impl Default for LifecycleHandler
impl Default for LifecycleHandler
Source§fn default() -> LifecycleHandler
fn default() -> LifecycleHandler
Returns the “default value” for a type. Read more
Source§impl Message for LifecycleHandler
impl Message for LifecycleHandler
Source§impl PartialEq for LifecycleHandler
impl PartialEq for LifecycleHandler
Source§fn eq(&self, other: &LifecycleHandler) -> bool
fn eq(&self, other: &LifecycleHandler) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LifecycleHandler
Auto Trait Implementations§
impl Freeze for LifecycleHandler
impl RefUnwindSafe for LifecycleHandler
impl Send for LifecycleHandler
impl Sync for LifecycleHandler
impl Unpin for LifecycleHandler
impl UnsafeUnpin for LifecycleHandler
impl UnwindSafe for LifecycleHandler
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