aws_sdk_elasticloadbalancing/types/
_policy_attribute_description.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PolicyAttributeDescription {
7 pub attribute_name: ::std::option::Option<::std::string::String>,
9 pub attribute_value: ::std::option::Option<::std::string::String>,
11}
12impl PolicyAttributeDescription {
13 pub fn attribute_name(&self) -> ::std::option::Option<&str> {
15 self.attribute_name.as_deref()
16 }
17 pub fn attribute_value(&self) -> ::std::option::Option<&str> {
19 self.attribute_value.as_deref()
20 }
21}
22impl PolicyAttributeDescription {
23 pub fn builder() -> crate::types::builders::PolicyAttributeDescriptionBuilder {
25 crate::types::builders::PolicyAttributeDescriptionBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct PolicyAttributeDescriptionBuilder {
33 pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
34 pub(crate) attribute_value: ::std::option::Option<::std::string::String>,
35}
36impl PolicyAttributeDescriptionBuilder {
37 pub fn attribute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.attribute_name = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_attribute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.attribute_name = input;
45 self
46 }
47 pub fn get_attribute_name(&self) -> &::std::option::Option<::std::string::String> {
49 &self.attribute_name
50 }
51 pub fn attribute_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.attribute_value = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_attribute_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.attribute_value = input;
59 self
60 }
61 pub fn get_attribute_value(&self) -> &::std::option::Option<::std::string::String> {
63 &self.attribute_value
64 }
65 pub fn build(self) -> crate::types::PolicyAttributeDescription {
67 crate::types::PolicyAttributeDescription {
68 attribute_name: self.attribute_name,
69 attribute_value: self.attribute_value,
70 }
71 }
72}