netbox_openapi/models/
brief_power_port_request.rs

1/*
2 * NetBox REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BriefPowerPortRequest : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BriefPowerPortRequest {
15    #[serde(rename = "device")]
16    pub device: Box<crate::models::BriefInterfaceRequestDevice>,
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
20    pub description: Option<String>,
21}
22
23impl BriefPowerPortRequest {
24    /// Adds support for custom fields and tags.
25    pub fn new(
26        device: crate::models::BriefInterfaceRequestDevice,
27        name: String,
28    ) -> BriefPowerPortRequest {
29        BriefPowerPortRequest {
30            device: Box::new(device),
31            name,
32            description: None,
33        }
34    }
35}