gitbundle_sdk/models/
contributor.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.3.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Contributor {
17    #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")]
18    pub display_name: Option<String>,
19    #[serde(rename = "email")]
20    pub email: String,
21    #[serde(rename = "id")]
22    pub id: i64,
23    #[serde(rename = "name")]
24    pub name: String,
25    #[serde(rename = "num_commits")]
26    pub num_commits: i64,
27}
28
29impl Contributor {
30    pub fn new(email: String, id: i64, name: String, num_commits: i64) -> Contributor {
31        Contributor {
32            display_name: None,
33            email,
34            id,
35            name,
36            num_commits,
37        }
38    }
39}