aws_sdk_resiliencehub/operation/remove_draft_app_version_resource_mappings/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::remove_draft_app_version_resource_mappings::_remove_draft_app_version_resource_mappings_output::RemoveDraftAppVersionResourceMappingsOutputBuilder;
3
4pub use crate::operation::remove_draft_app_version_resource_mappings::_remove_draft_app_version_resource_mappings_input::RemoveDraftAppVersionResourceMappingsInputBuilder;
5
6impl crate::operation::remove_draft_app_version_resource_mappings::builders::RemoveDraftAppVersionResourceMappingsInputBuilder {
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::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.remove_draft_app_version_resource_mappings();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `RemoveDraftAppVersionResourceMappings`.
24///
25/// <p>Removes resource mappings from a draft application version.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct RemoveDraftAppVersionResourceMappingsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::remove_draft_app_version_resource_mappings::builders::RemoveDraftAppVersionResourceMappingsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsOutput,
35        crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsError,
36    > for RemoveDraftAppVersionResourceMappingsFluentBuilder
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::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsOutput,
44            crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl RemoveDraftAppVersionResourceMappingsFluentBuilder {
51    /// Creates a new `RemoveDraftAppVersionResourceMappingsFluentBuilder`.
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 RemoveDraftAppVersionResourceMappings as a reference.
60    pub fn as_input(
61        &self,
62    ) -> &crate::operation::remove_draft_app_version_resource_mappings::builders::RemoveDraftAppVersionResourceMappingsInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins =
87            crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappings::operation_runtime_plugins(
88                self.handle.runtime_plugins.clone(),
89                &self.handle.conf,
90                self.config_override,
91            );
92        crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappings::orchestrate(&runtime_plugins, input)
93            .await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsOutput,
101        crate::operation::remove_draft_app_version_resource_mappings::RemoveDraftAppVersionResourceMappingsError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
116    pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.inner = self.inner.app_arn(input.into());
118        self
119    }
120    /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
121    pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.inner = self.inner.set_app_arn(input);
123        self
124    }
125    /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
126    pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
127        self.inner.get_app_arn()
128    }
129    ///
130    /// Appends an item to `resourceNames`.
131    ///
132    /// To override the contents of this collection use [`set_resource_names`](Self::set_resource_names).
133    ///
134    /// <p>The names of the resources you want to remove from the resource mappings.</p>
135    pub fn resource_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.resource_names(input.into());
137        self
138    }
139    /// <p>The names of the resources you want to remove from the resource mappings.</p>
140    pub fn set_resource_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
141        self.inner = self.inner.set_resource_names(input);
142        self
143    }
144    /// <p>The names of the resources you want to remove from the resource mappings.</p>
145    pub fn get_resource_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
146        self.inner.get_resource_names()
147    }
148    ///
149    /// Appends an item to `logicalStackNames`.
150    ///
151    /// To override the contents of this collection use [`set_logical_stack_names`](Self::set_logical_stack_names).
152    ///
153    /// <p>The names of the CloudFormation stacks you want to remove from the resource mappings.</p>
154    pub fn logical_stack_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.logical_stack_names(input.into());
156        self
157    }
158    /// <p>The names of the CloudFormation stacks you want to remove from the resource mappings.</p>
159    pub fn set_logical_stack_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
160        self.inner = self.inner.set_logical_stack_names(input);
161        self
162    }
163    /// <p>The names of the CloudFormation stacks you want to remove from the resource mappings.</p>
164    pub fn get_logical_stack_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
165        self.inner.get_logical_stack_names()
166    }
167    ///
168    /// Appends an item to `appRegistryAppNames`.
169    ///
170    /// To override the contents of this collection use [`set_app_registry_app_names`](Self::set_app_registry_app_names).
171    ///
172    /// <p>The names of the registered applications you want to remove from the resource mappings.</p>
173    pub fn app_registry_app_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.app_registry_app_names(input.into());
175        self
176    }
177    /// <p>The names of the registered applications you want to remove from the resource mappings.</p>
178    pub fn set_app_registry_app_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
179        self.inner = self.inner.set_app_registry_app_names(input);
180        self
181    }
182    /// <p>The names of the registered applications you want to remove from the resource mappings.</p>
183    pub fn get_app_registry_app_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
184        self.inner.get_app_registry_app_names()
185    }
186    ///
187    /// Appends an item to `resourceGroupNames`.
188    ///
189    /// To override the contents of this collection use [`set_resource_group_names`](Self::set_resource_group_names).
190    ///
191    /// <p>The names of the resource groups you want to remove from the resource mappings.</p>
192    pub fn resource_group_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.inner = self.inner.resource_group_names(input.into());
194        self
195    }
196    /// <p>The names of the resource groups you want to remove from the resource mappings.</p>
197    pub fn set_resource_group_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
198        self.inner = self.inner.set_resource_group_names(input);
199        self
200    }
201    /// <p>The names of the resource groups you want to remove from the resource mappings.</p>
202    pub fn get_resource_group_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
203        self.inner.get_resource_group_names()
204    }
205    ///
206    /// Appends an item to `terraformSourceNames`.
207    ///
208    /// To override the contents of this collection use [`set_terraform_source_names`](Self::set_terraform_source_names).
209    ///
210    /// <p>The names of the Terraform sources you want to remove from the resource mappings.</p>
211    pub fn terraform_source_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212        self.inner = self.inner.terraform_source_names(input.into());
213        self
214    }
215    /// <p>The names of the Terraform sources you want to remove from the resource mappings.</p>
216    pub fn set_terraform_source_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
217        self.inner = self.inner.set_terraform_source_names(input);
218        self
219    }
220    /// <p>The names of the Terraform sources you want to remove from the resource mappings.</p>
221    pub fn get_terraform_source_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
222        self.inner.get_terraform_source_names()
223    }
224    ///
225    /// Appends an item to `eksSourceNames`.
226    ///
227    /// To override the contents of this collection use [`set_eks_source_names`](Self::set_eks_source_names).
228    ///
229    /// <p>The names of the Amazon Elastic Kubernetes Service clusters and namespaces you want to remove from the resource mappings.</p><note>
230    /// <p>This parameter accepts values in "eks-cluster/namespace" format.</p>
231    /// </note>
232    pub fn eks_source_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
233        self.inner = self.inner.eks_source_names(input.into());
234        self
235    }
236    /// <p>The names of the Amazon Elastic Kubernetes Service clusters and namespaces you want to remove from the resource mappings.</p><note>
237    /// <p>This parameter accepts values in "eks-cluster/namespace" format.</p>
238    /// </note>
239    pub fn set_eks_source_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
240        self.inner = self.inner.set_eks_source_names(input);
241        self
242    }
243    /// <p>The names of the Amazon Elastic Kubernetes Service clusters and namespaces you want to remove from the resource mappings.</p><note>
244    /// <p>This parameter accepts values in "eks-cluster/namespace" format.</p>
245    /// </note>
246    pub fn get_eks_source_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
247        self.inner.get_eks_source_names()
248    }
249}