Skip to main content

nominal_api_conjure/conjure/objects/ingest/manifest/
extractor_upload_metadata.rs

1/// Metadata file created by yeeter after uploading extractor outputs to S3.
2/// This is uploaded to S3 by yeeter and read by the Temporal activity to orchestrate ingestion.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    conjure_object::private::DeriveWith
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct ExtractorUploadMetadata {
15    #[builder(default, list(item(type = super::UploadMetadata)))]
16    #[serde(rename = "uploads", skip_serializing_if = "Vec::is_empty", default)]
17    uploads: Vec<super::UploadMetadata>,
18    #[builder(default, into)]
19    #[serde(rename = "videoUploads", skip_serializing_if = "Option::is_none", default)]
20    video_uploads: Option<Vec<super::VideoUploadMetadata>>,
21}
22impl ExtractorUploadMetadata {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new() -> Self {
26        Self::builder().build()
27    }
28    /// List of uploaded files with their S3 locations and manifest metadata
29    #[inline]
30    pub fn uploads(&self) -> &[super::UploadMetadata] {
31        &*self.uploads
32    }
33    /// Uploaded video files and their resolved timestamp metadata.
34    #[inline]
35    pub fn video_uploads(&self) -> Option<&[super::VideoUploadMetadata]> {
36        self.video_uploads.as_ref().map(|o| &**o)
37    }
38}