/*
 * 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 EstimateAdReach200Response {
    /// Whether a pre-flight estimate is available on this platform. False for Google and TikTok.
    #[serde(rename = "available")]
    pub available: bool,
    /// Lower bound of the estimated reachable audience. Present only when available.
    #[serde(rename = "lower", skip_serializing_if = "Option::is_none")]
    pub lower: Option<i32>,
    /// Upper bound of the estimated reachable audience. Present only when available.
    #[serde(rename = "upper", skip_serializing_if = "Option::is_none")]
    pub upper: Option<i32>,
    /// Optional estimated daily reach/results at the given budget, when the platform returns it.
    #[serde(rename = "daily", skip_serializing_if = "Option::is_none")]
    pub daily: Option<i32>,
    /// Currency of any monetary fields in the estimate, when applicable.
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Meta only. False when Meta is still computing the estimate (the audience is too new); retry shortly.
    #[serde(rename = "estimateReady", skip_serializing_if = "Option::is_none")]
    pub estimate_ready: Option<bool>,
}

impl EstimateAdReach200Response {
    pub fn new(available: bool) -> EstimateAdReach200Response {
        EstimateAdReach200Response {
            available,
            lower: None,
            upper: None,
            daily: None,
            currency: None,
            estimate_ready: None,
        }
    }
}
