1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* server
*
* ## 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
*
* The version of the OpenAPI document:
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// UnstableDashboardWidgetChartConfig : Chart-specific widget configuration. `type` must match the top-level `chartType`. `row_limit` applies to total-value charts and pivot tables. `bins` applies to histograms. `defaultSort` applies to pivot tables.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct UnstableDashboardWidgetChartConfig {
#[serde(rename = "type")]
pub r#type: models::UnstableDashboardWidgetChartType,
#[serde(
rename = "row_limit",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub row_limit: Option<Option<i32>>,
#[serde(
rename = "show_value_labels",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub show_value_labels: Option<Option<bool>>,
#[serde(
rename = "bins",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub bins: Option<Option<i32>>,
#[serde(rename = "defaultSort", skip_serializing_if = "Option::is_none")]
pub default_sort: Option<Box<models::UnstableDashboardWidgetDefaultSort>>,
}
impl UnstableDashboardWidgetChartConfig {
/// Chart-specific widget configuration. `type` must match the top-level `chartType`. `row_limit` applies to total-value charts and pivot tables. `bins` applies to histograms. `defaultSort` applies to pivot tables.
pub fn new(
r#type: models::UnstableDashboardWidgetChartType,
) -> UnstableDashboardWidgetChartConfig {
UnstableDashboardWidgetChartConfig {
r#type,
row_limit: None,
show_value_labels: None,
bins: None,
default_sort: None,
}
}
}