netbox-openapi 0.6.0

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.2 (4.6)
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ScriptInputRequest {
    #[serde(rename = "data", deserialize_with = "Option::deserialize")]
    pub data: Option<serde_json::Value>,
    #[serde(rename = "commit")]
    pub commit: bool,
    #[serde(
        rename = "schedule_at",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub schedule_at: Option<Option<String>>,
    #[serde(
        rename = "interval",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub interval: Option<Option<i32>>,
    /// * `always` - Always * `on_failure` - On failure * `never` - Never
    #[serde(rename = "notifications", skip_serializing_if = "Option::is_none")]
    pub notifications: Option<Notifications>,
}

impl ScriptInputRequest {
    pub fn new(data: Option<serde_json::Value>, commit: bool) -> ScriptInputRequest {
        ScriptInputRequest {
            data,
            commit,
            schedule_at: None,
            interval: None,
            notifications: None,
        }
    }
}

/// * `always` - Always * `on_failure` - On failure * `never` - Never
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Notifications {
    #[serde(rename = "always")]
    Always,
    #[serde(rename = "on_failure")]
    OnFailure,
    #[serde(rename = "never")]
    Never,
}

impl Default for Notifications {
    fn default() -> Notifications {
        Self::Always
    }
}