late 0.0.1066

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.108.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 MetaCatalogProduct {
    /// Meta product item ID (use in the product endpoints)
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(
        rename = "retailerId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub retailer_id: Option<Option<String>>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(
        rename = "description",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub description: Option<Option<String>>,
    #[serde(
        rename = "url",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub url: Option<Option<String>>,
    #[serde(
        rename = "imageUrl",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub image_url: Option<Option<String>>,
    #[serde(
        rename = "additionalImageUrls",
        skip_serializing_if = "Option::is_none"
    )]
    pub additional_image_urls: Option<Vec<String>>,
    /// Formatted by Meta, e.g. \"€49.90\"
    #[serde(
        rename = "price",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub price: Option<Option<String>>,
    #[serde(
        rename = "salePrice",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sale_price: Option<Option<String>>,
    #[serde(
        rename = "currency",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub currency: Option<Option<String>>,
    #[serde(
        rename = "availability",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub availability: Option<Option<String>>,
    #[serde(
        rename = "condition",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub condition: Option<Option<String>>,
    #[serde(
        rename = "brand",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub brand: Option<Option<String>>,
    #[serde(
        rename = "category",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub category: Option<Option<String>>,
    #[serde(
        rename = "productType",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub product_type: Option<Option<String>>,
    #[serde(
        rename = "gtin",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub gtin: Option<Option<String>>,
    #[serde(
        rename = "inventory",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub inventory: Option<Option<i32>>,
    #[serde(
        rename = "visibility",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub visibility: Option<Option<String>>,
    #[serde(
        rename = "color",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub color: Option<Option<String>>,
    #[serde(
        rename = "size",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub size: Option<Option<String>>,
    #[serde(
        rename = "gender",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub gender: Option<Option<String>>,
    #[serde(
        rename = "material",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub material: Option<Option<String>>,
    #[serde(
        rename = "pattern",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub pattern: Option<Option<String>>,
    /// custom_label_0 to custom_label_4
    #[serde(rename = "customLabels", skip_serializing_if = "Option::is_none")]
    pub custom_labels: Option<Vec<String>>,
    /// Meta's commerce review status (approved, rejected, pending, ...)
    #[serde(
        rename = "reviewStatus",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub review_status: Option<Option<String>>,
    #[serde(
        rename = "reviewRejectionReasons",
        skip_serializing_if = "Option::is_none"
    )]
    pub review_rejection_reasons: Option<Vec<String>>,
}

impl MetaCatalogProduct {
    pub fn new() -> MetaCatalogProduct {
        MetaCatalogProduct {
            id: None,
            retailer_id: None,
            name: None,
            description: None,
            url: None,
            image_url: None,
            additional_image_urls: None,
            price: None,
            sale_price: None,
            currency: None,
            availability: None,
            condition: None,
            brand: None,
            category: None,
            product_type: None,
            gtin: None,
            inventory: None,
            visibility: None,
            color: None,
            size: None,
            gender: None,
            material: None,
            pattern: None,
            custom_labels: None,
            review_status: None,
            review_rejection_reasons: None,
        }
    }
}