aws_sdk_location/operation/delete_map/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_map::_delete_map_output::DeleteMapOutputBuilder;
3
4pub use crate::operation::delete_map::_delete_map_input::DeleteMapInputBuilder;
5
6impl crate::operation::delete_map::builders::DeleteMapInputBuilder {
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::delete_map::DeleteMapOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_map::DeleteMapError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_map();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteMap`.
24///
25/// <important>
26/// <p>This operation is no longer current and may be deprecated in the future. We recommend upgrading to the Maps API V2 unless you require <code>Grab</code> data.</p>
27/// <ul>
28/// <li>
29/// <p><code>DeleteMap</code> is part of a previous Amazon Location Service Maps API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).</p></li>
30/// <li>
31/// <p>The Maps API version 2 has a simplified interface that can be used without creating or managing map resources.</p></li>
32/// <li>
33/// <p>If you are using an AWS SDK or the AWS CLI, note that the Maps API version 2 is found under <code>geo-maps</code> or <code>geo_maps</code>, not under <code>location</code>.</p></li>
34/// <li>
35/// <p>Since <code>Grab</code> is not yet fully supported in Maps API version 2, we recommend you continue using API version 1 when using <code>Grab</code>.</p></li>
36/// <li>
37/// <p>Start your version 2 API journey with the <a href="https://docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html">Maps V2 API Reference</a> or the <a href="https://docs.aws.amazon.com/location/latest/developerguide/maps.html">Developer Guide</a>.</p></li>
38/// </ul>
39/// </important>
40/// <p>Deletes a map resource from your Amazon Web Services account.</p><note>
41/// <p>This operation deletes the resource permanently. If the map is being used in an application, the map may not render.</p>
42/// </note>
43#[derive(::std::clone::Clone, ::std::fmt::Debug)]
44pub struct DeleteMapFluentBuilder {
45    handle: ::std::sync::Arc<crate::client::Handle>,
46    inner: crate::operation::delete_map::builders::DeleteMapInputBuilder,
47    config_override: ::std::option::Option<crate::config::Builder>,
48}
49impl crate::client::customize::internal::CustomizableSend<crate::operation::delete_map::DeleteMapOutput, crate::operation::delete_map::DeleteMapError>
50    for DeleteMapFluentBuilder
51{
52    fn send(
53        self,
54        config_override: crate::config::Builder,
55    ) -> crate::client::customize::internal::BoxFuture<
56        crate::client::customize::internal::SendResult<crate::operation::delete_map::DeleteMapOutput, crate::operation::delete_map::DeleteMapError>,
57    > {
58        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
59    }
60}
61impl DeleteMapFluentBuilder {
62    /// Creates a new `DeleteMapFluentBuilder`.
63    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
64        Self {
65            handle,
66            inner: ::std::default::Default::default(),
67            config_override: ::std::option::Option::None,
68        }
69    }
70    /// Access the DeleteMap as a reference.
71    pub fn as_input(&self) -> &crate::operation::delete_map::builders::DeleteMapInputBuilder {
72        &self.inner
73    }
74    /// Sends the request and returns the response.
75    ///
76    /// If an error occurs, an `SdkError` will be returned with additional details that
77    /// can be matched against.
78    ///
79    /// By default, any retryable failures will be retried twice. Retry behavior
80    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81    /// set when configuring the client.
82    pub async fn send(
83        self,
84    ) -> ::std::result::Result<
85        crate::operation::delete_map::DeleteMapOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::delete_map::DeleteMapError,
88            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89        >,
90    > {
91        let input = self
92            .inner
93            .build()
94            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95        let runtime_plugins = crate::operation::delete_map::DeleteMap::operation_runtime_plugins(
96            self.handle.runtime_plugins.clone(),
97            &self.handle.conf,
98            self.config_override,
99        );
100        crate::operation::delete_map::DeleteMap::orchestrate(&runtime_plugins, input).await
101    }
102
103    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
104    pub fn customize(
105        self,
106    ) -> crate::client::customize::CustomizableOperation<
107        crate::operation::delete_map::DeleteMapOutput,
108        crate::operation::delete_map::DeleteMapError,
109        Self,
110    > {
111        crate::client::customize::CustomizableOperation::new(self)
112    }
113    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
114        self.set_config_override(::std::option::Option::Some(config_override.into()));
115        self
116    }
117
118    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
119        self.config_override = config_override;
120        self
121    }
122    /// <p>The name of the map resource to be deleted.</p>
123    pub fn map_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.inner = self.inner.map_name(input.into());
125        self
126    }
127    /// <p>The name of the map resource to be deleted.</p>
128    pub fn set_map_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.inner = self.inner.set_map_name(input);
130        self
131    }
132    /// <p>The name of the map resource to be deleted.</p>
133    pub fn get_map_name(&self) -> &::std::option::Option<::std::string::String> {
134        self.inner.get_map_name()
135    }
136}