late 0.0.1092

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.
Documentation
/*
 * 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.162.2
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// StorePixelInstall : A tracking tag's install on a connected store: a Shopify web pixel, or a Custom HTML widget on a WordPress site. Fields marked Shopify or WordPress are present only for that platform.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StorePixelInstall {
    #[serde(rename = "storeAccountId", skip_serializing_if = "Option::is_none")]
    pub store_account_id: Option<String>,
    /// The store platform.
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<Platform>,
    /// Platform of the tag this install is about (e.g. `metaads`).
    #[serde(rename = "tagPlatform", skip_serializing_if = "Option::is_none")]
    pub tag_platform: Option<String>,
    /// The id the tag carries on the site (see `TrackingTag.siteTagId`).
    #[serde(rename = "siteTagId", skip_serializing_if = "Option::is_none")]
    pub site_tag_id: Option<String>,
    /// Shopify: this tag is the one the store fires for its platform. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
    #[serde(rename = "installed", skip_serializing_if = "Option::is_none")]
    pub installed: Option<bool>,
    /// Shopify only.
    #[serde(rename = "shopDomain", skip_serializing_if = "Option::is_none")]
    pub shop_domain: Option<String>,
    /// Shopify only: the tag of the same platform the store fires now (may be a different tag), or null.
    #[serde(
        rename = "installedTagId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub installed_tag_id: Option<Option<String>>,
    /// GET only on WordPress, always on Shopify: every Zernio tag on the store, all platforms.
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<models::StorePixelInstallTagsInner>>,
    /// Shopify only: web pixel id, or null when nothing is installed.
    #[serde(
        rename = "webPixelId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub web_pixel_id: Option<Option<String>>,
    /// WordPress only.
    #[serde(rename = "siteUrl", skip_serializing_if = "Option::is_none")]
    pub site_url: Option<String>,
    /// WordPress only.
    #[serde(rename = "method", skip_serializing_if = "Option::is_none")]
    pub method: Option<Method>,
    /// WordPress only: widget id, e.g. `custom_html-3`.
    #[serde(
        rename = "widgetId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub widget_id: Option<Option<String>>,
    /// WordPress only: widget area holding the widget.
    #[serde(
        rename = "sidebarId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sidebar_id: Option<Option<String>>,
}

impl StorePixelInstall {
    /// A tracking tag's install on a connected store: a Shopify web pixel, or a Custom HTML widget on a WordPress site. Fields marked Shopify or WordPress are present only for that platform.
    pub fn new() -> StorePixelInstall {
        StorePixelInstall {
            store_account_id: None,
            platform: None,
            tag_platform: None,
            site_tag_id: None,
            installed: None,
            shop_domain: None,
            installed_tag_id: None,
            tags: None,
            web_pixel_id: None,
            site_url: None,
            method: None,
            widget_id: None,
            sidebar_id: None,
        }
    }
}
/// The store platform.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "shopify")]
    Shopify,
    #[serde(rename = "wordpress")]
    Wordpress,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Shopify
    }
}
/// WordPress only.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Method {
    #[serde(rename = "wordpress_widget")]
    WordpressWidget,
}

impl Default for Method {
    fn default() -> Method {
        Self::WordpressWidget
    }
}