/*
* 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};
/// AdKeywordQuality : Google Quality Score and the three component ratings behind it (`ad_group_criterion.quality_info`). Every field is null until Google has rated the keyword: a keyword with too little traffic is unrated, and negatives are never rated. Google's own UNKNOWN / UNSPECIFIED buckets are reported as null so \"unrated\" has a single representation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdKeywordQuality {
/// Quality Score, 1-10.
#[serde(
rename = "score",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub score: Option<Option<i32>>,
/// How the click-through rate compares with other ads in the same position (`search_predicted_ctr`).
#[serde(
rename = "expectedCtr",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub expected_ctr: Option<Option<ExpectedCtr>>,
/// How closely the ad matches the intent behind the search (`creative_quality_score`).
#[serde(
rename = "adRelevance",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub ad_relevance: Option<Option<AdRelevance>>,
/// How relevant and useful the landing page is to people who click (`post_click_quality_score`).
#[serde(
rename = "landingPageExperience",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub landing_page_experience: Option<Option<LandingPageExperience>>,
}
impl AdKeywordQuality {
/// Google Quality Score and the three component ratings behind it (`ad_group_criterion.quality_info`). Every field is null until Google has rated the keyword: a keyword with too little traffic is unrated, and negatives are never rated. Google's own UNKNOWN / UNSPECIFIED buckets are reported as null so \"unrated\" has a single representation.
pub fn new() -> AdKeywordQuality {
AdKeywordQuality {
score: None,
expected_ctr: None,
ad_relevance: None,
landing_page_experience: None,
}
}
}
/// How the click-through rate compares with other ads in the same position (`search_predicted_ctr`).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ExpectedCtr {
#[serde(rename = "BELOW_AVERAGE")]
BelowAverage,
#[serde(rename = "AVERAGE")]
Average,
#[serde(rename = "ABOVE_AVERAGE")]
AboveAverage,
}
impl Default for ExpectedCtr {
fn default() -> ExpectedCtr {
Self::BelowAverage
}
}
/// How closely the ad matches the intent behind the search (`creative_quality_score`).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AdRelevance {
#[serde(rename = "BELOW_AVERAGE")]
BelowAverage,
#[serde(rename = "AVERAGE")]
Average,
#[serde(rename = "ABOVE_AVERAGE")]
AboveAverage,
}
impl Default for AdRelevance {
fn default() -> AdRelevance {
Self::BelowAverage
}
}
/// How relevant and useful the landing page is to people who click (`post_click_quality_score`).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LandingPageExperience {
#[serde(rename = "BELOW_AVERAGE")]
BelowAverage,
#[serde(rename = "AVERAGE")]
Average,
#[serde(rename = "ABOVE_AVERAGE")]
AboveAverage,
}
impl Default for LandingPageExperience {
fn default() -> LandingPageExperience {
Self::BelowAverage
}
}