late 0.0.297

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * 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};

/// DiscordPlatformDataPoll : Native Discord poll. Cannot be combined with media attachments in the same message.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DiscordPlatformDataPoll {
    #[serde(rename = "question", skip_serializing_if = "Option::is_none")]
    pub question: Option<Box<models::DiscordPlatformDataPollQuestion>>,
    /// 1-10 answer options
    #[serde(rename = "answers", skip_serializing_if = "Option::is_none")]
    pub answers: Option<Vec<models::DiscordPlatformDataPollAnswersInner>>,
    /// Poll duration in hours (1-768). Default 24.
    #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
    pub duration: Option<i32>,
    /// Allow users to select multiple answers. Default false.
    #[serde(rename = "allow_multiselect", skip_serializing_if = "Option::is_none")]
    pub allow_multiselect: Option<bool>,
}

impl DiscordPlatformDataPoll {
    /// Native Discord poll. Cannot be combined with media attachments in the same message.
    pub fn new() -> DiscordPlatformDataPoll {
        DiscordPlatformDataPoll {
            question: None,
            answers: None,
            duration: None,
            allow_multiselect: None,
        }
    }
}