langfuse_client/models/
patch_media_body.rs

1/*
2 * langfuse
3 *
4 * ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml - Postman collection: https://cloud.langfuse.com/generated/postman/collection.json
5 *
6 * The version of the OpenAPI document: 
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)]
15#[cfg_attr(feature="bon", derive(bon::Builder))]
16pub struct PatchMediaBody {
17    /// The date and time when the media record was uploaded
18    #[serde(rename = "uploadedAt")]
19    pub uploaded_at: String,
20    /// The HTTP status code of the upload
21    #[serde(rename = "uploadHttpStatus")]
22    pub upload_http_status: i32,
23    /// The HTTP error message of the upload
24    #[serde(rename = "uploadHttpError", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub upload_http_error: Option<Option<String>>,
26    /// The time in milliseconds it took to upload the media record
27    #[serde(rename = "uploadTimeMs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub upload_time_ms: Option<Option<i32>>,
29}
30
31impl PatchMediaBody {
32    pub fn new(uploaded_at: String, upload_http_status: i32) -> PatchMediaBody {
33        PatchMediaBody {
34            uploaded_at,
35            upload_http_status,
36            upload_http_error: None,
37            upload_time_ms: None,
38        }
39    }
40}
41