late 0.0.1369

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

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

/// TikTokSmartPlusMaterialReview : The verdict of one creative of a Smart+ ad (`material_review_infos`).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TikTokSmartPlusMaterialReview {
    /// TikTok `ad_material_id` of the creative inside this ad.
    #[serde(rename = "adMaterialId", skip_serializing_if = "Option::is_none")]
    pub ad_material_id: Option<String>,
    /// Null for a creative TikTok added on its own or a carousel image.
    #[serde(
        rename = "materialType",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub material_type: Option<Option<MaterialType>>,
    /// The TikTok post id when the creative is a Spark post.
    #[serde(
        rename = "tiktokItemId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub tiktok_item_id: Option<Option<String>>,
    #[serde(
        rename = "videoId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub video_id: Option<Option<String>>,
    #[serde(
        rename = "name",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub name: Option<Option<String>>,
    /// TikTok `material_operation_status`: ENABLE or DISABLE.
    #[serde(
        rename = "operationStatus",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub operation_status: Option<Option<String>>,
    #[serde(rename = "reviewStatus", skip_serializing_if = "Option::is_none")]
    pub review_status: Option<models::TikTokSmartPlusReviewStatus>,
    /// TikTok `review_status`, verbatim.
    #[serde(
        rename = "rawReviewStatus",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub raw_review_status: Option<Option<String>>,
    /// Every distinct reason across `rejections`. Empty when approved.
    #[serde(rename = "rejectReasons", skip_serializing_if = "Option::is_none")]
    pub reject_reasons: Option<Vec<String>>,
    #[serde(rename = "passedLocations", skip_serializing_if = "Option::is_none")]
    pub passed_locations: Option<Vec<String>>,
    #[serde(rename = "rejections", skip_serializing_if = "Option::is_none")]
    pub rejections: Option<Vec<models::TikTokReviewRejection>>,
}

impl TikTokSmartPlusMaterialReview {
    /// The verdict of one creative of a Smart+ ad (`material_review_infos`).
    pub fn new() -> TikTokSmartPlusMaterialReview {
        TikTokSmartPlusMaterialReview {
            ad_material_id: None,
            material_type: None,
            tiktok_item_id: None,
            video_id: None,
            name: None,
            operation_status: None,
            review_status: None,
            raw_review_status: None,
            reject_reasons: None,
            passed_locations: None,
            rejections: None,
        }
    }
}
/// Null for a creative TikTok added on its own or a carousel image.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MaterialType {
    #[serde(rename = "spark_post")]
    SparkPost,
    #[serde(rename = "video")]
    Video,
    #[serde(rename = "carousel")]
    Carousel,
    #[serde(rename = "catalog_carousel")]
    CatalogCarousel,
}

impl Default for MaterialType {
    fn default() -> MaterialType {
        Self::SparkPost
    }
}