/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.587.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StoredEvent {
#[serde(rename = "eventId", skip_serializing_if = "Option::is_none")]
pub event_id: Option<String>,
/// Where the event came from: `api`, `relay`, `web`, `shopify`, `woocommerce`, `hubspot`, `meta_leads`, `google_leads`, `linkedin_leads` or `tiktok_leads`.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
#[serde(rename = "eventName", skip_serializing_if = "Option::is_none")]
pub event_name: Option<String>,
#[serde(rename = "eventTime", skip_serializing_if = "Option::is_none")]
pub event_time: Option<String>,
#[serde(rename = "receivedAt", skip_serializing_if = "Option::is_none")]
pub received_at: Option<String>,
#[serde(
rename = "actionSource",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub action_source: Option<Option<String>>,
#[serde(
rename = "value",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub value: Option<Option<f64>>,
#[serde(
rename = "currency",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub currency: Option<Option<String>>,
/// Origin, path and attribution parameters only.
#[serde(
rename = "sourceUrl",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub source_url: Option<Option<String>>,
#[serde(rename = "utm", skip_serializing_if = "Option::is_none")]
pub utm: Option<Box<models::StoredEventUtm>>,
/// Ad ID from the `zrn` parameter Zernio adds to links of ads it creates.
#[serde(
rename = "zrn",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub zrn: Option<Option<String>>,
#[serde(rename = "clickIds", skip_serializing_if = "Option::is_none")]
pub click_ids: Option<Box<models::StoredEventClickIds>>,
/// Destinations the event was forwarded to.
#[serde(rename = "destinationsSent", skip_serializing_if = "Option::is_none")]
pub destinations_sent: Option<i32>,
#[serde(rename = "hasEmail", skip_serializing_if = "Option::is_none")]
pub has_email: Option<bool>,
#[serde(rename = "hasPhone", skip_serializing_if = "Option::is_none")]
pub has_phone: Option<bool>,
#[serde(rename = "hasExternalId", skip_serializing_if = "Option::is_none")]
pub has_external_id: Option<bool>,
#[serde(rename = "ad", skip_serializing_if = "Option::is_none")]
pub ad: Option<Box<models::StoredEventAd>>,
}
impl StoredEvent {
pub fn new() -> StoredEvent {
StoredEvent {
event_id: None,
source: None,
event_name: None,
event_time: None,
received_at: None,
action_source: None,
value: None,
currency: None,
source_url: None,
utm: None,
zrn: None,
click_ids: None,
destinations_sent: None,
has_email: None,
has_phone: None,
has_external_id: None,
ad: None,
}
}
}