openapi_github/models/
timeline_committed_event.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TimelineCommittedEvent : Timeline Committed Event
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TimelineCommittedEvent {
17    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
18    pub event: Option<String>,
19    /// SHA for the commit
20    #[serde(rename = "sha")]
21    pub sha: String,
22    #[serde(rename = "node_id")]
23    pub node_id: String,
24    #[serde(rename = "url")]
25    pub url: String,
26    #[serde(rename = "author")]
27    pub author: Box<models::GitCommitAuthor>,
28    #[serde(rename = "committer")]
29    pub committer: Box<models::GitCommitAuthor>,
30    /// Message describing the purpose of the commit
31    #[serde(rename = "message")]
32    pub message: String,
33    #[serde(rename = "tree")]
34    pub tree: Box<models::GitCommitTree>,
35    #[serde(rename = "parents")]
36    pub parents: Vec<models::GitCommitParentsInner>,
37    #[serde(rename = "verification")]
38    pub verification: Box<models::GitCommitVerification>,
39    #[serde(rename = "html_url")]
40    pub html_url: String,
41}
42
43impl TimelineCommittedEvent {
44    /// Timeline Committed Event
45    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) -> TimelineCommittedEvent {
46        TimelineCommittedEvent {
47            event: None,
48            sha,
49            node_id,
50            url,
51            author: Box::new(author),
52            committer: Box::new(committer),
53            message,
54            tree: Box::new(tree),
55            parents,
56            verification: Box::new(verification),
57            html_url,
58        }
59    }
60}
61