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

/// ActiveOAuth2Token : 有効なOAuth2トークン情報

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ActiveOAuth2Token {
    /// トークンUUID
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// OAuth2クライアントUUID
    #[serde(rename = "clientId")]
    pub client_id: String,
    /// スコープ
    #[serde(rename = "scopes")]
    pub scopes: Vec<crate::models::OAuth2Scope>,
    /// 発行日時
    #[serde(rename = "issuedAt")]
    pub issued_at: String,
}

impl ActiveOAuth2Token {
    /// 有効なOAuth2トークン情報
    pub fn new(
        id: uuid::Uuid,
        client_id: String,
        scopes: Vec<crate::models::OAuth2Scope>,
        issued_at: String,
    ) -> ActiveOAuth2Token {
        ActiveOAuth2Token {
            id,
            client_id,
            scopes,
            issued_at,
        }
    }
}