/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateDiscordScheduledEventRequest {
    #[serde(rename = "accountId")]
    pub account_id: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// ISO 8601 start time. Must be in the future.
    #[serde(rename = "startsAt")]
    pub starts_at: String,
    #[serde(rename = "entity")]
    pub entity: Box<models::CreateDiscordScheduledEventRequestEntity>,
    /// Optional cover image as a base64 data URI.
    #[serde(rename = "imageDataUri", skip_serializing_if = "Option::is_none")]
    pub image_data_uri: Option<String>,
}

impl CreateDiscordScheduledEventRequest {
    pub fn new(
        account_id: String,
        name: String,
        starts_at: String,
        entity: models::CreateDiscordScheduledEventRequestEntity,
    ) -> CreateDiscordScheduledEventRequest {
        CreateDiscordScheduledEventRequest {
            account_id,
            name,
            description: None,
            starts_at,
            entity: Box::new(entity),
            image_data_uri: None,
        }
    }
}
