#[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 InvalidDataSourceRefNameType {
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[serde(rename = "type")]
    type_: super::super::super::super::super::objects::scout::run::api::DataSourceType,
    #[serde(rename = "existingType")]
    existing_type: super::super::super::super::super::objects::scout::run::api::DataSourceType,
}
impl InvalidDataSourceRefNameType {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        name: impl Into<String>,
        type_: super::super::super::super::super::objects::scout::run::api::DataSourceType,
        existing_type: super::super::super::super::super::objects::scout::run::api::DataSourceType,
    ) -> Self {
        Self::builder().name(name).type_(type_).existing_type(existing_type).build()
    }
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    #[inline]
    pub fn type_(
        &self,
    ) -> &super::super::super::super::super::objects::scout::run::api::DataSourceType {
        &self.type_
    }
    #[inline]
    pub fn existing_type(
        &self,
    ) -> &super::super::super::super::super::objects::scout::run::api::DataSourceType {
        &self.existing_type
    }
}
impl conjure_error::ErrorType for InvalidDataSourceRefNameType {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "Scout:InvalidDataSourceRefNameType"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["existingType", "name", "type"]
    }
}
