late 0.0.802

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).
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).
 *
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateBlogArticleRequest {
    #[serde(rename = "title")]
    pub title: String,
    /// Article body as HTML.
    #[serde(rename = "bodyHtml", skip_serializing_if = "Option::is_none")]
    pub body_html: Option<String>,
    /// URL slug. Generated from the title when omitted.
    #[serde(rename = "handle", skip_serializing_if = "Option::is_none")]
    pub handle: Option<String>,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// Display name of the article author.
    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
    pub author: Option<String>,
    /// Short summary shown in blog listings.
    #[serde(rename = "excerpt", skip_serializing_if = "Option::is_none")]
    pub excerpt: Option<String>,
    #[serde(rename = "image", skip_serializing_if = "Option::is_none")]
    pub image: Option<Box<models::CreateBlogArticleRequestImage>>,
    #[serde(rename = "seo", skip_serializing_if = "Option::is_none")]
    pub seo: Option<Box<models::CreateBlogArticleRequestSeo>>,
    /// Set false to create the article as a draft.
    #[serde(rename = "isPublished", skip_serializing_if = "Option::is_none")]
    pub is_published: Option<bool>,
    /// ISO 8601 datetime with offset (or Z). A future date schedules publication natively on the platform.
    #[serde(rename = "publishDate", skip_serializing_if = "Option::is_none")]
    pub publish_date: Option<String>,
}

impl CreateBlogArticleRequest {
    pub fn new(title: String) -> CreateBlogArticleRequest {
        CreateBlogArticleRequest {
            title,
            body_html: None,
            handle: None,
            tags: None,
            author: None,
            excerpt: None,
            image: None,
            seo: None,
            is_published: None,
            publish_date: None,
        }
    }
}