Skip to main content

nautobot_openapi/models/
patched_bulk_writable_interface_template_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/// PatchedBulkWritableInterfaceTemplateRequest : 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 PatchedBulkWritableInterfaceTemplateRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<crate::models::InterfaceTypeChoices>,
19    #[serde(rename = "port_type", skip_serializing_if = "Option::is_none")]
20    pub port_type: Option<crate::models::PortTypeChoices>,
21    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22    pub name: Option<String>,
23    /// Physical label
24    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
25    pub label: Option<String>,
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    #[serde(rename = "mgmt_only", skip_serializing_if = "Option::is_none")]
29    pub mgmt_only: Option<bool>,
30    #[serde(
31        rename = "speed",
32        default,
33        with = "::serde_with::rust::double_option",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub speed: Option<Option<i32>>,
37    #[serde(rename = "duplex", skip_serializing_if = "Option::is_none")]
38    pub duplex: Option<Box<crate::models::BulkWritableInterfaceTemplateRequestDuplex>>,
39    #[serde(
40        rename = "device_type",
41        default,
42        with = "::serde_with::rust::double_option",
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub device_type: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
46    #[serde(
47        rename = "module_type",
48        default,
49        with = "::serde_with::rust::double_option",
50        skip_serializing_if = "Option::is_none"
51    )]
52    pub module_type: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
53    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
54    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
55    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
56    pub relationships: Option<
57        ::std::collections::HashMap<
58            String,
59            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
60        >,
61    >,
62}
63
64impl PatchedBulkWritableInterfaceTemplateRequest {
65    /// 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.
66    pub fn new(id: uuid::Uuid) -> PatchedBulkWritableInterfaceTemplateRequest {
67        PatchedBulkWritableInterfaceTemplateRequest {
68            id,
69            r#type: None,
70            port_type: None,
71            name: None,
72            label: None,
73            description: None,
74            mgmt_only: None,
75            speed: None,
76            duplex: None,
77            device_type: None,
78            module_type: None,
79            custom_fields: None,
80            relationships: None,
81        }
82    }
83}