late 0.0.1391

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

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

/// GetAccountHealth200ResponseLineWebhook : LINE accounts only. Live read of the channel's webhook settings at LINE, performed at request time. Absent while the account is inactive or needs reconnecting.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAccountHealth200ResponseLineWebhook {
    /// `false`: Webhooks are turned off in LINE Official Account Manager (LINE Developers Console: Use webhook), so LINE sends no messages to Zernio; turn it on in Settings > Response settings. `null`: LINE could not be read, not evidence either way.
    #[serde(
        rename = "active",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub active: Option<Option<bool>>,
    /// Where the channel's webhook URL points.  - `zernio`: the URL Zernio set for this account. - `another_zernio_account`: another Zernio account connected to the same channel, which receives its events instead. - `other`: another integration's URL (reconnect the account to point it back). - `missing`: no URL is set. - `null`: LINE could not be read.
    #[serde(
        rename = "destination",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub destination: Option<Option<Destination>>,
    /// When this live read ran (always the current request; never cached)
    #[serde(rename = "checkedAt", skip_serializing_if = "Option::is_none")]
    pub checked_at: Option<String>,
}

impl GetAccountHealth200ResponseLineWebhook {
    /// LINE accounts only. Live read of the channel's webhook settings at LINE, performed at request time. Absent while the account is inactive or needs reconnecting.
    pub fn new() -> GetAccountHealth200ResponseLineWebhook {
        GetAccountHealth200ResponseLineWebhook {
            active: None,
            destination: None,
            checked_at: None,
        }
    }
}
/// Where the channel's webhook URL points.  - `zernio`: the URL Zernio set for this account. - `another_zernio_account`: another Zernio account connected to the same channel, which receives its events instead. - `other`: another integration's URL (reconnect the account to point it back). - `missing`: no URL is set. - `null`: LINE could not be read.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Destination {
    #[serde(rename = "zernio")]
    Zernio,
    #[serde(rename = "another_zernio_account")]
    AnotherZernioAccount,
    #[serde(rename = "other")]
    Other,
    #[serde(rename = "missing")]
    Missing,
}

impl Default for Destination {
    fn default() -> Destination {
        Self::Zernio
    }
}