langfuse_client_base/models/
otel_attribute_value.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/// OtelAttributeValue : Attribute value wrapper supporting different value types
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
16pub struct OtelAttributeValue {
17    /// String value
18    #[serde(
19        rename = "stringValue",
20        default,
21        with = "::serde_with::rust::double_option",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub string_value: Option<Option<String>>,
25    /// Integer value
26    #[serde(
27        rename = "intValue",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub int_value: Option<Option<i32>>,
33    /// Double value
34    #[serde(
35        rename = "doubleValue",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub double_value: Option<Option<f64>>,
41    /// Boolean value
42    #[serde(
43        rename = "boolValue",
44        default,
45        with = "::serde_with::rust::double_option",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub bool_value: Option<Option<bool>>,
49}
50
51impl OtelAttributeValue {
52    /// Attribute value wrapper supporting different value types
53    pub fn new() -> OtelAttributeValue {
54        OtelAttributeValue {
55            string_value: None,
56            int_value: None,
57            double_value: None,
58            bool_value: None,
59        }
60    }
61}