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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateManagedThingInput {
    /// <p>The id of the managed thing.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>Owner of the device, usually an indication of whom the device belongs to. This value should not contain personal identifiable information.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the credential for the managed thing.</p>
    pub credential_locker_id: ::std::option::Option<::std::string::String>,
    /// <p>The serial number of the device.</p>
    pub serial_number: ::std::option::Option<::std::string::String>,
    /// <p>The Wi-Fi Simple Setup configuration for the managed thing, which defines provisioning capabilities and timeout settings.</p>
    pub wi_fi_simple_setup_configuration: ::std::option::Option<crate::types::WiFiSimpleSetupConfiguration>,
    /// <p>The brand of the device.</p>
    pub brand: ::std::option::Option<::std::string::String>,
    /// <p>The model of the device.</p>
    pub model: ::std::option::Option<::std::string::String>,
    /// <p>The name of the managed thing representing the physical device.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A report of the capabilities for the managed thing.</p>
    pub capability_report: ::std::option::Option<crate::types::CapabilityReport>,
    /// <p>The updated capability schemas that define the functionality and features supported by the managed thing.</p>
    pub capability_schemas: ::std::option::Option<::std::vec::Vec<crate::types::CapabilitySchemaItem>>,
    /// <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 capabilities: ::std::option::Option<::std::string::String>,
    /// <p>The classification of the managed thing such as light bulb or thermostat.</p>
    pub classification: ::std::option::Option<::std::string::String>,
    /// <p>The network mode for the hub-connected device.</p>
    pub hub_network_mode: ::std::option::Option<crate::types::HubNetworkMode>,
    /// <p>The metadata for the managed thing.</p>
    pub meta_data: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdateManagedThingInput {
    /// <p>The id of the managed thing.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>The identifier of the credential for the managed thing.</p>
    pub fn credential_locker_id(&self) -> ::std::option::Option<&str> {
        self.credential_locker_id.as_deref()
    }
    /// <p>The serial number of the device.</p>
    pub fn serial_number(&self) -> ::std::option::Option<&str> {
        self.serial_number.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&crate::types::WiFiSimpleSetupConfiguration> {
        self.wi_fi_simple_setup_configuration.as_ref()
    }
    /// <p>The brand of the device.</p>
    pub fn brand(&self) -> ::std::option::Option<&str> {
        self.brand.as_deref()
    }
    /// <p>The model of the device.</p>
    pub fn model(&self) -> ::std::option::Option<&str> {
        self.model.as_deref()
    }
    /// <p>The name of the managed thing representing the physical device.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A report of the capabilities for the managed thing.</p>
    pub fn capability_report(&self) -> ::std::option::Option<&crate::types::CapabilityReport> {
        self.capability_report.as_ref()
    }
    /// <p>The updated capability schemas that define the functionality and features supported by the managed thing.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capability_schemas.is_none()`.
    pub fn capability_schemas(&self) -> &[crate::types::CapabilitySchemaItem] {
        self.capability_schemas.as_deref().unwrap_or_default()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.capabilities.as_deref()
    }
    /// <p>The classification of the managed thing such as light bulb or thermostat.</p>
    pub fn classification(&self) -> ::std::option::Option<&str> {
        self.classification.as_deref()
    }
    /// <p>The network mode for the hub-connected device.</p>
    pub fn hub_network_mode(&self) -> ::std::option::Option<&crate::types::HubNetworkMode> {
        self.hub_network_mode.as_ref()
    }
    /// <p>The metadata for the managed thing.</p>
    pub fn meta_data(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.meta_data.as_ref()
    }
}
impl ::std::fmt::Debug for UpdateManagedThingInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateManagedThingInput");
        formatter.field("identifier", &self.identifier);
        formatter.field("owner", &"*** Sensitive Data Redacted ***");
        formatter.field("credential_locker_id", &self.credential_locker_id);
        formatter.field("serial_number", &"*** Sensitive Data Redacted ***");
        formatter.field("wi_fi_simple_setup_configuration", &self.wi_fi_simple_setup_configuration);
        formatter.field("brand", &"*** Sensitive Data Redacted ***");
        formatter.field("model", &"*** Sensitive Data Redacted ***");
        formatter.field("name", &self.name);
        formatter.field("capability_report", &self.capability_report);
        formatter.field("capability_schemas", &self.capability_schemas);
        formatter.field("capabilities", &self.capabilities);
        formatter.field("classification", &"*** Sensitive Data Redacted ***");
        formatter.field("hub_network_mode", &self.hub_network_mode);
        formatter.field("meta_data", &self.meta_data);
        formatter.finish()
    }
}
impl UpdateManagedThingInput {
    /// Creates a new builder-style object to manufacture [`UpdateManagedThingInput`](crate::operation::update_managed_thing::UpdateManagedThingInput).
    pub fn builder() -> crate::operation::update_managed_thing::builders::UpdateManagedThingInputBuilder {
        crate::operation::update_managed_thing::builders::UpdateManagedThingInputBuilder::default()
    }
}

