nominal_api/conjure/objects/scout/channel/api/
batch_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 BatchSearchChannelsResponse {
16 #[builder(default, set(item(type = super::BatchedLocator)))]
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::BatchedLocator>,
23 #[builder(default, list(item(type = super::BatchedChannelEntry)))]
24 #[serde(rename = "results", skip_serializing_if = "Vec::is_empty", default)]
25 results: Vec<super::BatchedChannelEntry>,
26}
27impl BatchSearchChannelsResponse {
28 #[inline]
30 pub fn new() -> Self {
31 Self::builder().build()
32 }
33 #[inline]
36 pub fn all_expanded_locators(
37 &self,
38 ) -> &std::collections::BTreeSet<super::BatchedLocator> {
39 &self.all_expanded_locators
40 }
41 #[inline]
46 pub fn results(&self) -> &[super::BatchedChannelEntry] {
47 &*self.results
48 }
49}