aws_sdk_dax/operation/update_cluster/
_update_cluster_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateClusterInput {
6 pub cluster_name: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub preferred_maintenance_window: ::std::option::Option<::std::string::String>,
12 pub notification_topic_arn: ::std::option::Option<::std::string::String>,
14 pub notification_topic_status: ::std::option::Option<::std::string::String>,
16 pub parameter_group_name: ::std::option::Option<::std::string::String>,
18 pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20}
21impl UpdateClusterInput {
22 pub fn cluster_name(&self) -> ::std::option::Option<&str> {
24 self.cluster_name.as_deref()
25 }
26 pub fn description(&self) -> ::std::option::Option<&str> {
28 self.description.as_deref()
29 }
30 pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
32 self.preferred_maintenance_window.as_deref()
33 }
34 pub fn notification_topic_arn(&self) -> ::std::option::Option<&str> {
36 self.notification_topic_arn.as_deref()
37 }
38 pub fn notification_topic_status(&self) -> ::std::option::Option<&str> {
40 self.notification_topic_status.as_deref()
41 }
42 pub fn parameter_group_name(&self) -> ::std::option::Option<&str> {
44 self.parameter_group_name.as_deref()
45 }
46 pub fn security_group_ids(&self) -> &[::std::string::String] {
50 self.security_group_ids.as_deref().unwrap_or_default()
51 }
52}
53impl UpdateClusterInput {
54 pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
56 crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
57 }
58}
59
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct UpdateClusterInputBuilder {
64 pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
65 pub(crate) description: ::std::option::Option<::std::string::String>,
66 pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
67 pub(crate) notification_topic_arn: ::std::option::Option<::std::string::String>,
68 pub(crate) notification_topic_status: ::std::option::Option<::std::string::String>,
69 pub(crate) parameter_group_name: ::std::option::Option<::std::string::String>,
70 pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
71}
72impl UpdateClusterInputBuilder {
73 pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.cluster_name = ::std::option::Option::Some(input.into());
77 self
78 }
79 pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.cluster_name = input;
82 self
83 }
84 pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
86 &self.cluster_name
87 }
88 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 self.description = ::std::option::Option::Some(input.into());
91 self
92 }
93 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.description = input;
96 self
97 }
98 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
100 &self.description
101 }
102 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104 self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
105 self
106 }
107 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.preferred_maintenance_window = input;
110 self
111 }
112 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
114 &self.preferred_maintenance_window
115 }
116 pub fn notification_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.notification_topic_arn = ::std::option::Option::Some(input.into());
119 self
120 }
121 pub fn set_notification_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.notification_topic_arn = input;
124 self
125 }
126 pub fn get_notification_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
128 &self.notification_topic_arn
129 }
130 pub fn notification_topic_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.notification_topic_status = ::std::option::Option::Some(input.into());
133 self
134 }
135 pub fn set_notification_topic_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.notification_topic_status = input;
138 self
139 }
140 pub fn get_notification_topic_status(&self) -> &::std::option::Option<::std::string::String> {
142 &self.notification_topic_status
143 }
144 pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.parameter_group_name = ::std::option::Option::Some(input.into());
147 self
148 }
149 pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.parameter_group_name = input;
152 self
153 }
154 pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
156 &self.parameter_group_name
157 }
158 pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164 let mut v = self.security_group_ids.unwrap_or_default();
165 v.push(input.into());
166 self.security_group_ids = ::std::option::Option::Some(v);
167 self
168 }
169 pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
171 self.security_group_ids = input;
172 self
173 }
174 pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
176 &self.security_group_ids
177 }
178 pub fn build(
180 self,
181 ) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
182 ::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterInput {
183 cluster_name: self.cluster_name,
184 description: self.description,
185 preferred_maintenance_window: self.preferred_maintenance_window,
186 notification_topic_arn: self.notification_topic_arn,
187 notification_topic_status: self.notification_topic_status,
188 parameter_group_name: self.parameter_group_name,
189 security_group_ids: self.security_group_ids,
190 })
191 }
192}