/// Whether the dataset supports live streaming, plus unsupported data
/// source diagnostics.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct BatchStreamingSupport {
    #[serde(rename = "supportsStreaming")]
    supports_streaming: bool,
    #[builder(default, list(item(type = super::BatchDataSourceStreamingSupport)))]
    #[serde(
        rename = "unsupportedDataSources",
        skip_serializing_if = "Vec::is_empty",
        default
    )]
    unsupported_data_sources: Vec<super::BatchDataSourceStreamingSupport>,
}
impl BatchStreamingSupport {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(supports_streaming: bool) -> Self {
        Self::builder().supports_streaming(supports_streaming).build()
    }
    /// True iff `unsupportedDataSources` is empty.
    #[inline]
    pub fn supports_streaming(&self) -> bool {
        self.supports_streaming
    }
    /// Diagnostic entries for data sources reachable from the dataset that do
    /// not support live streaming. A data source may appear multiple times if
    /// multiple checks fail.
    #[inline]
    pub fn unsupported_data_sources(&self) -> &[super::BatchDataSourceStreamingSupport] {
        &*self.unsupported_data_sources
    }
}
