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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Request of CreateSubscriber</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSubscriberInput {
/// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</p>
pub account_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</p>
pub budget_name: ::std::option::Option<::std::string::String>,
/// <p>The notification that you want to create a subscriber for.</p>
pub notification: ::std::option::Option<crate::types::Notification>,
/// <p>The subscriber that you want to associate with a budget notification.</p>
pub subscriber: ::std::option::Option<crate::types::Subscriber>,
}
impl CreateSubscriberInput {
/// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</p>
pub fn account_id(&self) -> ::std::option::Option<&str> {
self.account_id.as_deref()
}
/// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</p>
pub fn budget_name(&self) -> ::std::option::Option<&str> {
self.budget_name.as_deref()
}
/// <p>The notification that you want to create a subscriber for.</p>
pub fn notification(&self) -> ::std::option::Option<&crate::types::Notification> {
self.notification.as_ref()
}
/// <p>The subscriber that you want to associate with a budget notification.</p>
pub fn subscriber(&self) -> ::std::option::Option<&crate::types::Subscriber> {
self.subscriber.as_ref()
}
}
impl CreateSubscriberInput {
/// Creates a new builder-style object to manufacture [`CreateSubscriberInput`](crate::operation::create_subscriber::CreateSubscriberInput).
pub fn builder() -> crate::operation::create_subscriber::builders::CreateSubscriberInputBuilder {
crate::operation::create_subscriber::builders::CreateSubscriberInputBuilder::default()
}
}
/// A builder for [`CreateSubscriberInput`](crate::operation::create_subscriber::CreateSubscriberInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSubscriberInputBuilder {
pub(crate) account_id: ::std::option::Option<::std::string::String>,
pub(crate) budget_name: ::std::option::Option<::std::string::String>,
pub(crate) notification: ::std::option::Option<crate::types::Notification>,
pub(crate) subscriber: ::std::option::Option<crate::types::Subscriber>,
}
impl CreateSubscriberInputBuilder {
/// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</p>
/// This field is required.
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</p>
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
/// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</p>
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
/// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</p>
/// This field is required.
pub fn budget_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.budget_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</p>
pub fn set_budget_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.budget_name = input;
self
}
/// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</p>
pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
&self.budget_name
}
/// <p>The notification that you want to create a subscriber for.</p>
/// This field is required.
pub fn notification(mut self, input: crate::types::Notification) -> Self {
self.notification = ::std::option::Option::Some(input);
self
}
/// <p>The notification that you want to create a subscriber for.</p>
pub fn set_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
self.notification = input;
self
}
/// <p>The notification that you want to create a subscriber for.</p>
pub fn get_notification(&self) -> &::std::option::Option<crate::types::Notification> {
&self.notification
}
/// <p>The subscriber that you want to associate with a budget notification.</p>
/// This field is required.
pub fn subscriber(mut self, input: crate::types::Subscriber) -> Self {
self.subscriber = ::std::option::Option::Some(input);
self
}
/// <p>The subscriber that you want to associate with a budget notification.</p>
pub fn set_subscriber(mut self, input: ::std::option::Option<crate::types::Subscriber>) -> Self {
self.subscriber = input;
self
}
/// <p>The subscriber that you want to associate with a budget notification.</p>
pub fn get_subscriber(&self) -> &::std::option::Option<crate::types::Subscriber> {
&self.subscriber
}
/// Consumes the builder and constructs a [`CreateSubscriberInput`](crate::operation::create_subscriber::CreateSubscriberInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_subscriber::CreateSubscriberInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_subscriber::CreateSubscriberInput {
account_id: self.account_id,
budget_name: self.budget_name,
notification: self.notification,
subscriber: self.subscriber,
})
}
}