Skip to main content

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

1/// The target dataset file could not be found.
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 DatasetFileNotFound {
17    #[serde(rename = "datasetRid")]
18    dataset_rid: super::super::super::super::objects::api::rids::DatasetRid,
19    #[serde(rename = "fileId")]
20    file_id: conjure_object::Uuid,
21}
22impl DatasetFileNotFound {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(
26        dataset_rid: super::super::super::super::objects::api::rids::DatasetRid,
27        file_id: conjure_object::Uuid,
28    ) -> Self {
29        Self::builder().dataset_rid(dataset_rid).file_id(file_id).build()
30    }
31    #[inline]
32    pub fn dataset_rid(
33        &self,
34    ) -> &super::super::super::super::objects::api::rids::DatasetRid {
35        &self.dataset_rid
36    }
37    #[inline]
38    pub fn file_id(&self) -> conjure_object::Uuid {
39        self.file_id
40    }
41}
42impl conjure_error::ErrorType for DatasetFileNotFound {
43    #[inline]
44    fn code() -> conjure_error::ErrorCode {
45        conjure_error::ErrorCode::NotFound
46    }
47    #[inline]
48    fn name() -> &'static str {
49        "IngestService:DatasetFileNotFound"
50    }
51    #[inline]
52    fn safe_args() -> &'static [&'static str] {
53        &["datasetRid", "fileId"]
54    }
55}