Skip to main content

netbox_openapi/models/
dcim_device_bay_templates_create_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.5.9-Docker-4.0.2 (4.5)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct DcimDeviceBayTemplatesCreateRequest {
13    #[serde(rename = "device_type")]
14    pub device_type: Box<crate::models::DeviceBayTemplateRequestDeviceType>,
15    /// {module} is accepted as a substitution for the module bay position when attached to a module type.
16    #[serde(rename = "name")]
17    pub name: String,
18    /// Physical label
19    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
20    pub label: Option<String>,
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23}
24
25impl DcimDeviceBayTemplatesCreateRequest {
26    pub fn new(
27        device_type: crate::models::DeviceBayTemplateRequestDeviceType,
28        name: String,
29    ) -> DcimDeviceBayTemplatesCreateRequest {
30        DcimDeviceBayTemplatesCreateRequest {
31            device_type: Box::new(device_type),
32            name,
33            label: None,
34            description: None,
35        }
36    }
37}