/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * 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 UpdateAdRequest {
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "budget", skip_serializing_if = "Option::is_none")]
    pub budget: Option<Box<models::UpdateAdRequestBudget>>,
    #[serde(rename = "targeting", skip_serializing_if = "Option::is_none")]
    pub targeting: Option<Box<models::UpdateAdRequestTargeting>>,
    #[serde(rename = "creative", skip_serializing_if = "Option::is_none")]
    pub creative: Option<Box<models::UpdateAdRequestCreative>>,
    /// Rename the ad. Now propagated to Meta (POST /{ad-id}); non-Meta platforms return 501.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

impl UpdateAdRequest {
    pub fn new() -> UpdateAdRequest {
        UpdateAdRequest {
            status: None,
            budget: None,
            targeting: None,
            creative: None,
            name: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "paused")]
    Paused,
}

impl Default for Status {
    fn default() -> Status {
        Self::Active
    }
}
