Skip to main content

nominal_api/conjure/objects/ingest/api/
ingest_video_response.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 IngestVideoResponse {
16    #[serde(rename = "videoRid")]
17    video_rid: super::super::super::api::rids::VideoRid,
18    #[serde(rename = "videoFileRid")]
19    video_file_rid: super::super::super::api::rids::VideoFileRid,
20    #[builder(
21        default,
22        custom(
23            type = impl
24            Into<Option<super::AsyncHandle>>,
25            convert = |v|v.into().map(Box::new)
26        )
27    )]
28    #[serde(rename = "asyncHandle", skip_serializing_if = "Option::is_none", default)]
29    async_handle: Option<Box<super::AsyncHandle>>,
30}
31impl IngestVideoResponse {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new(
35        video_rid: super::super::super::api::rids::VideoRid,
36        video_file_rid: super::super::super::api::rids::VideoFileRid,
37    ) -> Self {
38        Self::builder().video_rid(video_rid).video_file_rid(video_file_rid).build()
39    }
40    #[inline]
41    pub fn video_rid(&self) -> &super::super::super::api::rids::VideoRid {
42        &self.video_rid
43    }
44    #[inline]
45    pub fn video_file_rid(&self) -> &super::super::super::api::rids::VideoFileRid {
46        &self.video_file_rid
47    }
48    #[deprecated(note = "Deprecated")]
49    #[inline]
50    pub fn async_handle(&self) -> Option<&super::AsyncHandle> {
51        self.async_handle.as_ref().map(|o| &**o)
52    }
53}