#![doc(alias = "channel.channel_points_automatic_reward_redemption")]
use super::{EventSubscription, EventType};
use crate::types;
use serde_derive::{Deserialize, Serialize};
pub mod add;
#[doc(inline)]
pub use add::{
ChannelPointsAutomaticRewardRedemptionAddV1, ChannelPointsAutomaticRewardRedemptionAddV1Payload,
};
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "deny_unknown_fields", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct AutomaticReward {
#[serde(rename = "type")]
pub type_: AutomaticRewardType,
pub cost: i64,
pub unlocked_emote: Option<UnlockedEmote>,
}
#[derive(PartialEq, Eq, Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum AutomaticRewardType {
SingleMessageBypassSubMode,
SendHighlightedMessage,
RandomSubEmoteUnlock,
ChosenSubEmoteUnlock,
ChosenModifiedSubEmoteUnlock,
MessageEffect,
GigantifyAnEmote,
Celebration,
#[serde(untagged)]
Unknown(String),
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "deny_unknown_fields", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct UnlockedEmote {
pub id: types::EmoteId,
pub name: String,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "deny_unknown_fields", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct RedemptionMessage {
pub text: String,
pub emotes: Vec<types::EmoteOccurrence>,
}