/*
* 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.619.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 TrackingSite {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "profileId", skip_serializing_if = "Option::is_none")]
pub profile_id: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<Status>,
#[serde(rename = "install", skip_serializing_if = "Option::is_none")]
pub install: Option<Box<models::TrackingSiteInstall>>,
/// True when the store's orders reach Zernio from the store itself, so website purchases are forwarded but not counted twice.
#[serde(rename = "storeOrders", skip_serializing_if = "Option::is_none")]
pub store_orders: Option<bool>,
/// Public key that names the site in the snippet, such as `zs_...`.
#[serde(rename = "siteKey", skip_serializing_if = "Option::is_none")]
pub site_key: Option<String>,
#[serde(rename = "domains", skip_serializing_if = "Option::is_none")]
pub domains: Option<Vec<String>>,
#[serde(rename = "customHostname", skip_serializing_if = "Option::is_none")]
pub custom_hostname: Option<Box<models::TrackingSiteCustomHostname>>,
#[serde(rename = "consentMode", skip_serializing_if = "Option::is_none")]
pub consent_mode: Option<models::TrackingSiteConsentMode>,
/// One per setup step: `script` for the install, then one per ad account the site sends to, keyed by its platform and ids.
#[serde(rename = "checks", skip_serializing_if = "Option::is_none")]
pub checks: Option<Vec<models::TrackingSiteChecksInner>>,
#[serde(rename = "setup", skip_serializing_if = "Option::is_none")]
pub setup: Option<Box<models::TrackingSiteSetup>>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl TrackingSite {
pub fn new() -> TrackingSite {
TrackingSite {
id: None,
profile_id: None,
name: None,
status: None,
install: None,
store_orders: None,
site_key: None,
domains: None,
custom_hostname: None,
consent_mode: None,
checks: None,
setup: None,
created_at: None,
updated_at: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "active")]
Active,
#[serde(rename = "paused")]
Paused,
#[serde(rename = "removing")]
Removing,
}
impl Default for Status {
fn default() -> Status {
Self::Active
}
}