late 0.0.1313

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

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

/// CreateStandaloneAdRequestVideo : Creates a single VIDEO ad. Meta (facebook, instagram), LinkedIn and Reddit. Mutually exclusive with `imageUrl`.  Supply `url` to upload a file, or `id` to reuse a video already on the ad account (list them with GET /v1/ads/videos). Works on the single-ad and attach (`adSetId`) shapes; for Meta multi-creative, set `video` per entry inside `creatives[]` instead. Supply MP4 H.264/AAC, 3s-30min, 75KB-500MB.  - Reddit: `url`, `linkUrl` and a thumbnail (`thumbnailUrl`, or `imageUrl`) are all required. - LinkedIn: uploaded under the authoring Company Page (see `organizationId`) and the campaign format is set to SINGLE_VIDEO. LinkedIn ignores `thumbnailUrl` (it auto-generates the poster frame).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequestVideo {
    /// Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE); short clips take ~10-30s. Provide either `url` or `id`.
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    /// Meta only. Reuse a video ALREADY uploaded to this ad account instead of re-uploading the file: pass the `videoId` returned by a previous create. Wins over `url`, so N ads that differ only in copy share one upload (`existingCreativeId` only covers the identical-copy case). Provide either `url` or `id`.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Public URL of a still-image thumbnail for the video. OPTIONAL.  - Meta, omitted: the poster is auto-generated from Meta's own preferred video thumbnail (the candidates Ads Manager shows), so video ads usually publish without one. If Meta produces no candidate, the request fails with a 502 platform_error (reason: video_thumbnail_unavailable): retry, or supply this field. - Meta, provided: controls the poster frame exactly (uploaded as an ad image and referenced in object_story_spec.video_data). - LinkedIn: ignored (auto-generated poster frame).
    #[serde(rename = "thumbnailUrl", skip_serializing_if = "Option::is_none")]
    pub thumbnail_url: Option<String>,
}

impl CreateStandaloneAdRequestVideo {
    /// Creates a single VIDEO ad. Meta (facebook, instagram), LinkedIn and Reddit. Mutually exclusive with `imageUrl`.  Supply `url` to upload a file, or `id` to reuse a video already on the ad account (list them with GET /v1/ads/videos). Works on the single-ad and attach (`adSetId`) shapes; for Meta multi-creative, set `video` per entry inside `creatives[]` instead. Supply MP4 H.264/AAC, 3s-30min, 75KB-500MB.  - Reddit: `url`, `linkUrl` and a thumbnail (`thumbnailUrl`, or `imageUrl`) are all required. - LinkedIn: uploaded under the authoring Company Page (see `organizationId`) and the campaign format is set to SINGLE_VIDEO. LinkedIn ignores `thumbnailUrl` (it auto-generates the poster frame).
    pub fn new() -> CreateStandaloneAdRequestVideo {
        CreateStandaloneAdRequestVideo {
            url: None,
            id: None,
            thumbnail_url: None,
        }
    }
}