/// The subscription is operating on a series that has too many points.
#[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 TooManyPointsForSingleSeries {
    #[serde(rename = "limit")]
    limit: conjure_object::SafeLong,
    #[builder(default, into)]
    #[serde(
        rename = "requestStartBound",
        skip_serializing_if = "Option::is_none",
        default
    )]
    request_start_bound: Option<String>,
}
impl TooManyPointsForSingleSeries {
    /// 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 request_start_bound(&self) -> Option<&str> {
        self.request_start_bound.as_ref().map(|o| &**o)
    }
}
impl conjure_error::ErrorType for TooManyPointsForSingleSeries {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "PersistentCompute:TooManyPointsForSingleSeries"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["limit", "requestStartBound"]
    }
}
