aws-sdk-snowdevicemanagement 0.26.0

AWS SDK for AWS Snow 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, std::fmt::Debug)]
pub struct DescribeDeviceOutput {
    /// <p>When the device last contacted the Amazon Web Services Cloud. Indicates that the device is online.</p>
    #[doc(hidden)]
    pub last_reached_out_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>When the device last pushed an update to the Amazon Web Services Cloud. Indicates when the device cache was refreshed.</p>
    #[doc(hidden)]
    pub last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment. </p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The ID of the device that you checked the information for.</p>
    #[doc(hidden)]
    pub managed_device_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    #[doc(hidden)]
    pub managed_device_arn: std::option::Option<std::string::String>,
    /// <p>The type of Amazon Web Services Snow Family device.</p>
    #[doc(hidden)]
    pub device_type: std::option::Option<std::string::String>,
    /// <p>The ID of the job used when ordering the device.</p>
    #[doc(hidden)]
    pub associated_with_job: std::option::Option<std::string::String>,
    /// <p>The current state of the device.</p>
    #[doc(hidden)]
    pub device_state: std::option::Option<crate::types::UnlockState>,
    /// <p>The network interfaces available on the device.</p>
    #[doc(hidden)]
    pub physical_network_interfaces:
        std::option::Option<std::vec::Vec<crate::types::PhysicalNetworkInterface>>,
    /// <p>The hardware specifications of the device. </p>
    #[doc(hidden)]
    pub device_capacities: std::option::Option<std::vec::Vec<crate::types::Capacity>>,
    /// <p>The software installed on the device.</p>
    #[doc(hidden)]
    pub software: std::option::Option<crate::types::SoftwareInformation>,
    _request_id: Option<String>,
}
impl DescribeDeviceOutput {
    /// <p>When the device last contacted the Amazon Web Services Cloud. Indicates that the device is online.</p>
    pub fn last_reached_out_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_reached_out_at.as_ref()
    }
    /// <p>When the device last pushed an update to the Amazon Web Services Cloud. Indicates when the device cache was refreshed.</p>
    pub fn last_updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_updated_at.as_ref()
    }
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment. </p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The ID of the device that you checked the information for.</p>
    pub fn managed_device_id(&self) -> std::option::Option<&str> {
        self.managed_device_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn managed_device_arn(&self) -> std::option::Option<&str> {
        self.managed_device_arn.as_deref()
    }
    /// <p>The type of Amazon Web Services Snow Family device.</p>
    pub fn device_type(&self) -> std::option::Option<&str> {
        self.device_type.as_deref()
    }
    /// <p>The ID of the job used when ordering the device.</p>
    pub fn associated_with_job(&self) -> std::option::Option<&str> {
        self.associated_with_job.as_deref()
    }
    /// <p>The current state of the device.</p>
    pub fn device_state(&self) -> std::option::Option<&crate::types::UnlockState> {
        self.device_state.as_ref()
    }
    /// <p>The network interfaces available on the device.</p>
    pub fn physical_network_interfaces(
        &self,
    ) -> std::option::Option<&[crate::types::PhysicalNetworkInterface]> {
        self.physical_network_interfaces.as_deref()
    }
    /// <p>The hardware specifications of the device. </p>
    pub fn device_capacities(&self) -> std::option::Option<&[crate::types::Capacity]> {
        self.device_capacities.as_deref()
    }
    /// <p>The software installed on the device.</p>
    pub fn software(&self) -> std::option::Option<&crate::types::SoftwareInformation> {
        self.software.as_ref()
    }
}
impl aws_http::request_id::RequestId for DescribeDeviceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeDeviceOutput {
    /// Creates a new builder-style object to manufacture [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
    pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
        crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
    }
}

