Skip to main content

netbox_openapi/models/
script_module.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/// ScriptModule : 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>)
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ScriptModule {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<i32>,
17    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
18    pub display: Option<String>,
19    #[serde(rename = "file_path", skip_serializing_if = "Option::is_none")]
20    pub file_path: Option<String>,
21    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
22    pub created: Option<String>,
23    #[serde(
24        rename = "last_updated",
25        default,
26        with = "::serde_with::rust::double_option",
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub last_updated: Option<Option<String>>,
30}
31
32impl ScriptModule {
33    /// 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>)
34    pub fn new() -> ScriptModule {
35        ScriptModule {
36            id: None,
37            display: None,
38            file_path: None,
39            created: None,
40            last_updated: None,
41        }
42    }
43}