openapi_github/models/
git_commit.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GitCommit {
17 #[serde(rename = "sha")]
19 pub sha: String,
20 #[serde(rename = "node_id")]
21 pub node_id: String,
22 #[serde(rename = "url")]
23 pub url: String,
24 #[serde(rename = "author")]
25 pub author: Box<models::GitCommitAuthor>,
26 #[serde(rename = "committer")]
27 pub committer: Box<models::GitCommitAuthor>,
28 #[serde(rename = "message")]
30 pub message: String,
31 #[serde(rename = "tree")]
32 pub tree: Box<models::GitCommitTree>,
33 #[serde(rename = "parents")]
34 pub parents: Vec<models::GitCommitParentsInner>,
35 #[serde(rename = "verification")]
36 pub verification: Box<models::GitCommitVerification>,
37 #[serde(rename = "html_url")]
38 pub html_url: String,
39}
40
41impl GitCommit {
42 pub fn new(sha: String, node_id: String, url: String, author: models::GitCommitAuthor, committer: models::GitCommitAuthor, message: String, tree: models::GitCommitTree, parents: Vec<models::GitCommitParentsInner>, verification: models::GitCommitVerification, html_url: String) -> GitCommit {
44 GitCommit {
45 sha,
46 node_id,
47 url,
48 author: Box::new(author),
49 committer: Box::new(committer),
50 message,
51 tree: Box::new(tree),
52 parents,
53 verification: Box::new(verification),
54 html_url,
55 }
56 }
57}
58