aws_sdk_robomaker/operation/create_deployment_job/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_deployment_job::_create_deployment_job_output::CreateDeploymentJobOutputBuilder;
3
4pub use crate::operation::create_deployment_job::_create_deployment_job_input::CreateDeploymentJobInputBuilder;
5
6impl crate::operation::create_deployment_job::builders::CreateDeploymentJobInputBuilder {
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_deployment_job::CreateDeploymentJobOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_deployment_job::CreateDeploymentJobError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_deployment_job();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateDeploymentJob`.
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>Deploys a specific version of a robot application to robots in a fleet.</p>
31/// <p>The robot application must have a numbered <code>applicationVersion</code> for consistency reasons. To create a new version, use <code>CreateRobotApplicationVersion</code> or see <a href="https://docs.aws.amazon.com/robomaker/latest/dg/create-robot-application-version.html">Creating a Robot Application Version</a>.</p><note>
32/// <p>After 90 days, deployment jobs expire and will be deleted. They will no longer be accessible.</p>
33/// </note>
34#[deprecated(
35    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."
36)]
37#[derive(::std::clone::Clone, ::std::fmt::Debug)]
38pub struct CreateDeploymentJobFluentBuilder {
39    handle: ::std::sync::Arc<crate::client::Handle>,
40    inner: crate::operation::create_deployment_job::builders::CreateDeploymentJobInputBuilder,
41    config_override: ::std::option::Option<crate::config::Builder>,
42}
43impl
44    crate::client::customize::internal::CustomizableSend<
45        crate::operation::create_deployment_job::CreateDeploymentJobOutput,
46        crate::operation::create_deployment_job::CreateDeploymentJobError,
47    > for CreateDeploymentJobFluentBuilder
48{
49    fn send(
50        self,
51        config_override: crate::config::Builder,
52    ) -> crate::client::customize::internal::BoxFuture<
53        crate::client::customize::internal::SendResult<
54            crate::operation::create_deployment_job::CreateDeploymentJobOutput,
55            crate::operation::create_deployment_job::CreateDeploymentJobError,
56        >,
57    > {
58        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
59    }
60}
61impl CreateDeploymentJobFluentBuilder {
62    /// Creates a new `CreateDeploymentJobFluentBuilder`.
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 CreateDeploymentJob as a reference.
71    pub fn as_input(&self) -> &crate::operation::create_deployment_job::builders::CreateDeploymentJobInputBuilder {
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::create_deployment_job::CreateDeploymentJobOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::create_deployment_job::CreateDeploymentJobError,
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::create_deployment_job::CreateDeploymentJob::operation_runtime_plugins(
96            self.handle.runtime_plugins.clone(),
97            &self.handle.conf,
98            self.config_override,
99        );
100        crate::operation::create_deployment_job::CreateDeploymentJob::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::create_deployment_job::CreateDeploymentJobOutput,
108        crate::operation::create_deployment_job::CreateDeploymentJobError,
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 requested deployment configuration.</p>
123    pub fn deployment_config(mut self, input: crate::types::DeploymentConfig) -> Self {
124        self.inner = self.inner.deployment_config(input);
125        self
126    }
127    /// <p>The requested deployment configuration.</p>
128    pub fn set_deployment_config(mut self, input: ::std::option::Option<crate::types::DeploymentConfig>) -> Self {
129        self.inner = self.inner.set_deployment_config(input);
130        self
131    }
132    /// <p>The requested deployment configuration.</p>
133    pub fn get_deployment_config(&self) -> &::std::option::Option<crate::types::DeploymentConfig> {
134        self.inner.get_deployment_config()
135    }
136    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
137    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.inner = self.inner.client_request_token(input.into());
139        self
140    }
141    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
142    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.inner = self.inner.set_client_request_token(input);
144        self
145    }
146    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
147    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
148        self.inner.get_client_request_token()
149    }
150    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
151    pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.inner = self.inner.fleet(input.into());
153        self
154    }
155    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
156    pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.inner = self.inner.set_fleet(input);
158        self
159    }
160    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
161    pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> {
162        self.inner.get_fleet()
163    }
164    ///
165    /// Appends an item to `deploymentApplicationConfigs`.
166    ///
167    /// To override the contents of this collection use [`set_deployment_application_configs`](Self::set_deployment_application_configs).
168    ///
169    /// <p>The deployment application configuration.</p>
170    pub fn deployment_application_configs(mut self, input: crate::types::DeploymentApplicationConfig) -> Self {
171        self.inner = self.inner.deployment_application_configs(input);
172        self
173    }
174    /// <p>The deployment application configuration.</p>
175    pub fn set_deployment_application_configs(
176        mut self,
177        input: ::std::option::Option<::std::vec::Vec<crate::types::DeploymentApplicationConfig>>,
178    ) -> Self {
179        self.inner = self.inner.set_deployment_application_configs(input);
180        self
181    }
182    /// <p>The deployment application configuration.</p>
183    pub fn get_deployment_application_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeploymentApplicationConfig>> {
184        self.inner.get_deployment_application_configs()
185    }
186    ///
187    /// Adds a key-value pair to `tags`.
188    ///
189    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
190    ///
191    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
192    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.inner = self.inner.tags(k.into(), v.into());
194        self
195    }
196    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
197    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
198        self.inner = self.inner.set_tags(input);
199        self
200    }
201    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
202    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
203        self.inner.get_tags()
204    }
205}