1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The input for the <code>GetSMSAttributes</code> request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetSmsAttributesInput {
/// <p>A list of the individual attribute names, such as <code>MonthlySpendLimit</code>, for which you want values.</p>
/// <p>For all attribute names, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html">SetSMSAttributes</a>.</p>
/// <p>If you don't use this parameter, Amazon SNS returns all SMS attributes.</p>
pub attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetSmsAttributesInput {
/// <p>A list of the individual attribute names, such as <code>MonthlySpendLimit</code>, for which you want values.</p>
/// <p>For all attribute names, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html">SetSMSAttributes</a>.</p>
/// <p>If you don't use this parameter, Amazon SNS returns all SMS attributes.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes.is_none()`.
pub fn attributes(&self) -> &[::std::string::String] {
self.attributes.as_deref().unwrap_or_default()
}
}
impl GetSmsAttributesInput {
/// Creates a new builder-style object to manufacture [`GetSmsAttributesInput`](crate::operation::get_sms_attributes::GetSmsAttributesInput).
pub fn builder() -> crate::operation::get_sms_attributes::builders::GetSmsAttributesInputBuilder {
crate::operation::get_sms_attributes::builders::GetSmsAttributesInputBuilder::default()
}
}
/// A builder for [`GetSmsAttributesInput`](crate::operation::get_sms_attributes::GetSmsAttributesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSmsAttributesInputBuilder {
pub(crate) attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetSmsAttributesInputBuilder {
/// Appends an item to `attributes`.
///
/// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
///
/// <p>A list of the individual attribute names, such as <code>MonthlySpendLimit</code>, for which you want values.</p>
/// <p>For all attribute names, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html">SetSMSAttributes</a>.</p>
/// <p>If you don't use this parameter, Amazon SNS returns all SMS attributes.</p>
pub fn attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.attributes.unwrap_or_default();
v.push(input.into());
self.attributes = ::std::option::Option::Some(v);
self
}
/// <p>A list of the individual attribute names, such as <code>MonthlySpendLimit</code>, for which you want values.</p>
/// <p>For all attribute names, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html">SetSMSAttributes</a>.</p>
/// <p>If you don't use this parameter, Amazon SNS returns all SMS attributes.</p>
pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.attributes = input;
self
}
/// <p>A list of the individual attribute names, such as <code>MonthlySpendLimit</code>, for which you want values.</p>
/// <p>For all attribute names, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html">SetSMSAttributes</a>.</p>
/// <p>If you don't use this parameter, Amazon SNS returns all SMS attributes.</p>
pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.attributes
}
/// Consumes the builder and constructs a [`GetSmsAttributesInput`](crate::operation::get_sms_attributes::GetSmsAttributesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_sms_attributes::GetSmsAttributesInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_sms_attributes::GetSmsAttributesInput { attributes: self.attributes })
}
}