/// The requested compute contains nodes that support streaming but only via polling (not WebSocket).
/// The frontend should use polling mode (HTTP requests) instead of WebSocket streaming for this query.
#[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 PollingOnlyComputation {
    #[builder(
        default,
        set(
            item(
                type = super::super::super::super::super::objects::persistent::compute::api::PollingOnlyComputationType
            )
        )
    )]
    #[serde(
        rename = "pollingOnlyTypes",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    polling_only_types: std::collections::BTreeSet<
        super::super::super::super::super::objects::persistent::compute::api::PollingOnlyComputationType,
    >,
}
impl PollingOnlyComputation {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn polling_only_types(
        &self,
    ) -> &std::collections::BTreeSet<
        super::super::super::super::super::objects::persistent::compute::api::PollingOnlyComputationType,
    > {
        &self.polling_only_types
    }
}
impl conjure_error::ErrorType for PollingOnlyComputation {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "PersistentCompute:PollingOnlyComputation"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["pollingOnlyTypes"]
    }
}
