netbox-openapi 0.5.4

low level netbox bindings (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * NetBox REST API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 4.6.0 (4.6)
 *
 * Generated by: https://openapi-generator.tech
 */

/// PatchedInventoryItemTemplateRequest : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedInventoryItemTemplateRequest {
    #[serde(rename = "device_type", skip_serializing_if = "Option::is_none")]
    pub device_type: Option<Box<crate::models::DeviceBayTemplateRequestDeviceType>>,
    #[serde(
        rename = "parent",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub parent: Option<Option<i32>>,
    /// {module} is accepted as a substitution for the module bay position when attached to a module type.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Physical label
    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    #[serde(
        rename = "role",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub role: Option<Option<Box<crate::models::InventoryItemRequestRole>>>,
    #[serde(
        rename = "manufacturer",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub manufacturer: Option<Option<Box<crate::models::InventoryItemRequestManufacturer>>>,
    /// Manufacturer-assigned part identifier
    #[serde(rename = "part_id", skip_serializing_if = "Option::is_none")]
    pub part_id: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(
        rename = "component_type",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub component_type: Option<Option<String>>,
    #[serde(
        rename = "component_id",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub component_id: Option<Option<i64>>,
}

impl PatchedInventoryItemTemplateRequest {
    /// Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)
    pub fn new() -> PatchedInventoryItemTemplateRequest {
        PatchedInventoryItemTemplateRequest {
            device_type: None,
            parent: None,
            name: None,
            label: None,
            role: None,
            manufacturer: None,
            part_id: None,
            description: None,
            component_type: None,
            component_id: None,
        }
    }
}