late 0.0.1055

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

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

/// RecyclingState : Current recycling configuration and state on a post
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RecyclingState {
    /// Whether recycling is currently active
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// Number of interval units between reposts
    #[serde(rename = "gap", skip_serializing_if = "Option::is_none")]
    pub gap: Option<i32>,
    /// Interval unit (week or month)
    #[serde(rename = "gapFreq", skip_serializing_if = "Option::is_none")]
    pub gap_freq: Option<GapFreq>,
    #[serde(rename = "startDate", skip_serializing_if = "Option::is_none")]
    pub start_date: Option<String>,
    #[serde(rename = "expireCount", skip_serializing_if = "Option::is_none")]
    pub expire_count: Option<i32>,
    #[serde(rename = "expireDate", skip_serializing_if = "Option::is_none")]
    pub expire_date: Option<String>,
    /// Content variations for recycled copies (if configured)
    #[serde(rename = "contentVariations", skip_serializing_if = "Option::is_none")]
    pub content_variations: Option<Vec<String>>,
    /// Current position in the content variations rotation (read-only)
    #[serde(
        rename = "contentVariationIndex",
        skip_serializing_if = "Option::is_none"
    )]
    pub content_variation_index: Option<i32>,
    /// How many recycled copies have been created so far (read-only)
    #[serde(rename = "recycleCount", skip_serializing_if = "Option::is_none")]
    pub recycle_count: Option<i32>,
    /// When the next recycled copy will be created (read-only)
    #[serde(rename = "nextRecycleAt", skip_serializing_if = "Option::is_none")]
    pub next_recycle_at: Option<String>,
    /// When the last recycled copy was created (read-only)
    #[serde(rename = "lastRecycledAt", skip_serializing_if = "Option::is_none")]
    pub last_recycled_at: Option<String>,
}

impl RecyclingState {
    /// Current recycling configuration and state on a post
    pub fn new() -> RecyclingState {
        RecyclingState {
            enabled: None,
            gap: None,
            gap_freq: None,
            start_date: None,
            expire_count: None,
            expire_date: None,
            content_variations: None,
            content_variation_index: None,
            recycle_count: None,
            next_recycle_at: None,
            last_recycled_at: None,
        }
    }
}
/// Interval unit (week or month)
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum GapFreq {
    #[serde(rename = "week")]
    Week,
    #[serde(rename = "month")]
    Month,
}

impl Default for GapFreq {
    fn default() -> GapFreq {
        Self::Week
    }
}