/// The error supports both series metadata lookup shapes. RID-based lookups populate `rid`; channel lookups
/// populate `dataSourceRid` and `channel`.
#[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 SeriesMetadataNotFound {
    #[builder(default, into)]
    #[serde(rename = "rid", skip_serializing_if = "Option::is_none", default)]
    rid: Option<conjure_object::ResourceIdentifier>,
    #[builder(default, into)]
    #[serde(rename = "dataSourceRid", skip_serializing_if = "Option::is_none", default)]
    data_source_rid: Option<conjure_object::ResourceIdentifier>,
    #[builder(default, into)]
    #[serde(rename = "channel", skip_serializing_if = "Option::is_none", default)]
    channel: Option<String>,
}
impl SeriesMetadataNotFound {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn rid(&self) -> Option<&conjure_object::ResourceIdentifier> {
        self.rid.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn data_source_rid(&self) -> Option<&conjure_object::ResourceIdentifier> {
        self.data_source_rid.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn channel(&self) -> Option<&str> {
        self.channel.as_ref().map(|o| &**o)
    }
}
impl conjure_error::ErrorType for SeriesMetadataNotFound {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::NotFound
    }
    #[inline]
    fn name() -> &'static str {
        "SeriesMetadata:SeriesMetadataNotFound"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["dataSourceRid", "rid"]
    }
}
