Skip to main content

nautobot_openapi/models/
external_integration_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/// ExternalIntegrationRequest : 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 ExternalIntegrationRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "remote_url")]
20    pub remote_url: String,
21    /// Verify SSL certificates when connecting to the remote system
22    #[serde(rename = "verify_ssl", skip_serializing_if = "Option::is_none")]
23    pub verify_ssl: Option<bool>,
24    /// Number of seconds to wait for a response
25    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
26    pub timeout: Option<i32>,
27    /// Optional user-defined JSON data for this integration
28    #[serde(
29        rename = "extra_config",
30        default,
31        with = "::serde_with::rust::double_option",
32        skip_serializing_if = "Option::is_none"
33    )]
34    pub extra_config: Option<Option<serde_json::Value>>,
35    #[serde(rename = "http_method", skip_serializing_if = "Option::is_none")]
36    pub http_method: Option<Box<crate::models::BulkWritableExternalIntegrationRequestHttpMethod>>,
37    /// Headers for the HTTP request
38    #[serde(
39        rename = "headers",
40        default,
41        with = "::serde_with::rust::double_option",
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub headers: Option<Option<serde_json::Value>>,
45    #[serde(rename = "ca_file_path", skip_serializing_if = "Option::is_none")]
46    pub ca_file_path: Option<String>,
47    #[serde(
48        rename = "secrets_group",
49        default,
50        with = "::serde_with::rust::double_option",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub secrets_group:
54        Option<Option<Box<crate::models::BulkWritableExternalIntegrationRequestSecretsGroup>>>,
55    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
56    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
57    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
58    pub relationships: Option<
59        ::std::collections::HashMap<
60            String,
61            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
62        >,
63    >,
64    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
65    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
66}
67
68impl ExternalIntegrationRequest {
69    /// 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.
70    pub fn new(name: String, remote_url: String) -> ExternalIntegrationRequest {
71        ExternalIntegrationRequest {
72            id: None,
73            name,
74            remote_url,
75            verify_ssl: None,
76            timeout: None,
77            extra_config: None,
78            http_method: None,
79            headers: None,
80            ca_file_path: None,
81            secrets_group: None,
82            custom_fields: None,
83            relationships: None,
84            tags: None,
85        }
86    }
87}