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 GetDeviceDiscoveryOutput {
    /// <p>The id of the device discovery job request.</p>
    pub id: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the device discovery job request.</p>
    pub arn: ::std::string::String,
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery job request.</p>
    pub discovery_type: crate::types::DiscoveryType,
    /// <p>The status of the device discovery job request.</p>
    pub status: crate::types::DeviceDiscoveryStatus,
    /// <p>The timestamp value for the start time of the device discovery.</p>
    pub started_at: ::aws_smithy_types::DateTime,
    /// <p>The id of the end-user's IoT hub.</p>
    pub controller_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID tracking the current discovery process for one connector association.</p>
    #[deprecated(note = "ConnectorAssociationId has been deprecated", since = "2025-06-25")]
    pub connector_association_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the account association used for the device discovery.</p>
    pub account_association_id: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp value for the completion time of the device discovery.</p>
    pub finished_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <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>>,
    _request_id: Option<String>,
}
impl GetDeviceDiscoveryOutput {
    /// <p>The id of the device discovery job request.</p>
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the device discovery job request.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery job request.</p>
    pub fn discovery_type(&self) -> &crate::types::DiscoveryType {
        &self.discovery_type
    }
    /// <p>The status of the device discovery job request.</p>
    pub fn status(&self) -> &crate::types::DeviceDiscoveryStatus {
        &self.status
    }
    /// <p>The timestamp value for the start time of the device discovery.</p>
    pub fn started_at(&self) -> &::aws_smithy_types::DateTime {
        &self.started_at
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn controller_id(&self) -> ::std::option::Option<&str> {
        self.controller_id.as_deref()
    }
    /// <p>The ID tracking the current discovery process for one connector association.</p>
    #[deprecated(note = "ConnectorAssociationId has been deprecated", since = "2025-06-25")]
    pub fn connector_association_id(&self) -> ::std::option::Option<&str> {
        self.connector_association_id.as_deref()
    }
    /// <p>The identifier of the account association used for the device discovery.</p>
    pub fn account_association_id(&self) -> ::std::option::Option<&str> {
        self.account_association_id.as_deref()
    }
    /// <p>The timestamp value for the completion time of the device discovery.</p>
    pub fn finished_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.finished_at.as_ref()
    }
    /// <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()
    }
}
impl ::std::fmt::Debug for GetDeviceDiscoveryOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetDeviceDiscoveryOutput");
        formatter.field("id", &self.id);
        formatter.field("arn", &self.arn);
        formatter.field("discovery_type", &self.discovery_type);
        formatter.field("status", &self.status);
        formatter.field("started_at", &self.started_at);
        formatter.field("controller_id", &self.controller_id);
        formatter.field("connector_association_id", &self.connector_association_id);
        formatter.field("account_association_id", &self.account_association_id);
        formatter.field("finished_at", &self.finished_at);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetDeviceDiscoveryOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetDeviceDiscoveryOutput {
    /// Creates a new builder-style object to manufacture [`GetDeviceDiscoveryOutput`](crate::operation::get_device_discovery::GetDeviceDiscoveryOutput).
    pub fn builder() -> crate::operation::get_device_discovery::builders::GetDeviceDiscoveryOutputBuilder {
        crate::operation::get_device_discovery::builders::GetDeviceDiscoveryOutputBuilder::default()
    }
}