/// A builder for [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeDeviceOutputBuilder {
    pub(crate) last_reached_out_at: std::option::Option<aws_smithy_types::DateTime>,
    pub(crate) last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
    pub(crate) tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    pub(crate) managed_device_id: std::option::Option<std::string::String>,
    pub(crate) managed_device_arn: std::option::Option<std::string::String>,
    pub(crate) device_type: std::option::Option<std::string::String>,
    pub(crate) associated_with_job: std::option::Option<std::string::String>,
    pub(crate) device_state: std::option::Option<crate::types::UnlockState>,
    pub(crate) physical_network_interfaces:
        std::option::Option<std::vec::Vec<crate::types::PhysicalNetworkInterface>>,
    pub(crate) device_capacities: std::option::Option<std::vec::Vec<crate::types::Capacity>>,
    pub(crate) software: std::option::Option<crate::types::SoftwareInformation>,
    _request_id: Option<String>,
}
impl DescribeDeviceOutputBuilder {
    /// <p>When the device last contacted the Amazon Web Services Cloud. Indicates that the device is online.</p>
    pub fn last_reached_out_at(mut self, input: aws_smithy_types::DateTime) -> Self {
        self.last_reached_out_at = Some(input);
        self
    }
    /// <p>When the device last contacted the Amazon Web Services Cloud. Indicates that the device is online.</p>
    pub fn set_last_reached_out_at(
        mut self,
        input: std::option::Option<aws_smithy_types::DateTime>,
    ) -> Self {
        self.last_reached_out_at = input;
        self
    }
    /// <p>When the device last pushed an update to the Amazon Web Services Cloud. Indicates when the device cache was refreshed.</p>
    pub fn last_updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
        self.last_updated_at = Some(input);
        self
    }
    /// <p>When the device last pushed an update to the Amazon Web Services Cloud. Indicates when the device cache was refreshed.</p>
    pub fn set_last_updated_at(
        mut self,
        input: std::option::Option<aws_smithy_types::DateTime>,
    ) -> Self {
        self.last_updated_at = input;
        self
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment. </p>
    pub fn tags(
        mut self,
        k: impl Into<std::string::String>,
        v: impl Into<std::string::String>,
    ) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = Some(hash_map);
        self
    }
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment. </p>
    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>The ID of the device that you checked the information for.</p>
    pub fn managed_device_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.managed_device_id = Some(input.into());
        self
    }
    /// <p>The ID of the device that you checked the information for.</p>
    pub fn set_managed_device_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.managed_device_id = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn managed_device_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.managed_device_arn = Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn set_managed_device_arn(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.managed_device_arn = input;
        self
    }
    /// <p>The type of Amazon Web Services Snow Family device.</p>
    pub fn device_type(mut self, input: impl Into<std::string::String>) -> Self {
        self.device_type = Some(input.into());
        self
    }
    /// <p>The type of Amazon Web Services Snow Family device.</p>
    pub fn set_device_type(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.device_type = input;
        self
    }
    /// <p>The ID of the job used when ordering the device.</p>
    pub fn associated_with_job(mut self, input: impl Into<std::string::String>) -> Self {
        self.associated_with_job = Some(input.into());
        self
    }
    /// <p>The ID of the job used when ordering the device.</p>
    pub fn set_associated_with_job(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.associated_with_job = input;
        self
    }
    /// <p>The current state of the device.</p>
    pub fn device_state(mut self, input: crate::types::UnlockState) -> Self {
        self.device_state = Some(input);
        self
    }
    /// <p>The current state of the device.</p>
    pub fn set_device_state(
        mut self,
        input: std::option::Option<crate::types::UnlockState>,
    ) -> Self {
        self.device_state = input;
        self
    }
    /// Appends an item to `physical_network_interfaces`.
    ///
    /// To override the contents of this collection use [`set_physical_network_interfaces`](Self::set_physical_network_interfaces).
    ///
    /// <p>The network interfaces available on the device.</p>
    pub fn physical_network_interfaces(
        mut self,
        input: crate::types::PhysicalNetworkInterface,
    ) -> Self {
        let mut v = self.physical_network_interfaces.unwrap_or_default();
        v.push(input);
        self.physical_network_interfaces = Some(v);
        self
    }
    /// <p>The network interfaces available on the device.</p>
    pub fn set_physical_network_interfaces(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::PhysicalNetworkInterface>>,
    ) -> Self {
        self.physical_network_interfaces = input;
        self
    }
    /// Appends an item to `device_capacities`.
    ///
    /// To override the contents of this collection use [`set_device_capacities`](Self::set_device_capacities).
    ///
    /// <p>The hardware specifications of the device. </p>
    pub fn device_capacities(mut self, input: crate::types::Capacity) -> Self {
        let mut v = self.device_capacities.unwrap_or_default();
        v.push(input);
        self.device_capacities = Some(v);
        self
    }
    /// <p>The hardware specifications of the device. </p>
    pub fn set_device_capacities(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Capacity>>,
    ) -> Self {
        self.device_capacities = input;
        self
    }
    /// <p>The software installed on the device.</p>
    pub fn software(mut self, input: crate::types::SoftwareInformation) -> Self {
        self.software = Some(input);
        self
    }
    /// <p>The software installed on the device.</p>
    pub fn set_software(
        mut self,
        input: std::option::Option<crate::types::SoftwareInformation>,
    ) -> Self {
        self.software = input;
        self
    }
    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 [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
    pub fn build(self) -> crate::operation::describe_device::DescribeDeviceOutput {
        crate::operation::describe_device::DescribeDeviceOutput {
            last_reached_out_at: self.last_reached_out_at,
            last_updated_at: self.last_updated_at,
            tags: self.tags,
            managed_device_id: self.managed_device_id,
            managed_device_arn: self.managed_device_arn,
            device_type: self.device_type,
            associated_with_job: self.associated_with_job,
            device_state: self.device_state,
            physical_network_interfaces: self.physical_network_interfaces,
            device_capacities: self.device_capacities,
            software: self.software,
            _request_id: self._request_id,
        }
    }
}