nominal_api/conjure/objects/scout/metadata/
find_similar_label_matches_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 FindSimilarLabelMatchesResponse {
16 #[builder(
17 default,
18 map(
19 key(type = super::super::super::api::Label),
20 value(
21 custom(
22 type = impl
23 IntoIterator<Item = super::MatchCount>,
24 convert = |v|v.into_iter().collect()
25 )
26 )
27 )
28 )]
29 #[serde(
30 rename = "matches",
31 skip_serializing_if = "std::collections::BTreeMap::is_empty",
32 default
33 )]
34 matches: std::collections::BTreeMap<
35 super::super::super::api::Label,
36 Vec<super::MatchCount>,
37 >,
38}
39impl FindSimilarLabelMatchesResponse {
40 #[inline]
42 pub fn new() -> Self {
43 Self::builder().build()
44 }
45 #[inline]
46 pub fn matches(
47 &self,
48 ) -> &std::collections::BTreeMap<
49 super::super::super::api::Label,
50 Vec<super::MatchCount>,
51 > {
52 &self.matches
53 }
54}