/// A builder for [`GetDeviceDiscoveryOutput`](crate::operation::get_device_discovery::GetDeviceDiscoveryOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetDeviceDiscoveryOutputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) discovery_type: ::std::option::Option<crate::types::DiscoveryType>,
    pub(crate) status: ::std::option::Option<crate::types::DeviceDiscoveryStatus>,
    pub(crate) started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) controller_id: ::std::option::Option<::std::string::String>,
    pub(crate) connector_association_id: ::std::option::Option<::std::string::String>,
    pub(crate) account_association_id: ::std::option::Option<::std::string::String>,
    pub(crate) finished_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl GetDeviceDiscoveryOutputBuilder {
    /// <p>The id of the device discovery job request.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The id of the device discovery job request.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The id of the device discovery job request.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The Amazon Resource Name (ARN) of the device discovery job request.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the device discovery job request.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the device discovery job request.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The discovery type supporting the type of device to be discovered in the device discovery job 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 job 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 job request.</p>
    pub fn get_discovery_type(&self) -> &::std::option::Option<crate::types::DiscoveryType> {
        &self.discovery_type
    }
    /// <p>The status of the device discovery job request.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::DeviceDiscoveryStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the device discovery job request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::DeviceDiscoveryStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the device discovery job request.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::DeviceDiscoveryStatus> {
        &self.status
    }
    /// <p>The timestamp value for the start time of the device discovery.</p>
    /// This field is required.
    pub fn started_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.started_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp value for the start time of the device discovery.</p>
    pub fn set_started_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.started_at = input;
        self
    }
    /// <p>The timestamp value for the start time of the device discovery.</p>
    pub fn get_started_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.started_at
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn controller_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.controller_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn set_controller_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.controller_id = input;
        self
    }
    /// <p>The id of the end-user's IoT hub.</p>
    pub fn get_controller_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.controller_id
    }
    /// <p>The ID tracking the current discovery process for one connector association.</p>
    #[deprecated(note = "ConnectorAssociationId has been deprecated", since = "2025-06-25")]
    pub fn connector_association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connector_association_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID tracking the current discovery process for one connector association.</p>
    #[deprecated(note = "ConnectorAssociationId has been deprecated", since = "2025-06-25")]
    pub fn set_connector_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connector_association_id = input;
        self
    }
    /// <p>The ID tracking the current discovery process for one connector association.</p>
    #[deprecated(note = "ConnectorAssociationId has been deprecated", since = "2025-06-25")]
    pub fn get_connector_association_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connector_association_id
    }
    /// <p>The identifier of the account association used for the device discovery.</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 account association used for the device discovery.</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 account association used for the device discovery.</p>
    pub fn get_account_association_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_association_id
    }
    /// <p>The timestamp value for the completion time of the device discovery.</p>
    pub fn finished_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.finished_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp value for the completion time of the device discovery.</p>
    pub fn set_finished_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.finished_at = input;
        self
    }
    /// <p>The timestamp value for the completion time of the device discovery.</p>
    pub fn get_finished_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.finished_at
    }
    /// 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
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetDeviceDiscoveryOutput`](crate::operation::get_device_discovery::GetDeviceDiscoveryOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`id`](crate::operation::get_device_discovery::builders::GetDeviceDiscoveryOutputBuilder::id)
    /// - [`arn`](crate::operation::get_device_discovery::builders::GetDeviceDiscoveryOutputBuilder::arn)
    /// - [`discovery_type`](crate::operation::get_device_discovery::builders::GetDeviceDiscoveryOutputBuilder::discovery_type)
    /// - [`status`](crate::operation::get_device_discovery::builders::GetDeviceDiscoveryOutputBuilder::status)
    /// - [`started_at`](crate::operation::get_device_discovery::builders::GetDeviceDiscoveryOutputBuilder::started_at)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_device_discovery::GetDeviceDiscoveryOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_device_discovery::GetDeviceDiscoveryOutput {
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "id",
                    "id was not specified but it is required when building GetDeviceDiscoveryOutput",
                )
            })?,
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building GetDeviceDiscoveryOutput",
                )
            })?,
            discovery_type: self.discovery_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "discovery_type",
                    "discovery_type was not specified but it is required when building GetDeviceDiscoveryOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building GetDeviceDiscoveryOutput",
                )
            })?,
            started_at: self.started_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "started_at",
                    "started_at was not specified but it is required when building GetDeviceDiscoveryOutput",
                )
            })?,
            controller_id: self.controller_id,
            connector_association_id: self.connector_association_id,
            account_association_id: self.account_association_id,
            finished_at: self.finished_at,
            tags: self.tags,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for GetDeviceDiscoveryOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetDeviceDiscoveryOutputBuilder");
        formatter.field("id", &self.id);
        formatter.field("arn", &self.arn);
        formatter.field("discovery_type", &self.discovery_type);
        formatter.field("status", &self.status);
        formatter.field("started_at", &self.started_at);
        formatter.field("controller_id", &self.controller_id);
        formatter.field("connector_association_id", &self.connector_association_id);
        formatter.field("account_association_id", &self.account_association_id);
        formatter.field("finished_at", &self.finished_at);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}