late 0.0.1349

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

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

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum AdRuleConditionItem {
    AdRuleCondition(Box<models::AdRuleCondition>),
    AdRuleConditions(Box<models::AdRuleConditions>),
}

impl Default for AdRuleConditionItem {
    fn default() -> Self {
        Self::AdRuleCondition(Default::default())
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Metric {
    #[serde(rename = "spend")]
    Spend,
    #[serde(rename = "impressions")]
    Impressions,
    #[serde(rename = "clicks")]
    Clicks,
    #[serde(rename = "conversions")]
    Conversions,
    #[serde(rename = "ctr")]
    Ctr,
    #[serde(rename = "cpc")]
    Cpc,
    #[serde(rename = "cpm")]
    Cpm,
    #[serde(rename = "cpa")]
    Cpa,
    #[serde(rename = "roas")]
    Roas,
    #[serde(rename = "reach")]
    Reach,
    #[serde(rename = "frequency")]
    Frequency,
    #[serde(rename = "daily_budget")]
    DailyBudget,
    #[serde(rename = "budget_used")]
    BudgetUsed,
    #[serde(rename = "day_of_month")]
    DayOfMonth,
    #[serde(rename = "working_day_of_month")]
    WorkingDayOfMonth,
}

impl Default for Metric {
    fn default() -> Metric {
        Self::Spend
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Window {
    #[serde(rename = "today")]
    Today,
    #[serde(rename = "yesterday")]
    Yesterday,
    #[serde(rename = "last_3d")]
    Last3d,
    #[serde(rename = "last_7d")]
    Last7d,
    #[serde(rename = "last_14d")]
    Last14d,
    #[serde(rename = "last_30d")]
    Last30d,
    #[serde(rename = "this_month")]
    ThisMonth,
    #[serde(rename = "last_month")]
    LastMonth,
}

impl Default for Window {
    fn default() -> Window {
        Self::Today
    }
}
/// `top` and `bottom` rank the rule's objects by the metric over the window, highest first for `top`, and match the first `value` (a whole number from 1 to 100). Objects with no value are not ranked; the run history shows each one's position.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Op {
    #[serde(rename = ">")]
    GreaterThan,
    #[serde(rename = ">=")]
    GreaterThanEqual,
    #[serde(rename = "<")]
    LessThan,
    #[serde(rename = "<=")]
    LessThanEqual,
    #[serde(rename = "top")]
    Top,
    #[serde(rename = "bottom")]
    Bottom,
}

impl Default for Op {
    fn default() -> Op {
        Self::GreaterThan
    }
}