#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct WorkbookOffsetsV1 {
    #[builder(
        default,
        map(
            key(type = super::super::super::run::api::RunRid),
            value(type = super::RunOffset)
        )
    )]
    #[serde(
        rename = "runs",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    runs: std::collections::BTreeMap<
        super::super::super::run::api::RunRid,
        super::RunOffset,
    >,
    #[builder(
        default,
        map(
            key(type = super::super::super::rids::api::AssetRid),
            value(type = super::AssetOffset)
        )
    )]
    #[serde(
        rename = "assets",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    assets: std::collections::BTreeMap<
        super::super::super::rids::api::AssetRid,
        super::AssetOffset,
    >,
    #[builder(default, into)]
    #[serde(rename = "inputs", skip_serializing_if = "Option::is_none", default)]
    inputs: Option<
        std::collections::BTreeMap<super::WorkbookDataScopeInputId, super::InputOffset>,
    >,
}
impl WorkbookOffsetsV1 {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// Deprecated - use dataScope inputs
    #[inline]
    pub fn runs(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::run::api::RunRid,
        super::RunOffset,
    > {
        &self.runs
    }
    /// Deprecated - use dataScope inputs
    #[inline]
    pub fn assets(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::rids::api::AssetRid,
        super::AssetOffset,
    > {
        &self.assets
    }
    #[inline]
    pub fn inputs(
        &self,
    ) -> Option<
        &std::collections::BTreeMap<super::WorkbookDataScopeInputId, super::InputOffset>,
    > {
        self.inputs.as_ref().map(|o| &*o)
    }
}
