langfuse_client_base/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)]
15pub struct PatchMediaBody {
16    /// The date and time when the media record was uploaded
17    #[serde(rename = "uploadedAt")]
18    pub uploaded_at: String,
19    /// The HTTP status code of the upload
20    #[serde(rename = "uploadHttpStatus")]
21    pub upload_http_status: i32,
22    /// The HTTP error message of the upload
23    #[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    /// The time in milliseconds it took to upload the media record
31    #[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(uploaded_at: String, upload_http_status: i32) -> PatchMediaBody {
42        PatchMediaBody {
43            uploaded_at,
44            upload_http_status,
45            upload_http_error: None,
46            upload_time_ms: None,
47        }
48    }
49}