pub const NSID: &str = "app.bsky.video.abortUpload";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct InputData {
pub job_id: String,
}
pub type Input = crate::types::Object<InputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct OutputData {
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub completed_job_id: core::option::Option<String>,
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub failure_reason: core::option::Option<String>,
pub state: String,
}
pub type Output = crate::types::Object<OutputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
UploadNotFound(Option<String>),
UploadNotReady(Option<String>),
}
impl std::fmt::Display for Error {
fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Error::UploadNotFound(msg) => {
write!(_f, "UploadNotFound")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
Error::UploadNotReady(msg) => {
write!(_f, "UploadNotReady")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
}
Ok(())
}
}