#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDeviceOutput {
#[doc(hidden)]
pub device_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub device_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub device_fleet_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub iot_thing_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub registration_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub latest_heartbeat: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub models: std::option::Option<std::vec::Vec<crate::types::EdgeModel>>,
#[doc(hidden)]
pub max_models: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub agent_version: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl DescribeDeviceOutput {
pub fn device_arn(&self) -> std::option::Option<&str> {
self.device_arn.as_deref()
}
pub fn device_name(&self) -> std::option::Option<&str> {
self.device_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn device_fleet_name(&self) -> std::option::Option<&str> {
self.device_fleet_name.as_deref()
}
pub fn iot_thing_name(&self) -> std::option::Option<&str> {
self.iot_thing_name.as_deref()
}
pub fn registration_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.registration_time.as_ref()
}
pub fn latest_heartbeat(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.latest_heartbeat.as_ref()
}
pub fn models(&self) -> std::option::Option<&[crate::types::EdgeModel]> {
self.models.as_deref()
}
pub fn max_models(&self) -> i32 {
self.max_models
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn agent_version(&self) -> std::option::Option<&str> {
self.agent_version.as_deref()
}
}
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) device_arn: std::option::Option<std::string::String>,
pub(crate) device_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) device_fleet_name: std::option::Option<std::string::String>,
pub(crate) iot_thing_name: std::option::Option<std::string::String>,
pub(crate) registration_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) latest_heartbeat: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) models: std::option::Option<std::vec::Vec<crate::types::EdgeModel>>,
pub(crate) max_models: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) agent_version: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl DescribeDeviceOutputBuilder {
pub fn device_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.device_arn = Some(input.into());
self
}
pub fn set_device_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_arn = input;
self
}
pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
self.device_name = Some(input.into());
self
}
pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn device_fleet_name(mut self, input: impl Into<std::string::String>) -> Self {
self.device_fleet_name = Some(input.into());
self
}
pub fn set_device_fleet_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.device_fleet_name = input;
self
}
pub fn iot_thing_name(mut self, input: impl Into<std::string::String>) -> Self {
self.iot_thing_name = Some(input.into());
self
}
pub fn set_iot_thing_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.iot_thing_name = input;
self
}
pub fn registration_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.registration_time = Some(input);
self
}
pub fn set_registration_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.registration_time = input;
self
}
pub fn latest_heartbeat(mut self, input: aws_smithy_types::DateTime) -> Self {
self.latest_heartbeat = Some(input);
self
}
pub fn set_latest_heartbeat(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.latest_heartbeat = input;
self
}
pub fn models(mut self, input: crate::types::EdgeModel) -> Self {
let mut v = self.models.unwrap_or_default();
v.push(input);
self.models = Some(v);
self
}
pub fn set_models(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::EdgeModel>>,
) -> Self {
self.models = input;
self
}
pub fn max_models(mut self, input: i32) -> Self {
self.max_models = Some(input);
self
}
pub fn set_max_models(mut self, input: std::option::Option<i32>) -> Self {
self.max_models = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn agent_version(mut self, input: impl Into<std::string::String>) -> Self {
self.agent_version = Some(input.into());
self
}
pub fn set_agent_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.agent_version = 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 {
device_arn: self.device_arn,
device_name: self.device_name,
description: self.description,
device_fleet_name: self.device_fleet_name,
iot_thing_name: self.iot_thing_name,
registration_time: self.registration_time,
latest_heartbeat: self.latest_heartbeat,
models: self.models,
max_models: self.max_models.unwrap_or_default(),
next_token: self.next_token,
agent_version: self.agent_version,
_request_id: self._request_id,
}
}
}