Skip to main content

nautobot_openapi/models/
external_integration.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/// ExternalIntegration : Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ExternalIntegration {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
18    pub object_type: Option<String>,
19    /// Human friendly display value
20    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
21    pub display: Option<String>,
22    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
23    pub url: Option<String>,
24    #[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
25    pub natural_slug: Option<String>,
26    #[serde(rename = "name")]
27    pub name: String,
28    #[serde(rename = "remote_url")]
29    pub remote_url: String,
30    /// Verify SSL certificates when connecting to the remote system
31    #[serde(rename = "verify_ssl", skip_serializing_if = "Option::is_none")]
32    pub verify_ssl: Option<bool>,
33    /// Number of seconds to wait for a response
34    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
35    pub timeout: Option<i32>,
36    /// Optional user-defined JSON data for this integration
37    #[serde(
38        rename = "extra_config",
39        default,
40        with = "::serde_with::rust::double_option",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub extra_config: Option<Option<serde_json::Value>>,
44    #[serde(rename = "http_method", skip_serializing_if = "Option::is_none")]
45    pub http_method: Option<Box<crate::models::BulkWritableExternalIntegrationRequestHttpMethod>>,
46    /// Headers for the HTTP request
47    #[serde(
48        rename = "headers",
49        default,
50        with = "::serde_with::rust::double_option",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub headers: Option<Option<serde_json::Value>>,
54    #[serde(rename = "ca_file_path", skip_serializing_if = "Option::is_none")]
55    pub ca_file_path: Option<String>,
56    #[serde(
57        rename = "secrets_group",
58        default,
59        with = "::serde_with::rust::double_option",
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub secrets_group:
63        Option<Option<Box<crate::models::BulkWritableExternalIntegrationRequestSecretsGroup>>>,
64    #[serde(
65        rename = "created",
66        default,
67        with = "::serde_with::rust::double_option",
68        skip_serializing_if = "Option::is_none"
69    )]
70    pub created: Option<Option<String>>,
71    #[serde(
72        rename = "last_updated",
73        default,
74        with = "::serde_with::rust::double_option",
75        skip_serializing_if = "Option::is_none"
76    )]
77    pub last_updated: Option<Option<String>>,
78    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
79    pub notes_url: Option<String>,
80    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
81    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
82    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
83    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
84}
85
86impl ExternalIntegration {
87    /// Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
88    pub fn new(name: String, remote_url: String) -> ExternalIntegration {
89        ExternalIntegration {
90            id: None,
91            object_type: None,
92            display: None,
93            url: None,
94            natural_slug: None,
95            name,
96            remote_url,
97            verify_ssl: None,
98            timeout: None,
99            extra_config: None,
100            http_method: None,
101            headers: None,
102            ca_file_path: None,
103            secrets_group: None,
104            created: None,
105            last_updated: None,
106            notes_url: None,
107            custom_fields: None,
108            tags: None,
109        }
110    }
111}