Skip to main content

nominal_api/conjure/errors/persistent/compute/api/
unavailable_result_configuration.rs

1/// ResultConfiguration is incompatible with the requested compute.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct UnavailableResultConfiguration {
17    #[serde(rename = "reason")]
18    reason: super::super::super::super::super::objects::persistent::compute::api::UnavailableResultConfigurationReason,
19}
20impl UnavailableResultConfiguration {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(
24        reason: super::super::super::super::super::objects::persistent::compute::api::UnavailableResultConfigurationReason,
25    ) -> Self {
26        Self::builder().reason(reason).build()
27    }
28    #[inline]
29    pub fn reason(
30        &self,
31    ) -> &super::super::super::super::super::objects::persistent::compute::api::UnavailableResultConfigurationReason {
32        &self.reason
33    }
34}
35impl conjure_error::ErrorType for UnavailableResultConfiguration {
36    #[inline]
37    fn code() -> conjure_error::ErrorCode {
38        conjure_error::ErrorCode::InvalidArgument
39    }
40    #[inline]
41    fn name() -> &'static str {
42        "PersistentCompute:UnavailableResultConfiguration"
43    }
44    #[inline]
45    fn safe_args() -> &'static [&'static str] {
46        &["reason"]
47    }
48}