Skip to main content

nautobot_openapi/models/
interface_redundancy_group.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/// InterfaceRedundancyGroup : InterfaceRedundancyGroup Serializer.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct InterfaceRedundancyGroup {
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 = "protocol")]
27    pub protocol: Box<crate::models::InterfaceRedundancyGroupProtocol>,
28    #[serde(rename = "name")]
29    pub name: String,
30    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
31    pub description: Option<String>,
32    #[serde(rename = "protocol_group_id", skip_serializing_if = "Option::is_none")]
33    pub protocol_group_id: Option<String>,
34    #[serde(rename = "status")]
35    pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
36    #[serde(
37        rename = "secrets_group",
38        default,
39        with = "::serde_with::rust::double_option",
40        skip_serializing_if = "Option::is_none"
41    )]
42    pub secrets_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
43    #[serde(
44        rename = "virtual_ip",
45        default,
46        with = "::serde_with::rust::double_option",
47        skip_serializing_if = "Option::is_none"
48    )]
49    pub virtual_ip: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
50    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
51    pub created: Option<String>,
52    #[serde(
53        rename = "last_updated",
54        default,
55        with = "::serde_with::rust::double_option",
56        skip_serializing_if = "Option::is_none"
57    )]
58    pub last_updated: Option<Option<String>>,
59    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
60    pub notes_url: Option<String>,
61    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
62    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
63    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
64    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
65}
66
67impl InterfaceRedundancyGroup {
68    /// InterfaceRedundancyGroup Serializer.
69    pub fn new(
70        protocol: crate::models::InterfaceRedundancyGroupProtocol,
71        name: String,
72        status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
73    ) -> InterfaceRedundancyGroup {
74        InterfaceRedundancyGroup {
75            id: None,
76            object_type: None,
77            display: None,
78            url: None,
79            natural_slug: None,
80            protocol: Box::new(protocol),
81            name,
82            description: None,
83            protocol_group_id: None,
84            status: Box::new(status),
85            secrets_group: None,
86            virtual_ip: None,
87            created: None,
88            last_updated: None,
89            notes_url: None,
90            custom_fields: None,
91            tags: None,
92        }
93    }
94}