use super::APIPermissionDemandIdentify;
use crate::models::Snowflake;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct APIPermissionDemandToCreate {
#[serde(default)]
pub channel_id: Snowflake,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub api_identify: Option<APIPermissionDemandIdentify>,
#[serde(default)]
pub desc: String,
}
impl APIPermissionDemandToCreate {
pub fn new(
channel_id: impl Into<String>,
api_identify: APIPermissionDemandIdentify,
desc: impl Into<String>,
) -> Self {
Self {
channel_id: channel_id.into(),
api_identify: Some(api_identify),
desc: desc.into(),
}
}
}