Skip to main content

nominal_api/conjure/objects/scout/dataframe/api/
batch_streaming_support.rs

1/// Whether the data frame supports live streaming, plus unsupported data
2/// source diagnostics.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    PartialEq,
9    Eq,
10    PartialOrd,
11    Ord,
12    Hash
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct BatchStreamingSupport {
18    #[serde(rename = "supportsStreaming")]
19    supports_streaming: bool,
20    #[builder(default, list(item(type = super::BatchDataSourceStreamingSupport)))]
21    #[serde(
22        rename = "unsupportedDataSources",
23        skip_serializing_if = "Vec::is_empty",
24        default
25    )]
26    unsupported_data_sources: Vec<super::BatchDataSourceStreamingSupport>,
27}
28impl BatchStreamingSupport {
29    /// Constructs a new instance of the type.
30    #[inline]
31    pub fn new(supports_streaming: bool) -> Self {
32        Self::builder().supports_streaming(supports_streaming).build()
33    }
34    /// True iff `unsupportedDataSources` is empty.
35    #[inline]
36    pub fn supports_streaming(&self) -> bool {
37        self.supports_streaming
38    }
39    /// Diagnostic entries for data sources reachable from the data frame that do
40    /// not support live streaming. A data source may appear multiple times if
41    /// multiple checks fail.
42    #[inline]
43    pub fn unsupported_data_sources(&self) -> &[super::BatchDataSourceStreamingSupport] {
44        &*self.unsupported_data_sources
45    }
46}