langfuse_client_base/models/
patch_media_body.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
15pub struct PatchMediaBody {
16 #[serde(rename = "uploadedAt")]
18 pub uploaded_at: chrono::DateTime<chrono::FixedOffset>,
19 #[serde(rename = "uploadHttpStatus")]
21 pub upload_http_status: i32,
22 #[serde(
24 rename = "uploadHttpError",
25 default,
26 with = "::serde_with::rust::double_option",
27 skip_serializing_if = "Option::is_none"
28 )]
29 pub upload_http_error: Option<Option<String>>,
30 #[serde(
32 rename = "uploadTimeMs",
33 default,
34 with = "::serde_with::rust::double_option",
35 skip_serializing_if = "Option::is_none"
36 )]
37 pub upload_time_ms: Option<Option<i32>>,
38}
39
40impl PatchMediaBody {
41 pub fn new(
42 uploaded_at: chrono::DateTime<chrono::FixedOffset>,
43 upload_http_status: i32,
44 ) -> PatchMediaBody {
45 PatchMediaBody {
46 uploaded_at,
47 upload_http_status,
48 upload_http_error: None,
49 upload_time_ms: None,
50 }
51 }
52}