Skip to main content

orvanta_api/models/
git_repository_settings.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 6.5.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GitRepositorySettings {
16    #[serde(rename = "script_path", skip_serializing_if = "Option::is_none")]
17    pub script_path: Option<String>,
18    #[serde(rename = "git_repo_resource_path")]
19    pub git_repo_resource_path: String,
20    #[serde(rename = "use_individual_branch", skip_serializing_if = "Option::is_none")]
21    pub use_individual_branch: Option<bool>,
22    #[serde(rename = "group_by_folder", skip_serializing_if = "Option::is_none")]
23    pub group_by_folder: Option<bool>,
24    #[serde(rename = "collapsed", skip_serializing_if = "Option::is_none")]
25    pub collapsed: Option<bool>,
26    #[serde(rename = "settings", skip_serializing_if = "Option::is_none")]
27    pub settings: Option<Box<models::GitRepositorySettingsSettings>>,
28    #[serde(rename = "exclude_types_override", skip_serializing_if = "Option::is_none")]
29    pub exclude_types_override: Option<Vec<models::GitSyncObjectType>>,
30    /// The remote deploys are pinned to (#1801), without credentials. Server-written only: when the entry is first added, by git_sync_repin, or by the one-time backfill; a value sent by a client is replaced with the stored one. Deploys are refused while the resource names a different remote or branch.
31    #[serde(rename = "pinned_remote", skip_serializing_if = "Option::is_none")]
32    pub pinned_remote: Option<String>,
33    /// The base branch pinned together with pinned_remote (#1801).
34    #[serde(rename = "pinned_branch", skip_serializing_if = "Option::is_none")]
35    pub pinned_branch: Option<String>,
36}
37
38impl GitRepositorySettings {
39    pub fn new(git_repo_resource_path: String) -> GitRepositorySettings {
40        GitRepositorySettings {
41            script_path: None,
42            git_repo_resource_path,
43            use_individual_branch: None,
44            group_by_folder: None,
45            collapsed: None,
46            settings: None,
47            exclude_types_override: None,
48            pinned_remote: None,
49            pinned_branch: None,
50        }
51    }
52}
53