aws_sdk_elasticloadbalancing/types/
_policy_attribute_description.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about a policy attribute.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PolicyAttributeDescription {
7    /// <p>The name of the attribute.</p>
8    pub attribute_name: ::std::option::Option<::std::string::String>,
9    /// <p>The value of the attribute.</p>
10    pub attribute_value: ::std::option::Option<::std::string::String>,
11}
12impl PolicyAttributeDescription {
13    /// <p>The name of the attribute.</p>
14    pub fn attribute_name(&self) -> ::std::option::Option<&str> {
15        self.attribute_name.as_deref()
16    }
17    /// <p>The value of the attribute.</p>
18    pub fn attribute_value(&self) -> ::std::option::Option<&str> {
19        self.attribute_value.as_deref()
20    }
21}
22impl PolicyAttributeDescription {
23    /// Creates a new builder-style object to manufacture [`PolicyAttributeDescription`](crate::types::PolicyAttributeDescription).
24    pub fn builder() -> crate::types::builders::PolicyAttributeDescriptionBuilder {
25        crate::types::builders::PolicyAttributeDescriptionBuilder::default()
26    }
27}
28
29/// A builder for [`PolicyAttributeDescription`](crate::types::PolicyAttributeDescription).
30#[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    /// <p>The name of the attribute.</p>
38    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    /// <p>The name of the attribute.</p>
43    pub fn set_attribute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.attribute_name = input;
45        self
46    }
47    /// <p>The name of the attribute.</p>
48    pub fn get_attribute_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.attribute_name
50    }
51    /// <p>The value of the attribute.</p>
52    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    /// <p>The value of the attribute.</p>
57    pub fn set_attribute_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.attribute_value = input;
59        self
60    }
61    /// <p>The value of the attribute.</p>
62    pub fn get_attribute_value(&self) -> &::std::option::Option<::std::string::String> {
63        &self.attribute_value
64    }
65    /// Consumes the builder and constructs a [`PolicyAttributeDescription`](crate::types::PolicyAttributeDescription).
66    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}