aws_sdk_budgets/operation/update_notification/
_update_notification_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateNotificationInput {
7 pub account_id: ::std::option::Option<::std::string::String>,
9 pub budget_name: ::std::option::Option<::std::string::String>,
11 pub old_notification: ::std::option::Option<crate::types::Notification>,
13 pub new_notification: ::std::option::Option<crate::types::Notification>,
15}
16impl UpdateNotificationInput {
17 pub fn account_id(&self) -> ::std::option::Option<&str> {
19 self.account_id.as_deref()
20 }
21 pub fn budget_name(&self) -> ::std::option::Option<&str> {
23 self.budget_name.as_deref()
24 }
25 pub fn old_notification(&self) -> ::std::option::Option<&crate::types::Notification> {
27 self.old_notification.as_ref()
28 }
29 pub fn new_notification(&self) -> ::std::option::Option<&crate::types::Notification> {
31 self.new_notification.as_ref()
32 }
33}
34impl UpdateNotificationInput {
35 pub fn builder() -> crate::operation::update_notification::builders::UpdateNotificationInputBuilder {
37 crate::operation::update_notification::builders::UpdateNotificationInputBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct UpdateNotificationInputBuilder {
45 pub(crate) account_id: ::std::option::Option<::std::string::String>,
46 pub(crate) budget_name: ::std::option::Option<::std::string::String>,
47 pub(crate) old_notification: ::std::option::Option<crate::types::Notification>,
48 pub(crate) new_notification: ::std::option::Option<crate::types::Notification>,
49}
50impl UpdateNotificationInputBuilder {
51 pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.account_id = ::std::option::Option::Some(input.into());
55 self
56 }
57 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.account_id = input;
60 self
61 }
62 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
64 &self.account_id
65 }
66 pub fn budget_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.budget_name = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_budget_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.budget_name = input;
75 self
76 }
77 pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
79 &self.budget_name
80 }
81 pub fn old_notification(mut self, input: crate::types::Notification) -> Self {
84 self.old_notification = ::std::option::Option::Some(input);
85 self
86 }
87 pub fn set_old_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
89 self.old_notification = input;
90 self
91 }
92 pub fn get_old_notification(&self) -> &::std::option::Option<crate::types::Notification> {
94 &self.old_notification
95 }
96 pub fn new_notification(mut self, input: crate::types::Notification) -> Self {
99 self.new_notification = ::std::option::Option::Some(input);
100 self
101 }
102 pub fn set_new_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
104 self.new_notification = input;
105 self
106 }
107 pub fn get_new_notification(&self) -> &::std::option::Option<crate::types::Notification> {
109 &self.new_notification
110 }
111 pub fn build(
113 self,
114 ) -> ::std::result::Result<crate::operation::update_notification::UpdateNotificationInput, ::aws_smithy_types::error::operation::BuildError> {
115 ::std::result::Result::Ok(crate::operation::update_notification::UpdateNotificationInput {
116 account_id: self.account_id,
117 budget_name: self.budget_name,
118 old_notification: self.old_notification,
119 new_notification: self.new_notification,
120 })
121 }
122}