Skip to main content

nominal_api/conjure/errors/ingest/api/
incompatible_inputs.rs

1/// The inputs provided to the ingest job are incompatible with each other
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 IncompatibleInputs {
17    #[builder(default, into)]
18    #[serde(rename = "message", skip_serializing_if = "Option::is_none", default)]
19    message: Option<String>,
20}
21impl IncompatibleInputs {
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 message(&self) -> Option<&str> {
29        self.message.as_ref().map(|o| &**o)
30    }
31}
32impl conjure_error::ErrorType for IncompatibleInputs {
33    #[inline]
34    fn code() -> conjure_error::ErrorCode {
35        conjure_error::ErrorCode::InvalidArgument
36    }
37    #[inline]
38    fn name() -> &'static str {
39        "IngestService:IncompatibleInputs"
40    }
41    #[inline]
42    fn safe_args() -> &'static [&'static str] {
43        &[]
44    }
45}