late 0.0.1143

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.238.0
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// GoogleTargetImpressionShare : Google only. Target impression share bidding (Search campaigns only): Google sets bids so the ads show in `location` for `percent` of eligible impressions.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GoogleTargetImpressionShare {
    #[serde(rename = "location")]
    pub location: Location,
    /// Target share of impressions, in percent (65 = 65%). Sent to Google as location_fraction_micros (1% = 10,000).
    #[serde(rename = "percent")]
    pub percent: f64,
    /// Max CPC bid limit, in the account's currency units. Google requires it.
    #[serde(rename = "maxCpc")]
    pub max_cpc: f64,
}

impl GoogleTargetImpressionShare {
    /// Google only. Target impression share bidding (Search campaigns only): Google sets bids so the ads show in `location` for `percent` of eligible impressions.
    pub fn new(location: Location, percent: f64, max_cpc: f64) -> GoogleTargetImpressionShare {
        GoogleTargetImpressionShare {
            location,
            percent,
            max_cpc,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Location {
    #[serde(rename = "ANYWHERE_ON_PAGE")]
    AnywhereOnPage,
    #[serde(rename = "TOP_OF_PAGE")]
    TopOfPage,
    #[serde(rename = "ABSOLUTE_TOP_OF_PAGE")]
    AbsoluteTopOfPage,
}

impl Default for Location {
    fn default() -> Location {
        Self::AnywhereOnPage
    }
}