#[doc = include_str!("./api_select_cloud_channel.md")]
use crate::divoom_contracts::pixoo::common::*;
use crate::DivoomCloudChannelType;
use serde::{Deserialize, Serialize};
define_pixoo_command_request!(
"Channel/CloudIndex",
DivoomPixooCommandChannelSelectCloudChannelRequest,
DivoomPixooCommandChannelSelectCloudChannelRequestPayload
);
#[derive(Debug, Serialize, Deserialize, PartialOrd, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct DivoomPixooCommandChannelSelectCloudChannelRequestPayload {
pub index: i32,
}
impl DivoomPixooCommandChannelSelectCloudChannelRequestPayload {
pub fn new(
channel_type: DivoomCloudChannelType,
) -> DivoomPixooCommandChannelSelectCloudChannelRequestPayload {
DivoomPixooCommandChannelSelectCloudChannelRequestPayload {
index: channel_type.into(),
}
}
}
define_pixoo_command_response_without_payload!(DivoomPixooCommandChannelSelectCloudChannelResponse);