#[non_exhaustive]pub struct WriteUserEventRequest {
pub parent: String,
pub user_event: Option<UserEvent>,
pub write_async: bool,
/* private fields */
}Available on crate feature
user-event-service only.Expand description
Request message for WriteUserEvent method.
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.parent: StringRequired. The parent resource name.
If the write user event action is applied in
DataStore level, the format
is:
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}.
If the write user event action is applied in
Location level, for example, the event
with Document across multiple
DataStore, the format is:
projects/{project}/locations/{location}.
user_event: Option<UserEvent>Required. User event to write.
write_async: boolIf set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.
Implementations§
Source§impl WriteUserEventRequest
impl WriteUserEventRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_user_event<T>(self, v: T) -> Self
pub fn set_user_event<T>(self, v: T) -> Self
Sets the value of user_event.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::UserEvent;
let x = WriteUserEventRequest::new().set_user_event(UserEvent::default()/* use setters */);Sourcepub fn set_or_clear_user_event<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_user_event<T>(self, v: Option<T>) -> Self
Sets or clears the value of user_event.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::UserEvent;
let x = WriteUserEventRequest::new().set_or_clear_user_event(Some(UserEvent::default()/* use setters */));
let x = WriteUserEventRequest::new().set_or_clear_user_event(None::<UserEvent>);Sourcepub fn set_write_async<T: Into<bool>>(self, v: T) -> Self
pub fn set_write_async<T: Into<bool>>(self, v: T) -> Self
Sets the value of write_async.
§Example
ⓘ
let x = WriteUserEventRequest::new().set_write_async(true);Trait Implementations§
Source§impl Clone for WriteUserEventRequest
impl Clone for WriteUserEventRequest
Source§fn clone(&self) -> WriteUserEventRequest
fn clone(&self) -> WriteUserEventRequest
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 WriteUserEventRequest
impl Debug for WriteUserEventRequest
Source§impl Default for WriteUserEventRequest
impl Default for WriteUserEventRequest
Source§fn default() -> WriteUserEventRequest
fn default() -> WriteUserEventRequest
Returns the “default value” for a type. Read more
Source§impl Message for WriteUserEventRequest
impl Message for WriteUserEventRequest
Source§impl PartialEq for WriteUserEventRequest
impl PartialEq for WriteUserEventRequest
impl StructuralPartialEq for WriteUserEventRequest
Auto Trait Implementations§
impl Freeze for WriteUserEventRequest
impl RefUnwindSafe for WriteUserEventRequest
impl Send for WriteUserEventRequest
impl Sync for WriteUserEventRequest
impl Unpin for WriteUserEventRequest
impl UnwindSafe for WriteUserEventRequest
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