openapi_github/models/
file_commit.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FileCommit {
17 #[serde(rename = "content", deserialize_with = "Option::deserialize")]
18 pub content: Option<Box<models::FileCommitContent>>,
19 #[serde(rename = "commit")]
20 pub commit: Box<models::FileCommitCommit>,
21}
22
23impl FileCommit {
24 pub fn new(content: Option<models::FileCommitContent>, commit: models::FileCommitCommit) -> FileCommit {
26 FileCommit {
27 content: content.map(Box::new),
28 commit: Box::new(commit),
29 }
30 }
31}
32