zulip-api 0.0.8

Client library for interacting with the Zulip API
Documentation
use serde_repr::{Deserialize_repr, Serialize_repr};

/// Represents a bot type.
///
/// Modified from `openapi-generator-cli` output:
///
/// ```shell,no_build,no_run
/// $ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec
/// ```
///
/// ```text
/// /*
/// * Zulip REST API
/// *
/// * Powerful open source group chat
/// *
/// * The version of the OpenAPI document: 1.0.0
/// *
/// * Generated by: https://openapi-generator.tech
/// */
/// ```
///
/// See [zerver/openapi/zulip.yaml](https://github.com/zulip/zulip/blob/main/zerver/openapi/zulip.yaml) for the original OpenAPI configuration.
///
/// Configuration slightly modified to work with the Rust generator of [`openapi-generator-cli`](https://openapi-generator.tech).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize_repr, Serialize_repr)]
#[repr(u64)]
pub enum BotType {
    /// Represents a `Generic` bot.
    Generic = 1,
    /// Represents a `Incoming webhook` bot.
    IncomingWebhook = 2,
    /// Represents a `Outgoing webhook` bot.
    OutgoingWebhook = 3,
    /// Represents a `Embedded` bot.
    Embedded = 4,
}

impl BotType {
    /// Creates a new [BotType].
    pub const fn new() -> Self {
        Self::Generic
    }
}

impl Default for BotType {
    fn default() -> Self {
        Self::new()
    }
}