Skip to main content

gitbundle_sdk/models/
commit_branch.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 CommitBranch {
17    #[serde(
18        rename = "commit",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub commit: Option<Option<Box<models::Commit>>>,
24    #[serde(rename = "name")]
25    pub name: String,
26    #[serde(rename = "sha")]
27    pub sha: String,
28}
29
30impl CommitBranch {
31    pub fn new(name: String, sha: String) -> CommitBranch {
32        CommitBranch {
33            commit: None,
34            name,
35            sha,
36        }
37    }
38}