late 0.0.1055

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.104.0
 * 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 UpdateAdSet200Response {
    #[serde(rename = "budget", skip_serializing_if = "Option::is_none")]
    pub budget: Option<Box<models::AdBudget>>,
    #[serde(rename = "budgetLevel", skip_serializing_if = "Option::is_none")]
    pub budget_level: Option<BudgetLevel>,
    /// The status written to the ad set. Absent when nothing was written (see statusMessage).
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// Number of ads whose own stored status changed alongside the ad set switch
    #[serde(rename = "statusUpdated", skip_serializing_if = "Option::is_none")]
    pub status_updated: Option<i32>,
    /// Number of ads whose own status was left as it was
    #[serde(rename = "statusSkipped", skip_serializing_if = "Option::is_none")]
    pub status_skipped: Option<i32>,
    /// Why each group of ads was skipped
    #[serde(
        rename = "statusSkippedReasons",
        skip_serializing_if = "Option::is_none"
    )]
    pub status_skipped_reasons: Option<Vec<String>>,
    /// Present only where the platform has no ad-set switch and no child ad was actionable; `status` is then absent because nothing was written
    #[serde(rename = "statusMessage", skip_serializing_if = "Option::is_none")]
    pub status_message: Option<String>,
    #[serde(rename = "bidStrategy", skip_serializing_if = "Option::is_none")]
    pub bid_strategy: Option<models::BidStrategy>,
    #[serde(
        rename = "bidAmount",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub bid_amount: Option<Option<f64>>,
    #[serde(
        rename = "roasAverageFloor",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub roas_average_floor: Option<Option<f64>>,
    #[serde(
        rename = "platformSpecificData",
        skip_serializing_if = "Option::is_none"
    )]
    pub platform_specific_data: Option<serde_json::Value>,
}

impl UpdateAdSet200Response {
    pub fn new() -> UpdateAdSet200Response {
        UpdateAdSet200Response {
            budget: None,
            budget_level: None,
            status: None,
            status_updated: None,
            status_skipped: None,
            status_skipped_reasons: None,
            status_message: None,
            bid_strategy: None,
            bid_amount: None,
            roas_average_floor: None,
            platform_specific_data: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum BudgetLevel {
    #[serde(rename = "adset")]
    Adset,
}

impl Default for BudgetLevel {
    fn default() -> BudgetLevel {
        Self::Adset
    }
}
/// The status written to the ad set. Absent when nothing was written (see statusMessage).
#[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
    }
}