#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDeviceOutput {
#[doc(hidden)]
pub last_reached_out_at: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub managed_device_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub managed_device_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub device_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub associated_with_job: std::option::Option<std::string::String>,
#[doc(hidden)]
pub device_state: std::option::Option<crate::types::UnlockState>,
#[doc(hidden)]
pub physical_network_interfaces:
std::option::Option<std::vec::Vec<crate::types::PhysicalNetworkInterface>>,
#[doc(hidden)]
pub device_capacities: std::option::Option<std::vec::Vec<crate::types::Capacity>>,
#[doc(hidden)]
pub software: std::option::Option<crate::types::SoftwareInformation>,
_request_id: Option<String>,
}
impl DescribeDeviceOutput {
pub fn last_reached_out_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_reached_out_at.as_ref()
}
pub fn last_updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated_at.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn managed_device_id(&self) -> std::option::Option<&str> {
self.managed_device_id.as_deref()
}
pub fn managed_device_arn(&self) -> std::option::Option<&str> {
self.managed_device_arn.as_deref()
}
pub fn device_type(&self) -> std::option::Option<&str> {
self.device_type.as_deref()
}
pub fn associated_with_job(&self) -> std::option::Option<&str> {
self.associated_with_job.as_deref()
}
pub fn device_state(&self) -> std::option::Option<&crate::types::UnlockState> {
self.device_state.as_ref()
}
pub fn physical_network_interfaces(
&self,
) -> std::option::Option<&[crate::types::PhysicalNetworkInterface]> {
self.physical_network_interfaces.as_deref()
}
pub fn device_capacities(&self) -> std::option::Option<&[crate::types::Capacity]> {
self.device_capacities.as_deref()
}
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 {
pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
}
}
#[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 {
pub fn last_reached_out_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_reached_out_at = Some(input);
self
}
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
}
pub fn last_updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated_at = Some(input);
self
}
pub fn set_last_updated_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_updated_at = input;
self
}
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
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn managed_device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.managed_device_id = Some(input.into());
self
}
pub fn set_managed_device_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.managed_device_id = input;
self
}
pub fn managed_device_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.managed_device_arn = Some(input.into());
self
}
pub fn set_managed_device_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.managed_device_arn = input;
self
}
pub fn device_type(mut self, input: impl Into<std::string::String>) -> Self {
self.device_type = Some(input.into());
self
}
pub fn set_device_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_type = input;
self
}
pub fn associated_with_job(mut self, input: impl Into<std::string::String>) -> Self {
self.associated_with_job = Some(input.into());
self
}
pub fn set_associated_with_job(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.associated_with_job = input;
self
}
pub fn device_state(mut self, input: crate::types::UnlockState) -> Self {
self.device_state = Some(input);
self
}
pub fn set_device_state(
mut self,
input: std::option::Option<crate::types::UnlockState>,
) -> Self {
self.device_state = input;
self
}
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
}
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
}
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
}
pub fn set_device_capacities(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Capacity>>,
) -> Self {
self.device_capacities = input;
self
}
pub fn software(mut self, input: crate::types::SoftwareInformation) -> Self {
self.software = Some(input);
self
}
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
}
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,
}
}
}