netbox_openapi/models/
script_input_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#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct ScriptInputRequest {
13    #[serde(rename = "data", deserialize_with = "Option::deserialize")]
14    pub data: Option<serde_json::Value>,
15    #[serde(rename = "commit")]
16    pub commit: bool,
17    #[serde(
18        rename = "schedule_at",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub schedule_at: Option<Option<String>>,
24    #[serde(
25        rename = "interval",
26        default,
27        with = "::serde_with::rust::double_option",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub interval: Option<Option<i32>>,
31}
32
33impl ScriptInputRequest {
34    pub fn new(data: Option<serde_json::Value>, commit: bool) -> ScriptInputRequest {
35        ScriptInputRequest {
36            data,
37            commit,
38            schedule_at: None,
39            interval: None,
40        }
41    }
42}