#[non_exhaustive]pub struct CollectUserEventRequest {
pub parent: String,
pub user_event: String,
pub uri: String,
pub ets: i64,
pub raw_json: String,
pub conversion_rule: Option<ConversionRule>,
/* private fields */
}Expand description
Request message for CollectUserEvent method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The parent catalog name, such as
projects/1234/locations/global/catalogs/default_catalog.
user_event: StringRequired. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
uri: StringThe URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.
ets: i64The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
raw_json: StringAn arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.
conversion_rule: Option<ConversionRule>The rule that can convert the raw_json to a user event. It is needed only when the raw_json is set.
Implementations§
Source§impl CollectUserEventRequest
impl CollectUserEventRequest
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: Into<String>>(self, v: T) -> Self
pub fn set_user_event<T: Into<String>>(self, v: T) -> Self
Sets the value of user_event.
§Example
let x = CollectUserEventRequest::new().set_user_event("example");Sourcepub fn set_raw_json<T: Into<String>>(self, v: T) -> Self
pub fn set_raw_json<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_conversion_rule<T: Into<Option<ConversionRule>>>(self, v: T) -> Self
pub fn set_conversion_rule<T: Into<Option<ConversionRule>>>(self, v: T) -> Self
Sets the value of conversion_rule.
Note that all the setters affecting conversion_rule are mutually
exclusive.
§Example
use google_cloud_retail_v2::model::collect_user_event_request::ConversionRule;
let x = CollectUserEventRequest::new().set_conversion_rule(Some(ConversionRule::PrebuiltRule("example".to_string())));Sourcepub fn prebuilt_rule(&self) -> Option<&String>
pub fn prebuilt_rule(&self) -> Option<&String>
The value of conversion_rule
if it holds a PrebuiltRule, None if the field is not set or
holds a different branch.
Sourcepub fn set_prebuilt_rule<T: Into<String>>(self, v: T) -> Self
pub fn set_prebuilt_rule<T: Into<String>>(self, v: T) -> Self
Sets the value of conversion_rule
to hold a PrebuiltRule.
Note that all the setters affecting conversion_rule are
mutually exclusive.
§Example
let x = CollectUserEventRequest::new().set_prebuilt_rule("example");
assert!(x.prebuilt_rule().is_some());Trait Implementations§
Source§impl Clone for CollectUserEventRequest
impl Clone for CollectUserEventRequest
Source§fn clone(&self) -> CollectUserEventRequest
fn clone(&self) -> CollectUserEventRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more