Skip to main content

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

1#[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<String>>,
22    #[builder(default, into)]
23    #[serde(rename = "properties", skip_serializing_if = "Option::is_none", default)]
24    properties: Option<std::collections::BTreeMap<String, String>>,
25    #[builder(
26        default,
27        custom(
28            type = impl
29            Into<Option<super::super::super::super::api::Timestamp>>,
30            convert = |v|v.into().map(Box::new)
31        )
32    )]
33    #[serde(
34        rename = "startingTimestamp",
35        skip_serializing_if = "Option::is_none",
36        default
37    )]
38    starting_timestamp: Option<Box<super::super::super::super::api::Timestamp>>,
39    #[builder(
40        default,
41        custom(
42            type = impl
43            Into<Option<super::ScaleParameter>>,
44            convert = |v|v.into().map(Box::new)
45        )
46    )]
47    #[serde(rename = "scaleParameter", skip_serializing_if = "Option::is_none", default)]
48    scale_parameter: Option<Box<super::ScaleParameter>>,
49}
50impl UpdateVideoMetadataRequest {
51    /// Constructs a new instance of the type.
52    #[inline]
53    pub fn new() -> Self {
54        Self::builder().build()
55    }
56    #[inline]
57    pub fn title(&self) -> Option<&str> {
58        self.title.as_ref().map(|o| &**o)
59    }
60    #[inline]
61    pub fn description(&self) -> Option<&str> {
62        self.description.as_ref().map(|o| &**o)
63    }
64    #[inline]
65    pub fn labels(&self) -> Option<&std::collections::BTreeSet<String>> {
66        self.labels.as_ref().map(|o| &*o)
67    }
68    #[inline]
69    pub fn properties(&self) -> Option<&std::collections::BTreeMap<String, String>> {
70        self.properties.as_ref().map(|o| &*o)
71    }
72    #[inline]
73    pub fn starting_timestamp(
74        &self,
75    ) -> Option<&super::super::super::super::api::Timestamp> {
76        self.starting_timestamp.as_ref().map(|o| &**o)
77    }
78    #[deprecated(
79        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"
80    )]
81    #[inline]
82    pub fn scale_parameter(&self) -> Option<&super::ScaleParameter> {
83        self.scale_parameter.as_ref().map(|o| &**o)
84    }
85}