gitbundle_sdk/models/
repo_parent.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 RepoParent {
17    #[serde(rename = "model")]
18    pub model: Box<models::RepositoryModel>,
19    #[serde(
20        rename = "parent",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub parent: Option<Option<Box<models::RepositoryModel>>>,
26}
27
28impl RepoParent {
29    pub fn new(model: models::RepositoryModel) -> RepoParent {
30        RepoParent {
31            model: Box::new(model),
32            parent: None,
33        }
34    }
35}