Skip to main content

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

1/// The response to a reingest request.
2/// Maps the source dataset RID and file ID to the destination dataset RID and file ID.
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 ReingestDatasetsResponse {
18    #[builder(
19        default,
20        map(
21            key(type = super::super::super::api::rids::DatasetRid),
22            value(type = super::ReingestFilesMapping)
23        )
24    )]
25    #[serde(
26        rename = "datasets",
27        skip_serializing_if = "std::collections::BTreeMap::is_empty",
28        default
29    )]
30    datasets: std::collections::BTreeMap<
31        super::super::super::api::rids::DatasetRid,
32        super::ReingestFilesMapping,
33    >,
34}
35impl ReingestDatasetsResponse {
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 datasets(
43        &self,
44    ) -> &std::collections::BTreeMap<
45        super::super::super::api::rids::DatasetRid,
46        super::ReingestFilesMapping,
47    > {
48        &self.datasets
49    }
50}