late 0.0.1364

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

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

/// LinkedInPlatformData : LinkedIn post options.  - Media: up to 20 images, no multi-video. A single PDF is supported (max 100MB). Link previews are auto-generated when no media is 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. - Polls, via the poll object: 2-4 options, cannot be combined with media or reshareUrl, cannot be edited after publishing. API-created polls are non-sponsored only.
#[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. Mention with @[https://www.linkedin.com/in/vanity] (resolved to LinkedIn's live name, same rules and errors as post content) or @[Name](urn:li:person|organization:ID); a hand-written name must match LinkedIn's exactly or it renders as plain text.
    #[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>,
    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
    pub audience: Option<Box<models::LinkedInPlatformDataAudience>>,
    /// 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. Mutually exclusive with media. Works on personal profiles and organization pages.  The published post is always a reshare authored by your account with the original embedded underneath. With content, your text is the commentary (LinkedIn's \"repost with your thoughts\"); with no content it publishes as a text-free reshare.  A text-free reshare is NOT LinkedIn's one-click \"Repost\" (the feed treatment where the original author stays the author). LinkedIn's API exposes no way to create that, so the post still appears authored by you with the original embedded.
    #[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>>,
    #[serde(rename = "poll", skip_serializing_if = "Option::is_none")]
    pub poll: Option<Box<models::LinkedInPlatformDataPoll>>,
}

impl LinkedInPlatformData {
    /// LinkedIn post options.  - Media: up to 20 images, no multi-video. A single PDF is supported (max 100MB). Link previews are auto-generated when no media is 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. - Polls, via the poll object: 2-4 options, cannot be combined with media or reshareUrl, cannot be edited after publishing. API-created polls are non-sponsored only.
    pub fn new() -> LinkedInPlatformData {
        LinkedInPlatformData {
            document_title: None,
            organization_urn: None,
            first_comment: None,
            disable_link_preview: None,
            audience: None,
            reshare_url: None,
            geo_restriction: None,
            poll: None,
        }
    }
}