/*
 * Late API
 *
 * API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: support@getlate.dev
 * Generated by: https://openapi-generator.tech
 */

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

/// WebhookPayloadAccountDisconnected : Webhook payload for account disconnected events
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadAccountDisconnected {
    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
    pub event: Option<Event>,
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<Box<models::WebhookPayloadAccountDisconnectedAccount>>,
    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
}

impl WebhookPayloadAccountDisconnected {
    /// Webhook payload for account disconnected events
    pub fn new() -> WebhookPayloadAccountDisconnected {
        WebhookPayloadAccountDisconnected {
            event: None,
            account: None,
            timestamp: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Event {
    #[serde(rename = "account.disconnected")]
    AccountDisconnected,
}

impl Default for Event {
    fn default() -> Event {
        Self::AccountDisconnected
    }
}
