1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProductEvent {
/// DistinctID is the person/visitor the event is attributed to.
#[serde(rename = "distinctId", skip_serializing_if = "Option::is_none")]
pub distinct_id: Option<String>,
/// Event is the event name, e.g. page_viewed or signup_completed.
#[serde(rename = "event", skip_serializing_if = "Option::is_none")]
pub event: Option<String>,
/// ID is the row's stable event id — the client's own idempotency id when it sent one, else the server-minted one.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Path is the URL's path component, the key the topPages lens groups by.
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Product is the surface that emitted the event. Omitted when absent.
#[serde(rename = "product", skip_serializing_if = "Option::is_none")]
pub product: Option<String>,
#[serde(rename = "properties", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub properties: Option<Option<serde_json::Value>>,
/// SessionID groups the events of one visit. Omitted when the client sent none.
#[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
pub session_id: Option<String>,
/// Timestamp is when the event happened, RFC3339 UTC.
#[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
pub timestamp: Option<String>,
/// Type is the row's kind — the plane's discriminator: page, track, identify or group. (Errors are not here at all: they land on event.error and are read at /v1/event/errors.)
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
/// URL is the full page address the event fired on. Omitted when absent.
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl ProductEvent {
pub fn new() -> ProductEvent {
ProductEvent {
distinct_id: None,
event: None,
id: None,
path: None,
product: None,
properties: None,
session_id: None,
timestamp: None,
r#type: None,
url: None,
}
}
}