#[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 ListChannelChildrenResponse {
    #[builder(default, set(item(type = super::Locator)))]
    #[serde(
        rename = "allExpandedLocators",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    all_expanded_locators: std::collections::BTreeSet<super::Locator>,
    #[builder(default, list(item(type = super::ChannelChildEntry)))]
    #[serde(rename = "entries", skip_serializing_if = "Vec::is_empty", default)]
    entries: Vec<super::ChannelChildEntry>,
}
impl ListChannelChildrenResponse {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// All locators expanded from the request scope, independent of which channels exist within them.
    /// Useful for callers that need to know the complete locator topology (e.g. to render empty
    /// locators in a tree view) even when no matching channel was found in some of them.
    #[inline]
    pub fn all_expanded_locators(&self) -> &std::collections::BTreeSet<super::Locator> {
        &self.all_expanded_locators
    }
    /// Mix of channel leaves and prefix nodes, one entry per distinct
    /// (channel name | prefix part) collapsed across locators.
    #[inline]
    pub fn entries(&self) -> &[super::ChannelChildEntry] {
        &*self.entries
    }
}
