late 0.0.1313

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

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

/// UpdateCreatorCampaignRequest : Every field is optional; send at least one. `economics` can only change while the campaign is a draft.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateCreatorCampaignRequest {
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "brandName", skip_serializing_if = "Option::is_none")]
    pub brand_name: Option<String>,
    #[serde(rename = "platforms", skip_serializing_if = "Option::is_none")]
    pub platforms: Option<Vec<Platforms>>,
    #[serde(
        rename = "contentRules",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub content_rules: Option<Option<String>>,
    #[serde(
        rename = "startsAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub starts_at: Option<Option<String>>,
    #[serde(
        rename = "endsAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub ends_at: Option<Option<String>>,
    #[serde(rename = "trackingDays", skip_serializing_if = "Option::is_none")]
    pub tracking_days: Option<i32>,
    #[serde(rename = "holdDays", skip_serializing_if = "Option::is_none")]
    pub hold_days: Option<i32>,
    /// Null removes the limit.
    #[serde(
        rename = "maxPostAgeMinutes",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_post_age_minutes: Option<Option<i32>>,
    #[serde(rename = "settlement", skip_serializing_if = "Option::is_none")]
    pub settlement: Option<Settlement>,
    #[serde(rename = "economics", skip_serializing_if = "Option::is_none")]
    pub economics: Option<Box<models::CreatorCampaignEconomics>>,
    #[serde(rename = "caps", skip_serializing_if = "Option::is_none")]
    pub caps: Option<Box<models::CreatorCampaignCaps>>,
    #[serde(
        rename = "branding",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub branding: Option<Option<Box<models::CreatorCampaignBranding>>>,
}

impl UpdateCreatorCampaignRequest {
    /// Every field is optional; send at least one. `economics` can only change while the campaign is a draft.
    pub fn new() -> UpdateCreatorCampaignRequest {
        UpdateCreatorCampaignRequest {
            name: None,
            brand_name: None,
            platforms: None,
            content_rules: None,
            starts_at: None,
            ends_at: None,
            tracking_days: None,
            hold_days: None,
            max_post_age_minutes: None,
            settlement: None,
            economics: None,
            caps: None,
            branding: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platforms {
    #[serde(rename = "tiktok")]
    Tiktok,
    #[serde(rename = "instagram")]
    Instagram,
    #[serde(rename = "youtube")]
    Youtube,
    #[serde(rename = "threads")]
    Threads,
    #[serde(rename = "pinterest")]
    Pinterest,
    #[serde(rename = "facebook")]
    Facebook,
    #[serde(rename = "twitter")]
    Twitter,
}

impl Default for Platforms {
    fn default() -> Platforms {
        Self::Tiktok
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Settlement {
    #[serde(rename = "none")]
    None,
    #[serde(rename = "external")]
    External,
    #[serde(rename = "treasury")]
    Treasury,
}

impl Default for Settlement {
    fn default() -> Settlement {
        Self::None
    }
}