Skip to main content

mistral_openapi_client/models/
event_out.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.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 EventOut {
16    /// The name of the event.
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub data: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
21    /// The UNIX timestamp (in seconds) of the event.
22    #[serde(rename = "created_at")]
23    pub created_at: i32,
24}
25
26impl EventOut {
27    pub fn new(name: String, created_at: i32) -> EventOut {
28        EventOut {
29            name,
30            data: None,
31            created_at,
32        }
33    }
34}
35