aws_sdk_neptune/operation/copy_db_parameter_group/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::copy_db_parameter_group::_copy_db_parameter_group_output::CopyDbParameterGroupOutputBuilder;
3
4pub use crate::operation::copy_db_parameter_group::_copy_db_parameter_group_input::CopyDbParameterGroupInputBuilder;
5
6impl crate::operation::copy_db_parameter_group::builders::CopyDbParameterGroupInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::copy_db_parameter_group::CopyDbParameterGroupOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::copy_db_parameter_group::CopyDBParameterGroupError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.copy_db_parameter_group();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CopyDBParameterGroup`.
24///
25/// <p>Copies the specified DB parameter group.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CopyDBParameterGroupFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::copy_db_parameter_group::builders::CopyDbParameterGroupInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::copy_db_parameter_group::CopyDbParameterGroupOutput,
35        crate::operation::copy_db_parameter_group::CopyDBParameterGroupError,
36    > for CopyDBParameterGroupFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::copy_db_parameter_group::CopyDbParameterGroupOutput,
44            crate::operation::copy_db_parameter_group::CopyDBParameterGroupError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CopyDBParameterGroupFluentBuilder {
51    /// Creates a new `CopyDBParameterGroupFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CopyDBParameterGroup as a reference.
60    pub fn as_input(&self) -> &crate::operation::copy_db_parameter_group::builders::CopyDbParameterGroupInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::copy_db_parameter_group::CopyDbParameterGroupOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::copy_db_parameter_group::CopyDBParameterGroupError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::copy_db_parameter_group::CopyDBParameterGroup::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::copy_db_parameter_group::CopyDBParameterGroup::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::copy_db_parameter_group::CopyDbParameterGroupOutput,
97        crate::operation::copy_db_parameter_group::CopyDBParameterGroupError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The identifier or ARN for the source DB parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing"> Constructing an Amazon Resource Name (ARN)</a>.</p>
112    /// <p>Constraints:</p>
113    /// <ul>
114    /// <li>
115    /// <p>Must specify a valid DB parameter group.</p></li>
116    /// <li>
117    /// <p>Must specify a valid DB parameter group identifier, for example <code>my-db-param-group</code>, or a valid ARN.</p></li>
118    /// </ul>
119    pub fn source_db_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.source_db_parameter_group_identifier(input.into());
121        self
122    }
123    /// <p>The identifier or ARN for the source DB parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing"> Constructing an Amazon Resource Name (ARN)</a>.</p>
124    /// <p>Constraints:</p>
125    /// <ul>
126    /// <li>
127    /// <p>Must specify a valid DB parameter group.</p></li>
128    /// <li>
129    /// <p>Must specify a valid DB parameter group identifier, for example <code>my-db-param-group</code>, or a valid ARN.</p></li>
130    /// </ul>
131    pub fn set_source_db_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_source_db_parameter_group_identifier(input);
133        self
134    }
135    /// <p>The identifier or ARN for the source DB parameter group. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing"> Constructing an Amazon Resource Name (ARN)</a>.</p>
136    /// <p>Constraints:</p>
137    /// <ul>
138    /// <li>
139    /// <p>Must specify a valid DB parameter group.</p></li>
140    /// <li>
141    /// <p>Must specify a valid DB parameter group identifier, for example <code>my-db-param-group</code>, or a valid ARN.</p></li>
142    /// </ul>
143    pub fn get_source_db_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
144        self.inner.get_source_db_parameter_group_identifier()
145    }
146    /// <p>The identifier for the copied DB parameter group.</p>
147    /// <p>Constraints:</p>
148    /// <ul>
149    /// <li>
150    /// <p>Cannot be null, empty, or blank.</p></li>
151    /// <li>
152    /// <p>Must contain from 1 to 255 letters, numbers, or hyphens.</p></li>
153    /// <li>
154    /// <p>First character must be a letter.</p></li>
155    /// <li>
156    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
157    /// </ul>
158    /// <p>Example: <code>my-db-parameter-group</code></p>
159    pub fn target_db_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.inner = self.inner.target_db_parameter_group_identifier(input.into());
161        self
162    }
163    /// <p>The identifier for the copied DB parameter group.</p>
164    /// <p>Constraints:</p>
165    /// <ul>
166    /// <li>
167    /// <p>Cannot be null, empty, or blank.</p></li>
168    /// <li>
169    /// <p>Must contain from 1 to 255 letters, numbers, or hyphens.</p></li>
170    /// <li>
171    /// <p>First character must be a letter.</p></li>
172    /// <li>
173    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
174    /// </ul>
175    /// <p>Example: <code>my-db-parameter-group</code></p>
176    pub fn set_target_db_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.inner = self.inner.set_target_db_parameter_group_identifier(input);
178        self
179    }
180    /// <p>The identifier for the copied DB parameter group.</p>
181    /// <p>Constraints:</p>
182    /// <ul>
183    /// <li>
184    /// <p>Cannot be null, empty, or blank.</p></li>
185    /// <li>
186    /// <p>Must contain from 1 to 255 letters, numbers, or hyphens.</p></li>
187    /// <li>
188    /// <p>First character must be a letter.</p></li>
189    /// <li>
190    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
191    /// </ul>
192    /// <p>Example: <code>my-db-parameter-group</code></p>
193    pub fn get_target_db_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
194        self.inner.get_target_db_parameter_group_identifier()
195    }
196    /// <p>A description for the copied DB parameter group.</p>
197    pub fn target_db_parameter_group_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198        self.inner = self.inner.target_db_parameter_group_description(input.into());
199        self
200    }
201    /// <p>A description for the copied DB parameter group.</p>
202    pub fn set_target_db_parameter_group_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.inner = self.inner.set_target_db_parameter_group_description(input);
204        self
205    }
206    /// <p>A description for the copied DB parameter group.</p>
207    pub fn get_target_db_parameter_group_description(&self) -> &::std::option::Option<::std::string::String> {
208        self.inner.get_target_db_parameter_group_description()
209    }
210    ///
211    /// Appends an item to `Tags`.
212    ///
213    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
214    ///
215    /// <p>The tags to be assigned to the copied DB parameter group.</p>
216    pub fn tags(mut self, input: crate::types::Tag) -> Self {
217        self.inner = self.inner.tags(input);
218        self
219    }
220    /// <p>The tags to be assigned to the copied DB parameter group.</p>
221    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
222        self.inner = self.inner.set_tags(input);
223        self
224    }
225    /// <p>The tags to be assigned to the copied DB parameter group.</p>
226    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
227        self.inner.get_tags()
228    }
229}