hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdCampaign {
    /// Account is the provider ad-account the campaign runs under, in Meta's act_<id> form. Empty until the org supplies one or a launch resolves it.
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<String>,
    /// Budget is the campaign's authorized spend in MINOR units (cents). Negative clamps to 0. It is the org's stored plan: a Meta launch creates the campaign object only, and the delivering budget lives on the ad set.
    #[serde(rename = "budget", skip_serializing_if = "Option::is_none")]
    pub budget: Option<i32>,
    /// CreatedAt is when the campaign was first stored, in unix seconds. It never changes, including across a full-replace update.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<i32>,
    /// ExternalID is the ad network's own campaign id, written by a successful launch and by nothing else — an update never touches it. Empty means this campaign has never reached its network.
    #[serde(rename = "externalId", skip_serializing_if = "Option::is_none")]
    pub external_id: Option<String>,
    /// ID is the campaign's server-minted handle, \"camp_\" + 32 hex. A create body cannot choose it, and it is the id every other route addresses.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Name is the campaign's display label, and the name Meta creates the campaign object under at launch. Required; trimmed and bounded to 1024 bytes.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Objective is the campaign goal spelled as the provider names it (\"conversions\", \"OUTCOME_TRAFFIC\"), passed through to the network verbatim at launch — Meta defaults an empty one to OUTCOME_TRAFFIC. Free text, bounded to 1024 bytes; no vocabulary is enforced here.
    #[serde(rename = "objective", skip_serializing_if = "Option::is_none")]
    pub objective: Option<String>,
    /// Platform is the ad network: meta, google, tiktok or x, and nothing else — a write naming another is 400. Empty stores as meta. Only meta executes today; launching any of the other three is 501.
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    /// Spend is spend-to-date in MINOR units (cents), as last written through create or update. Negative clamps to 0. It is NOT read back from the network — that is a separate insights call — so 0 means nothing was recorded here, not that nothing was spent.
    #[serde(rename = "spend", skip_serializing_if = "Option::is_none")]
    pub spend: Option<i32>,
    /// Status is the lifecycle: draft, active, paused or completed, and nothing else — a write naming another is 400. Empty stores as draft; a successful launch sets active. It records what this deployment did, not what the ad network currently reports.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// UpdatedAt is when the row was last written, in unix seconds — set by create, update and launch. Listings are ordered by it, newest first.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<i32>,
}

impl AdCampaign {
    pub fn new() -> AdCampaign {
        AdCampaign {
            account: None,
            budget: None,
            created_at: None,
            external_id: None,
            id: None,
            name: None,
            objective: None,
            platform: None,
            spend: None,
            status: None,
            updated_at: None,
        }
    }
}