aws_sdk_budgets/operation/update_subscriber/
_update_subscriber_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request of UpdateSubscriber</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateSubscriberInput {
7    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
8    pub account_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the budget whose subscriber you want to update.</p>
10    pub budget_name: ::std::option::Option<::std::string::String>,
11    /// <p>The notification whose subscriber you want to update.</p>
12    pub notification: ::std::option::Option<crate::types::Notification>,
13    /// <p>The previous subscriber that is associated with a budget notification.</p>
14    pub old_subscriber: ::std::option::Option<crate::types::Subscriber>,
15    /// <p>The updated subscriber that is associated with a budget notification.</p>
16    pub new_subscriber: ::std::option::Option<crate::types::Subscriber>,
17}
18impl UpdateSubscriberInput {
19    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
20    pub fn account_id(&self) -> ::std::option::Option<&str> {
21        self.account_id.as_deref()
22    }
23    /// <p>The name of the budget whose subscriber you want to update.</p>
24    pub fn budget_name(&self) -> ::std::option::Option<&str> {
25        self.budget_name.as_deref()
26    }
27    /// <p>The notification whose subscriber you want to update.</p>
28    pub fn notification(&self) -> ::std::option::Option<&crate::types::Notification> {
29        self.notification.as_ref()
30    }
31    /// <p>The previous subscriber that is associated with a budget notification.</p>
32    pub fn old_subscriber(&self) -> ::std::option::Option<&crate::types::Subscriber> {
33        self.old_subscriber.as_ref()
34    }
35    /// <p>The updated subscriber that is associated with a budget notification.</p>
36    pub fn new_subscriber(&self) -> ::std::option::Option<&crate::types::Subscriber> {
37        self.new_subscriber.as_ref()
38    }
39}
40impl UpdateSubscriberInput {
41    /// Creates a new builder-style object to manufacture [`UpdateSubscriberInput`](crate::operation::update_subscriber::UpdateSubscriberInput).
42    pub fn builder() -> crate::operation::update_subscriber::builders::UpdateSubscriberInputBuilder {
43        crate::operation::update_subscriber::builders::UpdateSubscriberInputBuilder::default()
44    }
45}
46
47/// A builder for [`UpdateSubscriberInput`](crate::operation::update_subscriber::UpdateSubscriberInput).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct UpdateSubscriberInputBuilder {
51    pub(crate) account_id: ::std::option::Option<::std::string::String>,
52    pub(crate) budget_name: ::std::option::Option<::std::string::String>,
53    pub(crate) notification: ::std::option::Option<crate::types::Notification>,
54    pub(crate) old_subscriber: ::std::option::Option<crate::types::Subscriber>,
55    pub(crate) new_subscriber: ::std::option::Option<crate::types::Subscriber>,
56}
57impl UpdateSubscriberInputBuilder {
58    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
59    /// This field is required.
60    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.account_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
65    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.account_id = input;
67        self
68    }
69    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
70    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.account_id
72    }
73    /// <p>The name of the budget whose subscriber you want to update.</p>
74    /// This field is required.
75    pub fn budget_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.budget_name = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The name of the budget whose subscriber you want to update.</p>
80    pub fn set_budget_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.budget_name = input;
82        self
83    }
84    /// <p>The name of the budget whose subscriber you want to update.</p>
85    pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
86        &self.budget_name
87    }
88    /// <p>The notification whose subscriber you want to update.</p>
89    /// This field is required.
90    pub fn notification(mut self, input: crate::types::Notification) -> Self {
91        self.notification = ::std::option::Option::Some(input);
92        self
93    }
94    /// <p>The notification whose subscriber you want to update.</p>
95    pub fn set_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
96        self.notification = input;
97        self
98    }
99    /// <p>The notification whose subscriber you want to update.</p>
100    pub fn get_notification(&self) -> &::std::option::Option<crate::types::Notification> {
101        &self.notification
102    }
103    /// <p>The previous subscriber that is associated with a budget notification.</p>
104    /// This field is required.
105    pub fn old_subscriber(mut self, input: crate::types::Subscriber) -> Self {
106        self.old_subscriber = ::std::option::Option::Some(input);
107        self
108    }
109    /// <p>The previous subscriber that is associated with a budget notification.</p>
110    pub fn set_old_subscriber(mut self, input: ::std::option::Option<crate::types::Subscriber>) -> Self {
111        self.old_subscriber = input;
112        self
113    }
114    /// <p>The previous subscriber that is associated with a budget notification.</p>
115    pub fn get_old_subscriber(&self) -> &::std::option::Option<crate::types::Subscriber> {
116        &self.old_subscriber
117    }
118    /// <p>The updated subscriber that is associated with a budget notification.</p>
119    /// This field is required.
120    pub fn new_subscriber(mut self, input: crate::types::Subscriber) -> Self {
121        self.new_subscriber = ::std::option::Option::Some(input);
122        self
123    }
124    /// <p>The updated subscriber that is associated with a budget notification.</p>
125    pub fn set_new_subscriber(mut self, input: ::std::option::Option<crate::types::Subscriber>) -> Self {
126        self.new_subscriber = input;
127        self
128    }
129    /// <p>The updated subscriber that is associated with a budget notification.</p>
130    pub fn get_new_subscriber(&self) -> &::std::option::Option<crate::types::Subscriber> {
131        &self.new_subscriber
132    }
133    /// Consumes the builder and constructs a [`UpdateSubscriberInput`](crate::operation::update_subscriber::UpdateSubscriberInput).
134    pub fn build(
135        self,
136    ) -> ::std::result::Result<crate::operation::update_subscriber::UpdateSubscriberInput, ::aws_smithy_types::error::operation::BuildError> {
137        ::std::result::Result::Ok(crate::operation::update_subscriber::UpdateSubscriberInput {
138            account_id: self.account_id,
139            budget_name: self.budget_name,
140            notification: self.notification,
141            old_subscriber: self.old_subscriber,
142            new_subscriber: self.new_subscriber,
143        })
144    }
145}