Skip to main content

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

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