nominal_api/conjure/objects/scout/channel/api/
search_channels_response.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct SearchChannelsResponse {
16 #[builder(default, set(item(type = super::Locator)))]
17 #[serde(
18 rename = "allExpandedLocators",
19 skip_serializing_if = "std::collections::BTreeSet::is_empty",
20 default
21 )]
22 all_expanded_locators: std::collections::BTreeSet<super::Locator>,
23 #[builder(default, list(item(type = super::ChannelEntry)))]
24 #[serde(rename = "results", skip_serializing_if = "Vec::is_empty", default)]
25 results: Vec<super::ChannelEntry>,
26}
27impl SearchChannelsResponse {
28 #[inline]
30 pub fn new() -> Self {
31 Self::builder().build()
32 }
33 #[inline]
38 pub fn all_expanded_locators(&self) -> &std::collections::BTreeSet<super::Locator> {
39 &self.all_expanded_locators
40 }
41 #[inline]
44 pub fn results(&self) -> &[super::ChannelEntry] {
45 &*self.results
46 }
47}