Skip to main content

nominal_api/conjure/objects/scout/video/api/
update_video_file_request.rs

1/// Request to update metadata for a given video file.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct UpdateVideoFileRequest {
14    #[builder(default, into)]
15    #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
16    title: Option<String>,
17    #[builder(default, into)]
18    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
19    description: Option<String>,
20    #[builder(
21        default,
22        custom(
23            type = impl
24            Into<Option<super::super::super::super::api::Timestamp>>,
25            convert = |v|v.into().map(Box::new)
26        )
27    )]
28    #[serde(
29        rename = "startingTimestamp",
30        skip_serializing_if = "Option::is_none",
31        default
32    )]
33    starting_timestamp: Option<Box<super::super::super::super::api::Timestamp>>,
34    #[builder(
35        default,
36        custom(
37            type = impl
38            Into<Option<super::ScaleParameter>>,
39            convert = |v|v.into().map(Box::new)
40        )
41    )]
42    #[serde(rename = "scaleParameter", skip_serializing_if = "Option::is_none", default)]
43    scale_parameter: Option<Box<super::ScaleParameter>>,
44    #[builder(default, into)]
45    #[serde(
46        rename = "segmentedFilesSize",
47        skip_serializing_if = "Option::is_none",
48        default
49    )]
50    segmented_files_size: Option<conjure_object::SafeLong>,
51}
52impl UpdateVideoFileRequest {
53    /// Constructs a new instance of the type.
54    #[inline]
55    pub fn new() -> Self {
56        Self::builder().build()
57    }
58    #[inline]
59    pub fn title(&self) -> Option<&str> {
60        self.title.as_ref().map(|o| &**o)
61    }
62    #[inline]
63    pub fn description(&self) -> Option<&str> {
64        self.description.as_ref().map(|o| &**o)
65    }
66    #[inline]
67    pub fn starting_timestamp(
68        &self,
69    ) -> Option<&super::super::super::super::api::Timestamp> {
70        self.starting_timestamp.as_ref().map(|o| &**o)
71    }
72    #[inline]
73    pub fn scale_parameter(&self) -> Option<&super::ScaleParameter> {
74        self.scale_parameter.as_ref().map(|o| &**o)
75    }
76    /// The total size of all the post-processed segments corresponding to this video file in bytes.
77    #[inline]
78    pub fn segmented_files_size(&self) -> Option<conjure_object::SafeLong> {
79        self.segmented_files_size.as_ref().map(|o| *o)
80    }
81}