Skip to main content

nominal_api/conjure/objects/scout/chartdefinition/api/
bucket_display_stat_percentile.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct BucketDisplayStatPercentile {
16    #[builder(into)]
17    #[serde(rename = "value")]
18    value: String,
19}
20impl BucketDisplayStatPercentile {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(value: impl Into<String>) -> Self {
24        Self::builder().value(value).build()
25    }
26    /// Percentile value as a string (e.g. "0.95") to avoid floating-point precision issues.
27    /// Must be between 0 and 1.
28    #[inline]
29    pub fn value(&self) -> &str {
30        &*self.value
31    }
32}