Skip to main content

windmill_api/models/
gitlab_project.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.816.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// GitlabProject : a GitLab project a token can sync, as the resource form needs it
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GitlabProject {
17    /// nested group path plus project name, which is also GitLab's project id
18    #[serde(rename = "path_with_namespace")]
19    pub path_with_namespace: String,
20    #[serde(rename = "http_url_to_repo")]
21    pub http_url_to_repo: String,
22    #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
23    pub default_branch: Option<String>,
24}
25
26impl GitlabProject {
27    /// a GitLab project a token can sync, as the resource form needs it
28    pub fn new(path_with_namespace: String, http_url_to_repo: String) -> GitlabProject {
29        GitlabProject {
30            path_with_namespace,
31            http_url_to_repo,
32            default_branch: None,
33        }
34    }
35}
36