thehive_client/models/
input_custom_event.rs

1/*
2 * TheHive API
3 *
4 * Comprehensive OpenAPI specification inferred from the TheHive4py client library. This API allows interaction with TheHive platform for managing alerts, cases, observables, tasks, users, and other entities. 
5 *
6 * The version of the OpenAPI document: 2.1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InputCustomEvent {
16    #[serde(rename = "date")]
17    pub date: i64,
18    #[serde(rename = "endDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub end_date: Option<Option<i64>>,
20    #[serde(rename = "title")]
21    pub title: String,
22    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub description: Option<Option<String>>,
24}
25
26impl InputCustomEvent {
27    pub fn new(date: i64, title: String) -> InputCustomEvent {
28        InputCustomEvent {
29            date,
30            end_date: None,
31            title,
32            description: None,
33        }
34    }
35}
36