aws_sdk_rds/operation/copy_db_cluster_parameter_group/_copy_db_cluster_parameter_group_input.rs
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 CopyDbClusterParameterGroupInput {
6 /// <p>The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an ARN for Amazon RDS</a> in the <i>Amazon Aurora User Guide</i>.</p>
7 /// <p>Constraints:</p>
8 /// <ul>
9 /// <li>
10 /// <p>Must specify a valid DB cluster parameter group.</p></li>
11 /// </ul>
12 pub source_db_cluster_parameter_group_identifier: ::std::option::Option<::std::string::String>,
13 /// <p>The identifier for the copied DB cluster parameter group.</p>
14 /// <p>Constraints:</p>
15 /// <ul>
16 /// <li>
17 /// <p>Can't be null, empty, or blank</p></li>
18 /// <li>
19 /// <p>Must contain from 1 to 255 letters, numbers, or hyphens</p></li>
20 /// <li>
21 /// <p>First character must be a letter</p></li>
22 /// <li>
23 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
24 /// </ul>
25 /// <p>Example: <code>my-cluster-param-group1</code></p>
26 pub target_db_cluster_parameter_group_identifier: ::std::option::Option<::std::string::String>,
27 /// <p>A description for the copied DB cluster parameter group.</p>
28 pub target_db_cluster_parameter_group_description: ::std::option::Option<::std::string::String>,
29 /// <p>A list of tags.</p>
30 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
31 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
32}
33impl CopyDbClusterParameterGroupInput {
34 /// <p>The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an ARN for Amazon RDS</a> in the <i>Amazon Aurora User Guide</i>.</p>
35 /// <p>Constraints:</p>
36 /// <ul>
37 /// <li>
38 /// <p>Must specify a valid DB cluster parameter group.</p></li>
39 /// </ul>
40 pub fn source_db_cluster_parameter_group_identifier(&self) -> ::std::option::Option<&str> {
41 self.source_db_cluster_parameter_group_identifier.as_deref()
42 }
43 /// <p>The identifier for the copied DB cluster parameter group.</p>
44 /// <p>Constraints:</p>
45 /// <ul>
46 /// <li>
47 /// <p>Can't be null, empty, or blank</p></li>
48 /// <li>
49 /// <p>Must contain from 1 to 255 letters, numbers, or hyphens</p></li>
50 /// <li>
51 /// <p>First character must be a letter</p></li>
52 /// <li>
53 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
54 /// </ul>
55 /// <p>Example: <code>my-cluster-param-group1</code></p>
56 pub fn target_db_cluster_parameter_group_identifier(&self) -> ::std::option::Option<&str> {
57 self.target_db_cluster_parameter_group_identifier.as_deref()
58 }
59 /// <p>A description for the copied DB cluster parameter group.</p>
60 pub fn target_db_cluster_parameter_group_description(&self) -> ::std::option::Option<&str> {
61 self.target_db_cluster_parameter_group_description.as_deref()
62 }
63 /// <p>A list of tags.</p>
64 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
65 ///
66 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
67 pub fn tags(&self) -> &[crate::types::Tag] {
68 self.tags.as_deref().unwrap_or_default()
69 }
70}
71impl CopyDbClusterParameterGroupInput {
72 /// Creates a new builder-style object to manufacture [`CopyDbClusterParameterGroupInput`](crate::operation::copy_db_cluster_parameter_group::CopyDbClusterParameterGroupInput).
73 pub fn builder() -> crate::operation::copy_db_cluster_parameter_group::builders::CopyDbClusterParameterGroupInputBuilder {
74 crate::operation::copy_db_cluster_parameter_group::builders::CopyDbClusterParameterGroupInputBuilder::default()
75 }
76}
77
78/// A builder for [`CopyDbClusterParameterGroupInput`](crate::operation::copy_db_cluster_parameter_group::CopyDbClusterParameterGroupInput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct CopyDbClusterParameterGroupInputBuilder {
82 pub(crate) source_db_cluster_parameter_group_identifier: ::std::option::Option<::std::string::String>,
83 pub(crate) target_db_cluster_parameter_group_identifier: ::std::option::Option<::std::string::String>,
84 pub(crate) target_db_cluster_parameter_group_description: ::std::option::Option<::std::string::String>,
85 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
86}
87impl CopyDbClusterParameterGroupInputBuilder {
88 /// <p>The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an ARN for Amazon RDS</a> in the <i>Amazon Aurora User Guide</i>.</p>
89 /// <p>Constraints:</p>
90 /// <ul>
91 /// <li>
92 /// <p>Must specify a valid DB cluster parameter group.</p></li>
93 /// </ul>
94 /// This field is required.
95 pub fn source_db_cluster_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.source_db_cluster_parameter_group_identifier = ::std::option::Option::Some(input.into());
97 self
98 }
99 /// <p>The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an ARN for Amazon RDS</a> in the <i>Amazon Aurora User Guide</i>.</p>
100 /// <p>Constraints:</p>
101 /// <ul>
102 /// <li>
103 /// <p>Must specify a valid DB cluster parameter group.</p></li>
104 /// </ul>
105 pub fn set_source_db_cluster_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.source_db_cluster_parameter_group_identifier = input;
107 self
108 }
109 /// <p>The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing"> Constructing an ARN for Amazon RDS</a> in the <i>Amazon Aurora User Guide</i>.</p>
110 /// <p>Constraints:</p>
111 /// <ul>
112 /// <li>
113 /// <p>Must specify a valid DB cluster parameter group.</p></li>
114 /// </ul>
115 pub fn get_source_db_cluster_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
116 &self.source_db_cluster_parameter_group_identifier
117 }
118 /// <p>The identifier for the copied DB cluster parameter group.</p>
119 /// <p>Constraints:</p>
120 /// <ul>
121 /// <li>
122 /// <p>Can't be null, empty, or blank</p></li>
123 /// <li>
124 /// <p>Must contain from 1 to 255 letters, numbers, or hyphens</p></li>
125 /// <li>
126 /// <p>First character must be a letter</p></li>
127 /// <li>
128 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
129 /// </ul>
130 /// <p>Example: <code>my-cluster-param-group1</code></p>
131 /// This field is required.
132 pub fn target_db_cluster_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.target_db_cluster_parameter_group_identifier = ::std::option::Option::Some(input.into());
134 self
135 }
136 /// <p>The identifier for the copied DB cluster parameter group.</p>
137 /// <p>Constraints:</p>
138 /// <ul>
139 /// <li>
140 /// <p>Can't be null, empty, or blank</p></li>
141 /// <li>
142 /// <p>Must contain from 1 to 255 letters, numbers, or hyphens</p></li>
143 /// <li>
144 /// <p>First character must be a letter</p></li>
145 /// <li>
146 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
147 /// </ul>
148 /// <p>Example: <code>my-cluster-param-group1</code></p>
149 pub fn set_target_db_cluster_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.target_db_cluster_parameter_group_identifier = input;
151 self
152 }
153 /// <p>The identifier for the copied DB cluster parameter group.</p>
154 /// <p>Constraints:</p>
155 /// <ul>
156 /// <li>
157 /// <p>Can't be null, empty, or blank</p></li>
158 /// <li>
159 /// <p>Must contain from 1 to 255 letters, numbers, or hyphens</p></li>
160 /// <li>
161 /// <p>First character must be a letter</p></li>
162 /// <li>
163 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
164 /// </ul>
165 /// <p>Example: <code>my-cluster-param-group1</code></p>
166 pub fn get_target_db_cluster_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
167 &self.target_db_cluster_parameter_group_identifier
168 }
169 /// <p>A description for the copied DB cluster parameter group.</p>
170 /// This field is required.
171 pub fn target_db_cluster_parameter_group_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.target_db_cluster_parameter_group_description = ::std::option::Option::Some(input.into());
173 self
174 }
175 /// <p>A description for the copied DB cluster parameter group.</p>
176 pub fn set_target_db_cluster_parameter_group_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.target_db_cluster_parameter_group_description = input;
178 self
179 }
180 /// <p>A description for the copied DB cluster parameter group.</p>
181 pub fn get_target_db_cluster_parameter_group_description(&self) -> &::std::option::Option<::std::string::String> {
182 &self.target_db_cluster_parameter_group_description
183 }
184 /// Appends an item to `tags`.
185 ///
186 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
187 ///
188 /// <p>A list of tags.</p>
189 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
190 pub fn tags(mut self, input: crate::types::Tag) -> Self {
191 let mut v = self.tags.unwrap_or_default();
192 v.push(input);
193 self.tags = ::std::option::Option::Some(v);
194 self
195 }
196 /// <p>A list of tags.</p>
197 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
198 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
199 self.tags = input;
200 self
201 }
202 /// <p>A list of tags.</p>
203 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
204 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
205 &self.tags
206 }
207 /// Consumes the builder and constructs a [`CopyDbClusterParameterGroupInput`](crate::operation::copy_db_cluster_parameter_group::CopyDbClusterParameterGroupInput).
208 pub fn build(
209 self,
210 ) -> ::std::result::Result<
211 crate::operation::copy_db_cluster_parameter_group::CopyDbClusterParameterGroupInput,
212 ::aws_smithy_types::error::operation::BuildError,
213 > {
214 ::std::result::Result::Ok(crate::operation::copy_db_cluster_parameter_group::CopyDbClusterParameterGroupInput {
215 source_db_cluster_parameter_group_identifier: self.source_db_cluster_parameter_group_identifier,
216 target_db_cluster_parameter_group_identifier: self.target_db_cluster_parameter_group_identifier,
217 target_db_cluster_parameter_group_description: self.target_db_cluster_parameter_group_description,
218 tags: self.tags,
219 })
220 }
221}