1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateClusterInput {
6/// <p>The name of the DAX cluster to be modified.</p>
7pub cluster_name: ::std::option::Option<::std::string::String>,
8/// <p>A description of the changes being made to the cluster.</p>
9pub description: ::std::option::Option<::std::string::String>,
10/// <p>A range of time when maintenance of DAX cluster software will be performed. For example: <code>sun:01:00-sun:09:00</code>. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window.</p>
11pub preferred_maintenance_window: ::std::option::Option<::std::string::String>,
12/// <p>The Amazon Resource Name (ARN) that identifies the topic.</p>
13pub notification_topic_arn: ::std::option::Option<::std::string::String>,
14/// <p>The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.</p>
15pub notification_topic_status: ::std::option::Option<::std::string::String>,
16/// <p>The name of a parameter group for this cluster.</p>
17pub parameter_group_name: ::std::option::Option<::std::string::String>,
18/// <p>A list of user-specified security group IDs to be assigned to each node in the DAX cluster. If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
19pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20}
21impl UpdateClusterInput {
22/// <p>The name of the DAX cluster to be modified.</p>
23pub fn cluster_name(&self) -> ::std::option::Option<&str> {
24self.cluster_name.as_deref()
25 }
26/// <p>A description of the changes being made to the cluster.</p>
27pub fn description(&self) -> ::std::option::Option<&str> {
28self.description.as_deref()
29 }
30/// <p>A range of time when maintenance of DAX cluster software will be performed. For example: <code>sun:01:00-sun:09:00</code>. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window.</p>
31pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
32self.preferred_maintenance_window.as_deref()
33 }
34/// <p>The Amazon Resource Name (ARN) that identifies the topic.</p>
35pub fn notification_topic_arn(&self) -> ::std::option::Option<&str> {
36self.notification_topic_arn.as_deref()
37 }
38/// <p>The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.</p>
39pub fn notification_topic_status(&self) -> ::std::option::Option<&str> {
40self.notification_topic_status.as_deref()
41 }
42/// <p>The name of a parameter group for this cluster.</p>
43pub fn parameter_group_name(&self) -> ::std::option::Option<&str> {
44self.parameter_group_name.as_deref()
45 }
46/// <p>A list of user-specified security group IDs to be assigned to each node in the DAX cluster. If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
47 ///
48 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
49pub fn security_group_ids(&self) -> &[::std::string::String] {
50self.security_group_ids.as_deref().unwrap_or_default()
51 }
52}
53impl UpdateClusterInput {
54/// Creates a new builder-style object to manufacture [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
55pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
56crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
57 }
58}
5960/// A builder for [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct UpdateClusterInputBuilder {
64pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
65pub(crate) description: ::std::option::Option<::std::string::String>,
66pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
67pub(crate) notification_topic_arn: ::std::option::Option<::std::string::String>,
68pub(crate) notification_topic_status: ::std::option::Option<::std::string::String>,
69pub(crate) parameter_group_name: ::std::option::Option<::std::string::String>,
70pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
71}
72impl UpdateClusterInputBuilder {
73/// <p>The name of the DAX cluster to be modified.</p>
74 /// This field is required.
75pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76self.cluster_name = ::std::option::Option::Some(input.into());
77self
78}
79/// <p>The name of the DAX cluster to be modified.</p>
80pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81self.cluster_name = input;
82self
83}
84/// <p>The name of the DAX cluster to be modified.</p>
85pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
86&self.cluster_name
87 }
88/// <p>A description of the changes being made to the cluster.</p>
89pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90self.description = ::std::option::Option::Some(input.into());
91self
92}
93/// <p>A description of the changes being made to the cluster.</p>
94pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95self.description = input;
96self
97}
98/// <p>A description of the changes being made to the cluster.</p>
99pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
100&self.description
101 }
102/// <p>A range of time when maintenance of DAX cluster software will be performed. For example: <code>sun:01:00-sun:09:00</code>. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window.</p>
103pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
105self
106}
107/// <p>A range of time when maintenance of DAX cluster software will be performed. For example: <code>sun:01:00-sun:09:00</code>. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window.</p>
108pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109self.preferred_maintenance_window = input;
110self
111}
112/// <p>A range of time when maintenance of DAX cluster software will be performed. For example: <code>sun:01:00-sun:09:00</code>. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window.</p>
113pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
114&self.preferred_maintenance_window
115 }
116/// <p>The Amazon Resource Name (ARN) that identifies the topic.</p>
117pub fn notification_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118self.notification_topic_arn = ::std::option::Option::Some(input.into());
119self
120}
121/// <p>The Amazon Resource Name (ARN) that identifies the topic.</p>
122pub fn set_notification_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123self.notification_topic_arn = input;
124self
125}
126/// <p>The Amazon Resource Name (ARN) that identifies the topic.</p>
127pub fn get_notification_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
128&self.notification_topic_arn
129 }
130/// <p>The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.</p>
131pub fn notification_topic_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132self.notification_topic_status = ::std::option::Option::Some(input.into());
133self
134}
135/// <p>The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.</p>
136pub fn set_notification_topic_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137self.notification_topic_status = input;
138self
139}
140/// <p>The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.</p>
141pub fn get_notification_topic_status(&self) -> &::std::option::Option<::std::string::String> {
142&self.notification_topic_status
143 }
144/// <p>The name of a parameter group for this cluster.</p>
145pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146self.parameter_group_name = ::std::option::Option::Some(input.into());
147self
148}
149/// <p>The name of a parameter group for this cluster.</p>
150pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151self.parameter_group_name = input;
152self
153}
154/// <p>The name of a parameter group for this cluster.</p>
155pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
156&self.parameter_group_name
157 }
158/// Appends an item to `security_group_ids`.
159 ///
160 /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
161 ///
162 /// <p>A list of user-specified security group IDs to be assigned to each node in the DAX cluster. If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
163pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164let mut v = self.security_group_ids.unwrap_or_default();
165 v.push(input.into());
166self.security_group_ids = ::std::option::Option::Some(v);
167self
168}
169/// <p>A list of user-specified security group IDs to be assigned to each node in the DAX cluster. If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
170pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
171self.security_group_ids = input;
172self
173}
174/// <p>A list of user-specified security group IDs to be assigned to each node in the DAX cluster. If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
175pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
176&self.security_group_ids
177 }
178/// Consumes the builder and constructs a [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
179pub fn build(
180self,
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}