aws-sdk-iotmanagedintegrations 1.42.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::create_managed_thing::_create_managed_thing_input::CreateManagedThingInputBuilder;

pub use crate::operation::create_managed_thing::_create_managed_thing_output::CreateManagedThingOutputBuilder;

impl crate::operation::create_managed_thing::builders::CreateManagedThingInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_managed_thing::CreateManagedThingOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_managed_thing::CreateManagedThingError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_managed_thing();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateManagedThing`.
///
/// <p>Creates a managed thing. A managed thing contains the device identifier, protocol supported, and capabilities of the device in a data model format defined by Managed integrations.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateManagedThingFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_managed_thing::builders::CreateManagedThingInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_managed_thing::CreateManagedThingOutput,
        crate::operation::create_managed_thing::CreateManagedThingError,
    > for CreateManagedThingFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_managed_thing::CreateManagedThingOutput,
            crate::operation::create_managed_thing::CreateManagedThingError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateManagedThingFluentBuilder {
    /// Creates a new `CreateManagedThingFluentBuilder`.
    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 CreateManagedThing as a reference.
    pub fn as_input(&self) -> &crate::operation::create_managed_thing::builders::CreateManagedThingInputBuilder {
        &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::create_managed_thing::CreateManagedThingOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_managed_thing::CreateManagedThingError,
            ::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::create_managed_thing::CreateManagedThing::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_managed_thing::CreateManagedThing::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::create_managed_thing::CreateManagedThingOutput,
        crate::operation::create_managed_thing::CreateManagedThingError,
        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 type of device used. This will be the hub controller, cloud device, or AWS IoT device.</p>
    pub fn role(mut self, input: crate::types::Role) -> Self {
        self.inner = self.inner.role(input);
        self
    }
    /// <p>The type of device used. This will be the hub controller, cloud device, or AWS IoT device.</p>
    pub fn set_role(mut self, input: ::std::option::Option<crate::types::Role>) -> Self {
        self.inner = self.inner.set_role(input);
        self
    }
    /// <p>The type of device used. This will be the hub controller, cloud device, or AWS IoT device.</p>
    pub fn get_role(&self) -> &::std::option::Option<crate::types::Role> {
        self.inner.get_role()
    }
    /// <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 authentication material defining the device connectivity setup requests. The authorization materials used are the device bar code.</p>
    pub fn authentication_material(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.authentication_material(input.into());
        self
    }
    /// <p>The authentication material defining the device connectivity setup requests. The authorization materials used are the device bar code.</p>
    pub fn set_authentication_material(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_authentication_material(input);
        self
    }
    /// <p>The authentication material defining the device connectivity setup requests. The authorization materials used are the device bar code.</p>
    pub fn get_authentication_material(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_authentication_material()
    }
    /// <p>The type of authentication material used for device connectivity setup requests.</p>
    pub fn authentication_material_type(mut self, input: crate::types::AuthMaterialType) -> Self {
        self.inner = self.inner.authentication_material_type(input);
        self
    }
    /// <p>The type of authentication material used for device connectivity setup requests.</p>
    pub fn set_authentication_material_type(mut self, input: ::std::option::Option<crate::types::AuthMaterialType>) -> Self {
        self.inner = self.inner.set_authentication_material_type(input);
        self
    }
    /// <p>The type of authentication material used for device connectivity setup requests.</p>
    pub fn get_authentication_material_type(&self) -> &::std::option::Option<crate::types::AuthMaterialType> {
        self.inner.get_authentication_material_type()
    }
    /// <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 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 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 capability schemas that define the functionality and features supported by the managed thing, including device capabilities and their associated properties.</p>
    pub fn capability_schemas(mut self, input: crate::types::CapabilitySchemaItem) -> Self {
        self.inner = self.inner.capability_schemas(input);
        self
    }
    /// <p>The capability schemas that define the functionality and features supported by the managed thing, including device capabilities and their associated properties.</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 capability schemas that define the functionality and features supported by the managed thing, including device capabilities and their associated properties.</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>
    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>
    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>
    pub fn get_capabilities(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_capabilities()
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// <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()
    }
    ///
    /// Adds a key-value pair to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A set of key/value pairs that are used to manage the managed thing.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// <p>A set of key/value pairs that are used to manage the managed thing.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// <p>A set of key/value pairs that are used to manage the managed thing.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    ///
    /// 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><note>
    /// <p>The <code>managedThing</code> <code>metadata</code> parameter is used for associating attributes with a <code>managedThing</code> that can be used for grouping over-the-air (OTA) tasks. Name value pairs in <code>metadata</code> can be used in the <code>OtaTargetQueryString</code> parameter for the <code>CreateOtaTask</code> API operation.</p>
    /// </note>
    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><note>
    /// <p>The <code>managedThing</code> <code>metadata</code> parameter is used for associating attributes with a <code>managedThing</code> that can be used for grouping over-the-air (OTA) tasks. Name value pairs in <code>metadata</code> can be used in the <code>OtaTargetQueryString</code> parameter for the <code>CreateOtaTask</code> API operation.</p>
    /// </note>
    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><note>
    /// <p>The <code>managedThing</code> <code>metadata</code> parameter is used for associating attributes with a <code>managedThing</code> that can be used for grouping over-the-air (OTA) tasks. Name value pairs in <code>metadata</code> can be used in the <code>OtaTargetQueryString</code> parameter for the <code>CreateOtaTask</code> API operation.</p>
    /// </note>
    pub fn get_meta_data(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_meta_data()
    }
}