Skip to main content

nominal_api/conjure/objects/scout/spatial/api/
get_spatials_response.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct GetSpatialsResponse {
13    #[builder(default, set(item(type = super::Spatial)))]
14    #[serde(
15        rename = "responses",
16        skip_serializing_if = "std::collections::BTreeSet::is_empty",
17        default
18    )]
19    responses: std::collections::BTreeSet<super::Spatial>,
20}
21impl GetSpatialsResponse {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new() -> Self {
25        Self::builder().build()
26    }
27    #[inline]
28    pub fn responses(&self) -> &std::collections::BTreeSet<super::Spatial> {
29        &self.responses
30    }
31}