aws_sdk_iottwinmaker/types/
_property_value_entry.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PropertyValueEntry {
7 pub entity_property_reference: ::std::option::Option<crate::types::EntityPropertyReference>,
9 pub property_values: ::std::option::Option<::std::vec::Vec<crate::types::PropertyValue>>,
11}
12impl PropertyValueEntry {
13 pub fn entity_property_reference(&self) -> ::std::option::Option<&crate::types::EntityPropertyReference> {
15 self.entity_property_reference.as_ref()
16 }
17 pub fn property_values(&self) -> &[crate::types::PropertyValue] {
21 self.property_values.as_deref().unwrap_or_default()
22 }
23}
24impl PropertyValueEntry {
25 pub fn builder() -> crate::types::builders::PropertyValueEntryBuilder {
27 crate::types::builders::PropertyValueEntryBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct PropertyValueEntryBuilder {
35 pub(crate) entity_property_reference: ::std::option::Option<crate::types::EntityPropertyReference>,
36 pub(crate) property_values: ::std::option::Option<::std::vec::Vec<crate::types::PropertyValue>>,
37}
38impl PropertyValueEntryBuilder {
39 pub fn entity_property_reference(mut self, input: crate::types::EntityPropertyReference) -> Self {
42 self.entity_property_reference = ::std::option::Option::Some(input);
43 self
44 }
45 pub fn set_entity_property_reference(mut self, input: ::std::option::Option<crate::types::EntityPropertyReference>) -> Self {
47 self.entity_property_reference = input;
48 self
49 }
50 pub fn get_entity_property_reference(&self) -> &::std::option::Option<crate::types::EntityPropertyReference> {
52 &self.entity_property_reference
53 }
54 pub fn property_values(mut self, input: crate::types::PropertyValue) -> Self {
60 let mut v = self.property_values.unwrap_or_default();
61 v.push(input);
62 self.property_values = ::std::option::Option::Some(v);
63 self
64 }
65 pub fn set_property_values(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PropertyValue>>) -> Self {
67 self.property_values = input;
68 self
69 }
70 pub fn get_property_values(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PropertyValue>> {
72 &self.property_values
73 }
74 pub fn build(self) -> crate::types::PropertyValueEntry {
76 crate::types::PropertyValueEntry {
77 entity_property_reference: self.entity_property_reference,
78 property_values: self.property_values,
79 }
80 }
81}