// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_state_template::_update_state_template_input::UpdateStateTemplateInputBuilder;
pub use crate::operation::update_state_template::_update_state_template_output::UpdateStateTemplateOutputBuilder;
impl crate::operation::update_state_template::builders::UpdateStateTemplateInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::update_state_template::UpdateStateTemplateOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_state_template::UpdateStateTemplateError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.update_state_template();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `UpdateStateTemplate`.
///
/// <p>Updates a state template.</p><important>
/// <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>
/// </important>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateStateTemplateFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::update_state_template::builders::UpdateStateTemplateInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::update_state_template::UpdateStateTemplateOutput,
crate::operation::update_state_template::UpdateStateTemplateError,
> for UpdateStateTemplateFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::update_state_template::UpdateStateTemplateOutput,
crate::operation::update_state_template::UpdateStateTemplateError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl UpdateStateTemplateFluentBuilder {
/// Creates a new `UpdateStateTemplateFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the UpdateStateTemplate as a reference.
pub fn as_input(&self) -> &crate::operation::update_state_template::builders::UpdateStateTemplateInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::update_state_template::UpdateStateTemplateOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_state_template::UpdateStateTemplateError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::update_state_template::UpdateStateTemplate::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::update_state_template::UpdateStateTemplate::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::update_state_template::UpdateStateTemplateOutput,
crate::operation::update_state_template::UpdateStateTemplateError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>The unique ID of the state template.</p>
pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.identifier(input.into());
self
}
/// <p>The unique ID of the state template.</p>
pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_identifier(input);
self
}
/// <p>The unique ID of the state template.</p>
pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_identifier()
}
/// <p>A brief description of the state template.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>A brief description of the state template.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>A brief description of the state template.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_description()
}
///
/// Appends an item to `stateTemplatePropertiesToAdd`.
///
/// To override the contents of this collection use [`set_state_template_properties_to_add`](Self::set_state_template_properties_to_add).
///
/// <p>Add signals from which data is collected as part of the state template.</p>
pub fn state_template_properties_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.state_template_properties_to_add(input.into());
self
}
/// <p>Add signals from which data is collected as part of the state template.</p>
pub fn set_state_template_properties_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_state_template_properties_to_add(input);
self
}
/// <p>Add signals from which data is collected as part of the state template.</p>
pub fn get_state_template_properties_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_state_template_properties_to_add()
}
///
/// Appends an item to `stateTemplatePropertiesToRemove`.
///
/// To override the contents of this collection use [`set_state_template_properties_to_remove`](Self::set_state_template_properties_to_remove).
///
/// <p>Remove signals from which data is collected as part of the state template.</p>
pub fn state_template_properties_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.state_template_properties_to_remove(input.into());
self
}
/// <p>Remove signals from which data is collected as part of the state template.</p>
pub fn set_state_template_properties_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_state_template_properties_to_remove(input);
self
}
/// <p>Remove signals from which data is collected as part of the state template.</p>
pub fn get_state_template_properties_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_state_template_properties_to_remove()
}
///
/// Appends an item to `dataExtraDimensions`.
///
/// To override the contents of this collection use [`set_data_extra_dimensions`](Self::set_data_extra_dimensions).
///
/// <p>A list of vehicle attributes to associate with the payload published on the state template's MQTT topic. (See <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data"> Processing last known state vehicle data using MQTT messaging</a>). For example, if you add <code>Vehicle.Attributes.Make</code> and <code>Vehicle.Attributes.Model</code> attributes, Amazon Web Services IoT FleetWise will enrich the protobuf encoded payload with those attributes in the <code>extraDimensions</code> field.</p>
/// <p>Default: An empty array</p>
pub fn data_extra_dimensions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.data_extra_dimensions(input.into());
self
}
/// <p>A list of vehicle attributes to associate with the payload published on the state template's MQTT topic. (See <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data"> Processing last known state vehicle data using MQTT messaging</a>). For example, if you add <code>Vehicle.Attributes.Make</code> and <code>Vehicle.Attributes.Model</code> attributes, Amazon Web Services IoT FleetWise will enrich the protobuf encoded payload with those attributes in the <code>extraDimensions</code> field.</p>
/// <p>Default: An empty array</p>
pub fn set_data_extra_dimensions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_data_extra_dimensions(input);
self
}
/// <p>A list of vehicle attributes to associate with the payload published on the state template's MQTT topic. (See <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data"> Processing last known state vehicle data using MQTT messaging</a>). For example, if you add <code>Vehicle.Attributes.Make</code> and <code>Vehicle.Attributes.Model</code> attributes, Amazon Web Services IoT FleetWise will enrich the protobuf encoded payload with those attributes in the <code>extraDimensions</code> field.</p>
/// <p>Default: An empty array</p>
pub fn get_data_extra_dimensions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_data_extra_dimensions()
}
///
/// Appends an item to `metadataExtraDimensions`.
///
/// To override the contents of this collection use [`set_metadata_extra_dimensions`](Self::set_metadata_extra_dimensions).
///
/// <p>A list of vehicle attributes to associate with user properties of the messages published on the state template's MQTT topic. (See <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data"> Processing last known state vehicle data using MQTT messaging</a>). For example, if you add <code>Vehicle.Attributes.Make</code> and <code>Vehicle.Attributes.Model</code> attributes, Amazon Web Services IoT FleetWise will include these attributes as User Properties with the MQTT message.</p>
pub fn metadata_extra_dimensions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.metadata_extra_dimensions(input.into());
self
}
/// <p>A list of vehicle attributes to associate with user properties of the messages published on the state template's MQTT topic. (See <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data"> Processing last known state vehicle data using MQTT messaging</a>). For example, if you add <code>Vehicle.Attributes.Make</code> and <code>Vehicle.Attributes.Model</code> attributes, Amazon Web Services IoT FleetWise will include these attributes as User Properties with the MQTT message.</p>
pub fn set_metadata_extra_dimensions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_metadata_extra_dimensions(input);
self
}
/// <p>A list of vehicle attributes to associate with user properties of the messages published on the state template's MQTT topic. (See <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/process-visualize-data.html#process-last-known-state-vehicle-data"> Processing last known state vehicle data using MQTT messaging</a>). For example, if you add <code>Vehicle.Attributes.Make</code> and <code>Vehicle.Attributes.Model</code> attributes, Amazon Web Services IoT FleetWise will include these attributes as User Properties with the MQTT message.</p>
pub fn get_metadata_extra_dimensions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_metadata_extra_dimensions()
}
}