Skip to main content

nautobot_openapi/models/
bulk_writable_git_repository_request.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BulkWritableGitRepositoryRequest : Git repositories defined as a data source.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableGitRepositoryRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(rename = "provided_contents", skip_serializing_if = "Option::is_none")]
18    pub provided_contents:
19        Option<Vec<crate::models::BulkWritableGitRepositoryRequestProvidedContentsInner>>,
20    #[serde(rename = "name")]
21    pub name: String,
22    /// Internal field name. Please use underscores rather than dashes in this key.
23    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
24    pub slug: Option<String>,
25    /// Only HTTP and HTTPS URLs are presently supported
26    #[serde(rename = "remote_url")]
27    pub remote_url: String,
28    /// Branch, tag, or commit
29    #[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
30    pub branch: Option<String>,
31    /// Commit hash of the most recent fetch from the selected branch. Used for syncing between workers.
32    #[serde(rename = "current_head", skip_serializing_if = "Option::is_none")]
33    pub current_head: Option<String>,
34    #[serde(
35        rename = "secrets_group",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub secrets_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
41    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
42    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
43    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
44    pub relationships: Option<
45        ::std::collections::HashMap<
46            String,
47            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
48        >,
49    >,
50    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
51    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
52}
53
54impl BulkWritableGitRepositoryRequest {
55    /// Git repositories defined as a data source.
56    pub fn new(
57        id: uuid::Uuid,
58        name: String,
59        remote_url: String,
60    ) -> BulkWritableGitRepositoryRequest {
61        BulkWritableGitRepositoryRequest {
62            id,
63            provided_contents: None,
64            name,
65            slug: None,
66            remote_url,
67            branch: None,
68            current_head: None,
69            secrets_group: None,
70            custom_fields: None,
71            relationships: None,
72            tags: None,
73        }
74    }
75}