/*
* 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 CreateRfPredictionRequest {
/// Zernio SocialAccount id (posting or ads variant).
#[serde(rename = "accountId")]
pub account_id: String,
/// Platform ad account id (Meta act_<n>, Google customer id, LinkedIn account id, ...).
#[serde(rename = "adAccountId")]
pub ad_account_id: String,
/// Whole currency units. Exactly one of budgetAmount / reach.
#[serde(rename = "budgetAmount", skip_serializing_if = "Option::is_none")]
pub budget_amount: Option<f64>,
/// Target unique reach. Exactly one of budgetAmount / reach.
#[serde(rename = "reach", skip_serializing_if = "Option::is_none")]
pub reach: Option<i32>,
/// Campaign window start (must be in the future).
#[serde(rename = "startDate")]
pub start_date: String,
#[serde(rename = "endDate")]
pub end_date: String,
/// Max impressions per person over the window.
#[serde(rename = "frequencyCap", skip_serializing_if = "Option::is_none")]
pub frequency_cap: Option<i32>,
/// Canonical camelCase TargetingSpec (same shape as /v1/ads/create's `targeting`). Defaults to countries: [US].
#[serde(rename = "targeting", skip_serializing_if = "Option::is_none")]
pub targeting: Option<serde_json::Value>,
/// Meta placements object (same shape as /v1/ads/create's `placements`).
#[serde(rename = "placements", skip_serializing_if = "Option::is_none")]
pub placements: Option<serde_json::Value>,
}
impl CreateRfPredictionRequest {
pub fn new(
account_id: String,
ad_account_id: String,
start_date: String,
end_date: String,
) -> CreateRfPredictionRequest {
CreateRfPredictionRequest {
account_id,
ad_account_id,
budget_amount: None,
reach: None,
start_date,
end_date,
frequency_cap: None,
targeting: None,
placements: None,
}
}
}