Skip to main content

gitbundle_sdk/models/
pullreq_with_diff_stats.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.4.1
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 PullreqWithDiffStats {
17    #[serde(
18        rename = "author",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub author: Option<Option<Box<models::UserModel>>>,
24    #[serde(rename = "diff_stats")]
25    pub diff_stats: Box<models::DiffStats>,
26    #[serde(
27        rename = "merger",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub merger: Option<Option<Box<models::UserModel>>>,
33    #[serde(rename = "model")]
34    pub model: Box<models::PullreqModel>,
35}
36
37impl PullreqWithDiffStats {
38    pub fn new(diff_stats: models::DiffStats, model: models::PullreqModel) -> PullreqWithDiffStats {
39        PullreqWithDiffStats {
40            author: None,
41            diff_stats: Box::new(diff_stats),
42            merger: None,
43            model: Box::new(model),
44        }
45    }
46}