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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct StartDeviceDiscoveryInput {
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery task request.</p>
    pub discovery_type: ::std::option::Option<crate::types::DiscoveryType>,
    /// <p>Additional protocol-specific details required for device discovery, which vary based on the discovery type.</p><note>
    /// <p>For a <code>DiscoveryType</code> of <code>CUSTOM</code>, the string-to-string map must have a key value of <code>Name</code> set to a non-empty-string.</p>
    /// </note>
    pub custom_protocol_detail: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The id of the end-user's IoT hub.</p>
    pub controller_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The id of the connector association.</p>
    #[deprecated(note = "ConnectorAssociationIdentifier is deprecated", since = "06-25-2025")]
    pub connector_association_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the cloud-to-cloud account association to use for discovery of third-party devices.</p>
    pub account_association_id: ::std::option::Option<::std::string::String>,
    /// <p>The authentication material required to start the local device discovery job request.</p>
    pub authentication_material: ::std::option::Option<::std::string::String>,
    /// <p>The type of authentication material used for device discovery jobs.</p>
    pub authentication_material_type: ::std::option::Option<crate::types::DiscoveryAuthMaterialType>,
    /// <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 client_token: ::std::option::Option<::std::string::String>,
    /// <p>A set of key/value pairs that are used to manage the device discovery request.</p>
    #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Used as a filter for PLA discoveries.</p>
    pub connector_device_id_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The protocol type for capability rediscovery (ZWAVE, ZIGBEE, or CUSTOM).</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub protocol: ::std::option::Option<crate::types::ProtocolType>,
    /// <p>The unique id of the end device for capability rediscovery.</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub end_device_identifier: ::std::option::Option<::std::string::String>,
}
impl StartDeviceDiscoveryInput {
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery task request.</p>
    pub fn discovery_type(&self) -> ::std::option::Option<&crate::types::DiscoveryType> {
        self.discovery_type.as_ref()
    }
    /// <p>Additional protocol-specific details required for device discovery, which vary based on the discovery type.</p><note>
    /// <p>For a <code>DiscoveryType</code> of <code>CUSTOM</code>, the string-to-string map must have a key value of <code>Name</code> set to a non-empty-string.</p>
    /// </note>
    pub fn custom_protocol_detail(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.custom_protocol_detail.as_ref()
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn controller_identifier(&self) -> ::std::option::Option<&str> {
        self.controller_identifier.as_deref()
    }
    /// <p>The id of the connector association.</p>
    #[deprecated(note = "ConnectorAssociationIdentifier is deprecated", since = "06-25-2025")]
    pub fn connector_association_identifier(&self) -> ::std::option::Option<&str> {
        self.connector_association_identifier.as_deref()
    }
    /// <p>The identifier of the cloud-to-cloud account association to use for discovery of third-party devices.</p>
    pub fn account_association_id(&self) -> ::std::option::Option<&str> {
        self.account_association_id.as_deref()
    }
    /// <p>The authentication material required to start the local device discovery job request.</p>
    pub fn authentication_material(&self) -> ::std::option::Option<&str> {
        self.authentication_material.as_deref()
    }
    /// <p>The type of authentication material used for device discovery jobs.</p>
    pub fn authentication_material_type(&self) -> ::std::option::Option<&crate::types::DiscoveryAuthMaterialType> {
        self.authentication_material_type.as_ref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>A set of key/value pairs that are used to manage the device discovery request.</p>
    #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Used as a filter for PLA discoveries.</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 `.connector_device_id_list.is_none()`.
    pub fn connector_device_id_list(&self) -> &[::std::string::String] {
        self.connector_device_id_list.as_deref().unwrap_or_default()
    }
    /// <p>The protocol type for capability rediscovery (ZWAVE, ZIGBEE, or CUSTOM).</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn protocol(&self) -> ::std::option::Option<&crate::types::ProtocolType> {
        self.protocol.as_ref()
    }
    /// <p>The unique id of the end device for capability rediscovery.</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn end_device_identifier(&self) -> ::std::option::Option<&str> {
        self.end_device_identifier.as_deref()
    }
}
impl ::std::fmt::Debug for StartDeviceDiscoveryInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartDeviceDiscoveryInput");
        formatter.field("discovery_type", &self.discovery_type);
        formatter.field("custom_protocol_detail", &self.custom_protocol_detail);
        formatter.field("controller_identifier", &self.controller_identifier);
        formatter.field("connector_association_identifier", &self.connector_association_identifier);
        formatter.field("account_association_id", &self.account_association_id);
        formatter.field("authentication_material", &"*** Sensitive Data Redacted ***");
        formatter.field("authentication_material_type", &self.authentication_material_type);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("connector_device_id_list", &"*** Sensitive Data Redacted ***");
        formatter.field("protocol", &self.protocol);
        formatter.field("end_device_identifier", &self.end_device_identifier);
        formatter.finish()
    }
}
impl StartDeviceDiscoveryInput {
    /// Creates a new builder-style object to manufacture [`StartDeviceDiscoveryInput`](crate::operation::start_device_discovery::StartDeviceDiscoveryInput).
    pub fn builder() -> crate::operation::start_device_discovery::builders::StartDeviceDiscoveryInputBuilder {
        crate::operation::start_device_discovery::builders::StartDeviceDiscoveryInputBuilder::default()
    }
}

