Skip to main content

nominal_api/conjure/objects/scout/compute/api/
compute_units_request.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 ComputeUnitsRequest {
13    #[builder(custom(type = super::ComputableNode, convert = Box::new))]
14    #[serde(rename = "node")]
15    node: Box<super::ComputableNode>,
16    #[builder(custom(type = super::Context, convert = Box::new))]
17    #[serde(rename = "context")]
18    context: Box<super::Context>,
19}
20impl ComputeUnitsRequest {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(node: super::ComputableNode, context: super::Context) -> Self {
24        Self::builder().node(node).context(context).build()
25    }
26    #[inline]
27    pub fn node(&self) -> &super::ComputableNode {
28        &*self.node
29    }
30    #[inline]
31    pub fn context(&self) -> &super::Context {
32        &*self.context
33    }
34}