nominal_api/conjure/objects/scout/video/api/
update_video_metadata_request.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct UpdateVideoMetadataRequest {
13 #[builder(default, into)]
14 #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
15 title: Option<String>,
16 #[builder(default, into)]
17 #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
18 description: Option<String>,
19 #[builder(default, into)]
20 #[serde(rename = "labels", skip_serializing_if = "Option::is_none", default)]
21 labels: Option<std::collections::BTreeSet<super::super::super::super::api::Label>>,
22 #[builder(default, into)]
23 #[serde(rename = "properties", skip_serializing_if = "Option::is_none", default)]
24 properties: Option<
25 std::collections::BTreeMap<
26 super::super::super::super::api::PropertyName,
27 super::super::super::super::api::PropertyValue,
28 >,
29 >,
30 #[builder(
31 default,
32 custom(
33 type = impl
34 Into<Option<super::super::super::super::api::Timestamp>>,
35 convert = |v|v.into().map(Box::new)
36 )
37 )]
38 #[serde(
39 rename = "startingTimestamp",
40 skip_serializing_if = "Option::is_none",
41 default
42 )]
43 starting_timestamp: Option<Box<super::super::super::super::api::Timestamp>>,
44 #[builder(
45 default,
46 custom(
47 type = impl
48 Into<Option<super::ScaleParameter>>,
49 convert = |v|v.into().map(Box::new)
50 )
51 )]
52 #[serde(rename = "scaleParameter", skip_serializing_if = "Option::is_none", default)]
53 scale_parameter: Option<Box<super::ScaleParameter>>,
54}
55impl UpdateVideoMetadataRequest {
56 #[inline]
58 pub fn new() -> Self {
59 Self::builder().build()
60 }
61 #[inline]
62 pub fn title(&self) -> Option<&str> {
63 self.title.as_ref().map(|o| &**o)
64 }
65 #[inline]
66 pub fn description(&self) -> Option<&str> {
67 self.description.as_ref().map(|o| &**o)
68 }
69 #[inline]
70 pub fn labels(
71 &self,
72 ) -> Option<&std::collections::BTreeSet<super::super::super::super::api::Label>> {
73 self.labels.as_ref().map(|o| &*o)
74 }
75 #[inline]
76 pub fn properties(
77 &self,
78 ) -> Option<
79 &std::collections::BTreeMap<
80 super::super::super::super::api::PropertyName,
81 super::super::super::super::api::PropertyValue,
82 >,
83 > {
84 self.properties.as_ref().map(|o| &*o)
85 }
86 #[inline]
87 pub fn starting_timestamp(
88 &self,
89 ) -> Option<&super::super::super::super::api::Timestamp> {
90 self.starting_timestamp.as_ref().map(|o| &**o)
91 }
92 #[deprecated(
93 note = "deprecated in favor of updating scaleParameter per-file. Will fail if set on a video with multiple files.\nWill be removed after April 15th.\n"
94 )]
95 #[inline]
96 pub fn scale_parameter(&self) -> Option<&super::ScaleParameter> {
97 self.scale_parameter.as_ref().map(|o| &**o)
98 }
99}