/*
* 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.34.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 GenerateKeywordHistoricalMetricsRequest {
/// Zernio googleads SocialAccount id.
#[serde(rename = "accountId")]
pub account_id: String,
/// Numeric Google Ads customer id (no dashes); only needed when the connection has several accounts.
#[serde(rename = "customerId", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
#[serde(rename = "keywords")]
pub keywords: Vec<String>,
/// ISO 3166-1 alpha-2 country codes. Omitted = worldwide.
#[serde(rename = "countries", skip_serializing_if = "Option::is_none")]
pub countries: Option<Vec<String>>,
/// Google languageConstant id (1000 = English).
#[serde(rename = "languageConstantId", skip_serializing_if = "Option::is_none")]
pub language_constant_id: Option<String>,
#[serde(rename = "network", skip_serializing_if = "Option::is_none")]
pub network: Option<Network>,
#[serde(
rename = "includeAdultKeywords",
skip_serializing_if = "Option::is_none"
)]
pub include_adult_keywords: Option<bool>,
/// Adds averageCpcMicros to each row's keywordMetrics.
#[serde(rename = "includeAverageCpc", skip_serializing_if = "Option::is_none")]
pub include_average_cpc: Option<bool>,
}
impl GenerateKeywordHistoricalMetricsRequest {
pub fn new(
account_id: String,
keywords: Vec<String>,
) -> GenerateKeywordHistoricalMetricsRequest {
GenerateKeywordHistoricalMetricsRequest {
account_id,
customer_id: None,
keywords,
countries: None,
language_constant_id: None,
network: None,
include_adult_keywords: None,
include_average_cpc: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Network {
#[serde(rename = "GOOGLE_SEARCH")]
GoogleSearch,
#[serde(rename = "GOOGLE_SEARCH_AND_PARTNERS")]
GoogleSearchAndPartners,
}
impl Default for Network {
fn default() -> Network {
Self::GoogleSearch
}
}