/*
* 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.570.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// GoogleAnalyticsReport : Google Analytics Data API report, passed through as Google returns it. Every value in `rows` is a string; read `metricHeaders[].type` to parse metrics.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GoogleAnalyticsReport {
/// Zernio account ID of the Google Analytics connection.
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
/// Numeric GA4 property ID.
#[serde(rename = "propertyId", skip_serializing_if = "Option::is_none")]
pub property_id: Option<String>,
#[serde(rename = "dimensionHeaders", skip_serializing_if = "Option::is_none")]
pub dimension_headers: Option<Vec<models::GoogleAnalyticsReportDimensionHeadersInner>>,
#[serde(rename = "metricHeaders", skip_serializing_if = "Option::is_none")]
pub metric_headers: Option<Vec<models::GoogleAnalyticsReportMetricHeadersInner>>,
#[serde(rename = "rows", skip_serializing_if = "Option::is_none")]
pub rows: Option<Vec<models::GoogleAnalyticsReportRowsInner>>,
/// Total rows matching the request, across all pages.
#[serde(rename = "rowCount", skip_serializing_if = "Option::is_none")]
pub row_count: Option<i32>,
/// Google report metadata (currency, time zone, sampling and thresholding flags).
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
/// Google quota left on this property after the request (tokens per day and per hour, concurrent requests). Cached responses carry the quota from when they were fetched.
#[serde(rename = "propertyQuota", skip_serializing_if = "Option::is_none")]
pub property_quota: Option<std::collections::HashMap<String, serde_json::Value>>,
}
impl GoogleAnalyticsReport {
/// Google Analytics Data API report, passed through as Google returns it. Every value in `rows` is a string; read `metricHeaders[].type` to parse metrics.
pub fn new() -> GoogleAnalyticsReport {
GoogleAnalyticsReport {
account_id: None,
property_id: None,
dimension_headers: None,
metric_headers: None,
rows: None,
row_count: None,
metadata: None,
property_quota: None,
}
}
}