aws_sdk_robomaker/operation/create_fleet/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_fleet::_create_fleet_output::CreateFleetOutputBuilder;
3
4pub use crate::operation::create_fleet::_create_fleet_input::CreateFleetInputBuilder;
5
6impl crate::operation::create_fleet::builders::CreateFleetInputBuilder {
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::create_fleet::CreateFleetOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_fleet::CreateFleetError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_fleet();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateFleet`.
24///
25/// <important>
26/// <p>End of support notice: On September 10, 2025, Amazon Web Services will discontinue support for Amazon Web Services RoboMaker. After September 10, 2025, you will no longer be able to access the Amazon Web Services RoboMaker console or Amazon Web Services RoboMaker resources. For more information on transitioning to Batch to help run containerized simulations, visit <a href="https://aws.amazon.com/blogs/hpc/run-simulations-using-multiple-containers-in-a-single-aws-batch-job/">https://aws.amazon.com/blogs/hpc/run-simulations-using-multiple-containers-in-a-single-aws-batch-job/</a>.</p>
27/// </important> <important>
28/// <p>This API is no longer supported and will throw an error if used. For more information, see the January 31, 2022 update in the <a href="https://docs.aws.amazon.com/robomaker/latest/dg/chapter-support-policy.html#software-support-policy-january2022">Support policy</a> page.</p>
29/// </important>
30/// <p>Creates a fleet, a logical group of robots running the same robot application.</p>
31#[deprecated(
32    note = "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html."
33)]
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct CreateFleetFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::create_fleet::builders::CreateFleetInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::create_fleet::CreateFleetOutput,
43        crate::operation::create_fleet::CreateFleetError,
44    > for CreateFleetFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::create_fleet::CreateFleetOutput,
52            crate::operation::create_fleet::CreateFleetError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl CreateFleetFluentBuilder {
59    /// Creates a new `CreateFleetFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the CreateFleet as a reference.
68    pub fn as_input(&self) -> &crate::operation::create_fleet::builders::CreateFleetInputBuilder {
69        &self.inner
70    }
71    /// Sends the request and returns the response.
72    ///
73    /// If an error occurs, an `SdkError` will be returned with additional details that
74    /// can be matched against.
75    ///
76    /// By default, any retryable failures will be retried twice. Retry behavior
77    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78    /// set when configuring the client.
79    pub async fn send(
80        self,
81    ) -> ::std::result::Result<
82        crate::operation::create_fleet::CreateFleetOutput,
83        ::aws_smithy_runtime_api::client::result::SdkError<
84            crate::operation::create_fleet::CreateFleetError,
85            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86        >,
87    > {
88        let input = self
89            .inner
90            .build()
91            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92        let runtime_plugins = crate::operation::create_fleet::CreateFleet::operation_runtime_plugins(
93            self.handle.runtime_plugins.clone(),
94            &self.handle.conf,
95            self.config_override,
96        );
97        crate::operation::create_fleet::CreateFleet::orchestrate(&runtime_plugins, input).await
98    }
99
100    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101    pub fn customize(
102        self,
103    ) -> crate::client::customize::CustomizableOperation<
104        crate::operation::create_fleet::CreateFleetOutput,
105        crate::operation::create_fleet::CreateFleetError,
106        Self,
107    > {
108        crate::client::customize::CustomizableOperation::new(self)
109    }
110    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111        self.set_config_override(::std::option::Option::Some(config_override.into()));
112        self
113    }
114
115    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116        self.config_override = config_override;
117        self
118    }
119    /// <p>The name of the fleet.</p>
120    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.inner = self.inner.name(input.into());
122        self
123    }
124    /// <p>The name of the fleet.</p>
125    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.inner = self.inner.set_name(input);
127        self
128    }
129    /// <p>The name of the fleet.</p>
130    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
131        self.inner.get_name()
132    }
133    ///
134    /// Adds a key-value pair to `tags`.
135    ///
136    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
137    ///
138    /// <p>A map that contains tag keys and tag values that are attached to the fleet.</p>
139    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.inner = self.inner.tags(k.into(), v.into());
141        self
142    }
143    /// <p>A map that contains tag keys and tag values that are attached to the fleet.</p>
144    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
145        self.inner = self.inner.set_tags(input);
146        self
147    }
148    /// <p>A map that contains tag keys and tag values that are attached to the fleet.</p>
149    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
150        self.inner.get_tags()
151    }
152}