#[doc = include_str!("./api_play_gif_file.md")]
use crate::divoom_contracts::pixoo::common::*;
use crate::DivoomFileAnimationSourceType;
use serde::{Deserialize, Serialize};
define_pixoo_command_request!(
"Device/PlayTFGif",
DivoomPixooCommandAnimationPlayGifRequest,
DivoomPixooCommandAnimationPlayGifRequestPayload
);
#[derive(Debug, Serialize, Deserialize, PartialOrd, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct DivoomPixooCommandAnimationPlayGifRequestPayload {
pub file_type: i32,
pub file_name: String,
}
impl DivoomPixooCommandAnimationPlayGifRequestPayload {
pub fn new(
file_type: DivoomFileAnimationSourceType,
file_name: String,
) -> DivoomPixooCommandAnimationPlayGifRequestPayload {
DivoomPixooCommandAnimationPlayGifRequestPayload {
file_type: file_type.into(),
file_name,
}
}
}
define_pixoo_command_response_without_payload!(DivoomPixooCommandAnimationPlayGifResponse);