Skip to main content

nominal_api/conjure/objects/persistent/compute/api/
subscription_update_error.rs

1/// This will be sent if there is an error while updating a subscription. Note: This won't automatically cancel
2/// the subscription. The client will have to call `ClientMessage::unsubscribe` to do that if warranted.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    PartialEq,
9    Eq,
10    PartialOrd,
11    Ord,
12    Hash
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct SubscriptionUpdateError {
18    #[builder(
19        custom(
20            type = super::super::super::super::api::SerializableError,
21            convert = Box::new
22        )
23    )]
24    #[serde(rename = "serializableError")]
25    serializable_error: Box<super::super::super::super::api::SerializableError>,
26}
27impl SubscriptionUpdateError {
28    /// Constructs a new instance of the type.
29    #[inline]
30    pub fn new(
31        serializable_error: super::super::super::super::api::SerializableError,
32    ) -> Self {
33        Self::builder().serializable_error(serializable_error).build()
34    }
35    /// A serialized version of the error. Should match the errors defined below.
36    #[inline]
37    pub fn serializable_error(
38        &self,
39    ) -> &super::super::super::super::api::SerializableError {
40        &*self.serializable_error
41    }
42}