/// A builder for [`UpdateManagedThingInput`](crate::operation::update_managed_thing::UpdateManagedThingInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateManagedThingInputBuilder {
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) credential_locker_id: ::std::option::Option<::std::string::String>,
    pub(crate) serial_number: ::std::option::Option<::std::string::String>,
    pub(crate) wi_fi_simple_setup_configuration: ::std::option::Option<crate::types::WiFiSimpleSetupConfiguration>,
    pub(crate) brand: ::std::option::Option<::std::string::String>,
    pub(crate) model: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) capability_report: ::std::option::Option<crate::types::CapabilityReport>,
    pub(crate) capability_schemas: ::std::option::Option<::std::vec::Vec<crate::types::CapabilitySchemaItem>>,
    pub(crate) capabilities: ::std::option::Option<::std::string::String>,
    pub(crate) classification: ::std::option::Option<::std::string::String>,
    pub(crate) hub_network_mode: ::std::option::Option<crate::types::HubNetworkMode>,
    pub(crate) meta_data: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdateManagedThingInputBuilder {
    /// <p>The id of the managed thing.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(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.identifier = input;
        self
    }
    /// <p>The id of the managed thing.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.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.owner = ::std::option::Option::Some(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.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.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.credential_locker_id = ::std::option::Option::Some(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.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.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.serial_number = ::std::option::Option::Some(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.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.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.wi_fi_simple_setup_configuration = ::std::option::Option::Some(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.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.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.brand = ::std::option::Option::Some(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.brand = input;
        self
    }
    /// <p>The brand of the device.</p>
    pub fn get_brand(&self) -> &::std::option::Option<::std::string::String> {
        &self.brand
    }
    /// <p>The model of the device.</p>
    pub fn model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model = ::std::option::Option::Some(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.model = input;
        self
    }
    /// <p>The model of the device.</p>
    pub fn get_model(&self) -> &::std::option::Option<::std::string::String> {
        &self.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.name = ::std::option::Option::Some(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.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.name
    }
    /// <p>A report of the capabilities for the managed thing.</p>
    pub fn capability_report(mut self, input: crate::types::CapabilityReport) -> Self {
        self.capability_report = ::std::option::Option::Some(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.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.capability_report
    }
    /// Appends an item to `capability_schemas`.
    ///
    /// 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 {
        let mut v = self.capability_schemas.unwrap_or_default();
        v.push(input);
        self.capability_schemas = ::std::option::Option::Some(v);
        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.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.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.capabilities = ::std::option::Option::Some(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.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.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.classification = ::std::option::Option::Some(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.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.classification
    }
    /// <p>The network mode for the hub-connected device.</p>
    pub fn hub_network_mode(mut self, input: crate::types::HubNetworkMode) -> Self {
        self.hub_network_mode = ::std::option::Option::Some(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.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.hub_network_mode
    }
    /// Adds a key-value pair to `meta_data`.
    ///
    /// 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 {
        let mut hash_map = self.meta_data.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.meta_data = ::std::option::Option::Some(hash_map);
        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.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.meta_data
    }
    /// Consumes the builder and constructs a [`UpdateManagedThingInput`](crate::operation::update_managed_thing::UpdateManagedThingInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_managed_thing::UpdateManagedThingInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_managed_thing::UpdateManagedThingInput {
            identifier: self.identifier,
            owner: self.owner,
            credential_locker_id: self.credential_locker_id,
            serial_number: self.serial_number,
            wi_fi_simple_setup_configuration: self.wi_fi_simple_setup_configuration,
            brand: self.brand,
            model: self.model,
            name: self.name,
            capability_report: self.capability_report,
            capability_schemas: self.capability_schemas,
            capabilities: self.capabilities,
            classification: self.classification,
            hub_network_mode: self.hub_network_mode,
            meta_data: self.meta_data,
        })
    }
}
impl ::std::fmt::Debug for UpdateManagedThingInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateManagedThingInputBuilder");
        formatter.field("identifier", &self.identifier);
        formatter.field("owner", &"*** Sensitive Data Redacted ***");
        formatter.field("credential_locker_id", &self.credential_locker_id);
        formatter.field("serial_number", &"*** Sensitive Data Redacted ***");
        formatter.field("wi_fi_simple_setup_configuration", &self.wi_fi_simple_setup_configuration);
        formatter.field("brand", &"*** Sensitive Data Redacted ***");
        formatter.field("model", &"*** Sensitive Data Redacted ***");
        formatter.field("name", &self.name);
        formatter.field("capability_report", &self.capability_report);
        formatter.field("capability_schemas", &self.capability_schemas);
        formatter.field("capabilities", &self.capabilities);
        formatter.field("classification", &"*** Sensitive Data Redacted ***");
        formatter.field("hub_network_mode", &self.hub_network_mode);
        formatter.field("meta_data", &self.meta_data);
        formatter.finish()
    }
}