#[non_exhaustive]pub struct WriteUserEventRequest {
pub parent: String,
pub user_event: Option<UserEvent>,
pub write_async: bool,
/* private fields */
}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 catalog resource name, such as
projects/1234/locations/global/catalogs/default_catalog.
user_event: Option<UserEvent>Required. User event to write.
write_async: boolIf set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.
Implementations§
Source§impl WriteUserEventRequest
impl WriteUserEventRequest
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_retail_v2::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_retail_v2::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 UnsafeUnpin 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