/*
 * 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 EstimateAdReachRequest {
    /// Social account ID on the target ad platform.
    #[serde(rename = "accountId")]
    pub account_id: String,
    /// The targeting spec to estimate. Same shape used by POST /v1/ads/create.
    #[serde(rename = "spec")]
    pub spec: Box<models::TargetingSpec>,
    /// Optional. The optimization goal the estimate should assume (platform's own vocabulary, e.g. Meta `REACH`, `LINK_CLICKS`, `OFFSITE_CONVERSIONS`). Some platforms vary the estimate by goal; omit to use the platform default.
    #[serde(rename = "optimizationGoal", skip_serializing_if = "Option::is_none")]
    pub optimization_goal: Option<String>,
}

impl EstimateAdReachRequest {
    pub fn new(account_id: String, spec: models::TargetingSpec) -> EstimateAdReachRequest {
        EstimateAdReachRequest {
            account_id,
            spec: Box::new(spec),
            optimization_goal: None,
        }
    }
}
