aws_sdk_iotfleetwise/operation/update_decoder_manifest/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_decoder_manifest::_update_decoder_manifest_output::UpdateDecoderManifestOutputBuilder;
3
4pub use crate::operation::update_decoder_manifest::_update_decoder_manifest_input::UpdateDecoderManifestInputBuilder;
5
6impl crate::operation::update_decoder_manifest::builders::UpdateDecoderManifestInputBuilder {
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::update_decoder_manifest::UpdateDecoderManifestOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_decoder_manifest::UpdateDecoderManifestError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_decoder_manifest();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateDecoderManifest`.
24///
25/// <p>Updates a decoder manifest.</p>
26/// <p>A decoder manifest can only be updated when the status is <code>DRAFT</code>. Only <code>ACTIVE</code> decoder manifests can be associated with vehicles.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateDecoderManifestFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::update_decoder_manifest::builders::UpdateDecoderManifestInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::update_decoder_manifest::UpdateDecoderManifestOutput,
36        crate::operation::update_decoder_manifest::UpdateDecoderManifestError,
37    > for UpdateDecoderManifestFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::update_decoder_manifest::UpdateDecoderManifestOutput,
45            crate::operation::update_decoder_manifest::UpdateDecoderManifestError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl UpdateDecoderManifestFluentBuilder {
52    /// Creates a new `UpdateDecoderManifestFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the UpdateDecoderManifest as a reference.
61    pub fn as_input(&self) -> &crate::operation::update_decoder_manifest::builders::UpdateDecoderManifestInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::update_decoder_manifest::UpdateDecoderManifestOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::update_decoder_manifest::UpdateDecoderManifestError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::update_decoder_manifest::UpdateDecoderManifest::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::update_decoder_manifest::UpdateDecoderManifest::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::update_decoder_manifest::UpdateDecoderManifestOutput,
98        crate::operation::update_decoder_manifest::UpdateDecoderManifestError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The name of the decoder manifest to update.</p>
113    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.name(input.into());
115        self
116    }
117    /// <p>The name of the decoder manifest to update.</p>
118    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_name(input);
120        self
121    }
122    /// <p>The name of the decoder manifest to update.</p>
123    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_name()
125    }
126    /// <p>A brief description of the decoder manifest to update.</p>
127    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.description(input.into());
129        self
130    }
131    /// <p>A brief description of the decoder manifest to update.</p>
132    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_description(input);
134        self
135    }
136    /// <p>A brief description of the decoder manifest to update.</p>
137    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_description()
139    }
140    ///
141    /// Appends an item to `signalDecodersToAdd`.
142    ///
143    /// To override the contents of this collection use [`set_signal_decoders_to_add`](Self::set_signal_decoders_to_add).
144    ///
145    /// <p>A list of information about decoding additional signals to add to the decoder manifest.</p>
146    pub fn signal_decoders_to_add(mut self, input: crate::types::SignalDecoder) -> Self {
147        self.inner = self.inner.signal_decoders_to_add(input);
148        self
149    }
150    /// <p>A list of information about decoding additional signals to add to the decoder manifest.</p>
151    pub fn set_signal_decoders_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SignalDecoder>>) -> Self {
152        self.inner = self.inner.set_signal_decoders_to_add(input);
153        self
154    }
155    /// <p>A list of information about decoding additional signals to add to the decoder manifest.</p>
156    pub fn get_signal_decoders_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SignalDecoder>> {
157        self.inner.get_signal_decoders_to_add()
158    }
159    ///
160    /// Appends an item to `signalDecodersToUpdate`.
161    ///
162    /// To override the contents of this collection use [`set_signal_decoders_to_update`](Self::set_signal_decoders_to_update).
163    ///
164    /// <p>A list of updated information about decoding signals to update in the decoder manifest.</p>
165    pub fn signal_decoders_to_update(mut self, input: crate::types::SignalDecoder) -> Self {
166        self.inner = self.inner.signal_decoders_to_update(input);
167        self
168    }
169    /// <p>A list of updated information about decoding signals to update in the decoder manifest.</p>
170    pub fn set_signal_decoders_to_update(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SignalDecoder>>) -> Self {
171        self.inner = self.inner.set_signal_decoders_to_update(input);
172        self
173    }
174    /// <p>A list of updated information about decoding signals to update in the decoder manifest.</p>
175    pub fn get_signal_decoders_to_update(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SignalDecoder>> {
176        self.inner.get_signal_decoders_to_update()
177    }
178    ///
179    /// Appends an item to `signalDecodersToRemove`.
180    ///
181    /// To override the contents of this collection use [`set_signal_decoders_to_remove`](Self::set_signal_decoders_to_remove).
182    ///
183    /// <p>A list of signal decoders to remove from the decoder manifest.</p>
184    pub fn signal_decoders_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.inner = self.inner.signal_decoders_to_remove(input.into());
186        self
187    }
188    /// <p>A list of signal decoders to remove from the decoder manifest.</p>
189    pub fn set_signal_decoders_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
190        self.inner = self.inner.set_signal_decoders_to_remove(input);
191        self
192    }
193    /// <p>A list of signal decoders to remove from the decoder manifest.</p>
194    pub fn get_signal_decoders_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
195        self.inner.get_signal_decoders_to_remove()
196    }
197    ///
198    /// Appends an item to `networkInterfacesToAdd`.
199    ///
200    /// To override the contents of this collection use [`set_network_interfaces_to_add`](Self::set_network_interfaces_to_add).
201    ///
202    /// <p>A list of information about the network interfaces to add to the decoder manifest.</p>
203    pub fn network_interfaces_to_add(mut self, input: crate::types::NetworkInterface) -> Self {
204        self.inner = self.inner.network_interfaces_to_add(input);
205        self
206    }
207    /// <p>A list of information about the network interfaces to add to the decoder manifest.</p>
208    pub fn set_network_interfaces_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>) -> Self {
209        self.inner = self.inner.set_network_interfaces_to_add(input);
210        self
211    }
212    /// <p>A list of information about the network interfaces to add to the decoder manifest.</p>
213    pub fn get_network_interfaces_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>> {
214        self.inner.get_network_interfaces_to_add()
215    }
216    ///
217    /// Appends an item to `networkInterfacesToUpdate`.
218    ///
219    /// To override the contents of this collection use [`set_network_interfaces_to_update`](Self::set_network_interfaces_to_update).
220    ///
221    /// <p>A list of information about the network interfaces to update in the decoder manifest.</p>
222    pub fn network_interfaces_to_update(mut self, input: crate::types::NetworkInterface) -> Self {
223        self.inner = self.inner.network_interfaces_to_update(input);
224        self
225    }
226    /// <p>A list of information about the network interfaces to update in the decoder manifest.</p>
227    pub fn set_network_interfaces_to_update(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>) -> Self {
228        self.inner = self.inner.set_network_interfaces_to_update(input);
229        self
230    }
231    /// <p>A list of information about the network interfaces to update in the decoder manifest.</p>
232    pub fn get_network_interfaces_to_update(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>> {
233        self.inner.get_network_interfaces_to_update()
234    }
235    ///
236    /// Appends an item to `networkInterfacesToRemove`.
237    ///
238    /// To override the contents of this collection use [`set_network_interfaces_to_remove`](Self::set_network_interfaces_to_remove).
239    ///
240    /// <p>A list of network interfaces to remove from the decoder manifest.</p>
241    pub fn network_interfaces_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242        self.inner = self.inner.network_interfaces_to_remove(input.into());
243        self
244    }
245    /// <p>A list of network interfaces to remove from the decoder manifest.</p>
246    pub fn set_network_interfaces_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
247        self.inner = self.inner.set_network_interfaces_to_remove(input);
248        self
249    }
250    /// <p>A list of network interfaces to remove from the decoder manifest.</p>
251    pub fn get_network_interfaces_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
252        self.inner.get_network_interfaces_to_remove()
253    }
254    /// <p>The state of the decoder manifest. If the status is <code>ACTIVE</code>, the decoder manifest can't be edited. If the status is <code>DRAFT</code>, you can edit the decoder manifest.</p>
255    pub fn status(mut self, input: crate::types::ManifestStatus) -> Self {
256        self.inner = self.inner.status(input);
257        self
258    }
259    /// <p>The state of the decoder manifest. If the status is <code>ACTIVE</code>, the decoder manifest can't be edited. If the status is <code>DRAFT</code>, you can edit the decoder manifest.</p>
260    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ManifestStatus>) -> Self {
261        self.inner = self.inner.set_status(input);
262        self
263    }
264    /// <p>The state of the decoder manifest. If the status is <code>ACTIVE</code>, the decoder manifest can't be edited. If the status is <code>DRAFT</code>, you can edit the decoder manifest.</p>
265    pub fn get_status(&self) -> &::std::option::Option<crate::types::ManifestStatus> {
266        self.inner.get_status()
267    }
268    /// <p>Use default decoders for all unmapped signals in the model. You don't need to provide any detailed decoding information.</p><important>
269    /// <p>Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html">Amazon Web Services Region and feature availability</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p>
270    /// </important>
271    pub fn default_for_unmapped_signals(mut self, input: crate::types::DefaultForUnmappedSignalsType) -> Self {
272        self.inner = self.inner.default_for_unmapped_signals(input);
273        self
274    }
275    /// <p>Use default decoders for all unmapped signals in the model. You don't need to provide any detailed decoding information.</p><important>
276    /// <p>Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html">Amazon Web Services Region and feature availability</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p>
277    /// </important>
278    pub fn set_default_for_unmapped_signals(mut self, input: ::std::option::Option<crate::types::DefaultForUnmappedSignalsType>) -> Self {
279        self.inner = self.inner.set_default_for_unmapped_signals(input);
280        self
281    }
282    /// <p>Use default decoders for all unmapped signals in the model. You don't need to provide any detailed decoding information.</p><important>
283    /// <p>Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html">Amazon Web Services Region and feature availability</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p>
284    /// </important>
285    pub fn get_default_for_unmapped_signals(&self) -> &::std::option::Option<crate::types::DefaultForUnmappedSignalsType> {
286        self.inner.get_default_for_unmapped_signals()
287    }
288}