/// One or more requested export columns could not be exported.
#[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 ChannelsNotExportable {
    #[builder(into)]
    #[serde(rename = "format")]
    format: String,
    #[serde(rename = "failureCount")]
    failure_count: i32,
    #[builder(default, set(item(type = String, into)))]
    #[serde(
        rename = "errorNames",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    error_names: std::collections::BTreeSet<String>,
    #[builder(
        default,
        list(
            item(
                type = super::super::super::super::super::objects::scout::dataexport::api::ExportChannelFailure
            )
        )
    )]
    #[serde(rename = "channelFailures", skip_serializing_if = "Vec::is_empty", default)]
    channel_failures: Vec<
        super::super::super::super::super::objects::scout::dataexport::api::ExportChannelFailure,
    >,
}
impl ChannelsNotExportable {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(format: impl Into<String>, failure_count: i32) -> Self {
        Self::builder().format(format).failure_count(failure_count).build()
    }
    #[inline]
    pub fn format(&self) -> &str {
        &*self.format
    }
    #[inline]
    pub fn failure_count(&self) -> i32 {
        self.failure_count
    }
    #[inline]
    pub fn error_names(&self) -> &std::collections::BTreeSet<String> {
        &self.error_names
    }
    #[inline]
    pub fn channel_failures(
        &self,
    ) -> &[super::super::super::super::super::objects::scout::dataexport::api::ExportChannelFailure] {
        &*self.channel_failures
    }
}
impl conjure_error::ErrorType for ChannelsNotExportable {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "Export:ChannelsNotExportable"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["errorNames", "failureCount", "format"]
    }
}
