aws-sdk-iotmanagedintegrations 1.43.0

AWS SDK for Managed integrations for AWS IoT Device Management
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_managed_thing::_update_managed_thing_input::UpdateManagedThingInputBuilder;

pub use crate::operation::update_managed_thing::_update_managed_thing_output::UpdateManagedThingOutputBuilder;

impl crate::operation::update_managed_thing::builders::UpdateManagedThingInputBuilder {
    /// 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_managed_thing::UpdateManagedThingOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_managed_thing::UpdateManagedThingError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_managed_thing();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateManagedThing`.
///
/// <p>Update the attributes and capabilities associated with a managed thing.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateManagedThingFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_managed_thing::builders::UpdateManagedThingInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_managed_thing::UpdateManagedThingOutput,
        crate::operation::update_managed_thing::UpdateManagedThingError,
    > for UpdateManagedThingFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_managed_thing::UpdateManagedThingOutput,
            crate::operation::update_managed_thing::UpdateManagedThingError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateManagedThingFluentBuilder {
    /// Creates a new `UpdateManagedThingFluentBuilder`.
    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 UpdateManagedThing as a reference.
    pub fn as_input(&self) -> &crate::operation::update_managed_thing::builders::UpdateManagedThingInputBuilder {
        &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_managed_thing::UpdateManagedThingOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_managed_thing::UpdateManagedThingError,
            ::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_managed_thing::UpdateManagedThing::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_managed_thing::UpdateManagedThing::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_managed_thing::UpdateManagedThingOutput,
        crate::operation::update_managed_thing::UpdateManagedThingError,
        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 id of the managed thing.</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 id of the managed thing.</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 id of the managed thing.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_identifier()
    }
    /// <p>Owner of the device, usually an indication of whom the device belongs to. This value should not contain personal identifiable information.</p>
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.owner(input.into());
        self
    }
    /// <p>Owner of the device, usually an indication of whom the device belongs to. This value should not contain personal identifiable information.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_owner(input);
        self
    }
    /// <p>Owner of the device, usually an indication of whom the device belongs to. This value should not contain personal identifiable information.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_owner()
    }
    /// <p>The identifier of the credential for the managed thing.</p>
    pub fn credential_locker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.credential_locker_id(input.into());
        self
    }
    /// <p>The identifier of the credential for the managed thing.</p>
    pub fn set_credential_locker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_credential_locker_id(input);
        self
    }
    /// <p>The identifier of the credential for the managed thing.</p>
    pub fn get_credential_locker_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_credential_locker_id()
    }
    /// <p>The serial number of the device.</p>
    pub fn serial_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.serial_number(input.into());
        self
    }
    /// <p>The serial number of the device.</p>
    pub fn set_serial_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_serial_number(input);
        self
    }
    /// <p>The serial number of the device.</p>
    pub fn get_serial_number(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_serial_number()
    }
    /// <p>The Wi-Fi Simple Setup configuration for the managed thing, which defines provisioning capabilities and timeout settings.</p>
    pub fn wi_fi_simple_setup_configuration(mut self, input: crate::types::WiFiSimpleSetupConfiguration) -> Self {
        self.inner = self.inner.wi_fi_simple_setup_configuration(input);
        self
    }
    /// <p>The Wi-Fi Simple Setup configuration for the managed thing, which defines provisioning capabilities and timeout settings.</p>
    pub fn set_wi_fi_simple_setup_configuration(mut self, input: ::std::option::Option<crate::types::WiFiSimpleSetupConfiguration>) -> Self {
        self.inner = self.inner.set_wi_fi_simple_setup_configuration(input);
        self
    }
    /// <p>The Wi-Fi Simple Setup configuration for the managed thing, which defines provisioning capabilities and timeout settings.</p>
    pub fn get_wi_fi_simple_setup_configuration(&self) -> &::std::option::Option<crate::types::WiFiSimpleSetupConfiguration> {
        self.inner.get_wi_fi_simple_setup_configuration()
    }
    /// <p>The brand of the device.</p>
    pub fn brand(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.brand(input.into());
        self
    }
    /// <p>The brand of the device.</p>
    pub fn set_brand(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_brand(input);
        self
    }
    /// <p>The brand of the device.</p>
    pub fn get_brand(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_brand()
    }
    /// <p>The model of the device.</p>
    pub fn model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.model(input.into());
        self
    }
    /// <p>The model of the device.</p>
    pub fn set_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_model(input);
        self
    }
    /// <p>The model of the device.</p>
    pub fn get_model(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_model()
    }
    /// <p>The name of the managed thing representing the physical device.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The name of the managed thing representing the physical device.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The name of the managed thing representing the physical device.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>A report of the capabilities for the managed thing.</p>
    pub fn capability_report(mut self, input: crate::types::CapabilityReport) -> Self {
        self.inner = self.inner.capability_report(input);
        self
    }
    /// <p>A report of the capabilities for the managed thing.</p>
    pub fn set_capability_report(mut self, input: ::std::option::Option<crate::types::CapabilityReport>) -> Self {
        self.inner = self.inner.set_capability_report(input);
        self
    }
    /// <p>A report of the capabilities for the managed thing.</p>
    pub fn get_capability_report(&self) -> &::std::option::Option<crate::types::CapabilityReport> {
        self.inner.get_capability_report()
    }
    ///
    /// Appends an item to `CapabilitySchemas`.
    ///
    /// To override the contents of this collection use [`set_capability_schemas`](Self::set_capability_schemas).
    ///
    /// <p>The updated capability schemas that define the functionality and features supported by the managed thing.</p>
    pub fn capability_schemas(mut self, input: crate::types::CapabilitySchemaItem) -> Self {
        self.inner = self.inner.capability_schemas(input);
        self
    }
    /// <p>The updated capability schemas that define the functionality and features supported by the managed thing.</p>
    pub fn set_capability_schemas(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CapabilitySchemaItem>>) -> Self {
        self.inner = self.inner.set_capability_schemas(input);
        self
    }
    /// <p>The updated capability schemas that define the functionality and features supported by the managed thing.</p>
    pub fn get_capability_schemas(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapabilitySchemaItem>> {
        self.inner.get_capability_schemas()
    }
    /// <p>The capabilities of the device such as light bulb.</p>
    #[deprecated(note = "Capabilities has been deprecated, use CapabilityReport instead", since = "06-25-2025")]
    pub fn capabilities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.capabilities(input.into());
        self
    }
    /// <p>The capabilities of the device such as light bulb.</p>
    #[deprecated(note = "Capabilities has been deprecated, use CapabilityReport instead", since = "06-25-2025")]
    pub fn set_capabilities(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_capabilities(input);
        self
    }
    /// <p>The capabilities of the device such as light bulb.</p>
    #[deprecated(note = "Capabilities has been deprecated, use CapabilityReport instead", since = "06-25-2025")]
    pub fn get_capabilities(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_capabilities()
    }
    /// <p>The classification of the managed thing such as light bulb or thermostat.</p>
    pub fn classification(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.classification(input.into());
        self
    }
    /// <p>The classification of the managed thing such as light bulb or thermostat.</p>
    pub fn set_classification(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_classification(input);
        self
    }
    /// <p>The classification of the managed thing such as light bulb or thermostat.</p>
    pub fn get_classification(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_classification()
    }
    /// <p>The network mode for the hub-connected device.</p>
    pub fn hub_network_mode(mut self, input: crate::types::HubNetworkMode) -> Self {
        self.inner = self.inner.hub_network_mode(input);
        self
    }
    /// <p>The network mode for the hub-connected device.</p>
    pub fn set_hub_network_mode(mut self, input: ::std::option::Option<crate::types::HubNetworkMode>) -> Self {
        self.inner = self.inner.set_hub_network_mode(input);
        self
    }
    /// <p>The network mode for the hub-connected device.</p>
    pub fn get_hub_network_mode(&self) -> &::std::option::Option<crate::types::HubNetworkMode> {
        self.inner.get_hub_network_mode()
    }
    ///
    /// Adds a key-value pair to `MetaData`.
    ///
    /// To override the contents of this collection use [`set_meta_data`](Self::set_meta_data).
    ///
    /// <p>The metadata for the managed thing.</p>
    pub fn meta_data(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.meta_data(k.into(), v.into());
        self
    }
    /// <p>The metadata for the managed thing.</p>
    pub fn set_meta_data(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_meta_data(input);
        self
    }
    /// <p>The metadata for the managed thing.</p>
    pub fn get_meta_data(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_meta_data()
    }
}