late 0.0.1349

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.529.1
 * 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 AdsPerformanceResponseAdsInnerMetrics {
    /// In the ad's currency.
    #[serde(rename = "spend", skip_serializing_if = "Option::is_none")]
    pub spend: Option<f64>,
    #[serde(rename = "impressions", skip_serializing_if = "Option::is_none")]
    pub impressions: Option<i32>,
    #[serde(rename = "clicks", skip_serializing_if = "Option::is_none")]
    pub clicks: Option<i32>,
    /// Percent.
    #[serde(rename = "ctr", skip_serializing_if = "Option::is_none")]
    pub ctr: Option<f64>,
    /// Results over the range (see AdMetrics.conversions).
    #[serde(rename = "conversions", skip_serializing_if = "Option::is_none")]
    pub conversions: Option<f64>,
    #[serde(rename = "costPerConversion", skip_serializing_if = "Option::is_none")]
    pub cost_per_conversion: Option<f64>,
    #[serde(rename = "purchaseValue", skip_serializing_if = "Option::is_none")]
    pub purchase_value: Option<f64>,
    #[serde(rename = "roas", skip_serializing_if = "Option::is_none")]
    pub roas: Option<f64>,
    /// `conversions` split by what was counted (Meta action_type or Google conversion action name).
    #[serde(rename = "conversionsByType", skip_serializing_if = "Option::is_none")]
    pub conversions_by_type: Option<std::collections::HashMap<String, f64>>,
}

impl AdsPerformanceResponseAdsInnerMetrics {
    pub fn new() -> AdsPerformanceResponseAdsInnerMetrics {
        AdsPerformanceResponseAdsInnerMetrics {
            spend: None,
            impressions: None,
            clicks: None,
            ctr: None,
            conversions: None,
            cost_per_conversion: None,
            purchase_value: None,
            roas: None,
            conversions_by_type: None,
        }
    }
}