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.6.2 (4.6)
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 = "enabled", skip_serializing_if = "Option::is_none")]
22    pub enabled: Option<bool>,
23    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24    pub description: Option<String>,
25}
26
27impl DcimDeviceBayTemplatesCreateRequest {
28    pub fn new(
29        device_type: crate::models::DeviceBayTemplateRequestDeviceType,
30        name: String,
31    ) -> DcimDeviceBayTemplatesCreateRequest {
32        DcimDeviceBayTemplatesCreateRequest {
33            device_type: Box::new(device_type),
34            name,
35            label: None,
36            enabled: None,
37            description: None,
38        }
39    }
40}