#[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 IncompatibleSeriesMetadataUpdate {
    #[serde(rename = "violationCount")]
    violation_count: i32,
    #[builder(default, list(item(type = String, into)))]
    #[serde(rename = "violations", skip_serializing_if = "Vec::is_empty", default)]
    violations: Vec<String>,
}
impl IncompatibleSeriesMetadataUpdate {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(violation_count: i32) -> Self {
        Self::builder().violation_count(violation_count).build()
    }
    #[inline]
    pub fn violation_count(&self) -> i32 {
        self.violation_count
    }
    #[inline]
    pub fn violations(&self) -> &[String] {
        &*self.violations
    }
}
impl conjure_error::ErrorType for IncompatibleSeriesMetadataUpdate {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "SeriesMetadata:IncompatibleSeriesMetadataUpdate"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["violationCount", "violations"]
    }
}
