/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

/// LinkedInPlatformData : Up to 20 images, no multi-video. Single PDF supported (max 100MB). Link previews auto-generated when no media attached. Use organizationUrn for multi-org posting. Geo-restriction only works for organization pages (not personal profiles) and requires the targeted audience to exceed 300 followers.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LinkedInPlatformData {
    /// Title displayed on LinkedIn document (PDF/carousel) posts. Required by LinkedIn for document posts. If omitted, falls back to the media item title, then the filename.
    #[serde(rename = "documentTitle", skip_serializing_if = "Option::is_none")]
    pub document_title: Option<String>,
    /// Target LinkedIn Organization URN (e.g. \"urn:li:organization:123456789\"). If omitted, uses the default org. Use GET /v1/accounts/{id}/linkedin-organizations to list orgs.
    #[serde(rename = "organizationUrn", skip_serializing_if = "Option::is_none")]
    pub organization_urn: Option<String>,
    /// Optional first comment to add after the post is created
    #[serde(rename = "firstComment", skip_serializing_if = "Option::is_none")]
    pub first_comment: Option<String>,
    /// Set to true to disable automatic link previews for URLs in the post content (default is false)
    #[serde(rename = "disableLinkPreview", skip_serializing_if = "Option::is_none")]
    pub disable_link_preview: Option<bool>,
    /// LinkedIn post link to repost (use the post's \"Copy link to post\" action), or a urn:li:share / urn:li:ugcPost / urn:li:groupPost URN. The published post becomes a quote-reshare: your content is shown as the commentary and the original post is embedded underneath (LinkedIn's \"repost with your thoughts\"). Mutually exclusive with media. Works on personal profiles and organization pages.
    #[serde(rename = "reshareUrl", skip_serializing_if = "Option::is_none")]
    pub reshare_url: Option<String>,
    #[serde(rename = "geoRestriction", skip_serializing_if = "Option::is_none")]
    pub geo_restriction: Option<Box<models::GeoRestriction>>,
}

impl LinkedInPlatformData {
    /// Up to 20 images, no multi-video. Single PDF supported (max 100MB). Link previews auto-generated when no media attached. Use organizationUrn for multi-org posting. Geo-restriction only works for organization pages (not personal profiles) and requires the targeted audience to exceed 300 followers.
    pub fn new() -> LinkedInPlatformData {
        LinkedInPlatformData {
            document_title: None,
            organization_urn: None,
            first_comment: None,
            disable_link_preview: None,
            reshare_url: None,
            geo_restriction: None,
        }
    }
}
