late 0.0.1271

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

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

/// UpdateBlogArticleRequest : At least one field is required.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateBlogArticleRequest {
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    /// Article body as HTML.
    #[serde(rename = "bodyHtml", skip_serializing_if = "Option::is_none")]
    pub body_html: Option<String>,
    /// URL slug of the article.
    #[serde(rename = "handle", skip_serializing_if = "Option::is_none")]
    pub handle: Option<String>,
    /// Replaces the full tag-name list. WordPress and Wix resolve existing names case-insensitively and create missing tags (Wix allows up to 30).
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// Shopify author display name, numeric WordPress user id serialized as a string, or Wix site member id. Assigning another WordPress user may require elevated capability. Wix posts without one go to the site's default 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::UpdateBlogArticleRequestImage>>,
    #[serde(rename = "seo", skip_serializing_if = "Option::is_none")]
    pub seo: Option<Box<models::CreateBlogArticleRequestSeo>>,
    /// Set false to move to draft or true to publish. On WordPress and Wix false takes priority over a future publishDate; omission preserves status unless publishDate is sent (edits to a published Wix post go live).
    #[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>,
    /// Webflow only. The collection's own fields that the Blogs API does not map, keyed by field slug, in Webflow's value format (a Reference is an item id, an Image is { url, alt }). Required by collections with required fields of their own; a create that leaves one empty answers 400 listing them. A slug the API already fills (name, slug, body, summary, image, tags, author, date) or one the collection lacks answers 400. Other platforms answer 400.
    #[serde(rename = "fieldData", skip_serializing_if = "Option::is_none")]
    pub field_data: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl UpdateBlogArticleRequest {
    /// At least one field is required.
    pub fn new() -> UpdateBlogArticleRequest {
        UpdateBlogArticleRequest {
            title: None,
            body_html: None,
            handle: None,
            tags: None,
            author: None,
            excerpt: None,
            image: None,
            seo: None,
            is_published: None,
            publish_date: None,
            field_data: None,
        }
    }
}