Skip to main content

nominal_api/conjure/objects/datasource/api/
get_series_count_response.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    Copy
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct GetSeriesCountResponse {
17    #[builder(default, into)]
18    #[serde(rename = "seriesCount", skip_serializing_if = "Option::is_none", default)]
19    series_count: Option<i32>,
20}
21impl GetSeriesCountResponse {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new() -> Self {
25        Self::builder().build()
26    }
27    /// The number of distinct series. Empty if the datasource type does not support series counting
28    /// (e.g. external datasources).
29    #[inline]
30    pub fn series_count(&self) -> Option<i32> {
31        self.series_count.as_ref().map(|o| *o)
32    }
33}