/// The subscription is operating on too many points.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    Copy
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct TooManyPoints {
    #[serde(rename = "limit")]
    limit: conjure_object::SafeLong,
    #[builder(default, into)]
    #[serde(rename = "totalNumSeries", skip_serializing_if = "Option::is_none", default)]
    total_num_series: Option<conjure_object::SafeLong>,
}
impl TooManyPoints {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(limit: conjure_object::SafeLong) -> Self {
        Self::builder().limit(limit).build()
    }
    #[inline]
    pub fn limit(&self) -> conjure_object::SafeLong {
        self.limit
    }
    #[inline]
    pub fn total_num_series(&self) -> Option<conjure_object::SafeLong> {
        self.total_num_series.as_ref().map(|o| *o)
    }
}
impl conjure_error::ErrorType for TooManyPoints {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "PersistentCompute:TooManyPoints"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["limit", "totalNumSeries"]
    }
}
