#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct DerivedSeriesHasWrongType {
    #[builder(into)]
    #[serde(rename = "expectedType")]
    expected_type: String,
    #[builder(
        custom(
            type = super::super::super::super::super::objects::scout::compute::api::DerivedSeries,
            convert = Box::new
        )
    )]
    #[serde(rename = "derivedSeries")]
    derived_series: Box<
        super::super::super::super::super::objects::scout::compute::api::DerivedSeries,
    >,
}
impl DerivedSeriesHasWrongType {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        expected_type: impl Into<String>,
        derived_series: super::super::super::super::super::objects::scout::compute::api::DerivedSeries,
    ) -> Self {
        Self::builder()
            .expected_type(expected_type)
            .derived_series(derived_series)
            .build()
    }
    #[inline]
    pub fn expected_type(&self) -> &str {
        &*self.expected_type
    }
    #[inline]
    pub fn derived_series(
        &self,
    ) -> &super::super::super::super::super::objects::scout::compute::api::DerivedSeries {
        &*self.derived_series
    }
}
impl conjure_error::ErrorType for DerivedSeriesHasWrongType {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "Compute:DerivedSeriesHasWrongType"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["expectedType"]
    }
}
