traq 0.1.5

⚠️ Community Driven ⚠️ traQ v3 API
Documentation
/*
 * traQ v3
 *
 * traQ v3 API
 *
 * The version of the OpenAPI document: 3.0
 *
 * Generated by: https://openapi-generator.tech
 */

/// BotDetail : BOT詳細情報

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BotDetail {
    /// BOT UUID
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// 更新日時
    #[serde(rename = "updatedAt")]
    pub updated_at: String,
    /// 作成日時
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "mode")]
    pub mode: crate::models::BotMode,
    #[serde(rename = "state")]
    pub state: crate::models::BotState,
    /// BOTが購読しているイベントの配列
    #[serde(rename = "subscribeEvents")]
    pub subscribe_events: Vec<String>,
    /// BOT開発者UUID
    #[serde(rename = "developerId")]
    pub developer_id: uuid::Uuid,
    /// 説明
    #[serde(rename = "description")]
    pub description: String,
    /// BOTユーザーUUID
    #[serde(rename = "botUserId")]
    pub bot_user_id: uuid::Uuid,
    #[serde(rename = "tokens")]
    pub tokens: Box<crate::models::BotTokens>,
    /// BOTサーバーエンドポイント
    #[serde(rename = "endpoint")]
    pub endpoint: String,
    /// 特権BOTかどうか
    #[serde(rename = "privileged")]
    pub privileged: bool,
    /// BOTが参加しているチャンネルのUUID配列
    #[serde(rename = "channels")]
    pub channels: Vec<uuid::Uuid>,
}

impl BotDetail {
    /// BOT詳細情報
    pub fn new(
        id: uuid::Uuid,
        updated_at: String,
        created_at: String,
        mode: crate::models::BotMode,
        state: crate::models::BotState,
        subscribe_events: Vec<String>,
        developer_id: uuid::Uuid,
        description: String,
        bot_user_id: uuid::Uuid,
        tokens: crate::models::BotTokens,
        endpoint: String,
        privileged: bool,
        channels: Vec<uuid::Uuid>,
    ) -> BotDetail {
        BotDetail {
            id,
            updated_at,
            created_at,
            mode,
            state,
            subscribe_events,
            developer_id,
            description,
            bot_user_id,
            tokens: Box::new(tokens),
            endpoint,
            privileged,
            channels,
        }
    }
}