late 0.0.1345

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

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

/// NameOrGoal : Compares without case; a missing name reads as empty.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NameOrGoal {
    /// The object's own name, its campaign's or ad set's name, or the campaign goal (objective) as the platform reports it.
    #[serde(rename = "field")]
    pub field: Field,
    #[serde(rename = "op")]
    pub op: Op,
    #[serde(rename = "value")]
    pub value: String,
}

impl NameOrGoal {
    /// Compares without case; a missing name reads as empty.
    pub fn new(field: Field, op: Op, value: String) -> NameOrGoal {
        NameOrGoal { field, op, value }
    }
}
/// The object's own name, its campaign's or ad set's name, or the campaign goal (objective) as the platform reports it.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Field {
    #[serde(rename = "name")]
    Name,
    #[serde(rename = "campaign_name")]
    CampaignName,
    #[serde(rename = "adset_name")]
    AdsetName,
    #[serde(rename = "goal")]
    Goal,
}

impl Default for Field {
    fn default() -> Field {
        Self::Name
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Op {
    #[serde(rename = "contains")]
    Contains,
    #[serde(rename = "not_contains")]
    NotContains,
    #[serde(rename = "equals")]
    Equals,
    #[serde(rename = "not_equals")]
    NotEquals,
    #[serde(rename = "starts_with")]
    StartsWith,
}

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