/// A builder for [`StartDeviceDiscoveryInput`](crate::operation::start_device_discovery::StartDeviceDiscoveryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartDeviceDiscoveryInputBuilder {
    pub(crate) discovery_type: ::std::option::Option<crate::types::DiscoveryType>,
    pub(crate) custom_protocol_detail: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) controller_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) connector_association_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) account_association_id: ::std::option::Option<::std::string::String>,
    pub(crate) authentication_material: ::std::option::Option<::std::string::String>,
    pub(crate) authentication_material_type: ::std::option::Option<crate::types::DiscoveryAuthMaterialType>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) connector_device_id_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) protocol: ::std::option::Option<crate::types::ProtocolType>,
    pub(crate) end_device_identifier: ::std::option::Option<::std::string::String>,
}
impl StartDeviceDiscoveryInputBuilder {
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery task request.</p>
    /// This field is required.
    pub fn discovery_type(mut self, input: crate::types::DiscoveryType) -> Self {
        self.discovery_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery task request.</p>
    pub fn set_discovery_type(mut self, input: ::std::option::Option<crate::types::DiscoveryType>) -> Self {
        self.discovery_type = input;
        self
    }
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery task request.</p>
    pub fn get_discovery_type(&self) -> &::std::option::Option<crate::types::DiscoveryType> {
        &self.discovery_type
    }
    /// Adds a key-value pair to `custom_protocol_detail`.
    ///
    /// To override the contents of this collection use [`set_custom_protocol_detail`](Self::set_custom_protocol_detail).
    ///
    /// <p>Additional protocol-specific details required for device discovery, which vary based on the discovery type.</p><note>
    /// <p>For a <code>DiscoveryType</code> of <code>CUSTOM</code>, the string-to-string map must have a key value of <code>Name</code> set to a non-empty-string.</p>
    /// </note>
    pub fn custom_protocol_detail(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.custom_protocol_detail.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.custom_protocol_detail = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Additional protocol-specific details required for device discovery, which vary based on the discovery type.</p><note>
    /// <p>For a <code>DiscoveryType</code> of <code>CUSTOM</code>, the string-to-string map must have a key value of <code>Name</code> set to a non-empty-string.</p>
    /// </note>
    pub fn set_custom_protocol_detail(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.custom_protocol_detail = input;
        self
    }
    /// <p>Additional protocol-specific details required for device discovery, which vary based on the discovery type.</p><note>
    /// <p>For a <code>DiscoveryType</code> of <code>CUSTOM</code>, the string-to-string map must have a key value of <code>Name</code> set to a non-empty-string.</p>
    /// </note>
    pub fn get_custom_protocol_detail(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.custom_protocol_detail
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn controller_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.controller_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn set_controller_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.controller_identifier = input;
        self
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn get_controller_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.controller_identifier
    }
    /// <p>The id of the connector association.</p>
    #[deprecated(note = "ConnectorAssociationIdentifier is deprecated", since = "06-25-2025")]
    pub fn connector_association_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connector_association_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The id of the connector association.</p>
    #[deprecated(note = "ConnectorAssociationIdentifier is deprecated", since = "06-25-2025")]
    pub fn set_connector_association_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connector_association_identifier = input;
        self
    }
    /// <p>The id of the connector association.</p>
    #[deprecated(note = "ConnectorAssociationIdentifier is deprecated", since = "06-25-2025")]
    pub fn get_connector_association_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.connector_association_identifier
    }
    /// <p>The identifier of the cloud-to-cloud account association to use for discovery of third-party devices.</p>
    pub fn account_association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_association_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the cloud-to-cloud account association to use for discovery of third-party devices.</p>
    pub fn set_account_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_association_id = input;
        self
    }
    /// <p>The identifier of the cloud-to-cloud account association to use for discovery of third-party devices.</p>
    pub fn get_account_association_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_association_id
    }
    /// <p>The authentication material required to start the local device discovery job request.</p>
    pub fn authentication_material(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.authentication_material = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The authentication material required to start the local device discovery job request.</p>
    pub fn set_authentication_material(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.authentication_material = input;
        self
    }
    /// <p>The authentication material required to start the local device discovery job request.</p>
    pub fn get_authentication_material(&self) -> &::std::option::Option<::std::string::String> {
        &self.authentication_material
    }
    /// <p>The type of authentication material used for device discovery jobs.</p>
    pub fn authentication_material_type(mut self, input: crate::types::DiscoveryAuthMaterialType) -> Self {
        self.authentication_material_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of authentication material used for device discovery jobs.</p>
    pub fn set_authentication_material_type(mut self, input: ::std::option::Option<crate::types::DiscoveryAuthMaterialType>) -> Self {
        self.authentication_material_type = input;
        self
    }
    /// <p>The type of authentication material used for device discovery jobs.</p>
    pub fn get_authentication_material_type(&self) -> &::std::option::Option<crate::types::DiscoveryAuthMaterialType> {
        &self.authentication_material_type
    }
    /// <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.client_token = ::std::option::Option::Some(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.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.client_token
    }
    /// 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 device discovery request.</p>
    #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A set of key/value pairs that are used to manage the device discovery request.</p>
    #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A set of key/value pairs that are used to manage the device discovery request.</p>
    #[deprecated(note = "Tags have been deprecated from this api", since = "06-25-2025")]
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Appends an item to `connector_device_id_list`.
    ///
    /// To override the contents of this collection use [`set_connector_device_id_list`](Self::set_connector_device_id_list).
    ///
    /// <p>Used as a filter for PLA discoveries.</p>
    pub fn connector_device_id_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.connector_device_id_list.unwrap_or_default();
        v.push(input.into());
        self.connector_device_id_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>Used as a filter for PLA discoveries.</p>
    pub fn set_connector_device_id_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.connector_device_id_list = input;
        self
    }
    /// <p>Used as a filter for PLA discoveries.</p>
    pub fn get_connector_device_id_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.connector_device_id_list
    }
    /// <p>The protocol type for capability rediscovery (ZWAVE, ZIGBEE, or CUSTOM).</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn protocol(mut self, input: crate::types::ProtocolType) -> Self {
        self.protocol = ::std::option::Option::Some(input);
        self
    }
    /// <p>The protocol type for capability rediscovery (ZWAVE, ZIGBEE, or CUSTOM).</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn set_protocol(mut self, input: ::std::option::Option<crate::types::ProtocolType>) -> Self {
        self.protocol = input;
        self
    }
    /// <p>The protocol type for capability rediscovery (ZWAVE, ZIGBEE, or CUSTOM).</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn get_protocol(&self) -> &::std::option::Option<crate::types::ProtocolType> {
        &self.protocol
    }
    /// <p>The unique id of the end device for capability rediscovery.</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn end_device_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.end_device_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique id of the end device for capability rediscovery.</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn set_end_device_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.end_device_identifier = input;
        self
    }
    /// <p>The unique id of the end device for capability rediscovery.</p><note>
    /// <p>This parameter is only available when the discovery type is CONTROLLER_CAPABILITY_REDISCOVERY.</p>
    /// </note>
    pub fn get_end_device_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.end_device_identifier
    }
    /// Consumes the builder and constructs a [`StartDeviceDiscoveryInput`](crate::operation::start_device_discovery::StartDeviceDiscoveryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_device_discovery::StartDeviceDiscoveryInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_device_discovery::StartDeviceDiscoveryInput {
            discovery_type: self.discovery_type,
            custom_protocol_detail: self.custom_protocol_detail,
            controller_identifier: self.controller_identifier,
            connector_association_identifier: self.connector_association_identifier,
            account_association_id: self.account_association_id,
            authentication_material: self.authentication_material,
            authentication_material_type: self.authentication_material_type,
            client_token: self.client_token,
            tags: self.tags,
            connector_device_id_list: self.connector_device_id_list,
            protocol: self.protocol,
            end_device_identifier: self.end_device_identifier,
        })
    }
}
impl ::std::fmt::Debug for StartDeviceDiscoveryInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartDeviceDiscoveryInputBuilder");
        formatter.field("discovery_type", &self.discovery_type);
        formatter.field("custom_protocol_detail", &self.custom_protocol_detail);
        formatter.field("controller_identifier", &self.controller_identifier);
        formatter.field("connector_association_identifier", &self.connector_association_identifier);
        formatter.field("account_association_id", &self.account_association_id);
        formatter.field("authentication_material", &"*** Sensitive Data Redacted ***");
        formatter.field("authentication_material_type", &self.authentication_material_type);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("connector_device_id_list", &"*** Sensitive Data Redacted ***");
        formatter.field("protocol", &self.protocol);
        formatter.field("end_device_identifier", &self.end_device_identifier);
        formatter.finish()
    }
}