hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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,
        }
    }
}