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.4 (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    #[serde(
32        rename = "secrets_group",
33        default,
34        with = "::serde_with::rust::double_option",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub secrets_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
38    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
39    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
40    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
41    pub relationships: Option<
42        ::std::collections::HashMap<
43            String,
44            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
45        >,
46    >,
47    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
48    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
49}
50
51impl BulkWritableGitRepositoryRequest {
52    /// Git repositories defined as a data source.
53    pub fn new(
54        id: uuid::Uuid,
55        name: String,
56        remote_url: String,
57    ) -> BulkWritableGitRepositoryRequest {
58        BulkWritableGitRepositoryRequest {
59            id,
60            provided_contents: None,
61            name,
62            slug: None,
63            remote_url,
64            branch: None,
65            secrets_group: None,
66            custom_fields: None,
67            relationships: None,
68            tags: None,
69        }
70    }
71}