late 0.0.1055

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.104.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 GetCampaignBidding200Response {
    /// campaign.advertising_channel_type. COST_CAP's underlying Google field differs by channel; see bidStrategy on PUT.
    #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
    pub channel: Option<Channel>,
    /// Google's raw enum: MAXIMIZE_CONVERSIONS, TARGET_CPA, MAXIMIZE_CONVERSION_VALUE, TARGET_ROAS, TARGET_SPEND, MANUAL_CPC, TARGET_IMPRESSION_SHARE, or another Google adds later.
    #[serde(
        rename = "biddingStrategyType",
        skip_serializing_if = "Option::is_none"
    )]
    pub bidding_strategy_type: Option<String>,
    #[serde(rename = "bidSpec", skip_serializing_if = "Option::is_none")]
    pub bid_spec: Option<Box<models::CampaignBiddingBidSpec>>,
    #[serde(rename = "portfolio", skip_serializing_if = "Option::is_none")]
    pub portfolio: Option<Box<models::CampaignBiddingPortfolio>>,
    /// When this data was fetched from Google. Null when it was never served from cache.
    #[serde(rename = "cachedAt", skip_serializing_if = "Option::is_none")]
    pub cached_at: Option<String>,
    /// True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read.
    #[serde(rename = "stale", skip_serializing_if = "Option::is_none")]
    pub stale: Option<bool>,
    #[serde(rename = "campaignId", skip_serializing_if = "Option::is_none")]
    pub campaign_id: Option<String>,
}

impl GetCampaignBidding200Response {
    pub fn new() -> GetCampaignBidding200Response {
        GetCampaignBidding200Response {
            channel: None,
            bidding_strategy_type: None,
            bid_spec: None,
            portfolio: None,
            cached_at: None,
            stale: None,
            campaign_id: None,
        }
    }
}
/// campaign.advertising_channel_type. COST_CAP's underlying Google field differs by channel; see bidStrategy on PUT.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Channel {
    #[serde(rename = "SEARCH")]
    Search,
    #[serde(rename = "DISPLAY")]
    Display,
}

impl Default for Channel {
    fn default() -> Channel {
        Self::Search
    }
}