#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDeviceOutput {
pub last_reached_out_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub managed_device_id: ::std::option::Option<::std::string::String>,
pub managed_device_arn: ::std::option::Option<::std::string::String>,
pub device_type: ::std::option::Option<::std::string::String>,
pub associated_with_job: ::std::option::Option<::std::string::String>,
pub device_state: ::std::option::Option<crate::types::UnlockState>,
pub physical_network_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalNetworkInterface>>,
pub device_capacities: ::std::option::Option<::std::vec::Vec<crate::types::Capacity>>,
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) -> &[crate::types::PhysicalNetworkInterface] {
self.physical_network_interfaces.as_deref().unwrap_or_default()
}
pub fn device_capacities(&self) -> &[crate::types::Capacity] {
self.device_capacities.as_deref().unwrap_or_default()
}
pub fn software(&self) -> ::std::option::Option<&crate::types::SoftwareInformation> {
self.software.as_ref()
}
}
impl ::aws_types::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()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 = ::std::option::Option::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 get_last_reached_out_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_reached_out_at
}
pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_at = ::std::option::Option::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 get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_at
}
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
}
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 get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn managed_device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.managed_device_id = ::std::option::Option::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 get_managed_device_id(&self) -> &::std::option::Option<::std::string::String> {
&self.managed_device_id
}
pub fn managed_device_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.managed_device_arn = ::std::option::Option::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 get_managed_device_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.managed_device_arn
}
pub fn device_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.device_type = ::std::option::Option::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 get_device_type(&self) -> &::std::option::Option<::std::string::String> {
&self.device_type
}
pub fn associated_with_job(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.associated_with_job = ::std::option::Option::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 get_associated_with_job(&self) -> &::std::option::Option<::std::string::String> {
&self.associated_with_job
}
pub fn device_state(mut self, input: crate::types::UnlockState) -> Self {
self.device_state = ::std::option::Option::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 get_device_state(&self) -> &::std::option::Option<crate::types::UnlockState> {
&self.device_state
}
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 = ::std::option::Option::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 get_physical_network_interfaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PhysicalNetworkInterface>> {
&self.physical_network_interfaces
}
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 = ::std::option::Option::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 get_device_capacities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Capacity>> {
&self.device_capacities
}
pub fn software(mut self, input: crate::types::SoftwareInformation) -> Self {
self.software = ::std::option::Option::Some(input);
self
}
pub fn set_software(mut self, input: ::std::option::Option<crate::types::SoftwareInformation>) -> Self {
self.software = input;
self
}
pub fn get_software(&self) -> &::std::option::Option<crate::types::SoftwareInformation> {
&self.software
}
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,
}
}
}