late 0.0.853

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).
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).
 *
 * 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};

/// RfPrediction : A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RfPrediction {
    #[serde(rename = "predictionId", skip_serializing_if = "Option::is_none")]
    pub prediction_id: Option<String>,
    /// ready | pending | failed:<meta code>
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// Quoted (or provided) lifetime budget for the window.
    #[serde(
        rename = "budget",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub budget: Option<Option<f64>>,
    /// Predicted (or requested) unique reach.
    #[serde(
        rename = "reach",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub reach: Option<Option<i32>>,
    #[serde(
        rename = "impressions",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub impressions: Option<Option<i32>>,
    /// Meta's allowed lower bound for this spec.
    #[serde(
        rename = "minBudget",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub min_budget: Option<Option<f64>>,
    #[serde(
        rename = "maxBudget",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_budget: Option<Option<f64>>,
    #[serde(
        rename = "minReach",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub min_reach: Option<Option<i32>>,
    #[serde(
        rename = "maxReach",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_reach: Option<Option<i32>>,
    #[serde(
        rename = "frequencyCap",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub frequency_cap: Option<Option<i32>>,
    /// Unix seconds; the reserved window the R&F ad set will run on.
    #[serde(
        rename = "startTime",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub start_time: Option<Option<i32>>,
    #[serde(
        rename = "stopTime",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub stop_time: Option<Option<i32>>,
    /// When the reservation's locked price expires (set after reserving).
    #[serde(
        rename = "expiresAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub expires_at: Option<Option<String>>,
}

impl RfPrediction {
    /// A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
    pub fn new() -> RfPrediction {
        RfPrediction {
            prediction_id: None,
            status: None,
            budget: None,
            reach: None,
            impressions: None,
            min_budget: None,
            max_budget: None,
            min_reach: None,
            max_reach: None,
            frequency_cap: None,
            start_time: None,
            stop_time: None,
            expires_at: None,
        }
    }
}