Skip to main content

nominal_api/conjure/objects/scout/catalog/
update_dataset_metadata.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 UpdateDatasetMetadata {
16    #[builder(default, into)]
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none", default)]
18    name: Option<String>,
19    #[builder(default, into)]
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
21    description: Option<String>,
22    #[builder(default, into)]
23    #[serde(rename = "labels", skip_serializing_if = "Option::is_none", default)]
24    labels: Option<std::collections::BTreeSet<String>>,
25    #[builder(default, into)]
26    #[serde(rename = "properties", skip_serializing_if = "Option::is_none", default)]
27    properties: Option<std::collections::BTreeMap<String, String>>,
28}
29impl UpdateDatasetMetadata {
30    /// Constructs a new instance of the type.
31    #[inline]
32    pub fn new() -> Self {
33        Self::builder().build()
34    }
35    #[inline]
36    pub fn name(&self) -> Option<&str> {
37        self.name.as_ref().map(|o| &**o)
38    }
39    #[inline]
40    pub fn description(&self) -> Option<&str> {
41        self.description.as_ref().map(|o| &**o)
42    }
43    #[inline]
44    pub fn labels(&self) -> Option<&std::collections::BTreeSet<String>> {
45        self.labels.as_ref().map(|o| &*o)
46    }
47    #[inline]
48    pub fn properties(&self) -> Option<&std::collections::BTreeMap<String, String>> {
49        self.properties.as_ref().map(|o| &*o)
50    }
51}