Skip to main content

nominal_api/conjure/objects/ingest/api/
reingest_files_mapping.rs

1/// Maps the source dataset file ID to the destination dataset and file ID.
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 ReingestFilesMapping {
17    #[builder(
18        default,
19        map(
20            key(type = super::super::super::datasource::DatasetFileId),
21            value(type = super::IngestDetails)
22        )
23    )]
24    #[serde(
25        rename = "fileMap",
26        serialize_with = "conjure_object::private::serialize_map_keys_as_strings",
27        skip_serializing_if = "std::collections::BTreeMap::is_empty",
28        default
29    )]
30    file_map: std::collections::BTreeMap<
31        super::super::super::datasource::DatasetFileId,
32        super::IngestDetails,
33    >,
34}
35impl ReingestFilesMapping {
36    /// Constructs a new instance of the type.
37    #[inline]
38    pub fn new() -> Self {
39        Self::builder().build()
40    }
41    #[inline]
42    pub fn file_map(
43        &self,
44    ) -> &std::collections::BTreeMap<
45        super::super::super::datasource::DatasetFileId,
46        super::IngestDetails,
47    > {
48        &self.file_map
49    }
50}