// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `com.atproto.repo.putRecord` namespace.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Input {
    ///The NSID of the record collection.
    pub collection: String,
    ///The record to write.
    pub record: crate::records::Record,
    ///The handle or DID of the repo.
    pub repo: String,
    ///The key of the record.
    pub rkey: String,
    ///Compare and swap with the previous commit by cid.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub swap_commit: Option<String>,
    ///Compare and swap with the previous record by cid.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub swap_record: Option<String>,
    ///Validate the record?
    #[serde(skip_serializing_if = "Option::is_none")]
    pub validate: Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Output {
    pub cid: String,
    pub uri: String,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
    InvalidSwap(Option<String>),
}
