Skip to main content

nominal_api/conjure/objects/scout/compute/api/
grouped_compute_node_responses.rs

1/// Contains a `ComputeNodeResponse` for each applicable grouping along with metadata describing the grouping.
2/// All the contained `ComputeNodeResponse`s are guaranteed to be of the same type.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    conjure_object::private::DeriveWith
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct GroupedComputeNodeResponses {
15    #[builder(default, set(item(type = super::GroupedComputeNodeResponse)))]
16    #[serde(
17        rename = "responses",
18        skip_serializing_if = "std::collections::BTreeSet::is_empty",
19        default
20    )]
21    responses: std::collections::BTreeSet<super::GroupedComputeNodeResponse>,
22}
23impl GroupedComputeNodeResponses {
24    /// Constructs a new instance of the type.
25    #[inline]
26    pub fn new() -> Self {
27        Self::builder().build()
28    }
29    #[inline]
30    pub fn responses(
31        &self,
32    ) -> &std::collections::BTreeSet<super::GroupedComputeNodeResponse> {
33        &self.responses
34    }
35}