nominal_api/conjure/objects/scout/metadata/
rename_label.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 PartialEq,
8 Eq,
9 PartialOrd,
10 Ord,
11 Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct RenameLabel {
17 #[builder(default, set(item(type = super::super::super::api::Label)))]
18 #[serde(
19 rename = "source",
20 skip_serializing_if = "std::collections::BTreeSet::is_empty",
21 default
22 )]
23 source: std::collections::BTreeSet<super::super::super::api::Label>,
24 #[serde(rename = "target")]
25 target: super::super::super::api::Label,
26}
27impl RenameLabel {
28 #[inline]
30 pub fn new(target: super::super::super::api::Label) -> Self {
31 Self::builder().target(target).build()
32 }
33 #[inline]
34 pub fn source(
35 &self,
36 ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
37 &self.source
38 }
39 #[inline]
40 pub fn target(&self) -> &super::super::super::api::Label {
41 &self.target
42 }
43}