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
 */

/// Webhook : Webhook情報

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Webhook {
    /// WebhookUUID
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// WebhookユーザーUUID
    #[serde(rename = "botUserId")]
    pub bot_user_id: uuid::Uuid,
    /// Webhookユーザー表示名
    #[serde(rename = "displayName")]
    pub display_name: String,
    /// 説明
    #[serde(rename = "description")]
    pub description: String,
    /// セキュアWebhookかどうか
    #[serde(rename = "secure")]
    pub secure: bool,
    /// デフォルトの投稿先チャンネルUUID
    #[serde(rename = "channelId")]
    pub channel_id: uuid::Uuid,
    /// オーナーUUID
    #[serde(rename = "ownerId")]
    pub owner_id: uuid::Uuid,
    /// 作成日時
    #[serde(rename = "createdAt")]
    pub created_at: String,
    /// 更新日時
    #[serde(rename = "updatedAt")]
    pub updated_at: String,
}

impl Webhook {
    /// Webhook情報
    pub fn new(
        id: uuid::Uuid,
        bot_user_id: uuid::Uuid,
        display_name: String,
        description: String,
        secure: bool,
        channel_id: uuid::Uuid,
        owner_id: uuid::Uuid,
        created_at: String,
        updated_at: String,
    ) -> Webhook {
        Webhook {
            id,
            bot_user_id,
            display_name,
            description,
            secure,
            channel_id,
            owner_id,
            created_at,
            updated_at,
        }
    }
}