#[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 CannotChangeSavedViewResourceType {
    #[serde(rename = "oldResourceType")]
    old_resource_type: super::super::super::super::super::objects::scout::savedviews::api::ResourceType,
    #[serde(rename = "newResourceType")]
    new_resource_type: super::super::super::super::super::objects::scout::savedviews::api::ResourceType,
}
impl CannotChangeSavedViewResourceType {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        old_resource_type: super::super::super::super::super::objects::scout::savedviews::api::ResourceType,
        new_resource_type: super::super::super::super::super::objects::scout::savedviews::api::ResourceType,
    ) -> Self {
        Self::builder()
            .old_resource_type(old_resource_type)
            .new_resource_type(new_resource_type)
            .build()
    }
    #[inline]
    pub fn old_resource_type(
        &self,
    ) -> &super::super::super::super::super::objects::scout::savedviews::api::ResourceType {
        &self.old_resource_type
    }
    #[inline]
    pub fn new_resource_type(
        &self,
    ) -> &super::super::super::super::super::objects::scout::savedviews::api::ResourceType {
        &self.new_resource_type
    }
}
impl conjure_error::ErrorType for CannotChangeSavedViewResourceType {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "SavedView:CannotChangeSavedViewResourceType"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["newResourceType", "oldResourceType"]
    }
}
