use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FileCommit {
#[serde(rename = "content", deserialize_with = "Option::deserialize")]
pub content: Option<Box<models::FileCommitContent>>,
#[serde(rename = "commit")]
pub commit: Box<models::FileCommitCommit>,
}
impl FileCommit {
pub fn new(content: Option<models::FileCommitContent>, commit: models::FileCommitCommit) -> FileCommit {
FileCommit {
content: content.map(Box::new),
commit: Box::new(commit),
}
}
}